M8 · Scadenzario e tesoreria (v0.8.0) #127

Merged
Alby96 merged 8 commits from feat/69-tesoreria into main 2026-11-13 10:09:49 +01:00
Owner

M8 — Scadenzario e tesoreria (v0.8.0).

What changes

  • Schedule (#69): the open items of the ledger with aging, filters, change of due date/method/bank/dispute,
    statement of account with late interest, CSV export.
  • Collections and payments (#69): several items of one party, full or partial, allowances, bank fees, exchange
    differences, credit notes; INC/PAG entry in the same transaction; cancellation with reversal; the withholding of
    a professional's invoice becomes due when the invoice is paid.
  • Remittances (#70): RiBa CBI file, SDD core/B2B pain.008.001.08, SEPA credit transfers pain.001.001.09;
    draft → file → presentation (bills for collection or advance) → credit; unpaid effects reopen the item and turn the
    fees into a new item. SDD mandates with FRST/RCUR.
  • Bank reconciliation (#71): CSV (layout detected from the header), CBI and CAMT.053 imports without duplicates;
    scored proposals from items, payments, F24, remittances and saved rules; confirm one or all from 90%; manual
    matching, posting to an account, ignore, undo.
  • Reminders and cash flow (#72): three editable levels with channels, late interest (D.Lgs. 231/2002, 2026 rates
    checked), agent notice and customer block; scheduled job finance.dunning; cash flow forecast from items,
    remittances, orders, recurring entries and F24; due dates and overdue total on the dashboard.
  • Demo, docs and closure (#73): demo treasury when FIN is licensed; ADR 0038; wiki Scadenzario rewritten with
    screenshots, user guide and related pages updated; CHANGELOG 0.8.0, STATUS, MODULES, DATA-MODEL.

Verification

Release build with warnings as errors; 823 tests green locally (Core 148, Fiscal.Italy 139, Application 106, Infrastructure 101, Data 110, Web 219), PostgreSQL 18 tests included. Screens checked in the browser on the demo company and captured for the wiki.

Closes #69
Closes #70
Closes #71
Closes #72
Closes #73

🤖 Generated with Claude Code

M8 — Scadenzario e tesoreria (v0.8.0). ## What changes - **Schedule** (#69): the open items of the ledger with aging, filters, change of due date/method/bank/dispute, statement of account with late interest, CSV export. - **Collections and payments** (#69): several items of one party, full or partial, allowances, bank fees, exchange differences, credit notes; `INC`/`PAG` entry in the same transaction; cancellation with reversal; the withholding of a professional's invoice becomes due when the invoice is paid. - **Remittances** (#70): RiBa CBI file, SDD core/B2B `pain.008.001.08`, SEPA credit transfers `pain.001.001.09`; draft → file → presentation (bills for collection or advance) → credit; unpaid effects reopen the item and turn the fees into a new item. SDD mandates with FRST/RCUR. - **Bank reconciliation** (#71): CSV (layout detected from the header), CBI and CAMT.053 imports without duplicates; scored proposals from items, payments, F24, remittances and saved rules; confirm one or all from 90%; manual matching, posting to an account, ignore, undo. - **Reminders and cash flow** (#72): three editable levels with channels, late interest (D.Lgs. 231/2002, 2026 rates checked), agent notice and customer block; scheduled job `finance.dunning`; cash flow forecast from items, remittances, orders, recurring entries and F24; due dates and overdue total on the dashboard. - **Demo, docs and closure** (#73): demo treasury when FIN is licensed; ADR 0038; wiki *Scadenzario* rewritten with screenshots, user guide and related pages updated; CHANGELOG 0.8.0, STATUS, MODULES, DATA-MODEL. ## Verification Release build with warnings as errors; 823 tests green locally (Core 148, Fiscal.Italy 139, Application 106, Infrastructure 101, Data 110, Web 219), PostgreSQL 18 tests included. Screens checked in the browser on the demo company and captured for the wiki. Closes #69 Closes #70 Closes #71 Closes #72 Closes #73 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Alby96 added this to the M8 — Scadenzario e tesoreria · v0.8.0 milestone 2026-11-13 10:00:18 +01:00
Alby96 added 8 commits 2026-11-13 10:00:19 +01:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open items gain their schedule state; payments, remittances, mandates, bank
statements, match rules and dunning get their tables. Pure rules for aging,
allocation, payment posting, late interest, bank matching, dunning levels and
cash flow periods. The Italian pack adds the treasury accounts, templates and
the late payment rates of D.Lgs. 231/2002.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remittances need files the banks accept and statements need readers for
reconciliation, without external libraries:

- SepaXmlWriter writes pain.001.001.09 credit transfers and pain.008.001.08
  direct debits (one PmtInf per sequence and collection date), reducing texts
  to the SEPA Latin set and refusing what a bank would reject.
- Camt053Reader reads any camt.053.001.xx by local names; CsvStatementReader
  reads home banking exports (UTF-8 or Windows-1252, Italian or English
  numbers) and guesses the layout from the header row.
- The Italian pack gains RibaCbiWriter (CBI Ricevute bancarie, 120-character
  records IB/14/20/30/40/50/51/70/EF) and CbiStatementReader (RH/61-64/EF).
- Tests validate the SEPA files against hand-written subsets of the ISO 20022
  schemas, to be replaced by the official XSDs when available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The schedule lists the open items with aging, disputes and statement of
account; a collection or payment settles items with allowances, exchange
differences and fees, writes its INC/PAG entry and makes the withholding of a
fully paid invoice due. Reposting a document now updates its items by
installment and refuses to drop what was already collected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remittances draft the items due, write the RiBa CBI or SEPA pain.001/pain.008
file, present them (bills account and advance, or supplier payments), credit
them and record unpaid effects with their fees. The reconciliation imports
CSV, CBI and CAMT.053 statements without duplicates and proposes matches with
open items, payments, F24, remittances and saved rules. Reminders follow three
levels with late interest, e-mail/PEC/letter and customer block, also from a
scheduled task; the cash flow forecasts 90 days by week.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The demo company gets a bank account with the capital paid in, collections and
supplier payments (one customer pays only half), a RiBa remittance presented,
credited and with one effect back unpaid, a draft remittance for the next weeks,
a direct debit mandate, a CSV statement to reconcile with a rule for the bank
fees, and a first reminder already sent. The seeder runs only when FIN is
licensed and only once.

The tests run the demo on a real instance: collections registered and cancelled,
the CBI file written, the statement reconciled, reminders and cash flow, with the
trial balance checked after every flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pages of the Scadenzario area follow mockups 053-057: open items with aging,
the collection and payment dialog, collections and payments of a period,
remittances (new, file, presentation, credit, unpaid), SDD mandates, reminders
with levels and history, bank reconciliation with rules, and the cash flow
forecast. The dashboard shows the items due among the deadlines and the overdue
receivables among the things to do. Texts are in Treasury.json; the menu lists
the new pages and no longer marks the area as coming.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: close M8 with treasury wiki, screenshots and screen fixes (#69 #70 #71 #72 #73)
CI / Build and test (SQLite) (pull_request) Successful in 3m51s
CI / PostgreSQL 16 integration (pull_request) Skipped
CI / PostgreSQL 17 integration (pull_request) Skipped
CI / YAML check (pull_request) Successful in 5s
CI / Docker image (pull_request) Successful in 1m22s
f38b5894ce
Rewrite the Scadenzario wiki page from the real screens and services, add
ADR 0038, the 0.8.0 changelog, STATUS, MODULES and the regenerated data
model, and update the pages that still pointed to M8.

The browser check found a few screen defects, fixed here: reminder
channels are flags, so they show as "e-mail + PEC" and are edited with
check boxes; icon buttons in grids stay on one row; the summary strip no
longer collapses on long pages; the customers/suppliers switch uses the
right style; the cash flow bars scale between the lowest and highest
balance. The late payment rate of the second half of 2026 is 2.40 (MEF,
GU 163 of 16 July 2026), now covered by tests, and the mapping test
knows the ten treasury tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alby96 merged commit 0debd82983 into main 2026-11-13 10:09:49 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: BalboSoft/Khaemhat#127