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);