cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Last Purchase price in A/P and last landed cost Query

0 Likes
309

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.

 

Accepted Solutions (0)

Answers (0)