Wednesday 2 March 2016

PAN No Mandatory in AR Invoice

  If @object_type = '13' and @transaction_type in ( 'A','U')

BEGINIf exists (Select P.DocEntry From INV12 P INNER JOIN OINV R on P.DocEntry =R.DocEntry

inner join INV1 Q on P.DocEntry = Q.DocEntry

Where P.DocEntry=@list_of_cols_val_tab_del

and isnull(P.Taxid0,'') = '' and R.DocTotal >= '200000'

and Q.LineStatus = 'O'

)

Select @error = 1310001,

@error_message = 'AR Invoice Doctotal Greater than 2 Lakhs. Please set PAN No. for Customer.'

end