2025 Mar 19 2:09 PM - edited 2025 Mar 21 1:53 PM
Dear All,
I need a Query for the last purchase price in an A/P Invoice , A/P reserve Invoice with Docnum, docdate,Doccur, Itemcode,dscription, Quantity unitprice and UOM linked to last Landed cost with Docnum, doccur,dscription, quantity, priceFOB, TtlexpndLC and Unitmsr.
Not with a date rage. If there is no landed cost available then the landed cost value fields can be empty. Sometimes the company receives the landed cost late. Its how they work.
The reason for the A/P invoice last purchase price is because the currency in the a/p invoice is different from the Local and system currency.
PLease help!!!
This is what I have now, but I need the Last invoice created and the A/P or A/P reserve should not be canceled. And linked to the last landed cost and GRPO.
SELECT t0.docentry , T0.docdate , T1.itemcode, T1.Dscription, T1.Quantity,T0.doccur, T1.price , T1.unitmsr FROM OPCH
T0 inner join PCH1 T1 ON T0.Docentry =T1.docentry
where t1.itemcode like 'raw%' or T1.itemcode like 'pack%' and T0.canceled ='N'
I really need the experts help.
Request clarification before answering.
| User | Count |
|---|---|
| 36 | |
| 27 | |
| 21 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.