From a761af19ec0eeb276261838eba9f91575de98ad0 Mon Sep 17 00:00:00 2001
From: bonazzi <bonazzi@c028cbd2-c16b-5b4b-a496-9718f37d4682>
Date: Sun, 7 Jan 2018 21:33:30 +0000
Subject: [PATCH] Patch level         : 12.0 494 Files correlati     : cg4.exe

Aggiunta creazione registri dichiarazioni d'intenti all'apertura esercizio

git-svn-id: svn://10.65.10.50/branches/R_10_00@24250 c028cbd2-c16b-5b4b-a496-9718f37d4682
---
 src/cg/cg4500.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/cg/cg4500.cpp b/src/cg/cg4500.cpp
index a3de351d9..742a558a9 100755
--- a/src/cg/cg4500.cpp
+++ b/src/cg/cg4500.cpp
@@ -143,7 +143,8 @@ bool TAp_eser::apertura_es()
 	cur.freeze();
   for (cur = 0L; cur.pos() < items; ++cur)
   { 
-    if (tabreg.get_int("I0") == 5)
+		const int tipo = tabreg.get_int("I0");
+    if (tipo == 5 || tipo == 10)
     {
 	    TString16 cod(tabreg.get("CODTAB"));
 
@@ -159,7 +160,11 @@ bool TAp_eser::apertura_es()
       tabreg.put("D3", data);
       tabreg.zero("R1");
       tabreg.zero("R2");
-    
+			if (tipo == 10)
+			{
+				tabreg.zero("I3");
+				tabreg.zero("I4");
+			}  
       reg.write();
     }   
   }