calcinai / xero-php

A php library for the Xero API, with a cleaner OAuth interface and ORM-like abstraction.
MIT License
359 stars 261 forks source link

Missing "Amount" property of Payroll Employees PayTemplate SuperLines #735

Open cproetti opened 4 years ago

cproetti commented 4 years ago

The Payroll Employees PayTemplate SuperLines is missing the 'Amount' value which is used instead of 'Percentage' when the 'CalculationType' is set to 'FIXEDAMOUNT'.

This amount is most often used when employees have additional contributions to their super with each pay.

I have checked the official Xero documentation but it makes no mention of this 'Amount' property existing, however if you do a query in the API Previewer then you can see that this 'Amount' property does exists (see screenshot attached).

https://github.com/calcinai/xero-php/blob/5117ec913364a1b57dbd18a475ed4bfcd92d32b2/src/XeroPHP/Models/PayrollAU/Employee/PayTemplate/SuperLine.php#L110

Screen Shot 2020-05-01 at 1 19 06 PM
calcinai commented 4 years ago

@cproetti I think unless we get it added to the docs, it's probably risky to start using it...

cproetti commented 4 years ago

@calcinai I will send Xero an email now asking them to update their Docs to include this property. There is no other way to make use of the "FIXEDAMOUNT" CalculationType if you don't pass an "Amount" because their end just deletes rows with no amount value.

cproetti commented 4 years ago

@calcinai I have not received any response form Xero yet about them updating their documentation to match what properties the API is actually accepting and sending.

cproetti commented 4 years ago

@calcinai So yesterday I finally got a reply from Xero after 2 months if waiting πŸ˜­γ€‚He said:

β€œSorry for the extreme delay on responding to this. Our team are working on some backend changes to the site hosting the documentation. This has made the update process slower than would be normal. Thank you for letting us know your findings.”

β€œI’ve updated the documentation so that the amount field is now included. It will take a couple more days before it is released.”

Healyhatman commented 4 years ago

Well at least they updated the documentation - they still haven't added in the AllowanceType property on Pay Items I told them was missing months ago