> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyberskill.world/llms.txt
> Use this file to discover all available pages before exploring further.

# TIME: Billable Hours, Expenses, and Labour Compliance

> CyberOS TIME tracks billable hours, expenses, and leave with Vietnamese labour-law guardrails, hóa đơn OCR, and a three-tier approval flow.

TIME is CyberOS's billable-hours engine and the integrity-grade ledger that sits between PROJ and INV. It operates on three primitives: a `TimeEntry` records minutes worked against an Engagement, Project, or Issue with a billable flag; an `Expense` records VND or USD spent with vendor, VAT, and receipt image; a `LeaveRequest` records absence with a type and a multi-step approver flow. What makes TIME more than a simple timesheet is the integrity model — entries are append-only at the audit layer, every correction creates a new row rather than editing the original, and Vietnamese Labour Code caps on regular and overtime hours are enforced as hard system rules. At billing cycle close, TIME rolls up approved billable hours per member per role per Engagement and pushes the summary to INV, where it becomes invoice line items the Account Manager reviews before sending to the client.

<Note>
  TIME is a P1 module currently in the design phase. This page describes the planned functionality from the user perspective. Refer to the platform roadmap for GA availability details.
</Note>

***

## Logging time

TIME supports three entry modes. Choose the mode that fits how you work; all three produce the same auditable `TimeEntry` record.

<Tabs>
  <Tab title="Timer">
    The timer is the fastest way to log time for work you are doing right now.

    <Steps>
      <Step title="Start the timer">
        Open TIME and click **Start Timer**. Select the Engagement, Project, and Issue you are working on. The timer begins immediately and continues running even if you navigate elsewhere in CyberOS — the active timer indicator stays visible in the sidebar.
      </Step>

      <Step title="Work">
        The timer runs in the background. You can navigate anywhere in CyberOS; the active timer indicator remains visible in the sidebar.
      </Step>

      <Step title="Stop the timer">
        Click **Stop Timer** and add a short description of what you did. CyberOS calculates the duration from your start and stop times automatically — you never type a duration.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Manual entry">
    Use manual entry to log time retroactively — for example, time you spent in a client meeting before you had TIME open.

    Open TIME, click **Log Time**, and enter the date, duration, Engagement, Project, Issue, and a description. The entry is created with a draft status and is included in your next weekly submission.
  </Tab>

  <Tab title="Auto-detect (proposal)">
    CyberOS watches your PROJ activity — Issue status changes, comments, and transitions — and proposes time entries that match that activity.

    Auto-detect proposals appear in a **Review proposals** panel. For each proposal, you see the suggested Issue, duration, and description. You can accept it as-is, edit the duration or description, or dismiss it.

    <Tip>
      Auto-detect time entries are always proposals — you confirm before they are saved. CyberOS never creates a time entry on your behalf without your explicit confirmation.
    </Tip>
  </Tab>
</Tabs>

***

## Approval flow

Every week you submit your time entries for review. The flow has three tiers, and each step is recorded in the audit trail.

<Steps>
  <Step title="Member submits weekly">
    Before the end of each work week (Sunday 23:59 at the latest), select **Submit Week** in TIME. The system validates that there are no overlapping entries and no single entry longer than 12 continuous hours, then locks the entries and notifies your Account Manager.
  </Step>

  <Step title="Account Manager reviews">
    Your Account Manager reviews each entry against the Engagement and can **Approve**, **Reject** (with a note), or **Request revision**. Approved entries flow forward to INV at cycle close. Rejected or revision-requested entries return to you as drafts to correct.
  </Step>

  <Step title="CFO visibility">
    The CFO has a read-only consolidated dashboard across all Engagements. The CFO does not need to approve individual entries but can flag overtime exceptions that require explicit CFO sign-off before the TIME → INV rollup runs.
  </Step>
</Steps>

<Note>
  You cannot approve your own time entries. The system rejects any approval attempt where the approver and the member on the entry are the same person.
</Note>

***

## Expense capture

Capture expenses by uploading a receipt photo directly from your phone or desktop. The Vietnamese `hóa đơn` OCR pipeline handles the extraction.

<Steps>
  <Step title="Upload the receipt">
    In TIME, open **Expenses → Capture Expense** and upload or photograph the receipt. CyberOS stores the image securely and begins processing it immediately.
  </Step>

  <Step title="OCR processes the receipt">
    The OCR pipeline parses the `hóa đơn` structure: vendor name, MST tax code, line items, VAT split, and total. The `vietnam-mst-validate` skill cross-checks the vendor's MST against the GDT registry. The categoriser assigns a chart-of-accounts code (for example, `T&E.meals` or `T&E.travel.taxi`) with a confidence score.
  </Step>

  <Step title="Confirm and submit">
    Review the extracted fields in the **Confirm Expense** panel. Correct anything the OCR got wrong — the OCR is high-recall but not infallible, and you are the source of truth. Once confirmed, submit the expense for AM approval.
  </Step>
</Steps>

TIME supports **VND and USD** expenses. Every expense record stores the amount in its original currency plus a Vietcombank FX rate snapshot taken on the expense date, so the VND equivalent on your invoice is always reproducible.

***

## Leave requests

File leave through TIME's leave management flow. Eight leave types are supported:

| Type              | Vietnamese          | Notes                                                 |
| ----------------- | ------------------- | ----------------------------------------------------- |
| Annual leave      | Nghỉ phép năm       | Accrues per Labour Code Art. 113 quota                |
| Sick leave        | Nghỉ ốm             | Requires manager approval                             |
| Maternity leave   | Nghỉ thai sản       | 6-month statutory entitlement                         |
| Paternity leave   | Nghỉ thai sản (cha) | Per Labour Code amendment                             |
| Sabbatical        | Nghỉ nghiên cứu     | Subject to tenure and CDO approval                    |
| Unpaid leave      | Nghỉ không lương    | Approved case-by-case                                 |
| Bereavement leave | Nghỉ tang           | Statutory + company policy                            |
| Public holiday    | Nghỉ lễ             | Pre-populated from Vietnamese public holiday calendar |

To file leave, open **TIME → Leave → New Request**, select the type, enter start and end dates, and add a reason. Your manager receives a notification and approves or rejects the request. Approved leave syncs to your Google or Outlook calendar as a two-way event.

### Vietnamese Labour Code guardrails

TIME enforces Vietnamese Labour Code Article 107 caps as hard system rules:

* **40 hours** of regular work per week (Art. 105)
* **200 hours** of overtime per year — the standard cap
* **Up to 300 hours** of overtime per year — only with documented employee consent and MoLISA notification on file

<Warning>
  The system will block time entries that would breach the Vietnamese overtime cap. Attempts to exceed 300 hours of annual overtime are blocked and immediately page the CHRO. There are no exceptions — this is a hard rule, not a warning.
</Warning>

The cap enforcer evaluates total hours per ISO week and per calendar year regardless of entry mode (timer, manual, or auto-detect proposal). You cannot work around the cap by mixing entry modes.

***

## Correction model

TIME entries are **append-only** at the audit layer. You can never edit an existing entry in place. If you need to correct a submitted or approved entry, TIME creates a new corrected entry linked to the superseded original, and marks the original as corrected.

```
Original entry A  (status=submitted)
       │
       └─── Correction B  (links back to A, status=submitted)
                 │
                 └─── AM approves B → status=approved
                      A → status=corrected
```

INV and all downstream consumers always read from the latest approved entry in a correction chain — they never see a superseded original.

<Note>
  This design means every invoice is auditable back to a specific chain of entries with a documented correction history. If a client ever disputes a line item, you can show exactly what was logged, when, and what corrections were made.
</Note>

***

## TIME → INV bridge

At billing cycle close, TIME runs the per-cycle billable rollup and pushes a summary to INV.

<Steps>
  <Step title="Rollup trigger">
    The scheduled rollup (every Monday morning) or a manual Account Manager trigger initiates the rollup for the closed week or billing period.
  </Step>

  <Step title="Billable hours aggregated">
    TIME collects all approved billable entries for the period, grouped by Engagement, member, and role. Each entry uses the rate-card snapshot recorded at entry time — not the current rate card — so retroactive rate changes never affect closed periods.
  </Step>

  <Step title="Summary pushed to INV">
    TIME pushes the rollup to INV with each line item containing Engagement, member, role, hours, rate-card snapshot, and VND total. INV creates a draft invoice for the Account Manager to review before sending to the client.
  </Step>
</Steps>

If some members have not yet submitted their weekly entries when the rollup runs, TIME flags the draft INV invoice as **incomplete** and lists the missing members. The Account Manager can wait for submissions or mark the invoice ready with the hours available.


## Related topics

- [Vietnamese Market Compliance in CyberOS](/guides/vn-compliance.md)
- [HR Module: Member Lifecycle and Vietnamese Labour Law](/modules/hr.md)
- [LEARN Module: Skill Catalogue, VP Engine, and Promotions](/modules/learn.md)
- [PROJ: Client Engagements, Projects, and Issue Tracking](/modules/proj.md)
- [CyberOS Glossary: Terms, Acronyms, and Concepts](/reference/glossary.md)
- [OBS: CyberOS Observability, Alerting, and Runbooks](/modules/obs.md)
- [VietQR Payments and Hóa Đơn Invoicing](/guides/vietqr-invoicing.md)
- [CRM: Sales Pipeline, Accounts, and Vietnamese Commerce](/modules/crm.md)
- [CyberOS AUTH: Sign-In Options, Roles, and MFA Setup](/modules/auth.md)
- [KB: Markdown Knowledge Base, Search, and AI Grounding](/modules/kb.md)
