Adding Employee Details and Allocating Timesheets with UK Payroll API

Offen
#640 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
15/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
nodejs, typescript
Bereich
api

Rechercherichtung

The report involves xero.payrollUKApi.createEmployeeSalaryAndWage in the xero-node SDK (generated from Xero-OpenAPI) and the employee creation call that sets payrollCalendarID. Start by reproducing both calls against the UK payroll endpoints with the request bodies shown, using SDK 4.33.0. Done means the salary and wage is saved without the _default validation error, and the employee keeps the payrollCalendarID you sent. The thread has no maintainer reply, so confirm the expected request shape with Xero first.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I'm trying to add employee details through an API and allocate timesheets for employees using UK payroll. However, I encountered a couple of issues that I need assistance with.

Case 1: Issue with Payroll Calendar ID
While creating an employee, I set the payrollCalendarID, but it seems that the employee is being created with a null value for the payrollCalendarID. I'm not sure why this is happening and would appreciate any guidance on how to resolve it.

Case 2: Error when Adding Salary and Wage
I attempted to add salary and wage details for an employee using the following code snippet:

const response = await xero.payrollUKApi.createEmployeeSalaryAndWage(
  xeroTenantId,
  employeeId,
  {
    earningsRateID: earningsRateID, // I obtained the earnings Rate ID from the server
    numberOfUnitsPerWeek: 0,
    ratePerUnit: 14,
    numberOfUnitsPerDay: 12,
    effectiveFrom: "2023-01-01",
    annualSalary: 10000,
    status: "Active",
    paymentType: "Hourly",
  }
);

However, I received the following error:

"invalidFields":[{"name":"_default","reason":"Please add a salary & wage."}]}, "salaryAndWages":null

I'm using version 4.33.0 of the Xero API.

I would greatly appreciate any help or insights on how to resolve these issues. Thank you in advance!


Vorherrschende Sprache
TypeScript
Sterne
264
Forks
177
Ø Merge
10 Std. 5 Min.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus XeroAPI/xero-node

Alle Issues in XeroAPI/xero-node

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.