תפעול החברה
טיוטה: Finance
הכנסות מנויים ועמלות, רישום הוצאות ואומדן מע״מ מבוסס מסמכים.
בעמוד הזה
Finance extends the existing staff-only Admin with monthly subscription and charging-commission collections, internal expense records and a document-based VAT estimate. The workspace uses the approved Admin components, tokens and navigation. Its styles are scoped to lna-finance-* selectors.
Scope and source of truth#
- Confirmed collections come from persisted billing obligations and successful payment attempts. Subscription and charging-commission streams remain separate.
- Charging energy turnover belongs to the operator ledger. It is not added to LinkNodes collections or inferred as commission revenue.
- Refunds reduce cash only when confirmed. VAT credit evidence is evaluated separately.
- Expenses store document date, payment date, net amount, actual document VAT and explicit deduction evidence. All amounts are integer ILS agorot.
- Annual subscription cash receipts appear in their collection month. Recognized accounting revenue and profit are not inferred from cash receipts; MRR remains in RevOps.
Existing catalog prices, accepted agreements, commission rates and the pricing activation gate are unchanged. The provider research in charging-fee-research-20261121.md is evidence for a future pricing decision, not an active tariff.
Expense workflow#
Authorized staff can create an expense and void an incorrect entry with a reason. Voiding preserves the original record and audit history. A corrected expense is a new record. No supplier payment, refund, tax filing or outgoing message is initiated by these commands.
Both commands use actor-bound idempotency keys. A retry of the same command returns the original result; changing its payload while retaining the key is rejected. Duplicate active tax-invoice entries with the same supplier and document reference are rejected. An uncertain network result retains the original command and locks the form until the same request is reconciled.
Preview changes stay in component memory and are discarded when leaving the workspace or reloading. The standalone HTML preview uses only synthetic fixtures and forbids outgoing connections through its Content Security Policy.
VAT calculation and evidence#
The expected amount is output VAT from qualifying issued documents minus explicitly approved deductible input VAT. Negative results remain visible as an estimated credit. Pending input VAT is not automatically deducted. A missing or ambiguous invoice, unresolved payment, unmatched credit note or partial credit with no reliable tax split makes the affected VAT estimate unavailable.
Invoice date, payment date and deduction date are separate. The module preserves stored tax amounts and does not apply today's standard rate to every historical record. For approved input VAT it requires a verified tax document, an explicit eligible amount and claim date, and a verified allocation number when the document exceeds the applicable threshold. The selected period is a calendar month in Asia/Jerusalem; it is not an automatically prepared monthly or bimonthly statutory return.
Relevant primary guidance checked on 21 November 2026:
- Israel Tax Authority: VAT reporting and payment: output tax less deductible input tax.
- VAT rate interpretation 01/2025: standard rate of 18% for tax events from 1 January 2025, with tax timing determined by the transaction.
- Allocation-number threshold from 1 June 2026: transactions exceeding ILS 5,000 before VAT require the relevant allocation evidence for deduction.
This workspace provides an estimate from recorded evidence. It does not determine the company's legal tax treatment or submit a VAT return.
Access and database integration#
GET /api/admin/finance requires finance.read. POST requires finance.write, verified current staff identity and factors, the canonical Admin origin, bounded JSON and validated fields. Permissions are derived from the server-owned staff registry, not customer membership or client-supplied claims. See admin-access.md.
The additive migration 20261121170000_company_admin_finance.sql introduces private expense/audit tables and narrowly granted read/write functions. Anonymous and customer-authenticated roles cannot invoke them. Direct expense/audit mutations are revoked; commands preserve audited immutable history. The migration has been checked on isolated local PostgreSQL, not applied to a hosted project as part of this change.
The normal database regression runner includes test-company-admin-finance.mjs. The Admin Playwright configuration includes admin-finance.spec.ts for desktop and mobile.
Current limits#
- The report covers recorded ILS activity; external accounting records, bank balances and foreign currencies are not imported.
- Invoice file uploads are not part of this version. Expense document references and verification fields are stored.
- Each monthly source is limited to 1,000 rows. If a source exceeds that limit, its totals become unavailable instead of presenting a partial sum as complete.
- Historical subscription invoices are cross-checked against the available subscription price/tax facts. If those facts have since changed and no reliable matching basis remains, VAT requires review. Partial credit notes also require review.
- Unpaid obligations are not collected cash. Annual collections are not a substitute for accrual revenue recognition.
- Live use depends on the existing identity/Admin release chain, an applied migration, configured staff permissions and verified billing/document sources. A READY synthetic preview is not evidence of production activation.
Rollback#
This change is stacked on 167e29720880a5b05f40f728ee5fe6ac65a7d0a4 (Admin PR #68). Revert the Finance change or redeploy the previous Admin revision to remove the module. If the migration is later applied, preserve its financial records and audit history; do not drop them merely to roll back the UI.