Skip to Content
0

Restrict Delivery if A/R Down Payment is unpaid. Query Required

Jul 14, 2017 at 06:59 AM

74

avatar image

Hello All,

I need a query to Restrict Delivery if A/R Down Payment is unpaid in SAP Business One.

SQL
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Nagarajan K Jul 15, 2017 at 02:02 PM
0

Hi,

Try this transaction notification if AR Down payment invoice not paid before creating Delivery order from Sales order,

if @object_type = '15' and (@TRANSACTION_TYPE = 'A')

begin

If exists(select T0.Baseentry from DLN1 T0 where T0.Baseentry IN (SELECT T0.Docentry FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] left join DPI1 T2 on T2.[BaseEntry] = T1.Docentry and T2.[BaseLine] = T1.[LineNum] INNER JOIN ODPI T3 ON T2.[DocEntry] = T3.[DocEntry] WHERE T3.[PaidSum] = 0) and t0.Docentry = @list_of_cols_val_tab_del )

begin

select @error = 1, @error_message = 'AR Downpayment Invoice not paid'

end

end

Regards,

Nagarajan

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Nagaranjan

0