Skip to content

Double entry accounting milestone 6 - #85

Merged
chongfun merged 2 commits into
double_entry_accounting_milestone_5from
double_entry_accounting_milestone_6
Aug 24, 2026
Merged

Double entry accounting milestone 6#85
chongfun merged 2 commits into
double_entry_accounting_milestone_5from
double_entry_accounting_milestone_6

Conversation

@chongfun

Copy link
Copy Markdown
Owner

Implement:

Tenancy
└── SecurityDeposit
    └── SecurityDepositTransaction
        ├── received
        ├── refunded
        └── applied

with accounting:

Deposit received
  Dr Cash
  Cr Security Deposits Held

Deposit refunded
  Dr Security Deposits Held
  Cr Cash

Deposit applied
  Dr Security Deposits Held
  Cr Tenant Receivable

The last operation settles an already-existing Charge. It does not recognize income again.

At the end of the milestone:

  • deposit requirement is visible on the Tenancy;
  • deposit held is derived from accounting postings;
  • money can be received into the deposit liability;
  • held money can be refunded;
  • held money can be applied against an existing Charge;
  • liability can never go negative;
  • deposits never become ordinary Receipts;
  • security deposits never contribute to ordinary rent-received reporting.

@chongfun chongfun self-assigned this Aug 17, 2026
…workflows

- Add SecurityDeposit and SecurityDepositTransaction models with immutability and lifecycle guards
- Add double-entry posting and balance queries for security_deposits_held liability account
- Implement LiabilityTimeline validator enforcing non-negative liability across full timeline
- Implement ReceiveService, RefundService, ApplyService, VoidService, and CorrectService
- Add concurrency protection and lock ordering (Expense -> SecurityDeposit -> Charge)
- Add tenancy dashboard UI, transaction views, correction workflow, and property financial integration
- Add RBS type signatures, Rubocop cleanups, unit/request/feature specs with >97% line and >90% branch coverage
@chongfun
chongfun force-pushed the double_entry_accounting_milestone_6 branch from 492cbf0 to d940bf7 Compare August 21, 2026 06:03
@chongfun
chongfun merged commit 8db8e79 into main Aug 24, 2026
5 checks passed
@chongfun
chongfun deleted the double_entry_accounting_milestone_6 branch August 24, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant