From ec7d8be3773ab947ef382d5c1a07be810e660912 Mon Sep 17 00:00:00 2001 From: Mattia Tollari Date: Mon, 25 Mar 2019 16:17:04 +0100 Subject: [PATCH] Patch level : 12.0 744 Files correlati : tf Commento : Aggiunto controllo mese attuale durante il calcolo del totale liq. --- src/tf/tf0200.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tf/tf0200.cpp b/src/tf/tf0200.cpp index d7d812ba1..12206c11f 100644 --- a/src/tf/tf0200.cpp +++ b/src/tf/tf0200.cpp @@ -456,7 +456,10 @@ void TCom_liq_per_iva_msk::extractinator() // Per gli amici GTFO if(codiva.tipo() == "NS") continue; // Controllo che la registrazione sia di del mese che mi interessa o con flag "liquidazione periodo precedente" - if (cur_iva.get("23." MOV_DATAREG).as_date().month() == start || start == cur_iva.get("23." MOV_MESELIQ).as_int()) + const int month_reg = cur_iva.get("23." MOV_DATAREG).as_date().month(); + const int month_liq = cur_iva.get("23." MOV_MESELIQ).as_int(); + // month_liq viene valorizzato solo se è del mese precedente o sempre? Nei record vecchi ovviamente sarà a zero ma adesso che ci mette? + if ((month_reg == start && (month_liq == 0 || month_liq == month_reg)) || start == month_liq) { // Prendo il tipo di registro TRegistro reg(cur_iva.get(FIELD_NAME(LF_MOV, MOV_REG)).as_string(), anno);