Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8540

Re: Invoice Qty should not exceed from Sales Order Qty

$
0
0

Hi Idrees,

 

Use this for AP Invoice

 

SELECT TOP 1 @Error = -1, @error_message = 'Line ' + CONVERT(NVARCHAR(10),T0.VisOrder+1) + ' Total invoice qty exceeds base PO. '  
FROM PCH1 T0 JOIN OPCH T1 ON T0.DocEntry=T1.DocEntry  JOIN OPOR T2 ON T0.BaseType = T2.ObjType AND T0.BaseEntry = T2.DocEntry
WHERE T0.DocEntry = @list_of_cols_val_tab_del  AND T0.BaseOpnQty<T0.Quantity  AND T1.DocType = 'I'

 

Regards
Edy


Viewing all articles
Browse latest Browse all 8540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>