web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Best Practice Needed: Add Freight Charges After Posting Sales/Purchase Invoice in Business Central

(5) ShareShare
ReportReport
Posted on by 26

Hello everyone,

I need advice on the best approach for a customization in Microsoft Dynamics 365 Business Central.

My client has a requirement to add freight charges after a Sales Order or Purchase Order has already been posted. The requirement is for both:

  • Posted Sales Invoice

  • Posted Purchase Invoice

The client does not want to add freight during Sales Order or Purchase Order creation. They also do not want to create a separate sales/purchase invoice or use a manual credit memo process.

Business Requirement

Example:

  • Original Posted Invoice Amount = ₹20

  • Freight Amount added later = ₹5

  • Final amount to be paid/received = ₹25

The client wants the user to open the already posted invoice, click an Add Freight button, enter the freight G/L account and freight amount, and then the invoice should effectively become payable/receivable for ₹25.

Later, when the user clicks a custom Make Payment button from the Posted Invoice page, the payment should be created for the total amount, including both:

  • Original invoice amount

  • Freight amount

So in this example, payment should be made for ₹25 in one go.

Required Process

The desired process is:

  1. User posts a Sales Order or Purchase Order.

  2. A Posted Sales Invoice or Posted Purchase Invoice is created.

  3. User opens the Posted Invoice.

  4. User clicks Add Freight.

  5. System validates whether payment has already been made.

  6. If payment is already completed, freight should not be allowed.

  7. If unpaid, a dialog should open with:

    • Freight G/L Account

    • Freight Amount

  8. Freight should be linked to the same posted invoice.

  9. If freight already exists, the same freight record should be updated instead of creating a duplicate.

  10. User should later click Make Payment and pay the original invoice amount plus freight amount together.

Important Business Rules

  • Freight can only be added after invoice posting.

  • Freight cannot be added after payment is completed.

  • Only one freight record should exist per invoice.

  • Existing freight should be editable before payment.

  • The final payment should include both the original invoice amount and freight amount.

  • This should work for both customer and vendor invoices.

Technical Concern

Initially, I explored directly inserting/updating records in posted tables such as:

  • Posted Sales Invoice Line

  • Posted Purchase Invoice Line

  • G/L Entry

  • Customer Ledger Entry

  • Vendor Ledger Entry

  • Detailed Customer/Vendor Ledger Entry

  • VAT Entry

However, I understand this may not be the correct or safe approach because posted invoices and ledger entries are part of the accounting/audit trail.

So I am considering another approach:

  • Add a custom Freight Adjustment Entry table.

  • When freight is added, post a linked freight adjustment using standard journal posting logic.

  • Do not directly modify original G/L Entry, Customer Ledger Entry, or Vendor Ledger Entry.

  • Link the freight ledger entry to the original posted invoice.

  • On the Posted Invoice page, show:

    • Original Invoice Amount

    • Freight Amount

    • Total Including Freight

  • During payment, use one payment journal line and apply it to both:

    • Original invoice ledger entry

    • Freight adjustment ledger entry

For example:

Component Amount
Original Invoice ₹20
Freight Adjustment ₹5
Total Payment ₹25

The payment would be applied to both ledger entries using the same Applies-to ID.

Any suggestions, best practices, or warnings would be very helpful.

Thanks in advance.

I have the same question (0)
  • Suggested answer
    Teagen Boll Profile Picture
    3,187 Super User 2026 Season 1 on at
    Im not sure I understand the logic of your clients process. A posted invoice should never be modified. This is an auditable document that shouldn't be changed. It sounds like they have drafted invoices that need to be modified at a later date in which case BC can handle that without issue.
     
    What your client should be doing is the following:
     
    1. Create PO or SO
    2. Receive PO or Ship SO
    Do not post any invoice at this point.
    3. Create an Invoice manually and use Get Receipt Lines... or Get Shipment Lines...
    Leave this invoice unposted
    4. When freight charges come in add the Item Charge for freight to that Invoice
    5. Post Invoice
    6. Manage payment using standard payment processing procedures
     
    Otherwise you would have to look at a customization and with editing posted invoices this could be quite complicated as it touches logic in many different areas of the system.
     
    You could also use that process above and with a small customization just add a "Status" tag or some other flag that shows it as "Pending" or "Waiting for Item Charge" that could even prevent posting till its changed. This would be a smaller simpler customization.
     
    Best,
    Teagen Boll, CPA
    Social: LinkedIn
     
  • Suggested answer
    AndrewThomas81 Profile Picture
    2,220 on at
    I also concur that posted documents should not be modified.
     
    Standard procedure to add freight charges would be via using item charges.
     
    Kind Regards
     
    Andrew Thomas FCCA MCP
    YouTube - Use Business Central
    LinkedIn
     
  • Suggested answer
    AndrewThomas81 Profile Picture
    2,220 on at
    Best practice is to always use standard where possible
     
    Kind Regards
     
    Andrew Thomas FCCA MCP
    YouTube - Use Business Central
    LinkedIn
     
  • Suggested answer
    YUN ZHU Profile Picture
    101,995 Super User 2026 Season 1 on at
    This customization is too risky. I suggest you create a new invoice from the code to post the item charge. Do not add it to the original invoice.
    You can click this action on an posted invoice and record the source number.
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • Suggested answer
    Assisted by AI
    OussamaSabbouh Profile Picture
    17,586 Super User 2026 Season 1 on at
    Hello,
    I would not update posted invoice lines, G/L Entries, customer/vendor ledger entries, VAT entries, etc. directly — that will break the audit trail and will be painful later. Standard BC’s idea is: once posted, you either correct/cancel the document if still possible, or post a new financial document/entry that reverses or adds the difference. For your requirement, the safest customization is close to your second approach: create a Freight Adjustment Entry table for control/linking, then post the actual freight through standard posting logic as a separate customer/vendor ledger entry, preferably via a sales/purchase invoice or journal depending on accounting/tax needs, linked back to the original posted invoice by document no./external doc/custom link. Then your custom Make Payment action can collect both open entries and apply the payment to both using the same payment/application flow. One warning: if freight has VAT/GST or must appear on statutory invoice output, a plain G/L journal may not be enough; use a proper sales/purchase document or discuss with finance/localization. Technically, the original posted invoice should remain ₹20; show “Total incl. freight ₹25” as a calculated/custom display, not by changing the posted invoice itself.
    Regards,
    Oussama Sabbouh
  • Suggested answer
    Jainam M. Kothari Profile Picture
    17,024 Super User 2026 Season 1 on at
    Hello,
     
    It is recommended to utilize the standard Business Central functionality by recording Freight Charges as a “Charge (Item)” on the Purchase Invoice, ensuring accurate cost allocation and proper distribution of additional costs to the respective items.
  • Suggested answer
    Ahmad Subhani Profile Picture
    713 on at
    Hi,
     
    This is not a Standard Way. It is not recommendable even to customize this Process.
     
    Create a New Invoice and then apply the charges to the Purchase or Sales Invoices you posted. This is the Recommendable way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,222 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,603 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,186 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans