Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 5.1 KB

File metadata and controls

28 lines (22 loc) · 5.1 KB
name project-mtp-accounting-study
description Accounting module study complete — 19 clusters + 4 cross-cuts. Non-obvious legacy gaps the new build must own from day one.
metadata
type
project

The legacy ACC_* accounting module of GNUMS was studied cluster-by-cluster (2026-05-19 → 2026-05-20). Source-of-truth deliverable: gnums/accounting/scope.html + the 23 cluster docs under gnums/accounting/clusters/.

Why: Multiple non-obvious gaps emerged that a future me re-reading the codebase would not assume. These shape architecture decisions for the new MTP build.

How to apply: When planning any accounting-adjacent feature in the new platform, treat the following findings as load-bearing constraints, not refinements:

  1. Legacy has NO period close. dbo.GetFinalLockLevel() is a RETURN 1 stub used only by exam/academic. Voucher inserts accept @VoucherDate with zero validation against FY or lock-date. The new platform must build period close from scratch — it's not a port. See cross-C-config-fy.md.
  2. MST_FinYear has no IsClosed / LockDate column; IsActive is decorative. FY model = new design too.
  3. MST_Company has no BaseCurrency / Locale / FYStart — all implicit INR / en-IN / Apr-Mar. Multi-currency / multi-locale = new design.
  4. GST module is just a rate master (ACC_GSTPCT, 22+ Indian-compliance gaps logged). No place-of-supply, no RCM, no GSTR-1/3B/9 JSON, no IRN/e-invoice, no e-way bill, no HSN master, no CDN tables, no ITC eligibility, no multi-GSTIN. See cluster-16-gst.md.
  5. TDS amount is computed UPSTREAM at source-row insert (e.g. PI bill entry). Cluster 15 (TDS) owns only section master, PAN-section linkage, monthly aggregation, challan tracking, 26Q export prep — not the per-bill TDS calc. See cluster-15-tds.md.
  6. Cluster 3 (Posting Bridge) is the hub. Every source-type (PI, SI, Refund, FundTransfer, FeeCollectionBank, OPDReceiptCollection, TDS, ExpertRemuneration, ...) has its own multi-hundred-line voucher-insert SP. Hub-and-spoke posting bridge is the dominant pattern, not a generic ledger writer. See cluster-03-posting-bridge.md.
  7. No Trial Balance / Balance Sheet / Schedule III P&L in legacy. 16 RDLCs exist but the statutory three are absent. Must be built. See cross-A-reports.md.
  8. HDFC is the only outbound corporate bank rail. 13 inbound fee gateways (Razorpay, PayU, SBIePay, CCAvenue, etc.). No Tally / GSTN / NSDL / BankStatement integration folders — all statutory filing is RDLC-export + manual portal upload. See cross-B-integrations.md.
  9. OPD Receipt Collection is HOSPITAL-only and a copy-paste of Fee Collection Bank. New build should fold both into a single ReceiptDeposit abstraction. See cluster-14-opd-receipt.md.
  10. i18n catalog: 124 verbatim THROW messages across PR_ACC_*, zero RAISERROR (already migrated). 50+ key proposed naming scheme + legacy code → HTTP status map captured in cross-D-i18n.md.
  11. Cluster 13 (Fee Collection Bank) is the heart of school accounting — three posting variants (Standard / NoContraCash / ForOther), bank-reconcile-date snapshot/restore, system-lock + verification handshake. Single most critical workflow to model correctly. See cluster-13-fee-collection.md.

Decisions + designs made (2026-05-24): Two architecture decisions now resolve the Tier-2 banking/setup gaps and must not be re-litigated — ADR-0026 Approval Framework (one generic IApprovalWorkflow<TSubject> over a polymorphic (SubjectType, SubjectId) subject, amount-tiered + M-of-N joint-signing steps, events to the audit stream; replaces the 4 legacy JournalApproval_InsertFor* SPs + SEC_ApprovalStructure copy-paste; no MediatR/CQRS) and ADR-0027 Cheque Lifecycle (real leaf state machine Blank→PostDated/Issued→Presented→Cleared +Bounced/Stopped/Cancelled; clearance from statement import; issue gated by ADR-0026 joint-signing; print = QuestPDF positioned PDF, never GDI+/HTML→PDF; adds MICR/IFSC/SWIFT/UPI to the bank master). Nine new house-style mockups designed (mockups/accounting-{approvalframework,company,currency,signatory,cheque,onlinepayment,statementimport,statementmatcher,pgconsole}.html) — the Setup batch (FIN-CFG-APPR/CMP/CCY) and Banking batch (FIN-BNK-SIG/CHQ/OBP/IMP/MATCH/PGW) are now READY in 12-build-plan.html; period-close is [[../adr/0024-period-close-model]] (ADR-0024). Remaining open Tier-2 ADR: e-Invoice IRN.

Related: [[project-mtp-gnums-logic-in-sps]] (this study confirmed the SP-heavy pattern), [[project-mtp-gnums-conventions]] (ACC_ prefix mapping).