You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SDK you're using (please complete the following information):
Version 2.1.0
Describe the bug
When performing a retrieval of an ACCREC invoice with that has discounted line items only the getDiscountRate is returned and getDiscountAmount is empty.
Note I've tried this in both the example app (where the modified code above lives) and a more developed app - both fail to return the required discountAmount
@timwiel The API server response on the Invoices endpoint will vary depending on the call being made.
When retrieving a single invoice eg. api.xro/2.0/Invoices/c7e6d6b6-f32f-46a5-9e3b-31088fd9193d full detail will be returned.
If multiple invoices could be returned eg. api.xro/2.0/Invoices?where=InvoiceNumber=='ORC1041' only a summary is returned.
If the page argument is included eg. api.xro/2.0/Invoices?page=1 the response includes more - but not all the detail.
The call you are making uses the InvoiceNumbers argument eg. api.xro/2.0/Invoices?InvoiceNumbers=ORC1041 this gives the same response as the page argument, and crucially doesn't include the DiscountAmount field.
To retrieve the DiscountAmount field try making the call like this: $apiResponse = $accountingApi->getInvoice($xeroTenantId,$invoiceId);
I believe there is still a bug with this issue (not in the SDK but in the API) ... I've posted the a bug report on the API issues list (XeroAPI/Xero-OpenAPI#592 (comment))
SDK you're using (please complete the following information):
Describe the bug
When performing a retrieval of an ACCREC invoice with that has discounted line items only the getDiscountRate is returned and getDiscountAmount is empty.
However when using the Previewer the XML returns a discountAmount AND discountRate
Expected behavior
I would expect that both discountAmount AND discountRate should be returned
Screenshots
Xero Invoice Line Items:
print_r result from code above:
API previewer on developer.xero.com:
The text was updated successfully, but these errors were encountered: