on 2022 Feb 02 6:52 AM
Hi Experts,
I need a query where I can have an alert per document whenever the price set on the sales invoice is less than the default pricelist.(multiple pricelist of wich a specific one is assigned to the BP in Master Data)
The alert needs to pop up whenever a document matching these terms are created.
Regards
Bennie
Hi bennie1402
Try This...
SELECT T0.[Docnum],T1.[Price] as SalesPrice, T4.[Price] as Price FROM OINV T0
INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
INNER JOIN ocrd t3 on t3.cardcode=t0.cardcode
INNER JOIN ITM1 T4 ON T2.ItemCode = T4.ItemCode and t4.pricelist=t3.ListNum
WHERE T1.[Price] <> T4.[Price] and T0.docstatus = 'O'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abdul Basith
This works thanks.
It doesnt work for the alert pop up (unless im missing something)
But for a report it gives me what i need to back into historical records (although it will pull the current unit price in the pricelist and not the unit price from past date) but this is a step in the right direction.
Regards
User | Count |
---|---|
98 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
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.