Patch level : 12.0
Files correlati : Commento : Uniti tuuti gli header di cglib in cglib.h Aggiunto l'oggetto TMovimento_contabile con le funzioni per calcolare l'imponibile e l'imposta
This commit is contained in:
parent
aed538d01e
commit
4216fd9904
@ -343,11 +343,15 @@ real TMovimento_contabile::imponibile(const char * codiva) const
|
|||||||
{
|
{
|
||||||
real imponibile;
|
real imponibile;
|
||||||
const TString8 cod(codiva);
|
const TString8 cod(codiva);
|
||||||
int last_iva = iva().last_row();
|
|
||||||
|
if (iva_rows() > 0)
|
||||||
|
{
|
||||||
|
const int last_iva = iva().last_row();
|
||||||
|
|
||||||
for (int i = iva().first_row(); i <= last_iva; i = iva().succ_row(i))
|
for (int i = iva().first_row(); i <= last_iva; i = iva().succ_row(i))
|
||||||
if (cod.blank() || cod == iva(i, false).get(RMI_CODIVA))
|
if (cod.blank() || cod == iva(i, false).get(RMI_CODIVA))
|
||||||
imponibile += iva(i, false).get_real(RMI_IMPONIBILE);
|
imponibile += iva(i, false).get_real(RMI_IMPONIBILE);
|
||||||
|
}
|
||||||
return imponibile;
|
return imponibile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -355,11 +359,15 @@ real TMovimento_contabile::imposta(const char * codiva) const
|
|||||||
{
|
{
|
||||||
real imposta;
|
real imposta;
|
||||||
const TString8 cod(codiva);
|
const TString8 cod(codiva);
|
||||||
int last_iva = iva().last_row();
|
|
||||||
|
if (iva_rows() > 0)
|
||||||
|
{
|
||||||
|
int last_iva = iva().last_row();
|
||||||
|
|
||||||
for (int i = iva().first_row(); i <= last_iva; i = iva().succ_row(i))
|
for (int i = iva().first_row(); i <= last_iva; i = iva().succ_row(i))
|
||||||
if (cod.blank() || cod == iva(i, false).get(RMI_CODIVA))
|
if (cod.blank() || cod == iva(i, false).get(RMI_CODIVA))
|
||||||
imposta += iva(i, false).get_real(RMI_IMPOSTA);
|
imposta += iva(i, false).get_real(RMI_IMPOSTA);
|
||||||
|
}
|
||||||
return imposta;
|
return imposta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user