Patch level : 12.00 1260
Files correlati : cg4.exe Commento : Stampa registri 343130 - Le note di credito reverse charge sbagliavano il totale documento Nella stampa del prospetto delle indetraibililtà non stampava i codici IVA
This commit is contained in:
parent
d0656ff8d4
commit
13dae6de5d
@ -1180,7 +1180,7 @@ int TStampa_registri_app::riga_rmoviva(const bool fattrit)
|
|||||||
int TStampa_registri_app::setta_riga(int r, const TRigaiva& riga, real& tot1,
|
int TStampa_registri_app::setta_riga(int r, const TRigaiva& riga, real& tot1,
|
||||||
real& tot2, real& tot3, real& tot4)
|
real& tot2, real& tot3, real& tot4)
|
||||||
{
|
{
|
||||||
set_row(r, "%s", riga._codiva);
|
set_row(r, "%s", (const char *) riga._codiva);
|
||||||
|
|
||||||
TString descrizione = descr_iva(riga._codiva);
|
TString descrizione = descr_iva(riga._codiva);
|
||||||
if (riga._tipocr > 0)
|
if (riga._tipocr > 0)
|
||||||
@ -1473,6 +1473,16 @@ int TStampa_registri_app::stampa_acquisti(int row)
|
|||||||
tot_imponib = tot_imposta = tot_imponibp = tot_impostap = ZERO;
|
tot_imponib = tot_imposta = tot_imponibp = tot_impostap = ZERO;
|
||||||
|
|
||||||
_iva_array.sort(compare_righeiva);
|
_iva_array.sort(compare_righeiva);
|
||||||
|
|
||||||
|
for (int s = 0; s < _iva_array.items(); s++)
|
||||||
|
{
|
||||||
|
const TRigaiva& riga = _iva_array.riga(s);
|
||||||
|
const int tipodet = riga._tipodet;
|
||||||
|
|
||||||
|
if (tipodet == 0)
|
||||||
|
_iva_array.destroy(s);
|
||||||
|
}
|
||||||
|
_iva_array.pack();
|
||||||
for (int s = 0; s < _iva_array.items(); s++)
|
for (int s = 0; s < _iva_array.items(); s++)
|
||||||
{
|
{
|
||||||
const TRigaiva& riga = _iva_array.riga(s);
|
const TRigaiva& riga = _iva_array.riga(s);
|
||||||
@ -1665,7 +1675,7 @@ void TStampa_registri_app::set_page_tot_reg()
|
|||||||
tot_impostap+= riga._impostap;
|
tot_impostap+= riga._impostap;
|
||||||
tot_lordop += riga._implordop;
|
tot_lordop += riga._implordop;
|
||||||
}
|
}
|
||||||
arriva.destroy(); // Azzera il marciume
|
|
||||||
rr++;
|
rr++;
|
||||||
set_row(rr, TR("TOTALE"));
|
set_row(rr, TR("TOTALE"));
|
||||||
if (tot_imponib != ZERO)
|
if (tot_imponib != ZERO)
|
||||||
@ -1692,6 +1702,7 @@ void TStampa_registri_app::set_page_tot_reg()
|
|||||||
else
|
else
|
||||||
rr += 3;
|
rr += 3;
|
||||||
}
|
}
|
||||||
|
arriva.destroy(); // Azzera il marciume
|
||||||
} // for
|
} // for
|
||||||
}
|
}
|
||||||
if (printed)
|
if (printed)
|
||||||
@ -2435,6 +2446,11 @@ bool TStampa_registri_app::preprocess_page(int file, int counter)
|
|||||||
real ritsoc = mov.get(MOV_RITSOC);
|
real ritsoc = mov.get(MOV_RITSOC);
|
||||||
real ritfis = mov.get(MOV_RITFIS);
|
real ritfis = mov.get(MOV_RITFIS);
|
||||||
real revcha = is_reverse_charge(mov.curr()) ? mov.get_real(MOV_REVCHARGE) : ZERO;
|
real revcha = is_reverse_charge(mov.curr()) ? mov.get_real(MOV_REVCHARGE) : ZERO;
|
||||||
|
|
||||||
|
_tipodoc = mov.get(MOV_TIPODOC);
|
||||||
|
|
||||||
|
if (_tipodoc == "NC")
|
||||||
|
revcha = -revcha;
|
||||||
|
|
||||||
bool integrazione = false;
|
bool integrazione = false;
|
||||||
if (totdoc < ZERO) // Controlla il segno corretto da assegnare alle ritenute
|
if (totdoc < ZERO) // Controlla il segno corretto da assegnare alle ritenute
|
||||||
@ -2507,7 +2523,6 @@ bool TStampa_registri_app::preprocess_page(int file, int counter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_tipodoc = mov.get(MOV_TIPODOC);
|
|
||||||
_descr_doc = descr_doc();
|
_descr_doc = descr_doc();
|
||||||
TString app(datadoc.string(brief, '/'));
|
TString app(datadoc.string(brief, '/'));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user