Skip to Content
0
Jul 05, 2016 at 06:55 AM

Project code is mandatory?

25 Views

Hi Sir,

Im getting error in this query , plz help me out,, project is mandatory for SO to AR(base entry project code)

If @object_type='13' AND @transaction_type IN ('A','U')

Begin IF exists (Select T0.Project From [dbo].[OINV] T0 INNER JOIN [dbo].[INV1] T1 ON T0.[DocEntry] = T1.[DocEntry]

Where T0.Project <>(Select T2.[Project] FROM ORDR T2 INNER JOIN RDR1 T3 ON T2.[DocEntry] = T3.[DocEntry]

Where T3.TrgetEntry=T1.DocEntry)

--inner join OUSR T3 on T3.UserSign=t0.internal_k

-- where

AND T0.UserSign2 not in ('2') and T0.DocEntry=@list_of_cols_val_tab_del)

Begin

Select @error =50001,

@error_message = 'Sales Order Branch is not equal to Invoice Branch'

End

End

inner join OUSR T1 on T0.UserSign=t1.internal_k