Skip to content

feat(finance360): add Financeiro 360 ledger, reconciliation, cash flow, DRE, audit, admin UI and mobile contracts - #239

Merged
devmnsoft merged 1 commit into
mainfrom
codex/implementar-financeiro-360-definitivo
Sep 1, 2026
Merged

devmnsoft merged 1 commit into
mainfrom
codex/implementar-financeiro-360-definitivo

Conversation

@devmnsoft

Copy link
Copy Markdown
Owner

Motivation

  • Provide a single, auditable Financeiro 360 ledger to remove gaps between Atendimento/Checkout, Cash, Payments, Commissions, Payroll/Payouts and BI by introducing append-only postings, receivables/payables, reconciliation, cash-flow and DRE surfaces.
  • Enforce business rules: no simulated payments/reconciliations/payouts/payroll/DRE, decimal-based money, idempotent postings, and manual-authorized settlements only.
  • Expose an Admin UI and mobile read contracts so consumers can query confirmed financial data without inventing values.

Description

  • Added a Finance360 API surface with multiple controllers under Backend/Presentation/BarberSync.Api/Controllers/Finance360Controllers.cs and mobile endpoints under /api/mobile/finance360.
  • Implemented services and models in Backend/Presentation/BarberSync.Api/Services/Finance360/ including FinancialPostingService, AccountsReceivableService, AccountsPayableService, ReconciliationService, CashFlowService, DreService and FinanceAuditService, plus DTOs in Finance360Models.cs.
  • Created SQL schema and readiness fixtures in ScriptsSQL/script_completo.sql and ScriptsSQL/production_readiness_seed.sql for finance tables (accounts/categories/cost-centers/receivables/payables/postings/reconciliations/cash-flow/DRE/audit/delinquency) with idempotent CREATE/INDEX/ON CONFLICT rules.
  • Added Admin UI pages, JS and CSS under Web/BarberSync.AdminWeb/Views/Finance360, wwwroot/js/finance360.js and wwwroot/css/finance360.css, plus a menu item in the sidebar.
  • Integrated posting/receivable creation into checkout confirmation (atomic writes) and registered finance services in Program.cs; updated mobile client contracts in MobileApp/src/services/api.js and smoke tests to include Financeiro 360.
  • Strengthened validators and CI checks by updating scripts/validate-ui-contracts.* and scripts/validate-source-integrity.* to assert no visible technical ID fields in Finance360 forms and to detect fake financial outcomes or use of binary floats in the new finance code.

Testing

  • Ran the repository readiness/validation pipeline: ./scripts/validate-readiness-contracts.sh, ./scripts/validate-ui-contracts.sh, and ./scripts/validate-source-integrity.sh, all of which completed successfully and emitted EVIDENCE:UI_CONTRACTS_STATIC:PASS and EVIDENCE:SOURCE_INTEGRITY_STATIC:PASS.
  • Ran JavaScript static checks and smoke tests: node --check across Web/Mobile/Totem JS files, npm test --prefix MobileApp and npm test --prefix Totem, and Totem build succeeded; Mobile and Totem smoke tests passed and reported FINANCE360_MOBILE_CONTRACTS_OK.
  • CI-adjacent validations (YAML parse, git diff --check, JS validators) passed; dotnet builds/tests were not executed in this environment because dotnet was not available.

Codex Task

@devmnsoft
devmnsoft merged commit 7e00851 into main Sep 1, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant