# Timesheets & Time Tracking

Timesheets let managers review, approve, and export employee work hours. Combined with the Workbook's clock-in/clock-out system, BuyerKiosk provides a complete time tracking solution from punch to payroll export.

---

## Accessing Timesheets

Navigate to **Admin** > **Schedule** > **Timesheets**, or go directly to `/admin/{storeCode}/schedule/timesheets`.

You can also reach Timesheets from the Schedule Calendar by clicking the `Timesheets` button in the primary header bar.

You need the `uri_schedule` permission to view timesheets.

---

## Timesheet Dashboard

The dashboard provides an overview of all employee hours for either a single week or a two-week pay period. It includes:

- **Week navigation** -- Browse timesheets using the previous / next arrows or the `Today` button.
- **Pay-period toggle** -- Switch between `1 Week` and `2 Weeks` views. The 2-week view aggregates a standard biweekly pay period and is the recommended layout for running payroll. See the [Pay Period View](#pay-period-view) section below.
- **Employee summary rows** -- Each employee shows their hours, status, and pay totals for the selected period. In 2-week view, you'll see `Wk 1 Hours`, `Wk 2 Hours`, and `Total Hours` side by side.
- **Click-to-drill-down** -- Click any employee row to open their detailed timesheet.

### Dashboard Actions

| Action | Description |
|--------|-------------|
| **Approve All** | Bulk-approve all pending timesheets for the selected week (1-week view only — hidden in 2-week view) |
| **Export CSV** | Quick export of the visible period (see [Exporting Timesheets](#exporting-timesheets)) |
| **Custom Export…** | Open the export modal to pick any range up to 26 weeks |
| **Back to Schedule** | Return to the Schedule Calendar |

---

## Pay Period View

Use the `1 Week` / `2 Weeks` toggle next to the date navigation to switch between a single-week summary and a full biweekly pay-period summary.

| View | Best for |
|------|----------|
| **1 Week** | Daily review, approving timesheets, editing punches, comparing scheduled vs. actual |
| **2 Weeks** | Running biweekly payroll, exporting CSVs, seeing Week 1 and Week 2 side by side |

### What changes in 2-week view

- The header reads **Pay Period of {Mon Date, Year}** with the full 14-day range shown underneath.
- Navigation arrows step one week at a time, so you can slide the period without skipping a pay cycle.
- The employee table columns become `Employee`, `Wk 1 Hours`, `Wk 2 Hours`, `Total Hours`, `OT`, `Total Pay`, `Status`. Scheduled / Actual / Variance / Break / Actions columns are hidden — those are only meaningful for a single week.
- The status badge reflects both weeks: `Approved` shows when both weeks are approved; otherwise `{N} Pending` (where N is 1 or 2), or `Exported` once both weeks have been marked exported.
- `Approve All` is hidden — approval still happens one week at a time from the 1-week view or the employee detail page.
- KPI totals display with two decimals so they line up exactly with the per-row `Wk 1` / `Wk 2` / `Total` columns.

---

## Employee Timesheet Detail

Click an employee name on the dashboard to view their detailed timesheet at `/admin/{storeCode}/schedule/timesheets/{employeeId}`.

The detail view shows:

- **Daily breakdown** -- Each day's punches (clock in, clock out, breaks) with timestamps
- **Calculated hours** -- Automatic calculation of worked hours per day
- **Weekly total** -- Sum of all hours for the week
- **Scheduled vs. Actual** -- Comparison of scheduled shift times against actual punch times
- **Approval status** -- Whether the timesheet has been approved or is still pending

### Editing Time Punches

Managers can correct punch errors directly from the detail view:

1. Locate the punch entry that needs correction.
2. Click the punch time to edit it.
3. Enter the corrected time.
4. Save the change.

### Adding Manual Punches

If an employee forgot to clock in or out:

1. Open their timesheet detail page.
2. Click the option to add a manual punch.
3. Select the punch type (clock in or clock out).
4. Enter the correct date and time.
5. Save the new punch.

### Deleting Punches

To remove an erroneous punch:

1. Locate the punch on the detail page.
2. Click the delete option.
3. Confirm the deletion.

> **Warning:** Deleting a punch cannot be undone. Double-check the entry before confirming.

### Approving a Timesheet

1. Review the employee's hours for accuracy.
2. Click `Approve` to lock the timesheet.
3. Once approved, punches can no longer be edited unless the timesheet is unlocked.

### Unlocking an Approved Timesheet

If corrections are needed after approval:

1. Click `Unlock` on the approved timesheet.
2. Make the necessary edits.
3. Re-approve when finished.

---

## Clock In / Clock Out (Workbook Kiosk Mode)

The Workbook provides a kiosk-style time punch interface designed for shared terminals. Employees select their name and enter a PIN to clock in or out.

### Clock-In Flow

1. From the Workbook schedule panel, select your name from the employee list.
2. Enter your clock PIN.
3. The system verifies your PIN and records the clock-in time.
4. Your status on the schedule panel updates to "Clocked In."

### Clock-Out Flow

1. Select your name from the employee list.
2. Enter your clock PIN.
3. The system records your clock-out time.
4. Your total hours for the shift are calculated automatically.

### Breaks

Employees can also track breaks:

1. While clocked in, select your name and enter your PIN.
2. Choose `Start Break` to begin a break.
3. When returning, select your name, enter your PIN, and choose `End Break`.

Break time is automatically subtracted from total worked hours.

### Manager Override

If an employee cannot clock in or out (forgotten PIN, technical issue), a manager can perform an override:

1. Use the manager override option on the time punch screen.
2. Enter the manager PIN.
3. Select the employee and the action (clock in, clock out, start/end break).
4. The override is logged in the audit trail.

---

## Schedule Panel

The schedule panel (accessible via the Workbook) shows today's scheduled employees alongside their current clock status:

| Status | Meaning |
|--------|---------|
| **Scheduled** | Employee has a shift today but has not clocked in yet |
| **Clocked In** | Employee is currently on the clock |
| **On Break** | Employee is currently on break |
| **Clocked Out** | Employee has completed their shift |

This gives managers a real-time view of who is working, who is on break, and who has not yet arrived.

---

## Exporting Timesheets

Two export buttons sit in the dashboard toolbar:

| Button | Use it for… |
|--------|-------------|
| **Export CSV** | A one-click export of the visible period (1-week or 2-week) |
| **Custom Export…** | A specific date range, finer control over what's included, and optional bookkeeping (mark as exported) |

### Quick Export (current view)

Click `Export CSV` to export the period that's currently on screen.

| View | What it exports | When it's enabled | Side effect |
|------|-----------------|-------------------|-------------|
| **1 Week** | The visible week, **approved timesheets only** | Once at least one timesheet is approved | Approved rows are flagged **Exported** |
| **2 Weeks** | The full 14-day pay period, **all employees** (approved + pending) | Whenever there is data | None — does **not** mark anything as exported |

### Custom Export…

For everything outside the standard one-click flow, use **Custom Export…**:

1. Click `Custom Export…` (sliders icon) in the toolbar.
2. Pick a quick range — **Current view**, **1 week**, **2 weeks**, or **4 weeks** — or set the **Start week** and **End week** date pickers to any date inside the desired weeks.
3. The blue preview box shows `{N} weeks selected: {Start} – {End}` and resolves your raw dates to `Week of …` / `Week ending …` labels underneath the inputs.
4. Decide whether to:
   - **Include unapproved timesheets** (default on) -- uncheck to export approved rows only.
   - **Mark approved timesheets as exported after download** (default off) -- check this when this download represents the official payroll run; matching rows will switch to the **Exported** status afterwards.
5. Click `Download CSV`.

#### Limits and validation

- The end week must be on or after the start week.
- Maximum range is **26 weeks** -- wider ranges are blocked with a red warning in the preview box.

> **Tip:** A common payroll workflow is: switch to **2 Weeks** view, navigate to the pay period that just closed, approve any pending rows, open **Custom Export…**, click the **Current view** preset, and click **Download CSV** with `Mark approved as exported` checked.

> **Tip:** Export after all timesheets for the period are approved to ensure the data is final, or use **Custom Export…** with `Include unapproved` unchecked to get an approved-only file at any point in the cycle.

---

## Troubleshooting

### Employee's punches are not appearing
- Confirm the employee clocked in through the Workbook time punch interface (not through an external system).
- Check that the punch was recorded for the correct store.
- Verify the date range on the timesheet dashboard matches the expected dates.

### Clock-in shows "Invalid PIN"
- Have the employee verify their PIN with a manager.
- The PIN is set in the employee's user profile under store assignments.

### Hours calculation seems wrong
- Check for missing punches. A clock-in without a corresponding clock-out (or vice versa) can produce incorrect totals.
- Review break entries -- an unclosed break will affect calculations.
- Add manual punches to correct any gaps.

### Cannot edit an approved timesheet
- Approved timesheets are locked. Click `Unlock` to re-enable editing, then re-approve after corrections.

---

## Related Articles

- [Schedule Calendar](/support/articles/schedule-calendar) -- Creating and managing shifts
- [My Schedule](/support/articles/my-schedule) -- Employee personal schedule view
