Editing due dates when invoicing from PO's in Dynamics NAV Classic

Good Morning!

I have an issue with not being able to modify the due dates of invoices being posted using Purchase Orders. My employer only does 2 cheque runs a week and they are on specific days. I need to be able to modify due dates of invoices to be able to make sure Vendors are being paid on time and to make sure the dates coincide with our cheque dates. The only way that I have found that you can modify the due date is when the Vendor invoice has a discount allowance that you can enter when in the F9 feild. Some of the Vendors do not offer discounts and the area for the due date is auto populated from the payment terms. Is there a work around or a way to gain access to have this area opened up for editing in the invoice tab?

Welcome to DUG!!!

You can update the due date in Vendor Ledger entry as you required .Navision not allow to change the due date on Posted Invoices.

You can check the program on Vendor Ledger entry form for modifying the due dates. There is one codeunit called on OnModify Trigger for editing the due dates.

Thank-you very much I had no idea how to open up the due dates on the Leger entry because I was locked out. This should help!

You need some code on Vendor Ledger Entry table too if you would like to show the new Due Date on the Invoice document:

Add a local record variable to Due Date - OnValidate() trigger that references to Purch. Inv. Header then paste the below code in mentioned trigger:

// check if invoice is still open


// check if due date has changed

IF “Due Date” <> xRec.“Due Date” THEN

IF “Document Type” = “Document Type”::Invoice THEN

IF _purchInvHeader.GET(“Document No.”) THEN BEGIN

_purchInvHeader.VALIDATE(“Due Date”, “Due Date”);