From d18296c3a638b236ea05031153c28a174bdf2de6 Mon Sep 17 00:00:00 2001 From: renee-png Date: Tue, 9 Jun 2026 22:35:33 -0400 Subject: [PATCH] Accounting Banking: allow cash deposits with no homeowner The Banking-page deposit form required a homeowner, blocking general/cash deposits. Drop that requirement: a deposit still needs an income account, and post_transaction_gl already books Dr Bank / Cr income when no customer is set (vs. Dr Bank / Cr A/R with one). The Homeowner field is now optional with an explicit "No homeowner (general deposit)" choice. Co-Authored-By: Claude Opus 4.8 --- src/pages/accounting/AccountingBankingPage.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/accounting/AccountingBankingPage.tsx b/src/pages/accounting/AccountingBankingPage.tsx index 6392985..3b5b00a 100644 --- a/src/pages/accounting/AccountingBankingPage.tsx +++ b/src/pages/accounting/AccountingBankingPage.tsx @@ -298,7 +298,8 @@ export default function AccountingBankingPage() { if (!amount || amount <= 0) return toast.error("Amount can't be zero"); if (!coa_account_id) return toast.error(`${type === "credit" ? "Income" : "Expense"} account (COA) required`); if (type === "debit" && !vendor_id) return toast.error("Vendor required for payments"); - if (type === "credit" && !customer_id) return toast.error("Homeowner required for deposits"); + // Homeowner is optional on a deposit: a cash/general deposit posts Dr Bank / + // Cr the chosen income account (no A/R). With a homeowner it clears A/R instead. const coaName = (accounts as any[]).find((a) => a.id === coa_account_id)?.name ?? ""; const vendorName = (vendors as any[]).find((v) => v.id === vendor_id)?.name ?? ""; @@ -910,10 +911,11 @@ export default function AccountingBankingPage() { ) : (
- - setTxForm({ ...txForm, customer_id: v === "__none" ? "" : v })}> + + No homeowner (general deposit) {(customers as any[]).map((c: any) => ( {c.name} ))}