Patch level : 12.0

Files correlati     :
Commento:
continuare modifica cespiti
This commit is contained in:
smen 2022-07-15 17:22:20 +02:00
parent 1af2cbc3d5
commit 2f92c4df5d
2 changed files with 18 additions and 8 deletions

View File

@ -25,7 +25,8 @@ bool TConfig_mask::on_field_event(TOperable_field& f, TField_event e, long jolly
{ {
switch (f.dlg()) switch (f.dlg())
{ {
/* case F_ESERCORR: /*
case F_ESERCORR:
if (e == fe_init) if (e == fe_init)
{ {
const TEsercizio & esc = esercizi().esercizio(f.get_int()); const TEsercizio & esc = esercizi().esercizio(f.get_int());
@ -35,7 +36,8 @@ bool TConfig_mask::on_field_event(TOperable_field& f, TField_event e, long jolly
if (!covid_19) if (!covid_19)
reset(F_SOSPAMM); reset(F_SOSPAMM);
} }
break; */ */
break;
case F_NAME_USER: case F_NAME_USER:
if (e == fe_button) if (e == fe_button)
{ {

View File

@ -1035,7 +1035,7 @@ const TString& TCespite::ammini_get(const char* pstar) const
const TDitta_cespiti& dc = ditta_cespiti(); const TDitta_cespiti& dc = ditta_cespiti();
const TRectype* pcatdi = NULL; const TRectype* pcatdi = NULL;
const TRectype* pcac = NULL; const TRectype* pcac = NULL;
const bool sospamm = _sosp_covid && dc.esercizio_corrente() == 2020; const bool sospamm = _sosp_covid && dc.esercizio_corrente() >= 2020;
// L'utente fa le sue scelte: ma saranno sensate e coerenti? // L'utente fa le sue scelte: ma saranno sensate e coerenti?
int scelte = _ammini.get_int(AMMCE_SCELTE); int scelte = _ammini.get_int(AMMCE_SCELTE);
@ -1102,13 +1102,21 @@ const TString& TCespite::ammini_get(const char* pstar) const
break; break;
case tc_immateriale: case tc_immateriale:
// if (scelte == 2 || (_tipo_sit != 1 && sospamm)) // if (scelte == 2 || (_tipo_sit != 1 && sospamm))
if (scelte == 2) if (sospamm)
val = catdi_get(pcatdi, CATDI_PFNORVN, _tipo_sit); val = "0.00";
else else
val = pcac->get("R13"); {
break; if (scelte == 2)
val = catdi_get(pcatdi, CATDI_PFNORVN, _tipo_sit);
else
val = pcac->get("R13");
}
break;
case tc_pluriennale: case tc_pluriennale:
// if (scelte == 2 || (_tipo_sit != 1 && sospamm)) // if (scelte == 2 || (_tipo_sit != 1 && sospamm))
if (sospamm)
val = "0.00";
if (scelte == 2) if (scelte == 2)
val = catdi_get(pcatdi, CATDI_PFNORVN, _tipo_sit); val = catdi_get(pcatdi, CATDI_PFNORVN, _tipo_sit);
else else