mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
Accounting platform: remove Zoho, unify reports, board access, vendor sharing
- Remove the Zoho Books integration (edge functions, sync libs, settings, reports/overview, banking links, fees tab, import dialog); preserve fee rules as a standalone FeesTab and the COA accounting_system classification. - Financial Overview/Reports (staff + board) render the Accounting dashboard and reports; board reports mirror the rich Accounting Reports. - New Reserve Fund Schedule report + an is_reserve flag on accounts. - Unify all report exports to a branded format (logo + centered header + footer): shared ReportSheet (on-screen) and reportHeader (PDF). Budget vs Actuals and Bank Reconciliation PDFs now match the reference layout. - Render financial reports inline (no preview pop-up). - Budget Management mirrors Accounting Budgeting (staff-accessible) with SPA navigation; editable bills in the Accounting Bills page. - Negative opening balances flow through to the GL and reports (allow negative input; keep non-zero on save; signed CSV import). - Upload a per-account trial balance via CSV on Opening Balances. - Board members: read-only RLS access to their association's accounting ledger; editable board-members panel on the association page; share vendor contacts with the board (toggle + directory section). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,46 @@
|
||||
import { Building2 } from "lucide-react";
|
||||
import { useBoardAssociations } from "@/contexts/BoardAssociationContext";
|
||||
import ZohoFinancialReportsPage from "@/pages/ZohoFinancialReportsPage";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
import AccountingReportsPage from "@/pages/accounting/AccountingReportsPage";
|
||||
|
||||
/**
|
||||
* Board Financial Reports mirror the staff Accounting Reports (P&L, Balance Sheet,
|
||||
* Cash Flow, Movement of Equity, Trial Balance, General Ledger, Reserve Fund,
|
||||
* AR/AP Aging, Budget vs Actuals, Reconciliation), scoped to the board's selected
|
||||
* association. Board members have read-only access to the accounting ledger via RLS.
|
||||
*/
|
||||
export default function BoardFinancialReportsPage() {
|
||||
const { associationIds, loading } = useBoardAssociations();
|
||||
if (loading) return <div className="flex justify-center py-12"><div className="h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" /></div>;
|
||||
return <ZohoFinancialReportsPage boardAssociationIds={associationIds} />;
|
||||
const { associations, selectedAssociationId, setSelectedAssociationId, loading } = useBoardAssociations();
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="flex justify-center py-12">
|
||||
<div className="h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const selected = associations.find((a) => a.id === selectedAssociationId) ?? null;
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
{associations.length > 1 && (
|
||||
<div className="flex items-center justify-end">
|
||||
<Select value={selectedAssociationId ?? ""} onValueChange={setSelectedAssociationId}>
|
||||
<SelectTrigger className="w-[240px]">
|
||||
<Building2 className="h-4 w-4 mr-2 text-muted-foreground" />
|
||||
<SelectValue placeholder="Select association" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{associations.map((a) => (
|
||||
<SelectItem key={a.id} value={a.id}>{a.name}</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<AccountingReportsPage association={selected} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user