From d896fd055b0bbad50d8d970cb29bd4c316518574 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 4 Dec 2012 16:42:47 +0000 Subject: [PATCH] Migliorato controllo attivazione IC alla data git-svn-id: svn://10.65.10.50/branches/R_10_00@22764 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cglib03.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cg/cglib03.cpp b/cg/cglib03.cpp index a13aee5cc..b1d490c43 100755 --- a/cg/cglib03.cpp +++ b/cg/cglib03.cpp @@ -109,10 +109,12 @@ int analizza_IVA(const real& imptot, const real& ivatot, const real perc_ind, bool gestione_IVAxCassa(const TDate& data, long firm) { - bool yes = dongle().active(ICAUT) && dongle().active(SCAUT); + int anno = data.year(); + if (anno <= 0) + anno = TDate(TODAY).year(); + bool yes = anno >= 2012 && dongle().active(ICAUT) && dongle().active(SCAUT); if (yes) { - const int anno = data.year(); if (firm <= 0) firm = prefix().get_codditta(); TString16 codtab;