Aggiustati riepiloghi quater da stampa registri
Kaciatella visualizzazione git-svn-id: svn://10.65.10.50/trunk@1426 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6b677c5eca
commit
18f266696b
@ -351,7 +351,7 @@ public:
|
||||
void zero_annual (int month);
|
||||
void recalc_att (int month, const char* codatt);
|
||||
void recalc_annual (const char* codatt);
|
||||
_DescrItem* recalc_rimborso(int month, const char* codatts);
|
||||
_DescrItem* recalc_rimborso(int month, const char* codatts, bool print);
|
||||
|
||||
// ricalcolo liquidazioni dai progressivi mensili
|
||||
void write_liq (int month, const char* atts);
|
||||
|
@ -175,6 +175,10 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
// azzera rimborsi
|
||||
zero_firm(month);
|
||||
|
||||
// casini per stampa minchie in coda ai registri
|
||||
bool riepliq = FALSE;
|
||||
bool stliq = FALSE;
|
||||
|
||||
_nditte->save_status();
|
||||
if (_nditte->is_first_match(LF_ATTIV))
|
||||
{
|
||||
@ -251,14 +255,22 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
_pla->rewrite();
|
||||
}
|
||||
|
||||
for (_reg->first(); !_isvent && _reg->good(); _reg->next())
|
||||
|
||||
for (_reg->first(); _reg->good(); _reg->next())
|
||||
{
|
||||
if (codatt == _reg->get("S8") && _reg->get_int("I0") == 2)
|
||||
_isvent = _reg->get_bool("B3");
|
||||
{
|
||||
if (!_isvent) _isvent = _reg->get_bool("B3");
|
||||
if (!riepliq) riepliq = _reg->get_bool("B6");
|
||||
if (!stliq) stliq = _reg->get_bool("B7");
|
||||
}
|
||||
}
|
||||
|
||||
if (!_isregis)
|
||||
stliq = riepliq = TRUE;
|
||||
|
||||
if (calc || !recalc)
|
||||
if (!update_att(month, cattiv))
|
||||
if (!update_att(month, cattiv) && stliq)
|
||||
describe_error("Attivita' non ricalcolate: possibili errori",
|
||||
codatt);
|
||||
|
||||
@ -271,21 +283,22 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
!_plm->get_real("R1").is_zero();
|
||||
}
|
||||
|
||||
if (month == _month)
|
||||
describe_att(month,cattiv,gheravergot, '0' + (_mixed ? tipoatt : 0));
|
||||
if (month == _month && riepliq)
|
||||
describe_att(month, cattiv, gheravergot,
|
||||
'0' + (_mixed ? tipoatt : 0));
|
||||
|
||||
atts.add(cattiv);
|
||||
cattivs.add(cattiv);
|
||||
} // for tipoatt
|
||||
|
||||
// se attivita' mista stampa riepilogo
|
||||
if (_mixed && month == _month)
|
||||
if (_mixed && month == _month && riepliq)
|
||||
describe_att(month,cattivs, TRUE, 'M');
|
||||
}
|
||||
while (_nditte->next_match(LF_ATTIV));
|
||||
|
||||
// se quater stampa riepilogo
|
||||
if (quater && month == _month)
|
||||
if (quater && month == _month && riepliq)
|
||||
describe_att(month,atts, TRUE, 'Q');
|
||||
|
||||
// occorre poterla chiamare altre volte con mesi diversi
|
||||
@ -303,10 +316,10 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
// unica nel suo genere, recalc_rimborso ritorna
|
||||
// un bel descritem (NULL se non si rimborsa un cas)
|
||||
// da passare a describe_liq
|
||||
rimb_d = recalc_rimborso(month,atts);
|
||||
rimb_d = recalc_rimborso(month,atts, stliq);
|
||||
}
|
||||
|
||||
if (month == _month)
|
||||
if (month == _month && stliq)
|
||||
{
|
||||
describe_firm(month);
|
||||
describe_liq(_month, atts, _isregis ? NULL : rimb_d);
|
||||
|
@ -264,7 +264,8 @@ public:
|
||||
};
|
||||
|
||||
|
||||
_DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts)
|
||||
_DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts,
|
||||
bool stliq)
|
||||
{
|
||||
// calcola condizioni per il diritto al rimborso infracazzuale
|
||||
// chiamata soltanto per i trimestri anche se annuale
|
||||
@ -292,7 +293,7 @@ _DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts)
|
||||
}
|
||||
|
||||
// condizione 1
|
||||
if (!vol_aff.is_zero() && (es_ni/vol_aff) > MIN_PARTE_ESENTE)
|
||||
if (stliq && !vol_aff.is_zero() && (es_ni/vol_aff) > MIN_PARTE_ESENTE)
|
||||
{
|
||||
rimborsami = TRUE;
|
||||
d = new _DescrItem(RIMBORSO);
|
||||
@ -462,7 +463,7 @@ _DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts)
|
||||
alv = ivav/vtot; alv.round(2);
|
||||
ala = ivaa/atot; ala.round(2);
|
||||
|
||||
if ((ala - alv) > SOGLIA_MAGGIORE_ALIQUOTA_DEL_CAZZO_PER_AVER_DIRITTO_AL_RIMBORSO)
|
||||
if (stliq && (ala - alv) > SOGLIA_MAGGIORE_ALIQUOTA_DEL_CAZZO_PER_AVER_DIRITTO_AL_RIMBORSO)
|
||||
{
|
||||
rimborsami = TRUE;
|
||||
if (d == NULL) d = new _DescrItem(RIMBORSO);
|
||||
|
@ -1412,7 +1412,7 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
|
||||
int row = get_maxrow()+1;
|
||||
if (d._f0 & IS_PRORATA)
|
||||
{
|
||||
set_bookmark("Calcolo pro-rata", _firm_bookmark);
|
||||
set_bookmark("Calcolo pro-rata", _att_bookmark);
|
||||
|
||||
ret = TRUE;
|
||||
set_print_zero(TRUE);
|
||||
|
@ -425,6 +425,11 @@ bool Visliq_app::vis_liq()
|
||||
select_butt(m);
|
||||
else if (k == K_ENTER)
|
||||
{
|
||||
if (m.get(F_CODDITTA).empty() || m.get(F_RAGSOC).empty())
|
||||
{
|
||||
beep();
|
||||
continue;
|
||||
}
|
||||
long dtt = m.get_long(F_CODDITTA);
|
||||
|
||||
set_firm(dtt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user