diff --git a/src/tf/tf0200.cpp b/src/tf/tf0200.cpp index 9bbfc96a9..fccfb8d5f 100644 --- a/src/tf/tf0200.cpp +++ b/src/tf/tf0200.cpp @@ -125,7 +125,7 @@ int calc_inc_diff(int anno, int mese, int tipoiva, real& imposta_diff, real& imp switch (tipodiff) { case 1: - imposta_diff += iva; + imposta_diff += iva; break; case 2: imposta_xcas += iva; @@ -152,7 +152,7 @@ int calc_inc_diff(int anno, int mese, int tipoiva, real& imposta_diff, real& imp perc_prorata = p; } - if (perc_prorata > ZERO) + if (imposta_diff > ZERO && perc_prorata > ZERO) { real ind = imposta_diff * perc_prorata / CENTO; ind.round(TCurrency::get_firm_dec()); @@ -508,8 +508,12 @@ void ComLiqPerIva_mask::extractinator() // Per gli amici GTFO // IVA detraibile imposta_diff = imposta_xcas = ZERO; + TString pippo = ivadetxc.stringa(); + TString pluto = imposta_xcas.stringa(); // 2 = Acquisti calc_inc_diff(anno, start, REG_PAS, imposta_diff, imposta_xcas); + pippo = ivadetxc.stringa(); + pluto = imposta_xcas.stringa(); ivadetxc = ivadetxc + imposta_xcas; ivadetdiff = ivadetdiff + imposta_diff; }