Calcul tranzit: coeficient distanta rotunjit la 3 zecimale + protectie impartire la 0

Pentru distante scurte (ex. 0.2 km) coeficientul de distanta rotunjit la 2
zecimale iesea 0, deci valoarea facturata era 0. Rotunjire la 3 zecimale in
do_executa si in afisarea "mod de calcul". Protectie la impartirea cu 0 la
valoarea finala cand valoarea convoiului calculat este 0.

Adauga docs/fluxuri_calcul_facturare.md (lant facturare end-to-end pe tipuri)
si referinta in CLAUDE.md. Changelog 2.0.5.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 13:45:20 +03:00
parent d9bf25016f
commit 69c5290a8d
8 changed files with 374 additions and 1 deletions

View File

@@ -120,6 +120,12 @@ throughout the codebase:
the `crsFactura` structure, the VAT formulas, and which files to touch for a given task. Key
rule: `PACK_FACTURARE.pck` is the source of truth; the `frm_factura` preview must mirror its
formulas, and reports/list only read package-computed values.
- **`docs/fluxuri_calcul_facturare.md`** — the end-to-end billing chain (Import → Calcul →
Salvare → Listare) documented per service type (tranzit, cheiaj, chirii, penalități, apă,
diverse): where source data is imported from (RORIS/`ips_*`), the exact value/coefficient
formulas and roundings, where results are persisted, and what reports/recapitulations read
back. Read this to find which file:line computes a given value. Includes a "Capcane cunoscute"
section (e.g. the distance-coefficient rounding that zeroes sub-32m distances).
- **`Programe/proceduri_acnpro_rapoarte.prg`** — report-generation procedures feeding the
`Rapoarte/*.frx` layouts (factura, recapitulatie_cheiaj/tranzit/penalitati, registru tranzit).
- **`Programe/importroris*.prg`** + `importroris.pjx` — a *separate* small executable