Adding Employee Details and Allocating Timesheets with UK Payroll API

Aperta
#640 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
nodejs, typescript
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!


Lingua principale
TypeScript
Stelle
264
Fork
177
Merge medio
10h 5m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di XeroAPI/xero-node

Tutte le issue di XeroAPI/xero-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.