From 84e5e26200b893260e4a80050077cb9fe11f24d9 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Fri, 20 Oct 2023 19:26:26 +0200 Subject: [PATCH] Patch level : 12.00 1294 Files correlati : sc0.exe Commento : Programma di esportazione partite per scadenza --- src/sc/sc0500.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/sc/sc0500.cpp b/src/sc/sc0500.cpp index 4216ee4fd..f65a8bbfb 100644 --- a/src/sc/sc0500.cpp +++ b/src/sc/sc0500.cpp @@ -114,7 +114,7 @@ void TEsportazione_partite::main_loop() for (int s = 1; s <= nrate; s++) { TRiga_scadenze & scad = riga.rata(s); - TImporto residuo = scad.residuo(false); + TImporto residuo = scad.residuo_al(false, al, 0xF, true); if (!residuo.is_zero()) { @@ -144,6 +144,34 @@ void TEsportazione_partite::main_loop() } } } + + TImporto nass = p.importo_pagato_unassigned_al(false, al, 0xF, true); + + if (!nass.is_zero()) + { + TRiga_partite & riga = p.riga(p.first()); + int gruppo = riga.get_int(PART_GRUPPO); + + out.new_rec(); + if (gruppo == 0) + gruppo = riga.get_int(PART_GRUPPOCL); + out.set("GRUPPO", gruppo); + + int conto = riga.get_int(PART_CONTO); + + if (conto == 0) + conto = riga.get_int(PART_CONTOCL); + out.set("CONTO", conto); + out.set("SOTTOCONTO", riga.get_long(PART_SOTTOCONTO)); + out.set("NUMDOC", riga.get(PART_NUMDOC)); + out.set("DATADOC", riga.get(PART_DATADOC)); + + TString sezione; + + out.set("SALDO", nass.valore().stringa()); + sezione << nass.sezione(); + out.set("SEZIONE", sezione); + } } } }