Funded-only investments/contract payments + reversal helper #10

Open
leora wants to merge 2 commits from leora/coffer:leora/funded-only-investments into main
Contributor
  • transfer with tx_kind investment or contract_payment draws funded lots only and raises InsufficientCredit if funded is short (granted credit is for services). Other transfers keep promo-first.
  • Ledger.reverse_tx(tx, reason): correcting entries, one <kind>_reversal per original draw kind with reverses_seq; refuses double reversal.
  • tests/test_funded_only.py: 40 promo + 60 funded investing 100 raises and leaves promo untouched; funded-only draws; contract payment; reversal. 27 tests pass.

Context: ledger seq 39 (Leora -> company:orbit 100c) drew 40c promo. Correction (seq 40-42) is prepared but not run, pending approval.

- `transfer` with tx_kind `investment` or `contract_payment` draws funded lots only and raises InsufficientCredit if funded is short (granted credit is for services). Other transfers keep promo-first. - `Ledger.reverse_tx(tx, reason)`: correcting entries, one `<kind>_reversal` per original draw kind with `reverses_seq`; refuses double reversal. - tests/test_funded_only.py: 40 promo + 60 funded investing 100 raises and leaves promo untouched; funded-only draws; contract payment; reversal. 27 tests pass. Context: ledger seq 39 (Leora -> company:orbit 100c) drew 40c promo. Correction (seq 40-42) is prepared but not run, pending approval.
leora added 1 commit 2026-10-15 21:53:29 +08:00
leora added 1 commit 2026-10-15 21:55:50 +08:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u leora/funded-only-investments:leora-leora/funded-only-investments
git checkout leora-leora/funded-only-investments
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cursorman/coffer#10
No description provided.