Restriction for GRN not to Add more than1000 in Document total
Hi Expert ,
my client is doing direct GRN and asking whenever in GRN , DocTotal is more than 1000 then it should give error that first Add Purchase Order .
what is the store Procedure .....??
Please help me Out for this .
Balaji Sampath replied
If @object_type='20' and @transaction_type in ('A','u')
If Exists (select * from PDN1 r inner join opdn r1 on r.docentry=r1.docentry
where isnull(r.Baseref,'') ='' and r1.DocType ='I' and r1.doctotal > 1000 and r1.DocEntry = @list_of_cols_val_tab_del )
Select @error = -1,
@error_message = 'GRPO without PO is not allowed'