ZyncDocs · MY-Payroll · Modules · GL journal posting (detailed)
Must Should Could
Detailed Functional Requirements

GL Journal Posting — Detailed Requirements

An approved run is turned into a single balanced general-ledger journal entry: one consolidated Salary Expense debit, offset by credits for item deductions, employee statutory shares, PCB, and per-employee net salary payable. The posting is previewable, guarded against unmapped accounts, and must exist before a run can be marked paid.

5
Leg families
4
Requirements
1
Balancing identity

One expense debit

Σ gross salary in one line — allowances, OT and bonus are folded in.

Liability credits

Deductions, statutory shares, PCB and net pay each credit their payable account.

Preview first

A dry-run surfaces unmapped items and totals before anything is written.

Employee side only

Employer statutory and HRDF are deliberately excluded from the salary journal.

GL Posting · Detailed

Journal legs GL-L

Per approved run, calculated employees only. Each line carries the employee as payee and a descriptive remark.

LegSideAccountAmount
Salary ExpenseDRPayroll expense account (config)Σ gross salary — one consolidated line
Item deductionsCREach deduction item's own account|amount| per employee per item
Employee statutoryCRContribution group's per-scheme accountEmployee share per contribution (e.g. "EPF (Employee)")
PCB taxCRPayroll tax account (config)Tax per employee (when > 0)
Net salaryCRSalary liability account (chosen or config)Net pay per employee (when > 0)

Balancing identity: DR gross = CR deductions + CR employee statutory + CR PCB + CR net — which holds because net = gross − deductions − statutory − tax. The finance module independently validates balance before accepting the entry.

FR-GL-L01Must
Posting SHALL create one balanced general journal entry dated on the run's pay date, described as "Payroll: {run name}", with the legs above; each transaction line SHALL carry the employee as payee.
Acceptance criteria
  • The journal entry id is stored on the run, unblocking mark-as-paid.
  • Employer statutory contribution lines are built for preview grouping but removed before posting — employer costs are settled outside the salary journal.
  • The HRDF levy never appears in the salary journal.

GL Posting · Detailed

Preview & guards GL-P

The preview is a no-write twin of the posting, and the posting refuses to create an unbalanced or misconfigured entry.

FR-GL-P01Must
The system SHALL provide a journal preview returning the prospective lines, debit/credit totals, the net salary total, and the list of unmapped item names — deduction items or statutory types with no GL account.
Acceptance criteria
  • Preview never writes and has no status gate; posting requires APPROVED.
  • Preview totals equal what posting would write.
FR-GL-P02Must
Posting SHALL fail — rather than post an unbalanced entry — when any deduction or statutory line lacks a GL account (naming the offenders), or when no net-salary liability account resolves from the request or configuration.
Acceptance criteria
  • The error lists every unmapped item by name.
  • The liability account may be overridden per posting; the choice is remembered on the run.

GL Posting · Detailed

Re-posting GL-R

FR-GL-R01Must
Re-posting an already-journalled run SHALL delete the prior journal entry first, then create a fresh one — never leaving two live entries for one run.
Acceptance criteria
  • Posting and the entry-swap happen in one transaction.
  • Exception: a recalculation clears the run's journal link without deleting the entry — see Known gaps.

GL Posting · Detailed

Business rules

  • Journal before payment — mark-as-paid is impossible without a linked journal entry.
  • Only calculated employees post; zero-value tax/net lines are omitted.
  • Account resolution order for net salary: explicit argument → configured liability account → error.
  • Accounts come from three places: the config singleton (expense, tax, liability), the item catalogue (deduction payables), and the contribution group (statutory payables).

GL Posting · Detailed

Known gaps

Employer costs never reach the GL. Employer EPF/SOCSO/EIS and the HRDF levy are computed and stored on the run but posted nowhere; the configured employer-expense account is dead. Employer-side accounting must be handled by separate manual journals.
Recalculation orphans a posted journal. Re-running clears the journal link without deleting the entry; a subsequent post creates a second entry unless the first is manually removed.
No per-component expense split. Allowances, overtime and bonus have no dedicated expense lines — a single consolidated Salary Expense debit carries everything.
No payment/disbursement leg. Settling the salary-payable liability (the actual bank payment) is a separate manual finance entry; payroll only records the accrual.