xero-php-oauth2 icon indicating copy to clipboard operation
xero-php-oauth2 copied to clipboard

Unable to fetch Purchase Orders when using numeric PurchaseOrderNumber

Open dretsa opened this issue 3 years ago • 0 comments

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:

  1. Create a purchase order with a numeric PurchaseOrderNumber - eg. "19200"
  2. Try to fetch if
<?php
[$po] = $this->accountingApi()->getPurchaseOrderByNumber('', '19200');

  1. You get a 404 error
  2. Ament the entry and add a letter to the PurchaseOrderNumber - eg. "A19200"
  3. Try to fetch
  4. It works now

Expected behavior Correctly fetched purchase order by it's PurchaseOrderNumber when it's numeric

dretsa avatar Sep 21 '21 12:09 dretsa