Add Phase 19 bank accounting and reconciliation workflow
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user