From 3d80a270caf8d26e49696c83cdef6aee3781133d Mon Sep 17 00:00:00 2001 From: Stephen Waits <1+swaits@noreply.git.swaits.com> Date: Sun, 11 Oct 2026 15:31:55 +0000 Subject: [PATCH] Payroll accounting, class tracking, CPA handoff package (48 MCP tools) --- crates/ledger-core/src/error.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/ledger-core/src/error.rs b/crates/ledger-core/src/error.rs index 86c247e..f9fdd1c 100644 --- a/crates/ledger-core/src/error.rs +++ b/crates/ledger-core/src/error.rs @@ -222,4 +222,32 @@ pub enum LedgerError { /// and the engine disagree about event ordering. #[error("replay id mismatch: journal says {0}, allocator expects {1}")] ReplayIdMismatch(u64, u64), + + /// A payroll run must have at least one employee line. + #[error("payroll run must have at least one line")] + EmptyPayroll, + + /// Payroll amounts must not be negative. + #[error("payroll amount must not be negative, got {0}")] + NegativePayrollAmount(Decimal), + + /// Net pay went negative: withholdings exceed gross for this employee. + #[error("payroll net pay for '{0}' is negative")] + NegativeNetPay(String), + + /// No payroll tax payables are outstanding: nothing to remit. + #[error("no payroll tax payables to remit")] + NothingToRemit, + + /// The referenced payroll run does not exist. + #[error("unknown payroll run id {0}")] + UnknownPayrollRun(u64), + + /// Class names must not be empty. + #[error("class name must not be empty")] + EmptyClassName, + + /// The referenced class does not exist. + #[error("unknown class id {0}")] + UnknownClass(u32), }