Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

SalesLineTax is not inserted

(1) ShareShare
ReportReport
Posted on by

I'm trying to insert taxes on line item level by using Taxes array on SalesInvoiceLine object. However, when I check it through the interface, taxes are not applied at all. I tried to enter a salesinvoice through the interface and add taxes to line items to make sure that it is not related to a setting. Any help would be appreciated. My code is as follows:

                var tax = new SalesLineTax();

                tax.Key = new SalesLineTaxKey();
                tax.Key.SalesLineKey = new SalesLineKey();

                tax.Key.SalesLineKey.SalesDocumentKey = new SalesDocumentKey();
                tax.Key.SalesLineKey.SalesDocumentKey.Id = invoiceKey;

                tax.Key.TaxDetailKey = new TaxDetailKey();
                tax.Key.TaxDetailKey.Id = "SOMEKEY";

                tax.TaxableAmount = new MoneyAmount();
                tax.TaxableAmount.Currency = "USD";
                tax.TaxableAmount.DecimalDigits = 2;
                tax.TaxableAmount.Value = 94.75m;

                tax.TotalAmount = new MoneyAmount();
                tax.TotalAmount.Currency = "USD";
                tax.TotalAmount.DecimalDigits = 2;
                tax.TotalAmount.Value = 94.75m;

                tax.TaxAmount = new MoneyAmount();
                tax.TaxAmount.Currency = "USD";
                tax.TaxAmount.DecimalDigits = 2;
                tax.TaxAmount.Value = 6.15m;

                salesInvoiceLine.Taxes = new SalesLineTax[] { tax };




*This post is locked for comments

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans