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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Line-level Sales Tax Adjustment on Purchase Order / Invoice in D365FO

(3) ShareShare
ReportReport
Posted on by 2,376

Hi Experts,

I have a requirement in Microsoft Dynamics 365 Finance & Operations related to purchase invoice posting through X++.

Scenario:

  • Purchase order contains multiple line items

  • Sales tax group is already correctly assigned at the line level

  • Invoice data is first stored in a custom table via a third-party API

  • This data is then used to post the invoice programmatically through X++

Requirement:

I need to adjust the calculated sales tax amount per line item (not at the total/document level).

For example:

  • Line 1 calculated tax = 96.512, required = 96.52

  • Line 2 calculated tax = 170.403, required = 170.41

So the requirement is to override the calculated amounts coming in from third-party API to ensure correct tax posting based on each line’s ledger configuration.

Challenge:

  • Standard functionality allows adjustment only at the total tax level, not per line

  • Since posting is done via X++ using external data, manual adjustment is not an option

  • Line-level rounding/override of tax amounts does not seem to be supported out of the box

Question:

  • Is it possible in standard D365FO to adjust/override sales tax per line during invoice posting?

  • If not, is there any supported customization approach to achieve this requirement?

  • Or is this a limitation of the tax framework where such control is not feasible even with customization?

Any guidance, suggestions, or real-world experience would be highly appreciated.

Thanks in advance!

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    304,038 Super User 2026 Season 1 on at
    Hi Muhammad,
     
    The tax is initially calculated per PO line. You can, with a customization, try to add a record in the table TaxTmpWorkTrans with a reference to the PO line with the actual tax amount. I'm not sure if that will work as functionally, there is no support to override the tax amount on the PO line. 
  • Suggested answer
    Syed Haris Shah Profile Picture
    1,621 Super User 2026 Season 1 on at
     
    Are the default tax rounding method and rounding precision not helping you achieve your requirement? Assuming the third-party API is sending tax information to D365 and not bypassing the standard tax engine to calculate tax (unless heavily customized), shouldn’t the standard rounding logic apply?
     
    If not, then you probably need for customization?
     
    Regards,
    Syed Haris Shah
  • CU10040815-0 Profile Picture
    2 on at
    Thanks to share this real breakdown ! eplfeedback
  • Suggested answer
    Giorgio Bonacorsi Profile Picture
    2,313 on at
    Hello,

    Out-of-the-box you can manually change the tax at the line level to override what the system has calculated. Therefore, you could try to find a way to create a customization that simulates this process.

    However, I highly recommend that you discuss and validate the architectural design with a financial consultant first. Changing the tax on a document can have significant impacts. Tax recognition is not only a question of the amount, it also involves using the correct sales tax code to properly report the tax to the relevant tax authority.
     
    An incorrect tax declaration affects more than just the accountant. It has implications for the entire company, including the IT department and the vendors if they supply faulty tools.

    Thank you,
    Giorgio

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 455 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 308 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans