cancel
Showing results for 
Search instead for 
Did you mean: 

Reserve invoice - block delivery unless invoice is paid

former_member459477
Participant
0 Kudos

Hello experts

What is best way to block unpaid Reserve Invoice from being copied to a Delivery Note? I don't think there is setting for this.

If Reserve invoice has some Balance Due - it should not be possible to create delivery note.

thanks for assistance,

Regards

Karen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Andrew,

Please try below Transaction Notification.

IF @transaction_type IN ('A','U') AND @object_type = '15'and @error = 0

BEGIN

IF EXISTS (SELECT T3.DocEntry FROM OINV T0

INNER JOIN INV1 T1 on T1.DocEntry=T0.DocEntry

INNER JOIN DLN1 T2 ON T2.DocEntry = T1.TrgetEntry

INNER JOIN ODLN T3 ON T3.DocEntry = T2.DocEntry

WHERE T0.DocTotal <>  T0.PaidToDate

AND T3.DocEntry = @list_of_cols_val_tab_del)

BEGIN

SELECT @Error = 10, @error_message = 'Amount is not Paid in Full So you will not able to create Delivery for this AR Reserver Invoice '

END

END

Hope this help

--

--

Regards::::

Atul Chakraborty

former_member459477
Participant
0 Kudos

Thank you Atul for your assistance

This appear to be functioning well

Regards

Karen

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Karen

You could try using the Transaction Notification SP. The Reserve Invoice has 2 statuses unlike other Marketing Documents. The DocStatus will indicate if it has been closed by payment or a credit note whilst the InvntSttus will indicate Delivery Status.

So a query against the base document to check the PaidToDate and DocStatus could be used to block the Delivery Note from being added.

There are many samples of Stored Procedures for blocking documents on this forum, so just search and let us know if you need assistance writing the SP.

Kind regards

Peter Juby