Patch level : 12.0 782

Files correlati     : cg2102
Commento            : Aggiunti controlli sul tipodoc per collegamento fppro
This commit is contained in:
Simone Palacino 2019-05-03 12:17:21 +02:00
parent 058567f8e3
commit b32f7ebef2
2 changed files with 12 additions and 2 deletions

View File

@ -2259,6 +2259,15 @@ bool TPrimanota_application::caus_query_handler(TMask_field& f, KEY key)
return true; return true;
} }
void TPrimanota_application::check_fppro_fields(TMask& m)
{
if(m.get(F_TIPODOC) != "FA" && m.find_by_id(F_PROTFPPRO) != NULL)
{
m.hide(F_PROTFPPRO);
m.disable(DLG_LINK);
}
}
// Handler of the F_CODCAUS field on the modify mask // Handler of the F_CODCAUS field on the modify mask
// Certified 99% // Certified 99%
bool TPrimanota_application::caus_modify_handler(TMask_field& f, KEY key) bool TPrimanota_application::caus_modify_handler(TMask_field& f, KEY key)
@ -2328,7 +2337,7 @@ bool TPrimanota_application::caus_modify_handler(TMask_field& f, KEY key)
m.set(F_RITFATT, app().causale().fattura_in_ritardo() ? "X" : " "); m.set(F_RITFATT, app().causale().fattura_in_ritardo() ? "X" : " ");
} }
} }
check_fppro_fields(f.mask());
return true; return true;
} }
@ -3828,7 +3837,7 @@ bool TPrimanota_application::quadratura_handler(TMask_field& f, KEY key)
bool TPrimanota_application::fppro_mask(TMask_field& f, KEY key) bool TPrimanota_application::fppro_mask(TMask_field& f, KEY key)
{ {
TMask& cg_msk = f.mask(); TMask& cg_msk = f.mask();
if (!app().get_isfp() || key != K_SPACE && key != K_TAB) if (!app().get_isfp() || key != K_SPACE && key != K_TAB || f.mask().get(F_TIPODOC) != "FA")
return true; return true;
auto msk = std::make_shared<TPro_msk>(cg_msk); auto msk = std::make_shared<TPro_msk>(cg_msk);

View File

@ -105,6 +105,7 @@ class TPrimanota_application : public TRelation_application
static bool suspended_handler(TMask_field& f, KEY k); static bool suspended_handler(TMask_field& f, KEY k);
static bool num_handler(TMask_field& f, KEY key); static bool num_handler(TMask_field& f, KEY key);
static bool caus_query_handler(TMask_field& f, KEY key); static bool caus_query_handler(TMask_field& f, KEY key);
static void check_fppro_fields(TMask& m);
static bool caus_modify_handler(TMask_field& f, KEY key); static bool caus_modify_handler(TMask_field& f, KEY key);
static bool datareg_handler(TMask_field& f, KEY key); static bool datareg_handler(TMask_field& f, KEY key);
static bool datacomp_handler(TMask_field& f, KEY key); static bool datacomp_handler(TMask_field& f, KEY key);