on 07-14-2017 7:59 AM
Hello All,
I need a query to Restrict Delivery if A/R Down Payment is unpaid in SAP Business One.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.