PaySlipEarnings
Manages payslip earnings line items. It includes details about an employee's earnings, such as salary, wages, bonuses, and commissions.
Table Specific Information
This table supports the following operators server-side: =,IN
INSERT
To insert a single row, set the required fields. The connector adds a new earnings line to the payslip.
INSERT INTO PaySlipEarnings (PaySlipID, EarningsLine_EarningsRateId, EarningsLine_RatePerUnit, EarningsLine_NumberOfUnits) VALUES ('ea5aaaa7-c330-41d8-bfae-98ddc1f37680', 'fc394b8d-ff2e-4f10-992b-2a41390ad2c4', 4, 20)
Earnings lines can also be added in bulk by specifying multiple items in the VALUES clause.
INSERT INTO PaySlipEarnings (PaySlipID, EarningsLine_EarningsRateId, EarningsLine_RatePerUnit, EarningsLine_NumberOfUnits)
VALUES
('ea5aaaa7-c330-41d8-bfae-98ddc1f37680', 'fc394b8d-ff2e-4f10-992b-2a41390ad2c4', 4, 20),
('ea5aaaa7-c330-41d8-bfae-98ddc1f37680', 'fc394b8d-ff2e-4f10-992b-2a41390ad2c4', 5, 30)
UPDATE
You can update any field that is not read-only.
Note: UPDATE operations will count as two operations against the Xero API. One is required to retrieve the existing record, and another to update the record with new data.
UPDATE PaySlipEarnings SET EarningsLine_RatePerUnit = 5 WHERE Id = '2|ea5aaaa7-c330-41d8-bfae-98ddc1f37680'
DELETE
Supply the Id to delete payslip earnings lines.
DELETE FROM PaySlipEarnings WHERE Id = '2|ea5aaaa7-c330-41d8-bfae-98ddc1f37680'
Columns
| Name | Type | ReadOnly | Filterable | Description |
| Id [KEY] | String | True |
A unique identifier for the earnings line item, which is a combination of the line item and the unique Xero identifier of the associated payslip. This allows each specific earnings entry to be tracked and referenced within the payroll system. | |
| PayslipID | String | False |
The unique identifier for the payslip assigned by Xero. This identifier allows the payrun and its associated earnings and deductions to be linked to the specific payslip. | |
| EmployeeID | String | True |
The unique identifier for the employee whose earnings are detailed in the payslip. This ID helps to associate the payslip's earnings with the correct employee in the payroll system. | |
| EarningsLine_EarningsRateId | String | False |
The unique identifier of the earnings rate applied to this line item. The earnings rate defines the pay scale or the conditions under which an employee's wages are calculated (such as hourly or salary). | |
| EarningsLine_RatePerUnit | Decimal | False |
The wage rate applied per time unit (such as per hour or per day). This value defines how much the employee earns for each unit of time worked, important for calculating total earnings in hourly-based pay systems. | |
| EarningsLine_NumberOfUnits | Double | False |
The number of time units worked in this particular line item. For hourly workers, this is the number of hours worked, and it's multiplied by the rate per unit to calculate the total earnings for this line. | |
| EarningsLine_FixedAmount | Decimal | False |
The total fixed earnings in this line item. This appears only when the earnings type is FIXED, meaning the employee is paid a set amount regardless of the number of hours or units worked. | |
| EarningsLine_LumpSumETaxYear | String | False |
The tax year that applies to these earnings. This field is used only when the earnings type is 'LUMPSUME', typically for one-off payments such as bonuses, which may be reported separately for tax purposes. | |
| TenantId | String | False |
The unique identifier for the tenant (or organization) in Xero. This ensures that the earnings data is linked to the correct organization and prevents data confusion when managing multiple organizations. |