TN OV Preliminar

--------------- Validación ---------------- IF (@object_type = '112')and @transaction_type in ('A') BEGIN --OV PRELIMINARES-- if (select T0.ObjType from ODRF T0 where T0.DocEntry=@list_of_cols_val_tab_del) and T0.ObjType ='17' begin if (select T0.DocType from ODRF T0 where T0.DocEntry=@list_of_cols_val_tab_del)='I' begin if exists(select 'A' from ODRF A where A.DocEntry=@list_of_cols_val_tab_del and A.DocStatus='C') begin SET @error_message = 'OV ya fue creada' SET @error = 2122 END END END END