xero-php-oauth2
xero-php-oauth2 copied to clipboard
Unable to fetch Purchase Orders when using numeric PurchaseOrderNumber
SDK you're using (please complete the following information):
- Version 2.8.1
- Using custom connections
Describe the bug
Client can not fetch purchase order by PurchaseOrderNumber if it's numeric.
It must be a data type bug, but it seems like an API bug rather than the wrapper library bug, but I don't have access to Xero developer forums because you need to pay for that!
To Reproduce Steps to reproduce the behavior:
- Create a purchase order with a numeric PurchaseOrderNumber - eg. "19200"
- Try to fetch if
<?php
[$po] = $this->accountingApi()->getPurchaseOrderByNumber('', '19200');
- You get a 404 error
- Ament the entry and add a letter to the PurchaseOrderNumber - eg. "A19200"
- Try to fetch
- It works now
Expected behavior Correctly fetched purchase order by it's PurchaseOrderNumber when it's numeric