Payment Discounts but exclude freight

We have a vendor that gives us a 2% discount except for the freight on an invoice. Right now the system is taking 2% across the board. The freight is setup as a Charge(Item). Is there any way to exclude this from the discounting process? Thanks.


At this point I just made a function that scans the current payment journal:

It goes through each line, then looks for any FRT(Frieght) lines on that invoice. If so it adds back the 2% it took off on the amount. This isn’t ideal but since I don’t have a developer license I can’t modify the codeunit that determines what discount to take.

// Loop through the payment journals
PaymentJournal.SETFILTER(“Journal Template Name”,‘PAYMENTS’);
PaymentJournal.SETFILTER(“Journal Batch Name”,CurrentJnlBatchName);

// Loop through the payment invoice lines and look for freight
PurchInvoiceLine.SETFILTER(“Document No.”, PaymentJournal.“Applies-to Doc. No.”);
PurchInvoiceLine.SETFILTER(Type, ‘5’);
PurchInvoiceLine.SETFILTER(“No.”, ‘FRT’);

PaymentJournal.Amount += ROUND((PurchInvoiceLine.Amount * 0.02),0.01);
UNTIL PurchInvoiceLine.NEXT = 0;

UNTIL PaymentJournal.NEXT = 0;



Use Line Discount, not Invoice Discount, leave ChargeItem line(s) undiscounted…

updated: I wrote the above before your second post - WHY you can not enter the Invoice correctly and now need to correct something post factum?

Even in such case it is a bad idea to update data in code - normally you could simply enter a CreditMemo, if Vendor gave you discount LATER, not in original Invoice…

It isn’t an invoice discount it is a payment discount. So if we pay before X, we can take two percent off everything except Freight. It isn’t that the invoice is entered wrong, it just depends on how much we owe when we pay it. Make sense?

In such case you still can use standart Payment Discount functionality, to avoid discounting the freight you can create TWO POs, one for merchandise, another for freight, and set Payment discount along with its effective date in the first one only.

ChargeItems can be applied to another Invoice’s lines, not only the same where it sits, so no problems here. Disadvantage is, you need 2 separate POs, but otherwise everything works without modifications.

Decide yourself, what fits you better - a small additional work creating & applying charges in additional PO, or ordering modifications. Besides, mod will not be as simple as you supposed in your post, as such approach may cause problems with accurate costing. Without detailed analysis, I can’t suggest for sure, but I would look toward modifying that part in PO dealing with Payment Discount, as standart really allows only % of WHOLE Inv. amt.

The problem is we add the freight as a charge item so it effects the cost of the items. Thanks for your help!

We have a column header “Exclude from Payment Discount” that is checked for Item Charges that are not applicable for the payment discount.

What version of NAV do you have? What form/table do you see that on? Thanks.


None of Navision versions has this as standart option, Miki obviously has a modified system.