Quickbooks IPP v3 sales tax issue

坚强是说给别人听的谎言 提交于 2019-12-04 19:23:20

You can override the tax amount in the Taxline in TxnTaxDetail- Eg: Includes tax @ 20% on 16.67 = 3.33. we would expect the request to include following tax details

"TxnTaxDetail":{"TotalTax":3.33,"TaxLine":[{"Amount":3.33,"DetailType":"TaxLineDetail","TaxLineDetail":{"TaxRateRef":{"value":"4"},"PercentBased":true,"TaxPercent":20,"NetAmountTaxable":16.67 "GlobalTaxCalculation":"TaxIncludes",...

Please refer- https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v3/020_key_concepts/0700_other_topics#TxnTaxDetail

EDIT: Adding the sample request and response xml. Just set the following tags.

<TxnTaxDetail>
<TxnTaxCodeRef>
<TotalTax>
</TxnTaxDetail>

Do not set the Taxline as QBO recalculates the tax based on the details sent in the request. So in response you’ll get the recalculated amount based in the TaxPercent specified.

Request sample-

    <?xml version="1.0"?>
<Invoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schema.intuit.com/finance/v3">
 <TxnDate>2013-10-11+05:30</TxnDate>
  <PrivateNote>This is a private note</PrivateNote>
  <Line>
    <Description>Invoice line description.</Description>
<Amount>900</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
  <ItemRef name="Bat">2</ItemRef>
  <UnitPrice>90</UnitPrice>
  <Qty>10</Qty>
  <TaxCodeRef>TAX</TaxCodeRef>
  <ServiceDate>2013-10-11+05:30</ServiceDate>
</SalesItemLineDetail>
  </Line>
  <TxnTaxDetail>
<TxnTaxCodeRef name="StateSalesTax">8</TxnTaxCodeRef>
<TotalTax>450</TotalTax>

  </TxnTaxDetail>
  <AutoDocNumber>true</AutoDocNumber>
  <CustomerRef name="5748584cc7d64bb18a0e">23</CustomerRef>
  <BillAddr>
<Line1>123 Main St.</Line1>
<Line2>Unit 506</Line2>
<City>Brockton</City>
<Country>United States</Country>
<CountrySubDivisionCode>MA</CountrySubDivisionCode>
<PostalCode>02301</PostalCode>
<Note>Billing Address Note</Note>
  </BillAddr>
  <ShipAddr>
<Line1>100 Fifth Ave.</Line1>
<City>Waltham</City>
<Country>United States</Country>
<CountrySubDivisionCode>MA</CountrySubDivisionCode>
<PostalCode>02452</PostalCode>
<Note>Shipping Address Note</Note>
  </ShipAddr>
  <SalesTermRef name="Due on receipt">1</SalesTermRef>
  <DueDate>2013-11-10+05:30</DueDate>
  <GlobalTaxCalculation>TaxInclusive</GlobalTaxCalculation>
  <ARAccountRef name="Accounts Receivable (A/R)">32</ARAccountRef>
</Invoice>

Response sample-

<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-10-18T01:50:19.576-07:00">
  <Invoice domain="QBO" sparse="false">
    <Id>50</Id>
    <SyncToken>0</SyncToken>
    <MetaData>
  <CreateTime>2013-10-18T01:50:20-07:00</CreateTime>
  <LastUpdatedTime>2013-10-18T01:50:20-07:00</LastUpdatedTime>
</MetaData>
<DocNumber>1037</DocNumber>
<TxnDate>2013-10-11</TxnDate>
<PrivateNote>This is a private note</PrivateNote>
<Line>
  <Id>1</Id>
  <LineNum>1</LineNum>
  <Description>Invoice line test</Description>
  <Amount>900.00</Amount>
  <DetailType>SalesItemLineDetail</DetailType>
  <SalesItemLineDetail>
    <ItemRef name="Bat">2</ItemRef>
    <UnitPrice>90</UnitPrice>
    <Qty>10</Qty>
    <TaxCodeRef>TAX</TaxCodeRef>
    <ServiceDate>2013-10-11</ServiceDate>
  </SalesItemLineDetail>
</Line>
<Line>
  <Amount>900.00</Amount>
  <DetailType>SubTotalLineDetail</DetailType>
  <SubTotalLineDetail />
</Line>
<TxnTaxDetail>
  <TxnTaxCodeRef>8</TxnTaxCodeRef>
  <TotalTax>450.00</TotalTax>
  <TaxLine>
    <Amount>450.00</Amount>
    <DetailType>TaxLineDetail</DetailType>
    <TaxLineDetail>
      <TaxRateRef>18</TaxRateRef>
      <PercentBased>true</PercentBased>
      <TaxPercent>2.5</TaxPercent>
      <NetAmountTaxable>900.00</NetAmountTaxable>
    </TaxLineDetail>
  </TaxLine>
</TxnTaxDetail>
<CustomerRef name="5748584cc7d64bb18a0e">23</CustomerRef>
<BillAddr>
  <Id>78</Id>
  <Line1>123 Main St.</Line1>
  <Line2>Unit 506</Line2>
  <City>Brockton</City>
  <Country>United States</Country>
  <CountrySubDivisionCode>MA</CountrySubDivisionCode>
  <PostalCode>02301</PostalCode>
  <Lat>42.0829092</Lat>
  <Long>-71.01995200000002</Long>
</BillAddr>
<ShipAddr>
  <Id>79</Id>
  <Line1>100 Fifth Ave.</Line1>
  <City>Waltham</City>
  <Country>United States</Country>
  <CountrySubDivisionCode>MA</CountrySubDivisionCode>
  <PostalCode>02452</PostalCode>
  <Lat>42.3933303</Lat>
  <Long>-71.256777</Long>
</ShipAddr>
<SalesTermRef>1</SalesTermRef>
<DueDate>2013-11-10</DueDate>
<TotalAmt>1350.00</TotalAmt>
<ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount>
<PrintStatus>NeedToPrint</PrintStatus>
<EmailStatus>NotSet</EmailStatus>
<Balance>1350.00</Balance>
<Deposit>0</Deposit>
<AllowIPNPayment>false</AllowIPNPayment>
<AllowOnlinePayment>false</AllowOnlinePayment>
  </Invoice>
    </IntuitResponse>

EDIT for Global-

Ok, I retested this fr Global. I can override amounts for individual taxlines and then final taxamount- here is an invoice update request - I changed the following tags-

<TxnTaxDetail>
<TotalTax>2.90</TotalTax>

and then in one of the taxlines

<TaxLine>

<Amount>0.70</Amount>

and then in the final invoice amounts

<TotalAmt>79.90</TotalAmt>

<Balance>79.90</Balance>

<Invoice xmlns="http://schema.intuit.com/finance/v3" domain="QBO" sparse="false">
<Id>1</Id>
<SyncToken>0</SyncToken>
<MetaData>
    <CreateTime>2015-01-30T09:32:06-08:00</CreateTime>
    <LastUpdatedTime>2015-01-30T09:32:06-08:00</LastUpdatedTime>
</MetaData>
<DocNumber>1001</DocNumber>
<TxnDate>2015-01-30</TxnDate>
<CurrencyRef name="Canadian Dollar">CAD</CurrencyRef>
<Line>
    <Id>1</Id>
    <LineNum>1</LineNum>
    <Amount>33.00</Amount>
    <DetailType>SalesItemLineDetail</DetailType>
    <SalesItemLineDetail>
        <ItemRef name="Hours">2</ItemRef>
        <UnitPrice>33</UnitPrice>
        <Qty>1</Qty>
        <TaxCodeRef>7</TaxCodeRef>
    </SalesItemLineDetail>
</Line>
<Line>
    <Id>2</Id>
    <LineNum>2</LineNum>
    <Amount>44.00</Amount>
    <DetailType>SalesItemLineDetail</DetailType>
    <SalesItemLineDetail>
        <ItemRef name="Sales">1</ItemRef>
        <UnitPrice>44</UnitPrice>
        <Qty>1</Qty>
        <TaxCodeRef>5</TaxCodeRef>
    </SalesItemLineDetail>
</Line>
<Line>
    <Amount>77.00</Amount>
    <DetailType>SubTotalLineDetail</DetailType>
    <SubTotalLineDetail />
</Line>
<TxnTaxDetail>
    <TotalTax>2.90</TotalTax>
    <TaxLine>
        <Amount>2.20</Amount>
        <DetailType>TaxLineDetail</DetailType>
        <TaxLineDetail>
            <TaxRateRef>6</TaxRateRef>
            <PercentBased>true</PercentBased>
            <TaxPercent>5</TaxPercent>
            <NetAmountTaxable>44.00</NetAmountTaxable>
        </TaxLineDetail>
    </TaxLine>
    <TaxLine>
        <Amount>0.70</Amount>
        <DetailType>TaxLineDetail</DetailType>
        <TaxLineDetail>
            <TaxRateRef>15</TaxRateRef>
            <PercentBased>true</PercentBased>
            <TaxPercent>2</TaxPercent>
            <NetAmountTaxable>33.00</NetAmountTaxable>
        </TaxLineDetail>
    </TaxLine>
</TxnTaxDetail>
<CustomerRef name="dd">1</CustomerRef>
<SalesTermRef>3</SalesTermRef>
<DueDate>2015-03-01</DueDate>
<GlobalTaxCalculation>TaxExcluded</GlobalTaxCalculation>
<TotalAmt>79.90</TotalAmt>
<PrintStatus>NotSet</PrintStatus>
<EmailStatus>NotSet</EmailStatus>
<Balance>79.90</Balance>
<Deposit>0</Deposit>
<AllowIPNPayment>false</AllowIPNPayment>
<AllowOnlinePayment>false</AllowOnlinePayment>
<AllowOnlineCreditCardPayment>false</AllowOnlineCreditCardPayment>
<AllowOnlineACHPayment>false</AllowOnlineACHPayment>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!