XeroAPI / Xero-NetStandard

A wrapper of the Xero API in the .NetStandard 2.0 framework. Supports Accounting, Payroll AU/US, and Files
MIT License
127 stars 124 forks source link

Get Payslip returns same EarningsRateID for all LeaveEarningsLines (AU Payroll) #575

Closed humphrey closed 1 week ago

humphrey commented 2 weeks ago

SDK you're using (please complete the following information):

Describe the bug API returns the same EarningsRateID (Id in the SDK) for all LeaveEarningsLines. This is not an issue with the SDK as the API Explorer returns these same Id's also. This means that it is impossible to determine the leave type from a PaySlip.

Example output from API explorer:

{
  // ...
  "Payslip": {
     // ...
    "LeaveEarningsLines": [
      {
        "EarningsRateID": "12345678-1234-1234-1234-123456789012",
        "RatePerUnit": 30.72,
        "NumberOfUnits": 30.4,
        "PayOutType": "DEFAULT"
      },
      {
        "EarningsRateID": "12345678-1234-1234-1234-123456789012",
        "RatePerUnit": 5.376,
        "NumberOfUnits": 30.4,
        "PayOutType": "DEFAULT"
      },
      {
        "EarningsRateID": "12345678-1234-1234-1234-123456789012",
        "RatePerUnit": 30.72,
        "NumberOfUnits": 7.6,
        "PayOutType": "DEFAULT"
      }
    ],
    // ...
  }
}

To Reproduce Create a payslip with mulitple leave earnings lines items or different leave types and call the API. They will all have the same EarningsRateId

Expected behavior EarningsRateId's that correlate to the leave type

github-actions[bot] commented 2 weeks ago

PETOSS-669

github-actions[bot] commented 2 weeks ago

Thanks for raising an issue, a ticket has been created to track your request

Sallyhornet commented 2 weeks ago

This is not an issue with the SDK, it is a limitation of the API itself.

At the moment the leave type id is not surfaced in the payslips. All you see is the earnings rate id and this relates to the ordinary earnings rate for the employee as the leave amount is based on the ordinary earnings rate of pay.

humphrey commented 2 weeks ago

Yeah, so basically there is no way of determining the leave type id reliabily. You could compare these values to the leave applications, but this would be ambigous if a leave application spanned over multiple pays. What is the process of requesting this being fixed in the API itself?

Sallyhornet commented 1 week ago

You could raise a feature request on Uservoice here http://xero.uservoice.com/forums/250567-xero-payroll-api