cancel
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.

Regards,

Kawish

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member583013
Active Contributor
0 Kudos

Kawish,

Right from the PLD this would not be possible to achieve as PLD is very light on such functionality to link documents. You could add a formatted search on the Invoice at the row level.

The formatted search query should take the BaseEntry column value which would contain the Sales Order DocEntry (only if the SO was copied to Invoice directly) and use this to trace all Invoices which have the same BaseEntry.

Query example

SELECT DISTINCT T0.DocNum, T0.DocTotal FROM [dbo].[OINV] T0 INNER JOIN [dbo].[INV1] T1
ON T0.DocEntry = T1.DocEntry
WHERE T1.BaseEntry = $[$38.45.Number]

The above query could return mutlple rows if more than one invoice were created for the same Sales Order

Best wishes

Suda

Former Member
0 Kudos

Logically, it would amount to creating a second original invoice of the first, which is not the usual business practice.

Are you doing this because of partial deliveries? In which case, you could create multiple delivery receipts for partial deliveries, and then consolidate them all into a single invoice, either by pulling the complete info from the sales order, or by copying from multiple delivery receipts.

But creating multiple original invoices would amount to over-invoicing. You could look into printing duplicate of the first invoice, however.

Prajwal