Patch level : 12.0 nopatch

Files correlati     : 770mod.exe 771mod.exe 771230la.msk
commento:
CU 20222
Aggiornati rimborsis
This commit is contained in:
Alessandro Bonazzi 2022-02-21 10:07:50 +01:00
parent 3ea075ee98
commit e6cac4a70b
4 changed files with 57 additions and 46 deletions

View File

@ -174,7 +174,7 @@ TMask* TSchedaPercipienti::load_mask(int n)
m->set_handler(F_SPESE, check_spese);
m->set_handler(F_COMPENS, check_compensi);
m->set_handler(F_MESECOMP, check_competenza);
m->set_handler(F_CODQUA, enable_rimborsi);
m->set_handler(F_CAUSQUA, enable_rimborsi);
////////////////////////////////////////////////////////////////////////
// Handler versamenti
@ -1167,39 +1167,34 @@ bool TSchedaPercipienti::check_competenza(TMask_field& f, KEY k)
bool TSchedaPercipienti::enable_rimborsi(TMask_field& f, KEY k)
{
if (f.initial_check(k) || f.running_check(k))
{
const TString4 caus = f.get();
TSheet_field& sheet_c = f.mask().sfield(F_PAGAMENTI_C);
TSheet_field& sheet_d = f.mask().sfield(F_PAGAMENTI_D);
const bool on = (caus == "X" || caus == "Y");
if (f.initial_check(k) || f.running_check(k))
{
const TString4 caus = f.get();
TSheet_field& s = app().pags();
TMask & m = s.sheet_mask();
const bool on = (caus == "X" || caus == "Y");
const int offset = s.dlg() == F_PAGAMENTI_D ? -3 : 0;
sheet_c.enable_column(112, on);
sheet_c.enable_column(113, on);
sheet_c.enable_column(114, on);
sheet_d.enable_column(109, on);
sheet_d.enable_column(110, on);
sheet_d.enable_column(111, on);
s.enable_column(112 + offset, on);
s.enable_column(113 + offset, on);
s.enable_column(114 + offset, on);
if (!on)
{
const int items = s.items();
if (!on)
{
const int item_c = sheet_c.items();
for (int i = 0; i < item_c; i++) {
sheet_c.set_row_cell(112, "", i);
sheet_c.set_row_cell(113, "", i);
sheet_c.set_row_cell(114, "", i);
}
const int item_d = sheet_d.items();
for (int i = 0; i < item_d; i++) {
sheet_d.set_row_cell(109, "", i);
sheet_d.set_row_cell(110, "", i);
sheet_d.set_row_cell(111, "", i);
}
}
}
return TRUE;
for (int i = 0; i < items; i++)
{
s.set_row_cell(112 + offset, "", i);
s.set_row_cell(113, "", i);
s.set_row_cell(114, "", i);
}
}
s.enable_cell(0, 112 + offset);
s.enable_cell(0, 113 + offset);
s.enable_cell(0, 114 + offset);
s.force_update();
}
return true;
}
//

View File

@ -727,19 +727,18 @@ bool TSchedaPercipienti::vers1015_handler(TMask_field& f, KEY k)
// handler codice causale
bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k)
{
TMask& m = f.mask();
if (k == K_TAB)
if (f.initial_check(k) || f.running_check(k))
{
TMask& m = f.mask();
const TString& cod_qua = m.get(F_CODQUA);
// creo run-time gli items per la causale quadro
// creo run-time gli items per la causale quadro
app().build_causqua_items(m, cod_qua);
}
if (k == K_TAB && m.is_running())
if (f.running_check(k))
{
// leggo causale indicata
//TFixed_string cod_caus(f.get(),3);
TMask& m = f.mask();
const TString& cod_qua = m.get(F_CODQUA);
// cose da fare solo se viene modificato il codice causale
@ -759,11 +758,12 @@ bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k)
f_causqua.set(m.get(F_TABCAUSQUASG));
// attiva sheet pagamenti in base al quadro
app().activate_pag_sheet(m);
app().activate_pag_sheet(m);
f_causqua.on_hit();
}
}
return TRUE;
return true;
}
bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)

View File

@ -286,7 +286,8 @@ protected:
static bool ricalcola_imposte_d(TMask_field& f, KEY key);
static bool ricalcola_imposte_dbis(TMask_field& f, KEY key);
static bool ricalcola_imposte_e(TMask_field& f, KEY key);
static bool ricalcola_imposte_la(TMask_field& f, KEY key);
static bool ricalcola_imposte_la(TMask_field& f, KEY key);
static bool enable_rimborsi(TMask_field& f, KEY key);
static bool ricalcola_imposte_e1(TMask_field& f, KEY key);
static bool prospetto_e1_notify(TSheet_field& s, int r, KEY k);
@ -518,6 +519,7 @@ bool TQuadroC_E2::user_create()
{
_file = LF_QUALA;
m.set_handler(102, ricalcola_imposte_la);
m.set_handler(103, enable_rimborsi);
m.set_handler(105, ricalcola_imposte_la);
m.set_handler(106, ricalcola_imposte_la);
m.set_handler(107, ricalcola_imposte_la);
@ -1375,9 +1377,23 @@ bool TQuadroC_E2::ricalcola_imposte_la(TMask_field& f, KEY key)
}
}
}
return TRUE;
return true;
}
bool TQuadroC_E2::enable_rimborsi(TMask_field& f, KEY key)
{
if (f.initial_check(key) || f.running_check(key))
{
TMask & m = f.mask();
const TString4 caus = f.get();
const bool on = (caus == "X" || caus == "Y");
m.enable(119, on);
m.enable(120, on);
m.enable(121, on);
}
return true;
}
bool TQuadroC_E2::ritenute_handler_e2(TMask_field& f, KEY key)
{
if (key == K_TAB && f.focusdirty() || key == K_ENTER)

View File

@ -362,19 +362,19 @@ END
CURRENCY 122 15
BEGIN
PROMPT 1 7 "Altri contributi "
PROMPT 1 8 "Altri contributi "
FIELD ALTRICONTR
END
CURRENCY 123 15
BEGIN
PROMPT 1 8 "Contributi dovuti "
PROMPT 1 9 "Contributi dovuti "
FIELD CONTRDOV
END
CURRENCY 124 15
BEGIN
PROMPT 1 9 "Contributi versati "
PROMPT 1 10 "Contributi versati "
FIELD CONTRVER
END