Corretti ultimi errori liquidazione (Cristina)
git-svn-id: svn://10.65.10.50/trunk@706 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5fc07b4f63
commit
829c61f812
@ -105,9 +105,9 @@ bool TLiquidazione_app::user_create()
|
|||||||
_pim_r = &(_pim->curr());
|
_pim_r = &(_pim->curr());
|
||||||
_plm_r = &(_plm->curr());
|
_plm_r = &(_plm->curr());
|
||||||
_ptm_r = &(_ptm->curr());
|
_ptm_r = &(_ptm->curr());
|
||||||
_lim_r = &(_lim->curr());
|
|
||||||
_iva_r = &(_iva->curr());
|
_iva_r = &(_iva->curr());
|
||||||
_del_r = &(_del->curr());
|
_del_r = &(_del->curr());
|
||||||
|
_lim_r = &(_lim->curr());
|
||||||
_pla_r = &(_pla->curr());
|
_pla_r = &(_pla->curr());
|
||||||
_ppa_r = &(_ppa->curr());
|
_ppa_r = &(_ppa->curr());
|
||||||
_reg_r = &(_reg->curr());
|
_reg_r = &(_reg->curr());
|
||||||
@ -134,14 +134,14 @@ bool TLiquidazione_app::user_create()
|
|||||||
_ptm_anno = new TRecfield(*_ptm_r,"CODTAB",0,3);
|
_ptm_anno = new TRecfield(*_ptm_r,"CODTAB",0,3);
|
||||||
_ptm_codatt = new TRecfield(*_ptm_r,"CODTAB",4,9);
|
_ptm_codatt = new TRecfield(*_ptm_r,"CODTAB",4,9);
|
||||||
_ptm_mese = new TRecfield(*_ptm_r,"CODTAB",10,11);
|
_ptm_mese = new TRecfield(*_ptm_r,"CODTAB",10,11);
|
||||||
_lim_anno = new TRecfield(*_lim_r,"CODTAB",0,3);
|
|
||||||
_lim_mese = new TRecfield(*_lim_r,"CODTAB",4,6);
|
|
||||||
_pla_anno = new TRecfield(*_pla_r,"CODTAB",0,3);
|
_pla_anno = new TRecfield(*_pla_r,"CODTAB",0,3);
|
||||||
_pla_codatt = new TRecfield(*_pla_r,"CODTAB",4,9);
|
_pla_codatt = new TRecfield(*_pla_r,"CODTAB",4,9);
|
||||||
_del_ditta = new TRecfield(*_del_r,"CODTAB",0,4);
|
_del_ditta = new TRecfield(*_del_r,"CODTAB",0,4);
|
||||||
_del_anno = new TRecfield(*_del_r,"CODTAB",5,8);
|
_del_anno = new TRecfield(*_del_r,"CODTAB",5,8);
|
||||||
_del_mese = new TRecfield(*_del_r,"CODTAB",9,10);
|
_del_mese = new TRecfield(*_del_r,"CODTAB",9,10);
|
||||||
_del_tipo = new TRecfield(*_del_r,"CODTAB",11,11);
|
_del_tipo = new TRecfield(*_del_r,"CODTAB",11,11);
|
||||||
|
_lim_anno = new TRecfield(*_lim_r,"CODTAB",0,3);
|
||||||
|
_lim_mese = new TRecfield(*_lim_r,"CODTAB",4,6);
|
||||||
|
|
||||||
__firm = TApplication::get_firm();
|
__firm = TApplication::get_firm();
|
||||||
|
|
||||||
@ -270,8 +270,8 @@ bool TLiquidazione_app::set_print(int n)
|
|||||||
from.put(MOV_DATAREG, f);
|
from.put(MOV_DATAREG, f);
|
||||||
to.put(MOV_DATAREG, t);
|
to.put(MOV_DATAREG, t);
|
||||||
_cur->setregion(from, to);
|
_cur->setregion(from, to);
|
||||||
recalc_all();
|
|
||||||
return _isprint;
|
return recalc_all() && _isprint;
|
||||||
}
|
}
|
||||||
else warning_box("Nessuna ditta selezionata!");
|
else warning_box("Nessuna ditta selezionata!");
|
||||||
}
|
}
|
||||||
|
@ -222,8 +222,8 @@ class TLiquidazione_app : public TPrint_application
|
|||||||
TRectype* _pla_r;
|
TRectype* _pla_r;
|
||||||
TRectype* _plm_r;
|
TRectype* _plm_r;
|
||||||
TRectype* _ptm_r;
|
TRectype* _ptm_r;
|
||||||
TRectype* _lim_r;
|
|
||||||
TRectype* _ppa_r;
|
TRectype* _ppa_r;
|
||||||
|
TRectype* _lim_r;
|
||||||
TRectype* _del_r;
|
TRectype* _del_r;
|
||||||
TRectype* _att_r;
|
TRectype* _att_r;
|
||||||
|
|
||||||
@ -244,14 +244,14 @@ class TLiquidazione_app : public TPrint_application
|
|||||||
TRecfield* _ptm_anno;
|
TRecfield* _ptm_anno;
|
||||||
TRecfield* _ptm_codatt;
|
TRecfield* _ptm_codatt;
|
||||||
TRecfield* _ptm_mese;
|
TRecfield* _ptm_mese;
|
||||||
TRecfield* _lim_anno;
|
|
||||||
TRecfield* _lim_mese;
|
|
||||||
TRecfield* _pla_anno;
|
TRecfield* _pla_anno;
|
||||||
TRecfield* _pla_codatt;
|
TRecfield* _pla_codatt;
|
||||||
TRecfield* _del_ditta;
|
TRecfield* _del_ditta;
|
||||||
TRecfield* _del_anno;
|
TRecfield* _del_anno;
|
||||||
TRecfield* _del_mese;
|
TRecfield* _del_mese;
|
||||||
TRecfield* _del_tipo;
|
TRecfield* _del_tipo;
|
||||||
|
TRecfield* _lim_anno;
|
||||||
|
TRecfield* _lim_mese;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
long select_firm_range(long from, long to, wht freq);
|
long select_firm_range(long from, long to, wht freq);
|
||||||
|
@ -66,11 +66,13 @@ bool TLiquidazione_app::recalc_all()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!_prind->iscancelled()) _prind->addstatus(1);
|
bool canc = _prind->iscancelled();
|
||||||
|
if (!canc) _prind->addstatus(1);
|
||||||
|
|
||||||
TApplication::set_firm(__firm);
|
TApplication::set_firm(__firm);
|
||||||
delete _prind; _prind = NULL;
|
delete _prind; _prind = NULL;
|
||||||
|
|
||||||
return TRUE;
|
return !canc;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TLiquidazione_app::update_firm(int month, bool recalc)
|
bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||||
|
@ -108,9 +108,6 @@ void TLiquidazione_app::recalc_ventilation(int month, const char* codatt)
|
|||||||
if (_vend_arr.items() == 0) return;
|
if (_vend_arr.items() == 0) return;
|
||||||
|
|
||||||
TString att(codatt);
|
TString att(codatt);
|
||||||
// look_pla(att);
|
|
||||||
// _pla->put("B0","X");
|
|
||||||
// _pla->rewrite();
|
|
||||||
_isvent = TRUE;
|
_isvent = TRUE;
|
||||||
|
|
||||||
// 1) ricalcola i pim dei mesi dal primo al corrente se necessario
|
// 1) ricalcola i pim dei mesi dal primo al corrente se necessario
|
||||||
@ -137,8 +134,7 @@ void TLiquidazione_app::recalc_ventilation(int month, const char* codatt)
|
|||||||
look_iva(*_pim_codiva);
|
look_iva(*_pim_codiva);
|
||||||
|
|
||||||
// soltanto normali ed esenti IVA sono base di riparto
|
// soltanto normali ed esenti IVA sono base di riparto
|
||||||
if (_iva->get("S1").empty() ||
|
if (_iva->get("S1").empty() || _iva->get("S1") == "ES")
|
||||||
_iva->get("S1") == "ES")
|
|
||||||
{
|
{
|
||||||
real lurd = _pim->get_real("R0");
|
real lurd = _pim->get_real("R0");
|
||||||
lurd += _pim->get_real("R1");
|
lurd += _pim->get_real("R1");
|
||||||
@ -191,8 +187,8 @@ void TLiquidazione_app::recalc_ventilation(int month, const char* codatt)
|
|||||||
_VentItem* vv = (_VentItem*)&_vent_arr[j];
|
_VentItem* vv = (_VentItem*)&_vent_arr[j];
|
||||||
real imponibile = dst.get();
|
real imponibile = dst.get();
|
||||||
real div(1.0); div += vv->_aliquota;
|
real div(1.0); div += vv->_aliquota;
|
||||||
real imposta = imponibile/div;
|
real imposta = imponibile - (imponibile/div);
|
||||||
imposta.round(ROUND_LIRA);
|
imposta.ceil(ROUND_LIRA);
|
||||||
imponibile -= imposta;
|
imponibile -= imposta;
|
||||||
|
|
||||||
// aggiusto l'IVA vendite nei plm
|
// aggiusto l'IVA vendite nei plm
|
||||||
|
@ -814,9 +814,10 @@ void TLiquidazione_app::set_plm(_DescrItem& d)
|
|||||||
set_row(rw++,"");
|
set_row(rw++,"");
|
||||||
}
|
}
|
||||||
|
|
||||||
real tot1 = d._r7 + d._r4;
|
real tot1 = d._r7 + d._r4 + d._r9 + acq_pint;
|
||||||
real tot2 = d._r8 + d._r5;
|
real tot2 = d._r8 + d._r5 + d._r10 + acq_pint_iva;
|
||||||
|
|
||||||
|
if (tot1 != d._r4 || tot2 != d._r5)
|
||||||
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),
|
||||||
@ -880,7 +881,7 @@ void TLiquidazione_app::set_ptm(_DescrItem& d)
|
|||||||
&(d._r3),
|
&(d._r3),
|
||||||
&rn);
|
&rn);
|
||||||
}
|
}
|
||||||
if (!d._f0)
|
if (d._f0 && !(d._r11.is_zero()))
|
||||||
{
|
{
|
||||||
set_row(row++, "%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r",
|
set_row(row++, "%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r",
|
||||||
(const char*)(d._s0),
|
(const char*)(d._s0),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user