문제

I'm having an issue trying to get tax applied to an invoice with QBXML. I'm using SalesTaxCodeRef in InvoiceLineAdd but it doesn't seem that it's working for whatever reason. This same code worked for SalesReceiptAddRq. Am I missing a flag or something?

<?xml version="1.0" encoding="UTF-8"?>
<?qbxml version="11.0"?><QBXML>
 <QBXMLMsgsRq onError="stopOnError">
  <InvoiceAddRq requestID="c16d1753af62163f3891551c07a1eed493bb291a">
   <InvoiceAdd>
    <CustomerRef>
     <FullName>Customers FullName</FullName>
    </CustomerRef>
    <TemplateRef>
     <FullName>Default Template</FullName>
    </TemplateRef>
    <TxnDate>2013-07-31</TxnDate>
    <RefNumber>12324</RefNumber>
    <BillAddress>
     <Addr1>Customers FullName</Addr1>
     <Addr2>123 Test Dr</Addr2>
     <Addr3></Addr3>
     <City>Customer City</City>
     <State>AL</State>
     <PostalCode>12323</PostalCode>
     <Country>US</Country>
    </BillAddress>
    <ShipAddress>
     <Addr1>Customers FullName</Addr1>
     <Addr2>123 Test Dr</Addr2>
     <Addr3></Addr3>
     <City>Customer City</City>
     <State>AL</State>
     <PostalCode>12323</PostalCode>
     <Country>US</Country>
    </ShipAddress>
    <IsPending>false</IsPending>
    <IsToBePrinted>false</IsToBePrinted>
    <IsToBeEmailed>false</IsToBeEmailed>
    <InvoiceLineAdd>
     <ItemRef>
      <ListID>80000540-1339572998</ListID>
     </ItemRef>
     <Desc>Item Desc</Desc>
     <Quantity>1</Quantity>
     <Rate>39.27</Rate>
     <SalesTaxCodeRef>
      <FullName>SBT</FullName>
     </SalesTaxCodeRef>
    </InvoiceLineAdd>
   </InvoiceAdd>
  </InvoiceAddRq>
 </QBXMLMsgsRq>
</QBXML>
도움이 되었습니까?

해결책

For non-USA versions of QuickBooks (CA, UK, etc.):

What you have should work, ASSUMING that the Sales Tax Code "SBT" is correctly mapped to a tax rate in your tax preferences within QuickBooks.

For USA versions of QuickBooks:

Sales tax codes just indicate whether something is TAXable, or NONtaxable. They do NOT actually indicate any tax amount, or force tax to be recorded/charged.

In addition to the Sales tax code, you also need to specify an ItemSalesTaxRef, which is a reference to a specific tax item (a specific tax rate, e.g. 7%).

...
<ItemSalesTaxRef>
  <FullName>My Existing Tax Item Name</FullName>
</ItemSalesTaxRef>
<IsToBePrinted>true</IsToBePrinted>
...

다른 팁

CHeck your XML with the SDK Validator.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top