SDK you're using (please complete the following information):
Version 1.6.5
Describe the bug
When I try to use setStatus it will let me create an invoice with any status except for 'AUTHORISED'. I am unsure if I am doing something wrong. Please see code below:
Sorry guys, I just found the API key history in the dev portal and that gave me some info regarding the error which was related to the date range being locked.
SDK you're using (please complete the following information):
Describe the bug When I try to use setStatus it will let me create an invoice with any status except for 'AUTHORISED'. I am unsure if I am doing something wrong. Please see code below:
$invoice ->setStatus('AUTHORISED') ->setType('ACCPAY') ->setContact($contact['contacts'][0]) ->setInvoiceNumber($invoice_number) ->setDate($invoice_date) ->setDueDate($due_date) ->setLineAmountTypes($tax_type) ->setLineItems($arr_lineitems);
When I use AUTHORISED it will give me the below:
PHP Fatal error: Uncaught XeroAPI\XeroPHP\ApiException: [400] Client error:
PUT https://api.xero.com/api.xro/2.0/Invoices?summarizeErrors=true
resulted in a400 Bad Request
response: { "ErrorNumber": 10, "Type": "ValidationException", "Message": "A validation exception occurred", "Elements" (truncated...) in D:\inetpub\wwroot\ithub-staging\resources\vendor\xeroapi\xero-php-oauth2\lib\Api\AccountingApi.php:8579 Stack trace:0 D:\inetpub\wwroot\ithub-staging\resources\vendor\xeroapi\xero-php-oauth2\lib\Api\AccountingApi.php(8552): XeroAPI\XeroPHP\Api\AccountingApi->createInvoicesWithHttpInfo('1e7b23e5-abaf-4...', Object(XeroAPI\XeroPHP\Models\Accounting\Invoice), true, NULL)
1 D:\inetpub\wwroot\ithub-staging\resources\vendor\xeroapi\xero-php-oauth2\xero-push-invoice.php(103): XeroAPI\XeroPHP\Api\AccountingApi->createInvoices('1e7b23e5-abaf-4...', Object(XeroAPI\XeroPHP\Models\Accounting\Invoice), true)
2 {main}
thrown in D:\inetpub\wwroot\ithub-staging\resources\vendor\xeroapi\xero-php-oauth2\lib\Api\AccountingApi.php on line 8579
To Reproduce Steps to reproduce the behavior: Try to push an invoice into Xero and use AUTHORISED as the status. All other statuses seem to work
Expected behavior I thought it should put the bill into the "Awaiting Payment" section of "Bills"