From f4eda260e891fcfa0ca33e29a80584558b887c71 Mon Sep 17 00:00:00 2001 From: Mattia Tollari Date: Wed, 1 Aug 2018 12:32:56 +0200 Subject: [PATCH 1/7] Patch level : 12.0 no-patch Files correlati : Commento : Aggiunti compilatori SrcCompilerNEW e SqlCompiler --- build/CampoRules.props | 33 ++++++ build/CampoRules.rules | 23 ++++ build/CampoRules.targets | 151 ++++++++++++++++++++++++ build/CampoRules.xml | 249 +++++++++++++++++++++++++++++++++++++++ build/ini32r.bat | 5 +- 5 files changed, 457 insertions(+), 4 deletions(-) diff --git a/build/CampoRules.props b/build/CampoRules.props index a8e4a8056..b5f4cddff 100644 --- a/build/CampoRules.props +++ b/build/CampoRules.props @@ -274,4 +274,37 @@ Compiling %(Filename) to $(TargetDir) + + + Midl + CustomBuild + + + _SelectedFiles;$(SrcNEWCompilerDependsOn) + + + + ini32r %(FullPath) $(TargetDir)%(Filename).ini + $(TargetDir)%(Filename).ini + Compiling %(Filename) to $(TargetDir) + + + + Midl + CustomBuild + + + _SelectedFiles;$(SqlCompilerDependsOn) + + + + copy %(FullPath) $(TargetDir)sql\$(ProjectName)\ + $(TargetDir)sql\$(ProjectName)\%(Filename).sql + Copia di %(Filename) in $(TargetDir)sql\$(ProjectName)\ + + \ No newline at end of file diff --git a/build/CampoRules.rules b/build/CampoRules.rules index 87457db7c..4ef4e585b 100644 --- a/build/CampoRules.rules +++ b/build/CampoRules.rules @@ -193,5 +193,28 @@ + + + + + + + + + diff --git a/build/CampoRules.targets b/build/CampoRules.targets index 7c07bae1b..ed6d85ada 100644 --- a/build/CampoRules.targets +++ b/build/CampoRules.targets @@ -70,6 +70,15 @@ _SrcCompiler + + + + _SrcNEWCompiler + + + _SqlCompiler $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml + + + $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml + + + $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml + + + + + + + + + @(SrcNEWCompiler, '|') + + + + + + + + + $(ComputeLinkInputsTargets); + ComputeSrcNEWCompilerOutput; + + + $(ComputeLibInputsTargets); + ComputeSrcNEWCompilerOutput; + + + + + + + + + + + + + + + + + + @(SqlCompiler, '|') + + + + + + + + + $(ComputeLinkInputsTargets); + ComputeSqlCompilerOutput; + + + $(ComputeLibInputsTargets); + ComputeSqlCompilerOutput; + + + + + + + + + + + \ No newline at end of file diff --git a/build/CampoRules.xml b/build/CampoRules.xml index 0de28ee5c..b40b9380d 100644 --- a/build/CampoRules.xml +++ b/build/CampoRules.xml @@ -2108,4 +2108,253 @@ Name="SrcCompiler" DisplayName="Profile Debug Compiler" ItemType="SrcCompiler" /> + + + + + + + + + General + + + + + Command Line + + + + + + + + + + + + Execute Before + + + Specifies the targets for the build customization to run before. + + + + + + + + + + + Execute After + + + Specifies the targets for the build customization to run after. + + + + + + + + + + + + + + Additional Options + + + Additional Options + + + + + + + + + + + + + + General + + + + + Command Line + + + + + + + + + + + + Execute Before + + + Specifies the targets for the build customization to run before. + + + + + + + + + + + Execute After + + + Specifies the targets for the build customization to run after. + + + + + + + + + + + + + + Additional Options + + + Additional Options + + + + + + \ No newline at end of file diff --git a/build/ini32r.bat b/build/ini32r.bat index 5319c3e54..efbc17bb3 100644 --- a/build/ini32r.bat +++ b/build/ini32r.bat @@ -4,7 +4,4 @@ echo Generating %1 ini file set oldinc=%include set include=..\src\include;..\src\xvaga;..\src\ve;%~p1 -srcini %1 %2 -cd %~p2 -echo Generating %2 msk file -ve0 -3 %2 -f /uADMIN +srcini %1 %2 \ No newline at end of file From eeec3674ff47f4348e3d4800a223dea51eda3359 Mon Sep 17 00:00:00 2001 From: Mattia Tollari Date: Wed, 1 Aug 2018 14:30:43 +0200 Subject: [PATCH 2/7] Patch level : 12.0 no-patch Files correlati : fp Commento : Vincolato al modulo RS l'esportazione della fattura nell'XML --- src/fp/fp0100a.uml | 1 + src/fp/fplib01.cpp | 56 +++++++++++++++++++--------------------------- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/src/fp/fp0100a.uml b/src/fp/fp0100a.uml index 84da19f00..0e3d42abc 100644 --- a/src/fp/fp0100a.uml +++ b/src/fp/fp0100a.uml @@ -76,6 +76,7 @@ BOOLEAN F_ESPORTADOC BEGIN PROMPT 2 12 "Allega pdf documento nell'XML" FLAGS "D" + MODULE RS END STRING F_FLDDEST 300 50 diff --git a/src/fp/fplib01.cpp b/src/fp/fplib01.cpp index c711f133c..5a324102e 100644 --- a/src/fp/fplib01.cpp +++ b/src/fp/fplib01.cpp @@ -1425,43 +1425,33 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc) remove(paf2600f); // Cancella eventuali allegati long nprogr = 0; // Numero di file allegati // Se abilitato stampo il documento e lo allego - if (_allegafattura) + TFilename rep; + if (_allegafattura && dongle().active(RSAUT) && doc.tipo().main_print_profile(rep, 2)) { - //ve1 - 2 FPA 2017 D 202 P D / uADMIN - TFilename rep; - int filter = dongle().active(RSAUT) ? 2 : 1; - while (filter > 0 && !doc.tipo().main_print_profile(rep, filter)) - filter--; - if (filter > 0) - { - // Costruisco la chiamata - TString commandline = "ve1 -"; - if (filter == 2) - commandline << 2; // Esiste il nuovo report :-) - else - commandline << 0; // Esiste il vecchio form :-( + //ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} - commandline << ' ' << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO) - << ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC) << " X P"; // X: stampa su disco, P: provvisorio - TExternal_app interattivo(commandline); - if (interattivo.run() != NOERR) + // Costruisco la chiamata + static TString commandline; + commandline.cut(0) << "ve1 -2 " << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO) + << ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC) << " X P"; // X: stampa su disco, P: provvisorio + TExternal_app interattivo(commandline); + if (interattivo.run() != NOERR) + { + TString msgerr = "Fallita generazione PDF documento "; + msgerr << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO) + << ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC); + error_box(msgerr); + } + else + { + TFilename pdf; pdf.tempdir(); + pdf << SLASH << doc.get(DOC_ANNO) << '_' << doc.get(DOC_CODNUM) << '_' << doc.get(DOC_NDOC) << ".pdf"; + if (!pdf.exist() && !yesno_box("Attenzione! Non è stato possibile creare il pdf, continuare?")) { - TString msgerr = "Fallita generazione PDF documento "; - msgerr << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO) - << ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC); - error_box(msgerr); - } - else - { - TFilename pdf; pdf.tempdir(); - pdf << SLASH << doc.get(DOC_ANNO) << '_' << doc.get(DOC_CODNUM) << '_' << doc.get(DOC_NDOC) << ".pdf"; - if (!pdf.exist() && !yesno_box("Attenzione! Non è stato possibile creare il pdf, continuare?")) - { - return false; - } - if (!add_row_alleg(pdf, nprogr, paf2600f)) - return false; + return false; } + if (!add_row_alleg(pdf, nprogr, paf2600f)) + return false; } } From d028101e9216699c399ab043ae79a9b319af4fa3 Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Fri, 3 Aug 2018 16:02:12 +0200 Subject: [PATCH 3/7] Patch level : 12.0 614 Files correlati : fp, ve Commento : Aggiunto compilatore per ve0300a.src --- build/CampoRules.props | 25 ++++++----- build/CampoRules.rules | 9 ++-- build/CampoRules.targets | 79 +++++++++++++++++----------------- build/CampoRules.xml | 30 ++++++------- build/ini32.bat | 8 +++- build/ini32r.bat | 5 ++- build/profiles.vcxproj.filters | 21 +++++---- build/tp0.vcxproj | 2 +- build/ve0.vcxproj | 1 + build/ve0.vcxproj.filters | 3 ++ build/ve_maskrighe.vcxproj | 2 + 11 files changed, 101 insertions(+), 84 deletions(-) diff --git a/build/CampoRules.props b/build/CampoRules.props index b5f4cddff..69c496a4a 100644 --- a/build/CampoRules.props +++ b/build/CampoRules.props @@ -269,27 +269,21 @@ - ini32 %(FullPath) $(TargetDir)%(Filename).ini + call ini32 %(FullPath) $(TargetDir)%(Filename).ini $(TargetDir)%(Filename).ini Compiling %(Filename) to $(TargetDir) - - - Midl - CustomBuild - - - _SelectedFiles;$(SrcNEWCompilerDependsOn) + + _SelectedFiles;$(SrcSimpleCompilerDependsOn) - - ini32r %(FullPath) $(TargetDir)%(Filename).ini + + call ini32r %(FullPath) $(TargetDir)%(Filename).ini $(TargetDir)%(Filename).ini Compiling %(Filename) to $(TargetDir) - + @@ -307,4 +301,9 @@ Copia di %(Filename) in $(TargetDir)sql\$(ProjectName)\ + + + + + \ No newline at end of file diff --git a/build/CampoRules.rules b/build/CampoRules.rules index 4ef4e585b..b228a3987 100644 --- a/build/CampoRules.rules +++ b/build/CampoRules.rules @@ -185,7 +185,7 @@ - _SrcCompiler - + + - _SrcNEWCompiler + Include="SrcSimpleCompiler"> + _SrcSimpleCompiler @@ -183,9 +184,8 @@ AssemblyName="Microsoft.Build.Tasks.v4.0"> $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml @@ -196,6 +196,7 @@ AssemblyName="Microsoft.Build.Tasks.v4.0"> $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml + - + Name="_SrcSimpleCompiler" + BeforeTargets="$(SrcSimpleCompilerBeforeTargets)" + AfterTargets="$(SrcSimpleCompilerAfterTargets)" + Condition="'@(SrcSimpleCompiler)' != ''" + DependsOnTargets="$(SrcSimpleCompilerDependsOn);ComputeSrcSimpleCompilerOutput" + Outputs="%(SrcSimpleCompiler.Outputs)" + Inputs="%(SrcSimpleCompiler.Identity);%(SrcDebugCompiler.AdditionalDependencies);$(MSBuildProjectFile)"> - - - @(SrcNEWCompiler, '|') - + + @(SrcSimpleCompiler, '|') + + Text="%(SrcSimpleCompiler.ExecutionDescription)" /> - + Lines="^%(SrcSimpleCompiler_tlog.Source);@(SrcSimpleCompiler_tlog->'%(Fullpath)')" /> + $(ComputeLinkInputsTargets); - ComputeSrcNEWCompilerOutput; + ComputeSrcSimpleCompilerOutput; $(ComputeLibInputsTargets); - ComputeSrcNEWCompilerOutput; + ComputeSrcSimpleCompilerOutput; + Name="ComputeSrcSimpleCompilerOutput" + Condition="'@(SrcSimpleCompiler)' != ''"> - + + Directories="@(SrcSimpleCompilerDirsToMake->'%(RootDir)%(Directory)')" /> + \ No newline at end of file diff --git a/build/CampoRules.xml b/build/CampoRules.xml index b40b9380d..6c31a9583 100644 --- a/build/CampoRules.xml +++ b/build/CampoRules.xml @@ -2108,16 +2108,15 @@ Name="SrcCompiler" DisplayName="Profile Debug Compiler" ItemType="SrcCompiler" /> - + ItemType="SrcSimpleCompiler" /> @@ -2152,7 +2151,7 @@ Visible="False" IncludeInCommandLine="False" /> @@ -2165,7 +2164,7 @@ + Value="^SrcSimpleCompilerBeforeTargets|^Compute" /> @@ -2187,7 +2186,7 @@ + Value="^SrcSimpleCompilerAfterTargets|^Compute" /> + Name="SrcSimpleCompiler" + DisplayName="Profile Compiler Ini32r" /> + ContentType="SrcSimpleCompiler" /> + Name="SrcSimpleCompiler" + DisplayName="Profile Compiler Ini32r" + ItemType="SrcSimpleCompiler" /> + \ No newline at end of file diff --git a/build/ini32.bat b/build/ini32.bat index 5f78d1b17..6bbdf570e 100644 --- a/build/ini32.bat +++ b/build/ini32.bat @@ -4,7 +4,11 @@ echo Generating %1 ini file set oldinc=%include set include=..\src\include;..\src\xvaga;..\src\ve;%~p1 -srcini %1 %2 +call srcini32 %1 %2 + cd %~p2 echo Generating %2 msk file -ve0 -3 %2 -f /uADMIN \ No newline at end of file +ve0 -3 %2 -f /uADMIN + +set include=%oldinc +set oldinc= \ No newline at end of file diff --git a/build/ini32r.bat b/build/ini32r.bat index efbc17bb3..7388e55d2 100644 --- a/build/ini32r.bat +++ b/build/ini32r.bat @@ -4,4 +4,7 @@ echo Generating %1 ini file set oldinc=%include set include=..\src\include;..\src\xvaga;..\src\ve;%~p1 -srcini %1 %2 \ No newline at end of file +call srcini32 %1 %2 + +set include=%oldinc +set oldinc= diff --git a/build/profiles.vcxproj.filters b/build/profiles.vcxproj.filters index e56974874..ee1f40b34 100644 --- a/build/profiles.vcxproj.filters +++ b/build/profiles.vcxproj.filters @@ -8,6 +8,9 @@ {37b2ae10-489f-4bdb-b43e-2ade94ddca5d} + + {4d816024-06a3-4d7c-963b-7dd4af001f48} + @@ -35,18 +38,10 @@ Sources - - - Dat - - Sources - - Dat - Sources @@ -56,4 +51,14 @@ Sources + + + Dat + + + + + Src + + \ No newline at end of file diff --git a/build/tp0.vcxproj b/build/tp0.vcxproj index 7cf2d85a3..ab04f74c3 100644 --- a/build/tp0.vcxproj +++ b/build/tp0.vcxproj @@ -41,7 +41,7 @@ <_ProjectFileVersion>10.0.30319.1 - ..\exed\ + ..\exe\ $(Configuration)\$(ProjectName)\ true ..\exe\ diff --git a/build/ve0.vcxproj b/build/ve0.vcxproj index 822aeaa07..09c1bdae5 100644 --- a/build/ve0.vcxproj +++ b/build/ve0.vcxproj @@ -202,6 +202,7 @@ + diff --git a/build/ve0.vcxproj.filters b/build/ve0.vcxproj.filters index 04b5ea032..85ddc8e8e 100644 --- a/build/ve0.vcxproj.filters +++ b/build/ve0.vcxproj.filters @@ -90,6 +90,9 @@ Headers + + Headers + diff --git a/build/ve_maskrighe.vcxproj b/build/ve_maskrighe.vcxproj index d52b922f0..b9b30bfbd 100644 --- a/build/ve_maskrighe.vcxproj +++ b/build/ve_maskrighe.vcxproj @@ -141,6 +141,8 @@ Document + + Document From 632fb4b8745c53629526ad3974489c4c13504528 Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Fri, 3 Aug 2018 16:05:25 +0200 Subject: [PATCH 4/7] Patch level : 12.0 612 Files correlati : Commento : tp0.exe Sistemato calcolo peso per categorie conai inserite in bolla --- src/tp/tp0102.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tp/tp0102.cpp b/src/tp/tp0102.cpp index c6b4bfea8..f191bd1fb 100755 --- a/src/tp/tp0102.cpp +++ b/src/tp/tp0102.cpp @@ -853,18 +853,18 @@ bool TPack_ddt::trasferisci() { TGeneric_distrib d(peso_imballo_ddt, 3); FOR_EACH_CONFIGURED_CONAI_CLASS(cc) - if (art.conai_subclass(cc).full()) + if (rdoc.get(conai_sottocat_name(cc, LF_RIGHEDOC)).full()) d.add(art.conai_weight(cc)); FOR_EACH_CONFIGURED_CONAI_CLASS(cc) - if (art.conai_subclass(cc).full()) + if (rdoc.get(conai_sottocat_name(cc, LF_RIGHEDOC)).full()) rdoc.put(conai_peso_name(cc), d.get()); } else { // Il peso in bolla coincide con quello in anagrafica: devo riportarli FOR_EACH_CONFIGURED_CONAI_CLASS(cc) - if (art.conai_subclass(cc).full()) - rdoc.put(conai_peso_name(cc), art.conai_weight(cc)); + if (rdoc.get(conai_sottocat_name(cc, LF_RIGHEDOC)).full()) + rdoc.put(conai_peso_name(cc), art.conai_weight(cc)); } /* } else From 63a708a083813d663ff1f0e2622cf7c765ef5096 Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Fri, 3 Aug 2018 16:10:46 +0200 Subject: [PATCH 5/7] Patch level : 12.0 616 Files correlati : Commento : ve0.exe profili Aggiunti i campi per fatturazione elettronica alle maschere documenti --- src/ve/bolacq.src | 8 +- src/ve/bollac.src | 12 ++- src/ve/bollaf.src | 7 +- src/ve/fatacq.src | 12 ++- src/ve/fatturaa.src | 8 +- src/ve/fatturac.src | 7 +- src/ve/ordinec.src | 7 +- src/ve/ordinef.src | 27 ++++--- src/ve/ve0100.cpp | 16 +++- src/ve/ve0300.cpp | 80 +++++++++---------- src/ve/ve0300a.src | 30 +++++++ src/ve/ve0300c.ini | 3 + src/ve/velib03a.cpp | 187 +++++++++++++++++++++++--------------------- src/ve/veuml.h | 3 + 14 files changed, 251 insertions(+), 156 deletions(-) diff --git a/src/ve/bolacq.src b/src/ve/bolacq.src index 594645bb3..598557895 100755 --- a/src/ve/bolacq.src +++ b/src/ve/bolacq.src @@ -176,6 +176,9 @@ DESCRCUP = S_NORMALE CIG = S_NORMALE DESCRCIG = S_NORMALE CMSH = S_NORMALE +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [DEFAULT] @@ -240,10 +243,11 @@ Col(21)=FR_TIPORIGA 2400 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE 4000 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=14 +NGROUPS=15 1=100 2=200 3=400 @@ -258,5 +262,5 @@ NGROUPS=14 12=2400 13=2900 14=3000 - +15=3100 diff --git a/src/ve/bollac.src b/src/ve/bollac.src index 8117e67bf..ee4124857 100755 --- a/src/ve/bollac.src +++ b/src/ve/bollac.src @@ -20,8 +20,9 @@ Title(1)=Cliente Title(2)=Pagamenti Title(3)=Ind.Spedizione Title(4)=Spedizione -Title(5)=Righe -Title(6)=Totali +Title(5)=Fatturazione elettronica +Title(6)=Righe +Title(7)=Totali [PROFILO] // Si possono indicare, dopo il numero, PROMPT, HELP, WARNING cosi: @@ -175,6 +176,9 @@ DESCRCUP = S_NORMALE CIG = S_NORMALE DESCRCIG = S_NORMALE CMSH = S_NORMALE +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [DEFAULT] Default(0)=F_CAUSTRASP|VEN @@ -247,10 +251,11 @@ Col(24)=FR_TIPORIGA 2800 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE 4000 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=30 +NGROUPS=31 1=100 2=2500 3=200 @@ -281,4 +286,5 @@ NGROUPS=30 28=1000 29=2900 30=3000 +31=3100 diff --git a/src/ve/bollaf.src b/src/ve/bollaf.src index a53c327fa..3d3d6c6fb 100755 --- a/src/ve/bollaf.src +++ b/src/ve/bollaf.src @@ -122,6 +122,9 @@ CAUSMAG = S_OBBLIGATORIO CAUSMAGC = S_DISABILITATO DESCRMAG = S_NORMALE DESCRMAGC = S_DISABILITATO +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [DEFAULT] Default(0)=F_CAUSTRASP|RES @@ -177,9 +180,10 @@ Col(19) = FR_TIPORIGA 2800 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=23 +NGROUPS=24 1=100 2=200 3=300 @@ -203,3 +207,4 @@ NGROUPS=23 21=1500 22=1600 23=3000 +24=3100 diff --git a/src/ve/fatacq.src b/src/ve/fatacq.src index e27b5b419..326d5abff 100755 --- a/src/ve/fatacq.src +++ b/src/ve/fatacq.src @@ -21,8 +21,9 @@ PREZZO=ULTCOS1 MODULE=ve Title(1)=Fornitore Title(2)=Pagamenti -Title(3)=Righe -Title(4)=Totali +Title(3)=C.U.P. +Title(4)=Righe +Title(5)=Totali [PROFILO] @@ -138,6 +139,9 @@ DESCRCUP = S_NORMALE CIG = S_NORMALE DESCRCIG = S_NORMALE CMSH = S_NORMALE +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [DEFAULT] @@ -195,10 +199,11 @@ Col(21) = FR_TIPORIGA 2400 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE 4000 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=15 +NGROUPS=16 1=1000 2=100 3=200 @@ -214,3 +219,4 @@ NGROUPS=15 13=1900 14=2900 15=3000 +16=3100 \ No newline at end of file diff --git a/src/ve/fatturaa.src b/src/ve/fatturaa.src index 3adfde9f3..a2895cdf6 100755 --- a/src/ve/fatturaa.src +++ b/src/ve/fatturaa.src @@ -176,6 +176,9 @@ DESCRCUP = S_NORMALE CIG = S_NORMALE DESCRCIG = S_NORMALE CMSH = S_NORMALE +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [DEFAULT] Default(0)=F_CAUSTRASP|VEN @@ -249,9 +252,10 @@ Col(25) = FR_TIPORIGA 2800 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=30 +NGROUPS=31 1=100 2=2500 3=200 @@ -282,4 +286,4 @@ NGROUPS=30 28=1010 29=2900 30=3000 - +30=3100 diff --git a/src/ve/fatturac.src b/src/ve/fatturac.src index e05401a68..872d13047 100755 --- a/src/ve/fatturac.src +++ b/src/ve/fatturac.src @@ -157,6 +157,9 @@ DESCRCUP = S_NORMALE CIG = S_NORMALE DESCRCIG = S_NORMALE CMSH = S_NORMALE +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [DEFAULT] @@ -218,9 +221,10 @@ Col(21)=FR_TIPORIGA 2500 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=25 +NGROUPS=26 1=100 2=2500 3=200 @@ -246,3 +250,4 @@ NGROUPS=25 23=1010 24=2900 25=3000 +26=3100 diff --git a/src/ve/ordinec.src b/src/ve/ordinec.src index 9d10bb6bb..40650b056 100755 --- a/src/ve/ordinec.src +++ b/src/ve/ordinec.src @@ -170,6 +170,9 @@ DESCRCUP = S_NORMALE CIG = S_NORMALE DESCRCIG = S_NORMALE CMSH = S_NORMALE +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [DEFAULT] @@ -237,9 +240,10 @@ Col(25) = FR_TIPORIGA 2500 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=27 +NGROUPS=28 1=100 2=2500 3=200 @@ -267,4 +271,5 @@ NGROUPS=27 25=2900 26=2000 27=3000 +28=3100 diff --git a/src/ve/ordinef.src b/src/ve/ordinef.src index 05135f89d..f1d568076 100755 --- a/src/ve/ordinef.src +++ b/src/ve/ordinef.src @@ -29,8 +29,9 @@ Title(1)=Fornitore Title(2)=Pagamenti Title(3)=Ind.Spedizione Title(4)=Spedizione -Title(5)=Righe -Title(6)=Totali +Title(5)=C.U.P. +Title(6)=Righe +Title(7)=Totali [PROFILO] // Si possono indicare, dopo il numero, PROMPT, HELP, WARNING cosi: @@ -175,6 +176,9 @@ DESCRCUP = S_NORMALE CIG = S_NORMALE DESCRCIG = S_NORMALE CMSH = S_NORMALE +TIPO_SDI = S_NORMALE +INVIO_FP = S_NORMALE +REG_FISCF = S_NORMALE [SHEET] Col(0) = FR_CODMAG @@ -247,9 +251,10 @@ Col(24) = FR_TIPORIGA 2800 = S_NORMALE 2900 = S_NORMALE 3000 = S_NORMALE +3100 = S_NORMALE [ORDINEGRUPPI] -NGROUPS=34 +NGROUPS=36 1=100 2=200 3=300 @@ -277,11 +282,11 @@ NGROUPS=34 25=1000 26=2300 27=2400 -28=3000 -29=3200 -30=2500 -31=3400 -32=1600 -33=2000 -34=2900 -35=3000 +28=3200 +29=2500 +30=3400 +31=1600 +32=2000 +33=2900 +34=3000 +35=3100 diff --git a/src/ve/ve0100.cpp b/src/ve/ve0100.cpp index cb7f51c2e..5a78b8a00 100755 --- a/src/ve/ve0100.cpp +++ b/src/ve/ve0100.cpp @@ -717,7 +717,21 @@ bool TMotore_application::user_create( ) TISAM_recordset tip("USE %TIP"); for (bool ok = tip.move_first(); ok; ok = tip.move_next()) - cached_tipodoc(tip.get("CODTAB").as_string()); + { + TFilename pname(tip.get("S4").as_string().sleft(8)); + + pname.ext("ini"); + + bool exist = pname.exist(); + + if (!exist) + { + pname.custom_path(); + exist = pname.exist(); + } + if (exist) + cached_tipodoc(tip.get("CODTAB").as_string()); + } _config_ditta = new TConfig(CONFIG_DITTA); diff --git a/src/ve/ve0300.cpp b/src/ve/ve0300.cpp index 4b6fb86c4..7380d163d 100755 --- a/src/ve/ve0300.cpp +++ b/src/ve/ve0300.cpp @@ -692,33 +692,33 @@ TField::TField( TString& campo, TConfig& pro ) : _nome( campo ) _fieldname = pro.get( "FIELDNAME", campo ); _x = _gruppo = pro.get_int( "X", campo ); _y = _gruppo = pro.get_int( "Y", campo ); - _gruppo = pro.get_int( "GROUP", campo ); + _gruppo = pro.get_int( "GR", campo ); CHECK( _gruppo != 0, "Gruppo uguale a 0" ); - _id = pro.get_int( "MSKID", campo ); + _id = pro.get_int( "MS", campo ); CHECK( _id != 0, "Campo con MSKID uguale a 0" ); - _type = pro.get_int( "TYPE", campo ); - _size = pro.get_int( "SIZE", campo ); - _prompt = pro.get( "PROMPT", campo ); + _type = pro.get_int( "TY", campo ); + _size = pro.get_int( "SI", campo ); + _prompt = pro.get( "PR", campo ); if( _prompt[ 0 ] == '\"' ) { _prompt.rtrim(1); _prompt.ltrim(1); }; - _flag = pro.get( "FLAG", campo ); - _help = pro.get( "HELP", campo ); - _warning = pro.get( "WARNING", campo ); - _modules = pro.get( "MODULE", campo ); _modules.strip("\""); - _use = pro.get( "USE", campo ); + _flag = pro.get( "FL", campo ); + _help = pro.get( "HE", campo ); + _warning = pro.get( "WA", campo ); + _modules = pro.get( "MO", campo ); _modules.strip("\""); + _use = pro.get( "US", campo ); _use.separator( '~' ); - _input = pro.get( "INPUT", campo ); + _input = pro.get( "IN", campo ); _input.separator( '~' ); - _display = pro.get( "DISPLAY", campo ); + _display = pro.get( "DI", campo ); _display.separator( '~' ); - _output = pro.get( "OUTPUT", campo ); + _output = pro.get( "OU", campo ); _output.separator( '~' ); - _copy = pro.get( "COPY", campo ); + _copy = pro.get( "CO", campo ); _copy.separator( '~' ); - _special = pro.get( "SPECIAL", campo ); + _special = pro.get( "SP", campo ); _special.separator( '~' ); _configs = pro.get( "CONFIGS", campo ); _configs.separator( '~' ); @@ -811,7 +811,7 @@ int TField::stato_reale() if (stato > S_NON_VISIBILE) { - const TString80 gruppo(fieldsini().get("GROUP", _nome)); + const TString80 gruppo(fieldsini().get("GR", _nome)); int stato_gruppo = S_OBBLIGATORIO; if (stato > stato_gruppo) stato = stato_gruppo; @@ -972,17 +972,17 @@ void TMask_generator::carica_dati_campi( const TFilename& fn, TAssoc_array& a ) campo->x( atoi( value ) ); else if( key == "Y" ) campo->y( atoi( value ) ); - else if( key == "GROUP" ) + else if( key.starts_with("GR")) campo->gruppo( atoi( value ) ); - else if( key == "FIELDNAME" ) + else if(key.starts_with("FI")) campo->fieldname( value ); - else if( key == "MSKID" ) + else if( key.starts_with("MS")) campo->id( atoi( value ) ); - else if( key == "TYPE" ) + else if( key.starts_with("TY")) campo->type( atoi( value ) ); - else if( key == "SIZE" ) + else if( key.starts_with("SI")) campo->size( atoi( value ) ); - else if( key == "PROMPT" ) + else if( key.starts_with("PR")) { if( value[ 0 ] == '"' ) { @@ -991,29 +991,29 @@ void TMask_generator::carica_dati_campi( const TFilename& fn, TAssoc_array& a ) }; campo->prompt( value ); } - else if( key == "FLAG" ) + else if( key.starts_with("FL")) campo->flag( value ); - else if( key == "USE" ) - campo->use( (TToken_string & ) value ); - else if( key == "INPUT" ) - campo->input( (TToken_string & )value ); - else if( key == "DISPLAY" ) - campo->display( (TToken_string & )value ); - else if( key == "OUTPUT" ) - campo->output( (TToken_string & )value ); - else if( key == "COPY" ) + else if( key.starts_with("US")) + campo->use( TToken_string(value, '~')); + else if( key.starts_with("IN")) + campo->input(TToken_string(value, '~')); + else if( key.starts_with("DI")) + campo->display(TToken_string(value, '~')); + else if( key.starts_with("OU")) + campo->output(TToken_string(value, '~')); + else if( key.starts_with("CO")) campo->copy( (TToken_string & )value ); - else if( key == "WARNING" ) + else if( key.starts_with("WA")) campo->warning( value ); - else if( key == "HELP" ) + else if( key.starts_with("HE")) campo->help( value ); - else if( key == "MODULE" ) + else if( key.starts_with("MO")) campo->modules( value ); - else if( key == "SPECIAL" ) - campo->special( (TToken_string & )value ); - else if( key == "ITEMS" ) - campo->items( (TToken_string & )value ); - else if( key == "CONFIGS" ) + else if( key.starts_with("SP")) + campo->special(TToken_string(value, '~')); + else if( key.starts_with("IT")) + campo->items( TToken_string(value, '@')); + else if( key.starts_with("CONF")) campo->configs( (TToken_string & )value ); else yesnofatal_box( "Chiave non trovata(%s)", (const char *) key ); } diff --git a/src/ve/ve0300a.src b/src/ve/ve0300a.src index 3c42b4c5e..e9bcd0131 100755 --- a/src/ve/ve0300a.src +++ b/src/ve/ve0300a.src @@ -1993,6 +1993,36 @@ FIELDNAME=CODCMS FLAG=H SIZE=20 +[TIPO_SDI] +TYPE=T_LISTA +GROUP=3100 +MSKID=F_TIPO_SDI +X=2 +Y=1 +SIZE=40 +PROMPT="Tipo documento SDI " +FIELDNAME=TIPO_SDI +ITEMS=|@TD01|TD01 Fattura@TD02|TD02 Acconto/Anticipo su fattura@TD03|TD03 Acconto/Anticipo su parcella@TD04|TD04 Nota di credito@TD05|TD05 Nota di debito@TD06|TD06 parcella + +[INVIO_FP] +TYPE=T_CHECKBOX +GROUP=3100 +MSKID=F_INVIO_FP +X=65 +Y=1 +PROMPT="Invio XML" +FIELDNAME=INVIO_XML + +[REG_FISCF] +TYPE=T_LISTA +GROUP=3100 +MSKID=F_REG_FISCF +X=2 +Y=2 +SIZE=40 +PROMPT="Regime Fisc. " +FIELDNAME=REGFISC +ITEMS=|@RF01|RF01 Ordinario@RF02|RF02 Contribuenti minimi@RF04|RF04 Agricoltura, connesse e pesca@RF05|RF05 Vendita sali e tabacchi@RF06|RF06 Commercio fiammiferi@RF07|RF07 Editoria@RF08|RF08 Gestione servizi tel. pubblica@RF09|RF09 Rivendita DdT pubblico e di sosta@RF10|RF10 Intr., giochi e altre attività@RF11|RF11 Agenzie viaggi e turismo@RF12|RF12 Agriturismo@RF13|RF13 Vendite a domicilio@RF14|RF14 Rivendita usato, arte, ant. o col.@RF15|RF15 Asta d’arte, ant. o da col.@RF16|RF16 IVA per cassa P.A.@RF17|RF17 IVA per cassa@RF18|RF18 Altro@RF19|RF19 Regime forfettario [LVGROUP] GROUP=4041 X=1 diff --git a/src/ve/ve0300c.ini b/src/ve/ve0300c.ini index f681634df..209baf067 100755 --- a/src/ve/ve0300c.ini +++ b/src/ve/ve0300c.ini @@ -107,6 +107,9 @@ HEIGHT=2 [3000] HEIGHT=3 +[3100] +HEIGHT=2 + [3200] HEIGHT=1 diff --git a/src/ve/velib03a.cpp b/src/ve/velib03a.cpp index f22e6cc65..ab27441a2 100755 --- a/src/ve/velib03a.cpp +++ b/src/ve/velib03a.cpp @@ -357,105 +357,110 @@ void TTipo_documento::add_formula_if_needed(TConfig& profile, TString& variable, void TTipo_documento::read_formule() { TFilename profile; profile_name(profile); - TConfig prof(profile, "MAIN"); - prof.write_protect(); // Altrimenti non si distrugge!!! - - _tipocr = prof.get_char("TIPOCR", NULL, -1, ' '); - _formule = prof.get("CAMPICALC"); - const TString& calcoli = prof.get("CALCOLI"); - if (calcoli == "*") - { - TTable frd("%FRD"); - for (int err = frd.first(); err == NOERR; err = frd.next()) - { - const TString & formula = frd.get("CODTAB"); - if (_formule.find(formula) < 0) - _formule.add(formula); - } - } - else - _formule.add(calcoli); - - add_formula_if_needed(prof, _totale, "TOTALE", "IMPONIBILI()+IMPOSTE()"); - - if (_totale == "TOTALE") - _totale = "TOTDOC"; - - _totale_netto = "_"; _totale_netto << _totale; + TFilename p(profile); p.custom_path(); - add_formula_if_needed(prof, _basesconto, "BASESCONTO", "SOMMA(\"IMPONIBILE()\", \"(TIPO()!='S') && (TIPO()!='C')\")"); - add_formula_if_needed(prof, _spese, "SPESE", "SOMMA(\"IMPONIBILE()\", \"TIPO() == 'S'\")"); - add_formula_if_needed(prof, _totvalres, "TOTVALRES", "VALDOC(0)"); - add_formula_if_needed(prof, _totvalore, "TOTVALORE", "VALDOC(1)"); + if (p.exist()) // evita la creazione di profili vuoti + { + TConfig prof(profile, "MAIN"); + prof.write_protect(); // Altrimenti non si distrugge!!! - if (provvigioni()) - { - TString80 campo(prof.get("TOTPROVV")); - if (campo.empty()) - campo = "TOTPROVV"; - const TRectype& frd = cache().get("%FRD", campo); + _tipocr = prof.get_char("TIPOCR", NULL, -1, ' '); + _formule = prof.get("CAMPICALC"); + const TString& calcoli = prof.get("CALCOLI"); + if (calcoli == "*") + { + TTable frd("%FRD"); + for (int err = frd.first(); err == NOERR; err = frd.next()) + { + const TString & formula = frd.get("CODTAB"); + if (_formule.find(formula) < 0) + _formule.add(formula); + } + } + else + _formule.add(calcoli); - _totprovv = "_"; - _totprovv << campo; + add_formula_if_needed(prof, _totale, "TOTALE", "IMPONIBILI()+IMPOSTE()"); - TString80 expr(frd.get("S1")); - if (expr.empty()) - expr = "SOMMA(\"PROVV()\")"; - _formule_documento.add(_totprovv, new TFormula_documento(_documento, _totprovv, expr, TRUE)); - if (_formule.find(campo) < 0) - _formule.add(campo); - _formule.add(_totprovv); - _formule_documento.add(campo, new TFormula_documento(_documento, campo, "TOTPROVV()"), TRUE); - - campo = prof.get("TOTPROVV1"); - if (campo.empty()) - campo = "TOTPROVV1"; - const TRectype& frd1 = cache().get("%FRD", campo); + if (_totale == "TOTALE") + _totale = "TOTDOC"; - _totprovv1 = "_"; - _totprovv1 << campo; + _totale_netto = "_"; _totale_netto << _totale; - expr = frd1.get("S1"); - if (expr.empty()) - expr = "SOMMA(\"PROVV(-883,0)\")"; - _formule_documento.add(_totprovv1, new TFormula_documento(_documento, _totprovv1, expr)); - if (_formule.find(campo) < 0) - _formule.add(campo); - _formule.add(_totprovv1); - _formule_documento.add(campo, new TFormula_documento(_documento, campo, "TOTPROVV(-883,0)")); - } + add_formula_if_needed(prof, _basesconto, "BASESCONTO", "SOMMA(\"IMPONIBILE()\", \"(TIPO()!='S') && (TIPO()!='C')\")"); + add_formula_if_needed(prof, _spese, "SPESE", "SOMMA(\"IMPONIBILE()\", \"TIPO() == 'S'\")"); + add_formula_if_needed(prof, _totvalres, "TOTVALRES", "VALDOC(0)"); + add_formula_if_needed(prof, _totvalore, "TOTVALORE", "VALDOC(1)"); - _totale_cont = prof.get("TOTALECONT"); - _cnt_prezzi = prof.get_bool("CONTROLLO_PREZZI"); - _field_prezzo = prof.get(RDOC_PREZZO); - _field_qta = prof.get(RDOC_QTA, NULL, -1, RDOC_QTA); - _field_qtaevasa = prof.get(RDOC_QTAEVASA, NULL, -1, RDOC_QTAEVASA); - _field_qta_mag = prof.get("QTA_MAG"); - if(_field_qta_mag.blank()) - _field_qta_mag = _field_qta; - _field_qtaevasa_mag = prof.get("QTAEVASA_MAG"); - if(_field_qtaevasa_mag.blank()) - _field_qtaevasa_mag = _field_qtaevasa; - _check_qta = prof.get_char("CHECK_QTA", "MAIN"); - _load_cont = prof.get_bool("LOAD_CONT", "MAIN"); - _raee_cod = prof.get("RAEE_COD", "MAIN"); - _raee_fld = prof.get("RAEE_FLD", "MAIN"); - - TToken_string str = prof.get("ART_TO_SHOW", "MAIN"); - _liv = str.get_int(); - _row = str.get_int(); + if (provvigioni()) + { + TString80 campo(prof.get("TOTPROVV")); + if (campo.empty()) + campo = "TOTPROVV"; + const TRectype& frd = cache().get("%FRD", campo); - if (_liv > 0 && _row == 0) - _row = 1; - - _str_desc_doc = prof.get("DESCRIZIONE_DOC"); - _str_desc_rdoc = prof.get("DESCRIZIONE_RDOC"); - _show_evaded_lines = !prof.get_bool("NASCONDI_RIGHE_EVASE"); // Normalmente mostra anche evase - _non_evadere = prof.get_bool("NON_EVADERE"); // Normalmente mostra anche evase - _module = prof.get("MODULE", NULL, -1, "ve").left(2); - _hca_req = !prof.get_bool("HEAD_CA_OPT"); - _check_double_art = prof.get_bool("CHECK_DOUBLE_ART"); - _ignora_anticipi_fatturazione = prof.get_bool("IGNORA_ANTICIPI_FATTURAZIONE"); + _totprovv = "_"; + _totprovv << campo; + + TString80 expr(frd.get("S1")); + if (expr.empty()) + expr = "SOMMA(\"PROVV()\")"; + _formule_documento.add(_totprovv, new TFormula_documento(_documento, _totprovv, expr, TRUE)); + if (_formule.find(campo) < 0) + _formule.add(campo); + _formule.add(_totprovv); + _formule_documento.add(campo, new TFormula_documento(_documento, campo, "TOTPROVV()"), TRUE); + + campo = prof.get("TOTPROVV1"); + if (campo.empty()) + campo = "TOTPROVV1"; + const TRectype& frd1 = cache().get("%FRD", campo); + + _totprovv1 = "_"; + _totprovv1 << campo; + + expr = frd1.get("S1"); + if (expr.empty()) + expr = "SOMMA(\"PROVV(-883,0)\")"; + _formule_documento.add(_totprovv1, new TFormula_documento(_documento, _totprovv1, expr)); + if (_formule.find(campo) < 0) + _formule.add(campo); + _formule.add(_totprovv1); + _formule_documento.add(campo, new TFormula_documento(_documento, campo, "TOTPROVV(-883,0)")); + } + + _totale_cont = prof.get("TOTALECONT"); + _cnt_prezzi = prof.get_bool("CONTROLLO_PREZZI"); + _field_prezzo = prof.get(RDOC_PREZZO); + _field_qta = prof.get(RDOC_QTA, NULL, -1, RDOC_QTA); + _field_qtaevasa = prof.get(RDOC_QTAEVASA, NULL, -1, RDOC_QTAEVASA); + _field_qta_mag = prof.get("QTA_MAG"); + if (_field_qta_mag.blank()) + _field_qta_mag = _field_qta; + _field_qtaevasa_mag = prof.get("QTAEVASA_MAG"); + if (_field_qtaevasa_mag.blank()) + _field_qtaevasa_mag = _field_qtaevasa; + _check_qta = prof.get_char("CHECK_QTA", "MAIN"); + _load_cont = prof.get_bool("LOAD_CONT", "MAIN"); + _raee_cod = prof.get("RAEE_COD", "MAIN"); + _raee_fld = prof.get("RAEE_FLD", "MAIN"); + + TToken_string str = prof.get("ART_TO_SHOW", "MAIN"); + _liv = str.get_int(); + _row = str.get_int(); + + if (_liv > 0 && _row == 0) + _row = 1; + + _str_desc_doc = prof.get("DESCRIZIONE_DOC"); + _str_desc_rdoc = prof.get("DESCRIZIONE_RDOC"); + _show_evaded_lines = !prof.get_bool("NASCONDI_RIGHE_EVASE"); // Normalmente mostra anche evase + _non_evadere = prof.get_bool("NON_EVADERE"); // Normalmente mostra anche evase + _module = prof.get("MODULE", NULL, -1, "ve").left(2); + _hca_req = !prof.get_bool("HEAD_CA_OPT"); + _check_double_art = prof.get_bool("CHECK_DOUBLE_ART"); + _ignora_anticipi_fatturazione = prof.get_bool("IGNORA_ANTICIPI_FATTURAZIONE"); + } } bool TTipo_documento::movimento_interno() const diff --git a/src/ve/veuml.h b/src/ve/veuml.h index 4697910e2..2d3e8bfbb 100755 --- a/src/ve/veuml.h +++ b/src/ve/veuml.h @@ -124,6 +124,9 @@ #define F_PATIPOCON 227 #define F_IVAXCASSA 228 #define F_MANDATO 229 +#define F_TIPO_SDI 230 +#define F_INVIO_FP 231 +#define F_REG_FISCF 232 #define F_CDC1 251 #define F_CDC12 262 From fb98823f08aa16dc83de1804f5423651c0484e21 Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Sun, 26 Aug 2018 08:55:04 +0200 Subject: [PATCH 6/7] Patch level : 12.0 618 Files correlati : Commento : np0.exe npmenu.men MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corretti saldi iniziali mastrini per contabilità separata. Aggiunta chiusura al menu --- src/cg/cg3200.cpp | 109 ++++++++++++++++++++++++++++++---------------- src/cg/cg3600.cpp | 25 ++++++++++- src/np/npmenu.men | 3 +- 3 files changed, 97 insertions(+), 40 deletions(-) diff --git a/src/cg/cg3200.cpp b/src/cg/cg3200.cpp index 231952060..35b2c124f 100755 --- a/src/cg/cg3200.cpp +++ b/src/cg/cg3200.cpp @@ -97,7 +97,7 @@ class TMastrini_application : public TPrintapp TString _descrizione,_sezione,_numdoc,_descrizionemov,_numrivd,_descr; TString _dataregs, _datadocs; int _gruppocontr,_contocontr,_nummast,_pagina; -#ifdef _CONT_SEP +#ifdef CONT_SEP TString _cont_sep; #endif long _sottocontocontr; @@ -1451,7 +1451,10 @@ bool TMastrini_application::preprocess_page(int file, int counter) _dataregs = _datareg_stampa.string(); - +#ifdef CONT_SEP + if (_cont_sep.full() && _cont_sep != mov.get(MOV_CONTSEP)) + return false; +#endif if ((_stampa_mov_prov)||((!_stampa_mov_prov)&&(provvis.blank()))) { if ((_datareg >= _data_ini) && (_datareg <= _data_fine)) @@ -2257,15 +2260,15 @@ bool TMastrini_application::set_print(int m) // altrimenti estrae il primo elemento sovrascrivendo la maschera corrente. // Questa figata cerca di correggere gli errori MI6185 e MI3592 in una botta #ifdef CONT_SEP - TString cont_sep = _msk->get(F_CONTSEP); + _cont_sep = _msk->get(F_CONTSEP); - if (cont_sep.full()) +/* if (_cont_sep.full()) { TString filter("(FLSCA!=\" \")"); - filter << "&&(CONTSEP==\"" << cont_sep << "\")"; + filter << "&&(" << LF_MOV << "->CONTSEP==\"" << _cont_sep << "\")"; current_cursor()->setfilter(filter); - } + } */ #endif TSheet_field& sht = _msk->sfield(F_SCELTE); if (sht.items() != 0) @@ -2933,13 +2936,15 @@ void TMastrini_application::calcola_progressivi_al(const TDate& data_fin) const TDate data_inizio = _annomsk ? _data_inizioese : _inizioes; - if (_annomsk == _last_year && data_inizio == _last_inizio && data_fin == _last_date && +#ifndef CONT_SEP + if (_annomsk == _last_year && data_inizio == _last_inizio && data_fin == _last_date && _last_provv == _stampa_mov_prov && _last_bill == TBill(_gruppo, _conto, _sottoc)) { _totale_prima_dare = _last_dare; _totale_prima_avere = _last_avere; return; } +#endif TLocalisamfile& rmov_file = current_cursor()->file(LF_RMOV); const TRecnotype record = rmov_file.recno(); @@ -2969,15 +2974,18 @@ void TMastrini_application::calcola_progressivi_al(const TDate& data_fin) const TDate datareg = mov.get_date(_annomsk ? MOV_DATACOMP : RMV_DATAREG); //Legge movimenti con data > inizio esercizio e < data_fin - if (((annoes==_annomsk)||(_annomsk == 0))&&(datareg >= data_inizio)&&(datareg <= data_fin)) - { - const char sezione = rmov.get_char(RMV_SEZIONE); - const real importo = rmov.get_real(RMV_IMPORTO); - if (sezione == 'D') - _totale_prima_dare += importo; - else - _totale_prima_avere += importo; - } +#ifdef CONT_SEP + if (_cont_sep.blank() || _cont_sep == mov.get(MOV_CONTSEP)) +#endif + if (((annoes==_annomsk)||(_annomsk == 0))&&(datareg >= data_inizio)&&(datareg <= data_fin)) + { + const char sezione = rmov.get_char(RMV_SEZIONE); + const real importo = rmov.get_real(RMV_IMPORTO); + if (sezione == 'D') + _totale_prima_dare += importo; + else + _totale_prima_avere += importo; + } } } @@ -3026,6 +3034,15 @@ void TMastrini_application::calcola_progressivi(bool finali) //Calcola i progressivi dell'esercizio attuale if (annoes_saldi == _anno_corrente) { +#ifdef CONT_SEP + TDate datalim; + + _sld->saldo_cont_sep(_gruppo, _conto, _sottoc, annoes_saldi, esercizi().esercizio(annoes_saldi).fine(), _indbil, _cont_sep, _stampa_mov_prov); + saldo = _sld->saldo(); + saldoini_attuale = saldo; + saldofine_attuale = _sld->saldofin(); + +#else progdare_attuale = saldi.get_real(SLD_PDARE); progavere_attuale = saldi.get_real(SLD_PAVERE); if (_stampa_mov_prov) @@ -3035,13 +3052,14 @@ void TMastrini_application::calcola_progressivi(bool finali) } saldo = saldi.get_real(SLD_SALDO); - salini = saldi.get(SLD_FLAGSALINI)[0]; - _ultima_data_reg = saldi.get_date(SLD_DATAULMOV); - saldoini_attuale = saldi.get_real(SLD_SALDO); - salini_attuale = saldi.get_char(SLD_FLAGSALINI); - saldofine_attuale = saldi.get_real(SLD_SALDOFIN); - salfine_attuale = saldi.get_char(SLD_FLAGSALFIN); - } + saldoini_attuale = saldi.get_real(SLD_SALDO); + saldofine_attuale = saldi.get_real(SLD_SALDOFIN); +#endif + salini = saldi.get(SLD_FLAGSALINI)[0]; + _ultima_data_reg = saldi.get_date(SLD_DATAULMOV); + salini_attuale = saldi.get_char(SLD_FLAGSALINI); + salfine_attuale = saldi.get_char(SLD_FLAGSALFIN); + } } // if (!saldi.get_bool(SLD_FLSCA)) } // FOR @@ -3051,24 +3069,38 @@ void TMastrini_application::calcola_progressivi(bool finali) if (_annomsk != 0) { if ((_indbil == 1) || (_indbil == 2) || (_indbil == 5)) - { - const TRecnotype pos = saldi.recno(); + { + const TRecnotype pos = saldi.recno(); + +#ifdef CONT_SEP + const int esp = esercizi().pred(_anno_corrente); + + _sld->saldo_cont_sep(_gruppo, _conto, _sottoc, esp, esercizi().esercizio(esp).fine(), _indbil, _cont_sep, _stampa_mov_prov, true); + saldo = _sld->saldo(); +#else + // W96SALDI del 18-07-96 saldofin_esprec usa il flag TRUE xche' deve // considerare anche il saldo finale saldo = _sld->saldofin_esprec(_anno_corrente,_gruppo,_conto,_sottoc,TRUE, _stampa_mov_prov); - saldi.readat(pos); - - if (saldo > ZERO) - { - progredare_eseprec = saldo; - progdare_prec = saldo; - } - else if (saldo < ZERO) - { - saldo = -saldo; - progreavere_eseprec = saldo; - progavere_prec = saldo; - } +#endif + saldi.readat(pos); + + if (saldo > ZERO) + { + progredare_eseprec = saldo; + progdare_prec = saldo; + progreavere_eseprec = ZERO; + progavere_prec = ZERO; + + } + else if (saldo < ZERO) + { + progredare_eseprec = ZERO; + progdare_prec = ZERO; + saldo = -saldo; + progreavere_eseprec = saldo; + progavere_prec = saldo; + } } } @@ -3699,6 +3731,7 @@ bool TMastrini_application::user_create() exp.add("CONTO=CONTO"); exp.add("SOTTOCONTO=SOTTOCONTO"); _rel->add(LF_RMOV,exp,2,LF_SALDI); + _rel->add(LF_MOV, "NUMREG==NUMREG", 1, LF_RMOV); _rel->add("CMS", "CODTAB==CODCMS", 1, LF_RMOV, 501); _rel->add("FSC", "CODTAB==FASCMS", 1, LF_RMOV, 502); diff --git a/src/cg/cg3600.cpp b/src/cg/cg3600.cpp index 83f23020c..8daf104e6 100755 --- a/src/cg/cg3600.cpp +++ b/src/cg/cg3600.cpp @@ -344,7 +344,29 @@ void TMastrino::read(const TBill& conto, // vanno dall'inizio dell'esercizio al giorno precedente // la data di inizio stampa - TBalance saldo(_conto, ae, true, provvis); +#ifdef CONT_SEP + TSaldo saldo; + int aep = esercizi.pred(ae); + + saldo.saldo_cont_sep(_conto.gruppo(), _conto.conto(), _conto.sottoconto(), aep, esercizi.esercizio(aep).fine(), _conto.indicatore_bilancio(), app().query_mask().get(F_CONTSEP), provvis, true); + real saldoini = saldo.saldo(); + if (saldoini > ZERO) + { + _pdare_ini = saldoini; + _pavere_ini = ZERO; + } + else + { + _pdare_ini = ZERO; + _pavere_ini = -saldoini; + } + + // Valori dei saldi finali: + // Comprendono i movimenti di apertura, chiusura ed i progressivi attuali + _pdare_fin = saldo.prgdare(); + _pavere_fin = saldo.prgavere(); +#else + TBalance saldo(_conto, ae, true, provvis); _pdare_ini = saldo.progressivo_dare_iniziale(); _pavere_ini = saldo.progressivo_avere_iniziale(); @@ -353,6 +375,7 @@ void TMastrino::read(const TBill& conto, saldo.read(_conto, ae, false, provvis); _pdare_fin = saldo.progressivo_dare_finale(); _pavere_fin = saldo.progressivo_avere_finale(); +#endif // Valori dei saldi del perido in esame: // Vengono inizializzati a zero e poi si incrementa man mano diff --git a/src/np/npmenu.men b/src/np/npmenu.men index 24a07eaab..82704d885 100644 --- a/src/np/npmenu.men +++ b/src/np/npmenu.men @@ -4,7 +4,8 @@ Picture = Module = 2 Flags = "" Item_01 = "Tabelle ditta", [NPMENU_002] -Item_01 = "Stampe", [NPMENU_003] +Item_02 = "Stampe", [NPMENU_003] +Item_03 = "Apertura/Chiusura", "np0 -1", "F" [NPMENU_002] Caption = "Tabelle ditta" From 028e8139fddcc410cce6942f599edc395b4c046e Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Sun, 26 Aug 2018 09:03:57 +0200 Subject: [PATCH 7/7] Patch level : 12.0 618 Files correlati : Commento : cg5.exe cg5500b.msk cg5500a.rep cg5500d.msk Aggiunta colonna con iva da versare/a credito. camibato il contenuto della prima con il risultato --- src/cg/cg5500.cpp | 105 +++++++++++++++----------- src/cg/cg5500a.rep | 180 +++++++++++++++++++++++++++++++-------------- src/cg/cg5500b.uml | 23 +++++- src/cg/cg5500d.uml | 2 +- src/cg/cglib02.cpp | 2 +- 5 files changed, 209 insertions(+), 103 deletions(-) diff --git a/src/cg/cg5500.cpp b/src/cg/cg5500.cpp index 1eadb6cef..fb4812c0e 100755 --- a/src/cg/cg5500.cpp +++ b/src/cg/cg5500.cpp @@ -367,7 +367,7 @@ void Visliq_app::print() book.add(rep); rep.load("cg5500b"); r = rep.recordset(); - r->set_var("#FILTER", key, true); + r->set_var("#FILTER", key1, true); r->set_var("#ANNO", TVariant((long)year()), true); book.add(rep); book.print_or_preview(); @@ -613,7 +613,7 @@ bool Visliq_app::vis_all() for (int id = 108; shm.id2pos(id) > 0; id++) { - if ((id > 107 && id <= 110) || id == 112) + if ((id > 107 && id <= 110) || id == 114) sh.enable_column(id, true); } } @@ -1436,18 +1436,20 @@ void Visliq_app::recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field TToken_string& t = sl->row(row); t.add(itoname(i),0); - const real r0 = _lim->get_real("R0"); + + const real iva_ven = _lam->get_real("R0"); // IVA acquisti + const real iva_acq = _lam->get_real("R1"); // IVA vendite + const real ris = iva_ven - iva_acq; + + t.add(abs(ris).string(), 1); const real r1 = _lim->get_real("R1"); bool enable_date = !r1.is_zero(); const real r5 = _lim->get_real("R5"); - real absv = abs(r0); - t.add(absv, 1); - if (!r0.is_zero()) - t.add(r0 > ZERO ? "D" : "C", 2); + + t.add(ris == ZERO ? "" : (ris > ZERO ? "D" : "C"), 2); t.add(r1, 3); - absv = abs(r5); - t.add(absv, 4); + t.add(abs(r5), 4); if (!r5.is_zero()) t.add(r5 >ZERO ? "D" : "C", 5); @@ -1480,7 +1482,14 @@ void Visliq_app::recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field } else t.add("", 10); - t.add(_lim->get("S3"), 11); + + real r0 = _lim->get_real("R0"); + + if (compensabile) + r0 += autf24; + t.add(abs(r0).string(), 11); + t.add(r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), 12); + t.add(_lim->get("S3"), 13); for (int kk = 3; kk < 6 ; kk++) sl->enable_cell(row, kk); @@ -1488,7 +1497,7 @@ void Visliq_app::recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field sl->enable_cell(row, 8); sl->enable_cell(row, 9); sl->enable_cell(row, 9, enable_date); - sl->enable_cell(row, 12); + sl->enable_cell(row, 14); } } sl->force_update(); @@ -1600,17 +1609,21 @@ void Visliq_app::read_general(TMask& m) else tt = &(sh.row(row)); - const real r0abs = abs(_lim->get_real("R0")); + + const real iva_ven = _lam->get_real("R0"); // IVA acquisti + const real iva_acq = _lam->get_real("R1"); // IVA vendite + const real ris = iva_ven -iva_acq; + const real r1 = _lim->get_real("R1"); const real r5abs = abs(_lim->get_real("R5")); tt->add(itoname(i),0); - tt->add(r0abs.string(),1); + tt->add(abs(ris).string(),1); - int sr0 = (_lim->get_real("R0")).sign(); - int sr5 = (_lim->get_real("R5")).sign(); + const int sris = ris.sign(); + const int sr5 = (_lim->get_real("R5")).sign(); - tt->add(sr0 == 0 ? "" : (sr0 > 0 ? "D" : "C"),2); + tt->add(sris == 0 ? "" : (sris > 0 ? "D" : "C"),2); tt->add(r1.string(),3); tt->add(r5abs.string(),4); bool enable_date = !r1.is_zero(); @@ -1629,8 +1642,6 @@ void Visliq_app::read_general(TMask& m) sh.enable_cell(row, 9, enable_date); if (compensabile) { -// if (cr_res > ZERO) -// { cr_res += autf24; cr_res -= crf24; cr_res -= criva; @@ -1647,9 +1658,15 @@ void Visliq_app::read_general(TMask& m) } else tt->add("", 10); - tt->add(_lim->get("S3"), 11); + + real r0 = _lim->get_real("R0"); + + if (compensabile) + r0 += autf24; + tt->add(abs(r0).string(), 11); + tt->add(r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), 12); + tt->add(_lim->get("S3"), 13); sh.row(row) = (*tt); - // sh.force_update(row); } sh.force_update(); @@ -1708,7 +1725,7 @@ void Visliq_app::read_general(TMask& m) tt.add(versamenti[i-1].string(),5);// versamenti sv.row(-1) = tt; - if (i == 12) + if (i == 11) sv.enable_cell(sv.items() - 1, -1, false); } @@ -1771,7 +1788,7 @@ void Visliq_app::write_general(TMask& m) // risolve menata del dettaglio si'/no if (lfrommask) { - for (int i = 1; i <= 11; i++) + for (int i = 1; i <= 13; i++) tt_ln.add(shm.get(101+i),i); } @@ -1806,7 +1823,7 @@ void Visliq_app::write_general(TMask& m) TString8 ncab (tt_vn.get(3)); TString ocon (tt_vo.get(4)); TString ncon (tt_vn.get(4)); - TString descr(tt_ln.get(11)); + TString descr(tt_ln.get(13)); if (odbcr == "C") orett = -orett; if (ndbcr == "C") nrett = -nrett; @@ -1997,14 +2014,10 @@ void Visliq_app::write_general(TMask& m) if (compensabile) { const real criva(tt_ln.get(6)); -// if (cr_res > ZERO) -// { - cr_res += autf24; - cr_res -= crf24; - cr_res -= criva; -// } -// if (cr_res < ZERO) -// cr_res = ZERO; + + cr_res += autf24; + cr_res -= crf24; + cr_res -= criva; if (cr_res < ZERO) sh.set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, 7); else @@ -2039,23 +2052,31 @@ void Visliq_app::write_general(TMask& m) // Rimetti a posto righe sheet se serve if (was_lim) { - int sr0 = (_lim->get_real("R0")).sign(); - int sr5 = (_lim->get_real("R5")).sign(); - - real r0abs = abs(_lim->get_real("R0")); - real r5abs = abs(_lim->get_real("R5")); - - tt_ln.add(r0abs.string(),1); - tt_ln.add(sr0 == 0 ? "" : (sr0 > 0 ? "D" : "C"), 2); + + const real iva_ven = _lam->get_real("R0"); // IVA acquisti + const real iva_acq = _lam->get_real("R1"); // IVA vendite + const real ris = iva_ven - iva_acq; + + tt_ln.add(abs(ris).string(), 1); + tt_ln.add(ris == 0 ? "" : (ris > 0 ? "D" : "C"), 2); tt_ln.add((_lim->get_real("R1")).string(),3); - tt_ln.add(r5abs.string(),4); + + int sr5 = (_lim->get_real("R5")).sign(); + real r5abs = abs(_lim->get_real("R5")); + + tt_ln.add(r5abs.string(),4); tt_ln.add(sr5 == 0 ? "" : (sr5 > 0 ? "D" : "C"),5); if ( cr_res < ZERO) tt_ln.add("",10); else - tt_ln.add(cr_res.string(),10); - } + tt_ln.add(cr_res.string(), 10); + + real r0 = _lim->get_real("R0"); + + tt_ln.add(abs(r0).string(), 11); + tt_ln.add(r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), 12); + } _from_one = false; } // for mese liq. (riga sheet) diff --git a/src/cg/cg5500a.rep b/src/cg/cg5500a.rep index a13aeffde..6545aaaec 100644 --- a/src/cg/cg5500a.rep +++ b/src/cg/cg5500a.rep @@ -1,9 +1,12 @@ Stampa prospetto liquidazione - +
+ + + "Stampa Prospetto Liquidazione " @@ -11,9 +14,6 @@ + #THIS ! - - - #SYSTEM.DATE @@ -37,52 +37,65 @@ GET_FIRM_DATA "!IVA" GET_FIRM_DATA - - - - - - - - - - - -
- - - - - - - - - - - - + + + + + + + + + + + + + CODTAB[5,7]
  • @@ -100,67 +113,118 @@ TABLE_READ
  • - - R0 - #THIS @ + + "201@.R0" @ +"201@.R1" @ +- +#THIS ! +#THIS @ 0 E; IF "D" +#201 ! ELSE +#THIS @ +0 C; +IF 0 #THIS @ - #THIS ! "C" +#201 ! THEN -#201 ! +THEN - + R1 - + R5 #THIS @ 0 E; IF "D" +#202 ! ELSE +#THIS @ +0 C; +IF 0 #THIS @ - #THIS ! "C" +#202 ! THEN -#202 ! +THEN - + R15 - + R16 - + R20 - + D1 - + #H0.110 @ +#H0.111 @ +"CM" += +IF #113 @ - #114 @ - #115 @ + +ELSE +#119 @ +0 +C; +IF +0 +#119 @ +- +ELSE +0 +THEN +THEN DUP #THIS ! #H0.110 ! - + S3 - - + + R0 + #THIS @ +0 +E; +IF +"D" +#203 ! +ELSE +#THIS @ +0 C; +IF +0 +#THIS @ +- +#THIS ! +"C" +#203 ! +THEN +THEN + + + +
  • @@ -178,20 +242,22 @@ DUP
    - - - - - - - - - - - - + + + + + + + + + + + + +
    USE LIM +JOIN LAM ALIAS 201 INTO CODTAB==CODTAB FROM CODTAB=#ANNO TO CODTAB=#ANNO \ No newline at end of file diff --git a/src/cg/cg5500b.uml b/src/cg/cg5500b.uml index dc07523e8..ca88f3dcf 100755 --- a/src/cg/cg5500b.uml +++ b/src/cg/cg5500b.uml @@ -73,6 +73,8 @@ BEGIN ITEM "Credito anno in corso\nautorizzato F24@20" ITEM "Data autorizzazione@20" ITEM "Credito IVA\nresiduo@15" + ITEM "IVA dovuta o\na credito@15" + ITEM "D/C@3" ITEM "Descrizione@50" END @@ -201,9 +203,26 @@ BEGIN GROUP 12 END -STRING 112 50 35 +CURRENCY 112 15 BEGIN - PROMPT 1 10 "Descr. " + PROMPT 1 10 "IVA dovuta o credito " + FLAGS "D" + GROUP 12 +END + +LIST 113 1 10 +BEGIN + PROMPT 57 10 "" + ITEM " | " + ITEM "D|Debito" + ITEM "C|Credito" + FLAGS "UD" + GROUP 11 +END + +STRING 114 50 35 +BEGIN + PROMPT 1 11 "Descr. " GROUP 12 FLAGS "D" END diff --git a/src/cg/cg5500d.uml b/src/cg/cg5500d.uml index 5675dda03..e21f53802 100755 --- a/src/cg/cg5500d.uml +++ b/src/cg/cg5500d.uml @@ -251,7 +251,7 @@ END CURRENCY F_CREDAUT 15 BEGIN - PROMPT 2 22 "Credito IVA autorizzato in F24 : " + PROMPT 2 21 "Credito IVA autorizzato in F24 :" GROUP 10 FLAGS "H" PICTURE "." diff --git a/src/cg/cglib02.cpp b/src/cg/cglib02.cpp index 0862cf819..ff6027379 100755 --- a/src/cg/cglib02.cpp +++ b/src/cg/cglib02.cpp @@ -700,7 +700,7 @@ bool TSaldo::saldo_cont_sep(int g, int c, long s, const int codes, TDate al, if (ok) { - if (mov.get(MOV_CONTSEP) == cont_sep) + if (( cont_sep != NULL && *cont_sep == '\0') || mov.get(MOV_CONTSEP) == cont_sep) { _codcaus = mov.get(MOV_CODCAUS); _datareg = mov.get(MOV_DATAREG);