From d588908f7186e2381550a6b033659a20716834fc Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 19 Sep 1996 10:40:23 +0000 Subject: [PATCH] Corretta gestione del flag di movimento di sola IVA. git-svn-id: svn://10.65.10.50/trunk@3628 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2100c.uml | 2 +- cg/cg2102.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) 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();