quickbooks-php icon indicating copy to clipboard operation
quickbooks-php copied to clipboard

if Invoice Rate is 0, it becomes empty in the XML

Open Thesane opened this issue 9 years ago • 1 comments

If I want to set the Rate in InvoiceLineAdd = 0, the generated XML request has the <Rate> node empty which isn't the desired value as QuickBooks will ignore it and use the stored rate for this item.

I change line 695 in XML\Node.php to

if ($node->data() === '__EMPTY__')      // ick, bad hack 

instead of

if ($node->data() == '__EMPTY__')       // ick, bad hack 

to fix it

Thesane avatar Apr 22 '15 13:04 Thesane

I came across this same problem. Does anyone know why this test for EMPTY exists here? The comment says "ick, bad hack", but it doesn't really describe why this hack was necessary.

konrness avatar Aug 10 '16 04:08 konrness