OK, first off, let me say that I had this running perfectly with another Xero account with absolutely no issues.
I am using the PayrollAU API with PHP.
I have since created a new Xero account.
My process is;
- Create each employees timesheet and mark it as approved and post to Xero using createTimesheet
- Create the “DRAFT” pay run using createPayRun
- Search for my “DRAFT” pay run using getPayRuns and then get all the pay slips from that pay run using getPayslips
Process 3 works but it does not return the pay slip ID for each pay slip.
When I log into Xero through their website and look at the pay run, all the pay slips(timesheets) in the pay run are un-highlighted. If I select Include All, it then includes all pay slips(timesheets) in the pay run and I can run process 3 and retrieve all the pay slip ID’s.
with the old Xero account, all the pay slips were highlighted after process 2 and I was able to retrieve the pay slip ID’s without having to log into the Xero website.
The only things that have changed are the payroll calendar ID and the pay item ID’s along with the new log in details.Ahh OK I think it may be because I have created an uscheduled payrun by including setPayRunPeriodEndDateAsDate. I have commented this out now but have to wait untill next weeks pay run to see if it works.
Do all the employees have a pay template with hours greater than 0 on at least one earnings line?
2