I am getting a fatal error in the SDK code. The Tax rates all exist on QBO and work in sales items (they are all for expenses, revenue and assets). It seems that PO line items->ItemBasedExpenseLineDetail definition in the SDK does not support "TaxCodeRef"
Firstly, it shouldn't cause a fatal error, it should be an exception. Secondly there shouldn't be an error at all as the data is all fine.
Error response:
Fatal error: Uncaught ReflectionException: Property QuickBooksOnline\API\Data\IPPLine::$TaxCodeRef does not exist in /var/vendor/quickbooks/v3-php-sdk/src/Facades/FacadeHelper.php:439
Stack trace:
I am getting a fatal error in the SDK code. The Tax rates all exist on QBO and work in sales items (they are all for expenses, revenue and assets). It seems that PO line items->ItemBasedExpenseLineDetail definition in the SDK does not support "TaxCodeRef"
Firstly, it shouldn't cause a fatal error, it should be an exception. Secondly there shouldn't be an error at all as the data is all fine.
Error response:
Fatal error: Uncaught ReflectionException: Property QuickBooksOnline\API\Data\IPPLine::$TaxCodeRef does not exist in /var/vendor/quickbooks/v3-php-sdk/src/Facades/FacadeHelper.php:439 Stack trace:
0 /var/vendor/quickbooks/v3-php-sdk/src/Facades/FacadeHelper.php(439): ReflectionClass->getProperty('TaxCodeRef')
1 /var/vendor/quickbooks/v3-php-sdk/src/Facades/FacadeHelper.php(77): QuickBooksOnline\API\Facades\FacadeHelper::assignValue(Object(QuickBooksOnline\API\Data\IPPLine), 'TaxCodeRef', Object(QuickBooksOnline\API\Data\IPPReferenceType))
2 /var/vendor/quickbooks/v3-php-sdk/src/Facades/FacadeHelper.php(101): QuickBooksOnline\API\Facades\FacadeHelper::reflectArrayToObject('Line', Array, true)
3 /var/vendor/quickbooks/v3-php-sdk/src/Facades/PurchaseOrder.php(8): QuickBooksOnline\API\Facades\FacadeHelper::reflectArrayToObject('PurchaseOrder', Array, true)
4 /var/accounting/qbo_class.php(2799): QuickBooksOnline\API\Facades\PurchaseOrder::create(Array)
5 /var/accounting/tasks.php(502): qbo_class->batch_post_purchase_orders(Array)
6 {main}
thrown in /var/vendor/quickbooks/v3-php-sdk/src/Facades/FacadeHelper.php on line 439
The command called on line 2799 in qbo_class.php is simply:
$purchaseOrderObj = PurchaseOrder::create($po_data);
And $po_data variable is:
Tax code ref is a 0% rate if that helps.