Showing results for 
Search instead for 
Did you mean: 

Second Invoice PLD should have value of First Invoice with same SO

Former Member
0 Kudos

Hi All,

The scenerio is as such a Sales Order is created for the value of 1000. Now based on this sales order a partial invoice No 1 is created for 500. Again after somedays based on the same sales order another invoice No 2 is created for 300. Now in the Invoice No 2 prinout I want that Invoice Number 1 value which is 500 should also come.

How to achive this in PLD.



Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Kawish,

In the scenario you just described, only two invoices will be created to complete one sales order.

Could you create a UDF on the invoice header linked to the following query

SELECT  T0.DocTotal 
FROM OINV T0 INNER JOIN INV1 T1 On T0.DocEntry = T1.DocEntry
WHERE T1.BaseRef = $[$38.44.0]

refreshed on a header field that will always change once a line is entered (Doc Total for example).

This will populate the UDF with the previous amount and you just need to use that field in the PLD.

Kind regards,


TESTED IN 2007A PL44 - You could apply the same logic with the Invoice Doc Number in another UDF so you can show the first invoice price and doc number. And if you call the docnumber as well, than we can apply he logic to more than 2 invoices.