Skip to content

Commit 08e1f9e

Browse files
Document AU timesheet line creation best practice in tool descriptions
For AU payroll, timesheets should be created empty then lines added individually via add-timesheet-line. Passing lines at creation time creates separate rows per day in the Xero UI instead of consolidating them by earnings rate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c734fc8 commit 08e1f9e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/tools/create/create-payroll-timesheet.tool.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { CreateXeroTool } from "../../helpers/create-xero-tool.js";
99
const CreatePayrollTimesheetTool = CreateXeroTool(
1010
"create-timesheet",
1111
`Create a new payroll timesheet in Xero.
12-
Supports AU, NZ, and UK payroll regions. The organisation's region is auto-detected.`,
12+
Supports AU, NZ, and UK payroll regions. The organisation's region is auto-detected.
13+
IMPORTANT: For AU payroll, create the timesheet WITHOUT timesheetLines, then use add-timesheet-line to add lines one at a time. Passing lines at creation time creates separate rows per day in the UI instead of consolidating them by earnings rate.`,
1314
{
1415
payrollCalendarID: z.string().describe("The ID of the payroll calendar."),
1516
employeeID: z.string().describe("The ID of the employee."),

src/tools/update/update-payroll-timesheet-add-line.tool.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { CreateXeroTool } from "../../helpers/create-xero-tool.js";
99
const AddTimesheetLineTool = CreateXeroTool(
1010
"add-timesheet-line",
1111
`Add a new timesheet line to an existing payroll timesheet in Xero.
12-
Supports AU, NZ, and UK payroll regions. The organisation's region is auto-detected.`,
12+
Supports AU, NZ, and UK payroll regions. The organisation's region is auto-detected.
13+
For AU payroll, this is the recommended way to add hours. Lines added this way with the same earnings rate are consolidated into a single row in the UI. Add one line per day per earnings rate.`,
1314
{
1415
timesheetID: z.string().describe("The ID of the timesheet to update."),
1516
timesheetLine: z.object({

0 commit comments

Comments
 (0)