1

Using the C# API for QuickBooks Desktop, how do I mark lines as taxable? Here is my code:

            InvoiceLine qboInvoiceLine = new InvoiceLine();
            qboInvoiceLine.Amount = order.ShippingExclTax;
            qboInvoiceLine.AmountSpecified = true;
            qboInvoiceLine.Taxable = false;
            qboInvoiceLine.TaxableSpecified = false;

My XML fails to specify the taxable element:

<?xml version="1.0" encoding="utf-8"?>
<Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:xsd="http://www.w3.org/2001/XMLSchema" RequestId="8313fa49e42f432cacfcade7b0787a7a"  FullResponse="true" xmlns="http://www.intuit.com/sb/cdm/v2"><ExternalRealmId>310582310</ExternalRealmId>
  <Object xsi:type="Invoice">
<Header>
  <DocNumber>1</DocNumber>
  <TxnDate>2013-05-18T17:54:52.668263-04:00</TxnDate>
  <CustomerName>Web Store</CustomerName>
  <ShipAddr>
    <Line1>John Smith</Line1>
    <Line2>21 West 52nd Street</Line2>
    <Line3 />
    <City>New York</City>
    <Country>United States</Country>
    <CountrySubDivisionCode>New York</CountrySubDivisionCode>
    <PostalCode>10021</PostalCode>
  </ShipAddr>
  <DiscountAmt>0</DiscountAmt>
</Header>
<Line>
  <Amount>1.0000</Amount>
  <ItemName>TestShoe123</ItemName>
  <UnitPrice>1.0000</UnitPrice>
  <Qty>1</Qty>
</Line>
<Line>
  <Amount>0.0000</Amount>
  <ItemName>In-Store Pickup</ItemName>
  <UnitPrice>0.0000</UnitPrice>
  <Qty>1</Qty>
</Line>

4

1 回答 1

1

我需要将 SalesTaxCodeName 分配给“Tax”或“Non”,而不是将 Taxable 分配为 true 或 false。

于 2013-05-19T20:44:25.267 回答