0

As far as I can tell with the documentation and examples for QBXML, I need pass a <Rate> and a <Quantity> when adding a line item to a request (then Quickbooks calculates the subtotal). Unfortunately, sometimes I have a quantity of 3 and the subtotal needs to add up to $10.00.

3 * $3.33 = $9.99 != $10.00

Is it possible to only enter a <Quantity> and <Amount> to have the <Amount> override the calculation? Is there a better way to handle this?

Will something like this work?

<InvoiceLineAdd>
    <ItemRef>
        <FullName><?php echo $item->name;?></FullName>
    </ItemRef>
    <Desc><?php echo $line->description;?></Desc>
    <Quantity><?php echo $line->quantity;?></Quantity>
    <Amount><?php echo $line->subtotal;?></Amount>
    <SalesTaxCodeRef>
        <FullName><?php echo $line->taxable ? 'TAX' : 'NON';?></FullName>
    </SalesTaxCodeRef>
</InvoiceLineAdd>
Douglas.Sesar
  • 4,214
  • 3
  • 29
  • 36

1 Answers1

2

Enter 2 of the 3 values and the other will be calculated.

Enter Quantity and Amount and the rate will be calculated for you.

William Lorfing
  • 2,656
  • 10
  • 7