1

我们正在使用 IPP v3 构建一个应用程序,它将发票从我们的 SaaS 应用程序同步到 QBOE(希望是 QBD)。遇到的问题是使用快速簿中创建的发票复制我们发票上的销售额。

具体来说,我们的发票可以包含不征税的项目(每个州在哪些项目征税和税率方面有所不同)。此外,州、市和县税也有很多次,其中一些适用于某些项目,而不适用于其他项目。

对于 IPP v3 美国版,税费必须是全球发票?

我认为如果我们可以覆盖发票的总税额,所有这些都可以解决。文档似乎表明 API 支持这一点。然而,我所有的尝试都被忽略了。要么是无税,要么是默认税率(百分比)。这意味着我们不能覆盖总计或输入固定税。

另一种选择是在名为“Tax Name”的发票和值中添加一个额外的行。发票总额是正确的,但 Quickbooks 上的税务报告不正确?

我真的很想要一个直接的答案,比如“不能通过 API 覆盖税额”,只是为了确定。

我还想知道 Intuit 是否计划在不久的将来支持该功能?API 中有一些字段,例如“PercentBased”(可以设置为 true 或 false),似乎表明可以设置固定金额。但是当我尝试使用这些字段时,它们会被完全忽略。

任何有关这方面的帮助或未来指导将不胜感激,因为它与 QBOE / QBD 的 IPP v3 有关。

这是我们的 XML 请求

<?xml version='1.0' encoding='utf-8'?>
<IntuitBatchRequest xmlns:ns2="http://www.intuit.com/sb/cdm/qbo"     
xmlns="http://schema.intuit.com/finance/v3">
<BatchItemRequest bId="bid1" operation="create">
<Invoice>
<DocNumber>2459999</DocNumber>
<TxnDate>2012-12-10</TxnDate>
<GlobalTaxCalculation>TaxIncluded</GlobalTaxCalculation>
<Line>
<DetailType>SalesItemLineDetail</DetailType>
<Amount>200</Amount>
<SalesItemLineDetail>
<TaxCodeRef>TAX</TaxCodeRef>
<ServiceDate>2012-12-10</ServiceDate>
</SalesItemLineDetail>
<Description>Test</Description>
<ItemRef>1</ItemRef>
</Line>
<CustomerRef>66</CustomerRef>
<TxnTaxDetail>
<TaxLine>
<DetailType>TaxLineDetail</DetailType>
<Amount>13.00</Amount>
<TaxLineDetail>
<NetAmountTaxable>200.00</NetAmountTaxable>
<TaxPercent>6.50</TaxPercent>
<TaxRateRef>1</TaxRateRef>
<PercentBased>true</PercentBased>
</TaxLineDetail>
</TaxLine>
</TxnTaxDetail>
</Invoice>
</BatchItemRequest>
</IntuitBatchRequest>
4

1 回答 1

1

您可以在 TxnTaxDetail 中覆盖税线中的税额 - 例如:在 16.67 = 3.33 上包括税 @ 20%。我们希望请求包括以下税务详细信息

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

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

在此处输入图像描述

编辑: 添加示例请求和响应 xml。只需设置以下标签。

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

不要设置 Taxline,因为 QBO 会根据请求中发送的详细信息重新计算税款。因此,作为响应,您将根据指定的 TaxPercent 获得重新计算的金额。

索取样品-

    <?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>

响应样本-

<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>

编辑全球-

好的,我重新测试了这个fr Global。我可以覆盖个别税行的金额,然后是最终税额-这是发票更新请求-我更改了以下标签-

<TxnTaxDetail>
<TotalTax>2.90</TotalTax>

然后在其中一条税线上

<TaxLine>

<Amount>0.70</Amount>

然后在最终发票金额中

<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>

于 2013-10-10T16:38:50.357 回答