Add Phase 19 bank accounting and reconciliation workflow

This commit is contained in:
A R R R Associates
2026-08-24 15:23:49 +05:30
parent 67ebd587e9
commit 769add8cb8
17 changed files with 1363 additions and 10 deletions
+13
View File
@@ -293,6 +293,19 @@ def _ensure_reviewed(tx):
if tx.posting_status == "posted":
raise ValueError("This bank transaction is already posted.")
# Phase 19: reconciliation is a duplicate-safety control. Rows already
# matched/probably matched to Tally must not be posted as new vouchers.
if getattr(tx, "reconciliation_status", "not_tested") in {
"matched",
"probable_match",
"duplicate_candidate",
}:
raise ValueError(
"Bank Reconciliation indicates that this transaction already has, "
"or probably has, a corresponding Tally voucher. Resolve the "
"reconciliation item instead of posting a duplicate entry."
)
def queue_preflight(db, *, tx_id, tenant_id, client_id, workstation_id, user_id):
tx = db.get(AccountingBankTransaction, tx_id)