Corretto errore MI2160 sul riepilogo progressivi
git-svn-id: svn://10.65.10.50/trunk@3613 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f978a256e2
commit
7b2da0f8cf
@ -405,6 +405,7 @@ void TProgressivi_iva::cerca_i_pim()
|
||||
impos += imposta;
|
||||
}
|
||||
break;
|
||||
case acq_bd_ind_art_19:
|
||||
case acq_ind_art_19:
|
||||
if (_tipoprog == 1) break;
|
||||
if (_tipo_aliq == 4)
|
||||
@ -744,7 +745,7 @@ void TProgressivi_iva::prospetto_pagina(TGen_array& gen, TIva_array& iva)
|
||||
set_row(r++, "Totale@24g%r@40g%r@62g%r@78g%r@100g%r@116g%r",
|
||||
&t_impov,&t_imposv,&t_impoa,&t_imposa,&t_impobd,&t_imposbd);
|
||||
r++;
|
||||
real im, is, d; //inizializzati in cerca_tipo()
|
||||
real im, is, d, im1, is1, d1; //inizializzati in cerca_tipo()
|
||||
cerca_tipo(iva,acq_ind_op_es,im,is,d);
|
||||
t_impoa += im;
|
||||
t_imposa += is;
|
||||
@ -755,11 +756,14 @@ void TProgressivi_iva::prospetto_pagina(TGen_array& gen, TIva_array& iva)
|
||||
st_riga = TRUE;
|
||||
}
|
||||
cerca_tipo(iva,acq_ind_art_19,im,is,d);
|
||||
t_impobd += im;
|
||||
t_imposbd += is;
|
||||
if (im != ZERO || is != ZERO)
|
||||
cerca_tipo(iva,acq_bd_ind_art_19,im1,is1,d1);
|
||||
t_impoa += im;
|
||||
t_imposa += is;
|
||||
t_impobd += im1;
|
||||
t_imposbd += is1;
|
||||
if (im != ZERO || is != ZERO || im1 != ZERO || is1 != ZERO)
|
||||
{
|
||||
set_row(r++, "Totali acquisti indeducibili per ART.19@100g%r@116g%r", &im, &is);
|
||||
set_row(r++, "Totali acquisti indeducibili per ART.19@62g%r@78g%r@100g%r@116g%r", &im, &is, &im1, &is1);
|
||||
st_riga = TRUE;
|
||||
}
|
||||
cerca_tipo(iva,acq_ind_pass_int,im,is,d);
|
||||
|
@ -24,7 +24,7 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t, bool tipost)
|
||||
// cominciamo cosi'
|
||||
imp = ZERO; iva = ZERO;
|
||||
|
||||
for (int i = last_checked + 1; i <= MAX_TIPOREC; i++)
|
||||
for (int i = last_checked + 1; i <= MAX_TIPOREC+1; i++)
|
||||
{
|
||||
tiporec tocheck = (tiporec)i;
|
||||
bool found = FALSE;
|
||||
@ -77,7 +77,7 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t, bool tipost)
|
||||
break;
|
||||
case bolle_doganali:
|
||||
//if (tipomov == 2 && tipoiva != "NS")
|
||||
if (tipomov == 2)
|
||||
if (tipomov == 2 && tipodet != 9) // scarta le bolle doganali con tipo detr. == 9
|
||||
{
|
||||
imp = pimr.get_real("R9");
|
||||
iva = pimr.get_real("R10");
|
||||
@ -191,8 +191,8 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t, bool tipost)
|
||||
found = tipomov == 2 && tipodet == 9 && tipoiva != "NS";
|
||||
if (found)
|
||||
{
|
||||
imp = pimr.get_real("R0");
|
||||
iva = pimr.get_real("R1");
|
||||
imp = pimr.get_real("R0") - pimr.get_real("R9"); // toglie le bolle doganali (sono a parte)
|
||||
iva = pimr.get_real("R1") - pimr.get_real("R10");
|
||||
found &= (!imp.is_zero() || !iva.is_zero());
|
||||
}
|
||||
break;
|
||||
@ -224,9 +224,18 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t, bool tipost)
|
||||
found &= (!imp.is_zero() || !iva.is_zero());
|
||||
}
|
||||
break;
|
||||
case acq_bd_ind_art_19:
|
||||
found = tipomov == 2 && tipodet == 9 && tipoiva != "NS";
|
||||
if (found)
|
||||
{
|
||||
imp = pimr.get_real("R9");
|
||||
iva = pimr.get_real("R10");
|
||||
found &= (!imp.is_zero() || !iva.is_zero());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == MAX_TIPOREC)
|
||||
if (i == MAX_TIPOREC+1)
|
||||
last_checked = -1;
|
||||
else if (found)
|
||||
{
|
||||
|
@ -31,13 +31,14 @@ enum tiporec { acq_norm = 0, vend_norm = 1, // acquisti e vendite normali
|
||||
acq_ind_art_19 = 15, // indetr. art. 19
|
||||
cess_amm = 16, // cessioni amministrative
|
||||
vend_rimborso = 17, // vendite valide per rimborso
|
||||
acq_rimborso = 18 // acq. validi per rimborso
|
||||
acq_rimborso = 18, // acq. validi per rimborso
|
||||
acq_bd_ind_art_19 = 19 // acq. con tipo documento BD e tipo detr 9
|
||||
// ACHTUNG: se si aggiunge, cambiare sotto!!!
|
||||
};
|
||||
|
||||
// questo serve nel cpp ma lo metto qua se no
|
||||
// non lo cambiero' mai quando serve
|
||||
const int MAX_TIPOREC = 18;
|
||||
const int MAX_TIPOREC = 19;
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// "classifica" un record progressivo IVA passato per reference
|
||||
|
Loading…
x
Reference in New Issue
Block a user