web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans