Reconciliation: set cleared=false on transfer far leg (NOT NULL fix)

The far-account transfer leg omitted cleared, violating the column's
not-null constraint. Default it to false; the near leg stays cleared=true.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 15:57:00 -04:00
parent 59c23dfec1
commit f063d05ae0
@@ -500,7 +500,7 @@ export default function AccountingReconcileDetailPage() {
{ {
company_id: cid, account_id: transfer.other_account_id, date: transfer.date, type: otherType, amount: amt, company_id: cid, account_id: transfer.other_account_id, date: transfer.date, type: otherType, amount: amt,
description: `Transfer ${transfer.direction === "out" ? "from" : "to"} ${thisName}${memo ? `${memo}` : ""}`, description: `Transfer ${transfer.direction === "out" ? "from" : "to"} ${thisName}${memo ? `${memo}` : ""}`,
category: "Transfer", transfer_id: transferId, category: "Transfer", transfer_id: transferId, cleared: false,
}, },
]; ];
const { data, error } = await accounting.from("transactions").insert(rows).select("id,account_id"); const { data, error } = await accounting.from("transactions").insert(rows).select("id,account_id");