Stampe, classificazione pim, scorporo corrispettivi

git-svn-id: svn://10.65.10.50/trunk@1205 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1995-04-04 09:05:49 +00:00
parent bdfdd1b7e7
commit 4cec333328
4 changed files with 20 additions and 17 deletions

View File

@ -83,11 +83,13 @@ struct TRiga_iva : public TArray
class TIva_array : public TArray
{
public:
bool add_riga(const tiporec& tipo, const real& imponibile, const real& imposta, const real& detr);
bool add_riga(const tiporec& tipo, const real& imponibile,
const real& imposta, const real& detr);
TRiga_iva& riga(int i) { return (TRiga_iva&)(*this)[i]; }
};
bool TIva_array::add_riga(const tiporec& tipo, const real& imponibile, const real& imposta, const real& detr)
bool TIva_array::add_riga(const tiporec& tipo, const real& imponibile,
const real& imposta, const real& detr)
{
bool found = FALSE;
for (int i = 0; i < items(); i++)
@ -97,7 +99,7 @@ bool TIva_array::add_riga(const tiporec& tipo, const real& imponibile, const rea
{
found = TRUE;
r._imponibile += imponibile;
r._imposta += imposta;
r._imposta += imposta;
r._detrazione += detr;
}
}
@ -125,12 +127,14 @@ class CG0400_application : public TPrintapp
Importi _mesi[13];
liste _tipo_lista;
public:
public:
virtual bool user_create();
virtual bool user_destroy();
virtual bool set_print(int);
virtual bool preprocess_page(int,int);
virtual print_action postprocess_page(int,int);
void cerca_i_pim();
void azzera_mesi();
void get_dati_ditta();

View File

@ -98,12 +98,12 @@ void TLiquidazione_app::recalc_corrispettivi(int month, const char* codatt)
_plm->rewrite();
// Aggiorno i luridi pim
look_pim(month, codatt, ci->_codreg, "0", ci->_codiva, ci->_tipodet, TRUE);
look_pim(month, codatt, ci->_codreg, "", ci->_codiva, ci->_tipodet, TRUE);
imponibile += _pim->get_real("R0");
imposta += _pim->get_real("R1");
_pim->put("R0", imponibile);
_pim->put("R1", imposta);
_pim->put("R1", imposta);
_pim->rewrite();
}
}

View File

@ -937,24 +937,22 @@ void TLiquidazione_app::set_plm(_DescrItem& d)
&(d._r3),
&(d._r4),
&(d._r5));
set_row(rw++,"");
}
if (!d._r6.is_zero())
{
set_row(rw++,"di cui per acquisti intracomunitari@107g%r", &(d._r6));
set_row(rw++,"");
}
if (!(d._r7.is_zero() && d._r8.is_zero()))
{
set_row(rw++,"Totali acquisti indeducibili per art.19@91g%r@107g%r",
&(d._r7), &(d._r8));
set_row(rw++,"");
}
if (! (d._r9.is_zero() && d._r10.is_zero()))
{
set_row(rw++, "Totale acquisti indeducibili su ricavi esenti@91g%r@107g%r",
&(d._r9),
&(d._r10));
set_row(rw++,"");
}
real acq_pint(d._s0);
@ -965,7 +963,6 @@ void TLiquidazione_app::set_plm(_DescrItem& d)
set_row(rw++, "Totale acquisti indeducibili per passaggi interni@91g%r@107g%r",
&acq_pint,
&acq_pint_iva);
set_row(rw++,"");
}
real iva74ter(d._s2);
@ -973,20 +970,22 @@ void TLiquidazione_app::set_plm(_DescrItem& d)
{
set_row(rw++, "Iva dovuta - 74ter@41g%r", &iva74ter);
d._r1 += iva74ter;
set_row(rw++,"");
}
real tot1 = d._r7 + d._r4 + d._r9 + acq_pint;
real tot2 = d._r8 + d._r5 + d._r10 + acq_pint_iva;
if (tot1 != d._r4 || tot2 != d._r5)
if (tot1 != d._r4 || tot2 != d._r5)
{
set_row(rw++, "");
set_row(rw++,"Totale Generale IVA@25g%r@41g%r@58g%r@74g%r@91g%r@107g%r",
&(d._r0),
&(d._r1),
&(d._r2),
&(d._r3),
&tot1,
&tot2);
&tot2);
}
}

View File

@ -33,8 +33,8 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
{
case acq_norm:
found = tipomov == 2 && tipoiva != "NS";
found &= (tipodet == 0 || tipodet == 1 || tipodet == 3 ||
tipodet == 5 || tipodet == 9);
found &= (tipodet == 0 /* || tipodet == 1 || tipodet == 3 ||
tipodet == 5 || tipodet == 9 */);
if (found)
{
imp = pimr.get_real("R0");
@ -42,7 +42,7 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
}
break;
case vend_norm:
found = tipomov == 1 && corrisp == 1 && tipoiva != "NS";
found = tipomov == 1 /* && corrisp == 1 */ && tipoiva != "NS";
if (found)
{
imp = pimr.get_real("R0");
@ -58,7 +58,7 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
found = !imp.is_zero() || !iva.is_zero();
break;
case vend_simp:
if (tipomov == 1 && corrisp == 1)
if (tipomov == 1 /* && corrisp == 1 */)
{
imp = pimr.get_real("R11");
iva = pimr.get_real("R12");