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 class TIva_array : public TArray
{ {
public: 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]; } 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; bool found = FALSE;
for (int i = 0; i < items(); i++) for (int i = 0; i < items(); i++)
@ -126,11 +128,13 @@ class CG0400_application : public TPrintapp
liste _tipo_lista; liste _tipo_lista;
public: public:
virtual bool user_create(); virtual bool user_create();
virtual bool user_destroy(); virtual bool user_destroy();
virtual bool set_print(int); virtual bool set_print(int);
virtual bool preprocess_page(int,int); virtual bool preprocess_page(int,int);
virtual print_action postprocess_page(int,int); virtual print_action postprocess_page(int,int);
void cerca_i_pim(); void cerca_i_pim();
void azzera_mesi(); void azzera_mesi();
void get_dati_ditta(); void get_dati_ditta();

View File

@ -98,7 +98,7 @@ void TLiquidazione_app::recalc_corrispettivi(int month, const char* codatt)
_plm->rewrite(); _plm->rewrite();
// Aggiorno i luridi pim // 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"); imponibile += _pim->get_real("R0");
imposta += _pim->get_real("R1"); imposta += _pim->get_real("R1");

View File

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

View File

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