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

View File

@ -727,19 +727,18 @@ bool TSchedaPercipienti::vers1015_handler(TMask_field& f, KEY k)
// handler codice causale // handler codice causale
bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k) bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k)
{ {
TMask& m = f.mask(); if (f.initial_check(k) || f.running_check(k))
if (k == K_TAB)
{ {
TMask& m = f.mask();
const TString& cod_qua = m.get(F_CODQUA); 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); app().build_causqua_items(m, cod_qua);
} }
if (k == K_TAB && m.is_running()) if (f.running_check(k))
{ {
// leggo causale indicata TMask& m = f.mask();
//TFixed_string cod_caus(f.get(),3);
const TString& cod_qua = m.get(F_CODQUA); const TString& cod_qua = m.get(F_CODQUA);
// cose da fare solo se viene modificato il codice causale // cose da fare solo se viene modificato il codice causale
@ -760,10 +759,11 @@ bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k)
// attiva sheet pagamenti in base al quadro // 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) 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_d(TMask_field& f, KEY key);
static bool ricalcola_imposte_dbis(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_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 ricalcola_imposte_e1(TMask_field& f, KEY key);
static bool prospetto_e1_notify(TSheet_field& s, int r, KEY k); static bool prospetto_e1_notify(TSheet_field& s, int r, KEY k);
@ -518,6 +519,7 @@ bool TQuadroC_E2::user_create()
{ {
_file = LF_QUALA; _file = LF_QUALA;
m.set_handler(102, ricalcola_imposte_la); m.set_handler(102, ricalcola_imposte_la);
m.set_handler(103, enable_rimborsi);
m.set_handler(105, ricalcola_imposte_la); m.set_handler(105, ricalcola_imposte_la);
m.set_handler(106, ricalcola_imposte_la); m.set_handler(106, ricalcola_imposte_la);
m.set_handler(107, 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) bool TQuadroC_E2::ritenute_handler_e2(TMask_field& f, KEY key)
{ {
if (key == K_TAB && f.focusdirty() || key == K_ENTER) if (key == K_TAB && f.focusdirty() || key == K_ENTER)

View File

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