quickbooks-php
quickbooks-php copied to clipboard
if Invoice Rate is 0, it becomes empty in the XML
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
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.