Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
btamulis 11/17/2011 6:08:52 AM

Sales Taxes - How to integrate

I previously posted seeking assistance on how to apply payments to documents and your assistance was invaluable. I certainly hate to request further assistance - but here goes...........I can't seem to get the handle on how to apply taxes to either a document or a line item. I would prefer the line item - i couldn't get it to work (at item) so I switched and thought document level might be easier.

Here's the current error message:

A validation exception has occurred.
Validation Errors:
 - Tax Detail does not equal the TaxAmount.
 - Tax Detail does not equal the TaxAmount.
 - Sum of the Sales Document Line tax does not equal the TaxAmount.

Here's the code: (Note - Behaviour is set to 'provide taxes') Tax schedule = 'ALL' Tax DetailID = 'NOTAX' - the document total = $56.80 (what tax value should this be?) the taxes are $3.88 (or $1.94 per line item) is this value = tax.amount or taxes? Very confusing......


essentially GP is setup to let user manually enter tax amount. Our source is a web site that calculates tax - I simply want to bring it into GP (prefer line level) - trying to get anything to work. Code works great if tax stuff is commented out.

Error seems to indicate that it expects values at line item level (Tax Detail error - listed twice and I have 2 line items on the invoice) - do I have to have line item detail? If so, how should I code it?


    <record_id>8587798</record_id>
        <CompanyKey>
            <Id>3</Id>
        </CompanyKey>
        <Id>8587798</Id>
    </Key>
    <Comment xmlns="http://schemas.microsoft.com/dynamics/gp/2006/01">8587798</Comment>
    <ShippingMethodKey xmlns="http://schemas.microsoft.com/dynamics/gp/2006/01">
        <CompanyKey>
            <Id xmlns="http://schemas.microsoft.com/dynamics/2006/01">3</Id>
        </CompanyKey>
        <Id>USPS</Id>
    </ShippingMethodKey>
    <FreightAmount xmlns="http://schemas.microsoft.com/dynamics/gp/2006/01">
        <Currency>USD</Currency>
        <Value>10.9400</Value>
        <DecimalDigits>2</DecimalDigits>
    </FreightAmount>
    <TaxScheduleKey xmlns="http://schemas.microsoft.com/dynamics/gp/2006/01">
        <CompanyKey>
 
 
 </CompanyKey>
        <Id>ALL</Id>
    </TaxScheduleKey>
        <Currency>USD</Currency>
        <Value>56.8000</Value>
        <DecimalDigits>2</DecimalDigits>
    </TaxAmount>
        <SalesDocumentTax>
            <TaxAmount>
                <Currency>USD</Currency>
                <Value>3.8800</Value>
                <DecimalDigits>2</DecimalDigits>
            </TaxAmount>
            <IsBackoutTax xsi:nil="true"/>
            <IsTaxableTax xsi:nil="true"/>
            <Key>
                <CompanyKey>
                    <Id xmlns="http://schemas.microsoft.com/dynamics/2006/01">3</Id>
                </CompanyKey>
                <TaxDetailKey>
                    <CompanyKey>
                        <Id xmlns="http://schemas.microsoft.com/dynamics/2006/01">3</Id>
                    </CompanyKey>
                    <Id>NOTAX</Id>
                </TaxDetailKey>
            </Key>
        </SalesDocumentTax>
    </Taxes>
    <InvoiceDate xmlns="http://schemas.microsoft.com/dynamics/gp/2006/01">2010-12-28T18:00:00-06:00</InvoiceDate>
    <DocumentTypeKey xmlns="http://schemas.microsoft.com/dynamics/gp/2006/01">
        <CompanyKey>
            <Id>3</Id>
        </CompanyKey>
        <Type>Invoice</Type>
        <Id>WARRIOR</Id>
    </DocumentTypeKey>
        <CompanyKey>
            <Id>3</Id>
        </CompanyKey>
        <Id>C101</Id>
    </CustomerKey>
        <CompanyKey>
            <Id>3</Id>
        </CompanyKey>
        <ISOCode>USD</ISOCode>
    </CurrencyKey>
        <SalesInvoiceLine>
            <UnitPrice>
                <Currency>USD</Currency>
                <Value>19.9900</Value>
                <DecimalDigits>2</DecimalDigits>
            </UnitPrice>
            <Quantity>
                <Value>1</Value>
                <DecimalDigits>0</DecimalDigits>
            </Quantity>
            <IsNonInventory>false</IsNonInventory>
            <UofM>Each</UofM>
            <ItemKey>
                <CompanyKey>
                    <Id>3</Id>
                </CompanyKey>
                <Id>885166162874</Id>
            </ItemKey>
            <Discount>
                <Amount>
                    <Currency>USD</Currency>
                    <Value>0.0000</Value>
                    <DecimalDigits>2</DecimalDigits>
                </Amount>
            </Discount>
        </SalesInvoiceLine>
        <SalesInvoiceLine>
            <UnitPrice>
                <Currency>USD</Currency>
                <Value>21.9900</Value>
                <DecimalDigits>2</DecimalDigits>
            </UnitPrice>
            <Quantity>
                <Value>1</Value>
                <DecimalDigits>0</DecimalDigits>
            </Quantity>
            <IsNonInventory>false</IsNonInventory>
            <UofM>Each</UofM>
            <ItemKey>
                <CompanyKey>
                    <Id>3</Id>
                </CompanyKey>
                <Id>739980982845</Id>
            </ItemKey>
            <Discount>
                <Amount>
                    <Currency>USD</Currency>
                    <Value>0.0000</Value>
                    <DecimalDigits>2</DecimalDigits>
                </Amount>
            </Discount>
        </SalesInvoiceLine>
    </Lines>
        <SalesPayment>
            <PaymentAmount>
                <Currency>USD</Currency>
                <Value>56.8000</Value>
                <DecimalDigits>2</DecimalDigits>
            </PaymentAmount>
            <PaymentCardTypeKey>
                <CompanyKey>
                    <Id xmlns="http://schemas.microsoft.com/dynamics/2006/01">3</Id>
                </CompanyKey>
                <Id>Amex-Warrior</Id>
            </PaymentCardTypeKey>
            <Type>Payment Card Payment</Type>
        </SalesPayment>
    </Payments>
</SalesInvoice>
Version: GP 2010
Section: Dynamics GP, eConnect, Web Services








Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables