REPOSITORY CODING · HARD
Reverse an original journal at most once, swap every debit and credit, and roll back reversal markers when journaling fails
Reverse an original journal at most once, swap every debit and credit, and roll back reversal markers when journaling fails. The complete application includes native models, services, repository projections, a working preview and visible acceptance cases. Preserve the other documented invariants and run bash test/run.sh.
accountingDouble entry ledger closing laboratory
Work through a real codebase.
Choose an environment, investigate the existing implementation and use the tests to check your change. Sign in to open a workspace; execution and Ono usage follow your plan’s allowances.
Task requirements and environments
Ruby on Rails · 80 minute session
- Report natural account balances using debit-positive assets and expenses, and credit-positive income, liabilities and equity.
- Balance every currency separately. Equal amounts in different currencies do not form a balanced journal.
- A closed day is inclusive. Reject every posting or reversal on or before the closed period without changing state.
- Reverse an original journal at most once, swap every debit and credit, and roll back reversal markers when journaling fails.
- Respect the inclusive statement cutoff and preserve credit-normal signs for non-asset accounts. A statement never includes future journals.
- All amounts are positive integer minor units. At most twenty accounts, sixty commands and twelve lines per journal. Each command is atomic and audit is appended only on success. This is a synthetic ledger, with no payment execution.