Patch level : 12.0 744

Files correlati     : tf
Commento            : Aggiunto controllo mese attuale durante il calcolo del totale liq.
This commit is contained in:
Mattia Tollari 2019-03-25 16:17:04 +01:00
parent 56746e985e
commit ec7d8be377

View File

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