diff --git a/cg/cg2100c.uml b/cg/cg2100c.uml index 5b40a22c4..95c6ba640 100755 --- a/cg/cg2100c.uml +++ b/cg/cg2100c.uml @@ -144,7 +144,7 @@ BEGIN WARNING "La causale o il saldaconto richiedono il numero documento" END -LIST F_SOLAIVA 1 2 +LIST F_SOLAIVA 1 3 BEGIN PROMPT 1 7 "Movimento di sola IVA " ITEM " |No" diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index bc31ef82b..9b65d22f2 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -2461,15 +2461,17 @@ bool TPrimanota_application::activate_numrif(bool init_pag) // Handler del checkbox di movimento di sola IVA bool TPrimanota_application::solaiva_handler(TMask_field& f, KEY key) { - if (key == K_TAB && f.dirty()) + TMask& m = f.mask(); + const bool run = m.is_running(); + + if (key == K_TAB && (f.focusdirty() || !run)) { - TMask& m = f.mask(); TPrimanota_application& a = app(); - bool anchecg = f.get().empty(); + bool anchecg = f.get()[0] != 'X'; bool recalcg = anchecg; - if (m.is_running() && a.is_fattura()) + if (run && a.is_fattura()) { const TPartita* game = a.partite().first(); @@ -2500,7 +2502,7 @@ bool TPrimanota_application::solaiva_handler(TMask_field& f, KEY key) m.show(F_DARE, anchecg); m.show(F_AVERE, anchecg); - if (m.is_running() && recalcg) + if (run && recalcg) { TSheet_field& iva = a.ivas(); const int righe = iva.items();