Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00

This commit is contained in:
Simone Palacino 2020-07-28 11:30:54 +02:00
commit 02ccc727bd
102 changed files with 2805 additions and 2779 deletions

View File

@ -145,7 +145,6 @@
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\cg\cg2101.cpp" />
<ClCompile Include="..\src\cg\cglib01.cpp" />
<ClCompile Include="..\src\cg\cglib02.cpp" />
<ClCompile Include="..\src\cg\cglib03.cpp" />
@ -294,6 +293,9 @@
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="lilib.vcxproj">
<Project>{b61f0ad4-0cce-4371-8e92-85a26caf1a7c}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
</ProjectReference>

View File

@ -90,9 +90,6 @@
<ClCompile Include="..\src\cg\cgsaldac.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cg2101.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib03.cpp">
<Filter>Sources</Filter>
</ClCompile>

View File

@ -145,8 +145,9 @@
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\cg\cg2103.cpp" />
<ClCompile Include="..\src\cg\cglib01.cpp" />
<ClCompile Include="..\src\cg\cglib03.cpp" />
<ClCompile Include="..\src\cg\cgsaldac.cpp" />
<ClCompile Include="..\src\ef\ef0101.cpp" />
<ClCompile Include="..\src\ef\ef0301.cpp" />
<ClCompile Include="..\src\ef\ef1.cpp">

View File

@ -41,10 +41,13 @@
<ClCompile Include="..\src\ef\ef0101.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cg2103.cpp">
<ClCompile Include="..\src\cg\cglib01.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib01.cpp">
<ClCompile Include="..\src\cg\cglib03.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cgsaldac.cpp">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>

View File

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1169
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ef0", "Ef0.vcxproj", "{3D726EFE-764B-4B24-A4ED-DCD41B9BB386}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ef1", "Ef1.vcxproj", "{C3A8FEC3-47D9-4F1C-B62D-BCF2DB3FD81C}"
@ -9,6 +11,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedoc", "vedoc.vcxproj", "{A1CE9743-A597-4F92-B55A-345A366C9E55}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lilib", "lilib.vcxproj", "{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -31,8 +35,15 @@ Global
{A1CE9743-A597-4F92-B55A-345A366C9E55}.Debug|Win32.Build.0 = Debug|Win32
{A1CE9743-A597-4F92-B55A-345A366C9E55}.Release|Win32.ActiveCfg = Release|Win32
{A1CE9743-A597-4F92-B55A-345A366C9E55}.Release|Win32.Build.0 = Release|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.ActiveCfg = Debug|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.Build.0 = Debug|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.ActiveCfg = Release|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {85C4422F-D5BE-460A-94AF-2F659B236219}
EndGlobalSection
EndGlobal

View File

@ -1,11 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1082
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "li0", "li0.vcxproj", "{E3E7DE6C-EDE3-48D4-8F15-333B71AE4AC2}"
ProjectSection(ProjectDependencies) = postProject
{A1CE9743-A597-4F92-B55A-345A366C9E55} = {A1CE9743-A597-4F92-B55A-345A366C9E55}
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15} = {0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C} = {B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lilib", "lilib.vcxproj", "{C575788B-0BE4-4F68-B9C9-3C204EC04E07}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lilib", "lilib.vcxproj", "{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedocext", "vedocext.vcxproj", "{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}"
EndProject
@ -25,10 +32,10 @@ Global
{2D38A763-3D74-4338-9362-B891784EC90E}.Debug|Win32.Build.0 = Debug|Win32
{2D38A763-3D74-4338-9362-B891784EC90E}.Release|Win32.ActiveCfg = Release|Win32
{2D38A763-3D74-4338-9362-B891784EC90E}.Release|Win32.Build.0 = Release|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Debug|Win32.ActiveCfg = Debug|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Debug|Win32.Build.0 = Debug|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.ActiveCfg = Release|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.Build.0 = Release|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.ActiveCfg = Debug|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.Build.0 = Debug|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.ActiveCfg = Release|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.Build.0 = Release|Win32
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.ActiveCfg = Debug|Win32
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.Build.0 = Debug|Win32
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.ActiveCfg = Release|Win32
@ -41,4 +48,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C9B6BDAD-0FE2-4D97-AB23-388ED191C26B}
EndGlobalSection
EndGlobal

View File

@ -43,7 +43,7 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
@ -70,10 +70,9 @@
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<StringPooling>true</StringPooling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
@ -95,6 +94,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ShowProgress>NotSet</ShowProgress>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
@ -179,6 +179,8 @@
<ClCompile Include="..\src\li\li0300.cpp" />
</ItemGroup>
<ItemGroup>
<MskCompiler Include="..\src\li\li0100a.uml" />
<MskCompiler Include="..\src\li\li0200a.uml" />
<MskCompiler Include="..\src\li\li0400a.uml" />
<MskCompiler Include="..\src\li\li0500a.uml" />
<MskCompiler Include="..\src\li\li0500b.uml" />
@ -237,16 +239,12 @@
<ProjectReference Include="lilib.vcxproj">
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<MskCompiler Include="..\src\li\li0200a.msk">
<FileType>Document</FileType>
</MskCompiler>
</ItemGroup>
<ItemGroup>
<MskCompiler Include="..\src\li\li0100a.msk">
<FileType>Document</FileType>
</MskCompiler>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
</ProjectReference>
<ProjectReference Include="vedocext.vcxproj">
<Project>{0042619a-6b7c-4d3d-9cd9-9bdd8d200c15}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -75,10 +75,10 @@
<MskCompiler Include="..\src\li\li0300a.uml">
<Filter>Masks</Filter>
</MskCompiler>
<MskCompiler Include="..\src\li\li0200a.msk">
<MskCompiler Include="..\src\li\li0100a.uml">
<Filter>Masks</Filter>
</MskCompiler>
<MskCompiler Include="..\src\li\li0100a.msk">
<MskCompiler Include="..\src\li\li0200a.uml">
<Filter>Masks</Filter>
</MskCompiler>
</ItemGroup>

View File

@ -11,7 +11,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C575788B-0BE4-4F68-B9C9-3C204EC04E07}</ProjectGuid>
<ProjectGuid>{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}</ProjectGuid>
<RootNamespace>li0</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
@ -74,7 +74,7 @@
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<StringPooling>true</StringPooling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
@ -158,27 +158,7 @@
<ItemGroup>
<ClInclude Include="..\src\li\lilib01.h" />
</ItemGroup>
<ItemGroup>
<CustomBuildStep Include="..\lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
</ProjectReference>
<ProjectReference Include="vedocext.vcxproj">
<Project>{0042619a-6b7c-4d3d-9cd9-9bdd8d200c15}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="CampoRules.targets" />

View File

@ -4,14 +4,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 15.0.28307.902
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ve0", "ve0.vcxproj", "{15F2937A-7DB1-4462-9FC7-9621FC9ACF17}"
ProjectSection(ProjectDependencies) = postProject
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C} = {B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ve1", "ve1.vcxproj", "{3A7DC7C5-D10B-47FC-A8E9-BF696B5A2F1E}"
ProjectSection(ProjectDependencies) = postProject
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C} = {B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ve2", "ve2.vcxproj", "{8C4464D8-10CE-4FF0-A371-5D5A35DFE06D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ve3", "ve3.vcxproj", "{8D923FAD-EA83-4FCF-8322-99EA3E76AAE6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ve4", "ve4.vcxproj", "{F4BA5949-4FCD-4AF4-ABC5-CDADA21E1663}"
ProjectSection(ProjectDependencies) = postProject
{A1CE9743-A597-4F92-B55A-345A366C9E55} = {A1CE9743-A597-4F92-B55A-345A366C9E55}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ve5", "ve5.vcxproj", "{31F3D895-F3DD-42CC-AFB5-5BA65B38F8FA}"
ProjectSection(ProjectDependencies) = postProject
@ -38,7 +47,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xi", "xi.vcxproj", "{3A5B01
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xvaga", "xvaga.vcxproj", "{4A2FC619-2461-4F58-8F1D-92FA153E39A2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lilib", "lilib.vcxproj", "{C575788B-0BE4-4F68-B9C9-3C204EC04E07}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lilib", "lilib.vcxproj", "{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -110,10 +119,10 @@ Global
{4A2FC619-2461-4F58-8F1D-92FA153E39A2}.Debug|Win32.Build.0 = Debug|Win32
{4A2FC619-2461-4F58-8F1D-92FA153E39A2}.Release|Win32.ActiveCfg = Release|Win32
{4A2FC619-2461-4F58-8F1D-92FA153E39A2}.Release|Win32.Build.0 = Release|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Debug|Win32.ActiveCfg = Debug|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Debug|Win32.Build.0 = Debug|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.ActiveCfg = Release|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.Build.0 = Release|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.ActiveCfg = Debug|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.Build.0 = Debug|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.ActiveCfg = Release|Win32
{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -187,6 +187,7 @@
<ClCompile Include="..\src\ve\ve0600.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\include\doc.h" />
<ClInclude Include="..\src\ve\ve0.h" />
<ClInclude Include="..\src\ve\ve0100.h" />
<ClInclude Include="..\src\ve\ve0100b1.h" />
@ -249,6 +250,8 @@
<MskCompiler Include="..\src\ve\ve0200g.uml" />
<MskCompiler Include="..\src\ve\ve0200h.uml" />
<MskCompiler Include="..\src\ve\ve0500a.uml" />
<MskCompiler Include="..\src\ve\velib04d.uml" />
<MskCompiler Include="..\src\ve\velib04e.uml" />
</ItemGroup>
<ItemGroup>
<MenCompiler Include="..\src\ve\veaddon.men" />

View File

@ -93,6 +93,9 @@
<ClInclude Include="..\src\ve\veuml.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\src\include\doc.h">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="campo.rc" />
@ -143,6 +146,12 @@
<MskCompiler Include="..\src\ve\ve0500a.uml">
<Filter>Mask</Filter>
</MskCompiler>
<MskCompiler Include="..\src\ve\velib04d.uml">
<Filter>Mask</Filter>
</MskCompiler>
<MskCompiler Include="..\src\ve\velib04e.uml">
<Filter>Mask</Filter>
</MskCompiler>
</ItemGroup>
<ItemGroup>
<MenCompiler Include="..\src\ve\vearea.men">

View File

@ -266,25 +266,23 @@
<BmpCompiler Include="..\src\ve\fattacc.bmp" />
<BmpCompiler Include="..\src\ve\fattura.bmp" />
</ItemGroup>
<ItemGroup>
<CustomBuildStep Include="..\Lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\Lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="lilib.vcxproj">
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ProjectReference Include="vedocext.vcxproj">
<Project>{0042619a-6b7c-4d3d-9cd9-9bdd8d200c15}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="campo.rc" />
</ItemGroup>

View File

@ -92,6 +92,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ProfileGuidedDatabase>$(IntDir)$(TargetName).pgd</ProfileGuidedDatabase>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>

View File

@ -197,24 +197,21 @@
<ClInclude Include="..\src\ve\ve3800.h" />
<ClInclude Include="..\src\ve\ve3900a.h" />
</ItemGroup>
<ItemGroup>
<CustomBuildStep Include="..\Lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\Lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="lilib.vcxproj">
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="vedocext.vcxproj">
<Project>{0042619a-6b7c-4d3d-9cd9-9bdd8d200c15}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="campo.rc">

View File

@ -92,6 +92,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ProfileGuidedDatabase>$(IntDir)$(TargetName).pgd</ProfileGuidedDatabase>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
@ -172,14 +173,13 @@
<MskCompiler Include="..\src\ve\ve4300a.uml" />
</ItemGroup>
<ItemGroup>
<CustomBuildStep Include="..\Lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\Lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="campo.rc" />

View File

@ -141,6 +141,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ProfileGuidedDatabase>$(IntDir)$(TargetName).pgd</ProfileGuidedDatabase>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
@ -213,26 +214,20 @@
<ClInclude Include="..\src\ve\ve5400.h" />
<ClInclude Include="..\src\ve\ve5500.h" />
</ItemGroup>
<ItemGroup>
<CustomBuildStep Include="..\Lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\Lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="lilib.vcxproj">
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="vedocext.vcxproj">
<Project>{0042619a-6b7c-4d3d-9cd9-9bdd8d200c15}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@ -94,6 +94,7 @@
<ProfileGuidedDatabase>$(IntDir)$(TargetName).pgd</ProfileGuidedDatabase>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
@ -260,16 +261,6 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)%(Filename).pwt;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuildStep Include="..\Lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\Lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>

View File

@ -93,6 +93,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ProfileGuidedDatabase>$(IntDir)$(TargetName).pgd</ProfileGuidedDatabase>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
@ -190,24 +191,21 @@
<ItemGroup>
<RepCompiler Include="..\src\ve\ve8100a.rep" />
</ItemGroup>
<ItemGroup>
<CustomBuildStep Include="..\Lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\Lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="lilib.vcxproj">
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="vedocext.vcxproj">
<Project>{0042619a-6b7c-4d3d-9cd9-9bdd8d200c15}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="campo.rc" />

View File

@ -316,6 +316,10 @@
<IniCompiler Include="..\src\ve\verig15.ini" />
<IniCompiler Include="..\src\ve\verig23.ini" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\ve\verigdef.h" />
<ClInclude Include="..\src\ve\veuml.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="CampoRules.targets" />

View File

@ -11,6 +11,9 @@
<Filter Include="Ini">
<UniqueIdentifier>{14bb585e-0c0d-42da-a077-cb102cf4ebfa}</UniqueIdentifier>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{7ca7db75-37c6-46b8-a014-e713bdc435d6}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<IniCompiler Include="..\src\ve\verig23.ini">
@ -114,4 +117,12 @@
<Filter>Mask</Filter>
</MskCompiler>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\ve\verigdef.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\src\ve\veuml.h">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -206,6 +206,7 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\src\ve\velib04.cpp" />
<ClCompile Include="..\src\ve\velib05.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -62,6 +62,9 @@
<ClCompile Include="..\src\cg\cglib03.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\ve\velib04.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\cg\cg2103.h">

View File

@ -105,12 +105,12 @@
<ItemGroup>
<ClCompile Include="..\src\ca\calib01.cpp" />
<ClCompile Include="..\src\ca\calib02.cpp" />
<ClCompile Include="..\src\cg\cg2101.cpp" />
<ClCompile Include="..\src\cg\cglib02.cpp" />
<ClCompile Include="..\src\cg\cglib03.cpp" />
<ClCompile Include="..\src\cg\cglib06.cpp" />
<ClCompile Include="..\src\cg\cgsaldac.cpp" />
<ClCompile Include="..\src\ef\ef0101.cpp" />
<ClCompile Include="..\src\in\inlib01.cpp" />
<ClCompile Include="..\src\ve\velib04.cpp" />
<ClCompile Include="..\src\ve\velib04a.cpp" />
<ClCompile Include="..\src\ve\velib04b.cpp" />
<ClCompile Include="..\src\ve\velib04c.cpp" />

View File

@ -17,18 +17,6 @@
<ClCompile Include="..\src\ca\calib02.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cg2101.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib02.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cgsaldac.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\ve\velib04.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\ve\velib04a.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -62,6 +50,18 @@
<ClCompile Include="..\src\in\inlib01.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib06.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib02.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib03.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cgsaldac.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\ve\velib.h">

4
cd/test/ba0982.txt Normal file
View File

@ -0,0 +1,4 @@
recdesc\f154.trr
recdesc\f154.dir
Ristrutturato modulo li

32
cd/test/ba0982a.ini Normal file
View File

@ -0,0 +1,32 @@
[Main]
Demo=0
[ba0]
File(219) = recdesc\f154.dir|X
File(220) = recdesc\f154.trr|X
Patch = 982
Versione = 21511200
[ba99]
Kill(0) = wxmsw240.dll|x
Kill(1) = batbsce.txt|x
Kill(2) = bastfsc.rep|x
Kill(3) = bastfsc.msk|x
Kill(4) = bastcms.msk|x
Kill(5) = bastcms.rep|x
Kill(6) = bastuue.rep|x
Kill(7) = bastuue.msk|x
[ba]
Data = 27-07-2020
Descrizione = Base
Dischi = 1
Moduli = sy
OEM =
Patch = 982
PostProcess = bainst -0 BA
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ba0982a1.zip Normal file

Binary file not shown.

3
cd/test/cg0982.txt Normal file
View File

@ -0,0 +1,3 @@
cg0200a.msk
Ristrutturato modulo li

98
cd/test/cg0982a.ini Normal file
View File

@ -0,0 +1,98 @@
[Main]
Demo=0
[cg0]
File(2) = cg0200a.msk|X
Patch = 0982
Versione = 21511200
[cg99]
Kill(0) = bastcam.msk|x
Kill(1) = bastver.msk|x
Kill(2) = batbndo.msk|x
Kill(3) = batbdpn.msk|x
Kill(4) = cg2fppro.msk|x
Kill(5) = bastreg.rep|x
Kill(6) = batbcco.msk|x
Kill(7) = batbnot.msk|x
Kill(8) = batbtit.msk|x
Kill(9) = bastscc.rep|x
Kill(10) = bastdpn.msk|x
Kill(11) = batbvet.msk|x
Kill(12) = batblbu.msk|x
Kill(13) = bastcco.msk|x
Kill(14) = bastcfi.msk|x
Kill(15) = bastesc.rep|x
Kill(16) = batbleg.msk|x
Kill(17) = bastarb.msk|x
Kill(18) = batbpor.msk|x
Kill(19) = batbpdb.msk|x
Kill(20) = batbind.msk|x
Kill(21) = bastivd.msk|x
Kill(22) = batbinl.msk|x
Kill(23) = bastdpn.rep|x
Kill(24) = bastesc.msk|x
Kill(25) = bastndo.rep|x
Kill(26) = bastcco.rep|x
Kill(27) = batblia.msk|x
Kill(28) = bastzon.msk|x
Kill(29) = bastarb.rep|x
Kill(30) = batbzon.msk|x
Kill(31) = batbarb.msk|x
Kill(32) = bastpdb.rep|x
Kill(33) = batbver.msk|x
Kill(34) = bastivd.rep|x
Kill(35) = batbcam.msk|x
Kill(36) = bastscc.msk|x
Kill(37) = batbcve.msk|x
Kill(38) = bastmsp.msk|x
Kill(39) = bastver.rep|x
Kill(40) = bastpdb.msk|x
Kill(41) = bastntb.msk|x
Kill(42) = batbtra.msk|x
Kill(43) = batbesc.msk|x
Kill(44) = bastcfi.rep|x
Kill(45) = batblia.msk|x
Kill(46) = bastcve.rep|x
Kill(47) = bastleg.rep|x
Kill(48) = cgtbcon.msk|x
Kill(49) = bastndo.msk|x
Kill(50) = bastntb.rep|x
Kill(51) = batbmsp.msk|x
Kill(52) = bastzon.rep|x
Kill(53) = batbscc.msk|x
Kill(54) = bastcam.rep|x
Kill(55) = bastnot.rep|x
Kill(56) = bastvet.msk|x
Kill(57) = batbivd.msk|x
Kill(58) = bastmsp.rep|x
Kill(59) = bastreg.msk|x
Kill(60) = batbreg.msk|x
Kill(61) = bastcve.msk|x
Kill(62) = bastpor.msk|x
Kill(63) = bastpor.rep|x
Kill(64) = batbins.msk|x
Kill(65) = batbdel.msk|x
Kill(66) = bastleg.msk|x
Kill(67) = batbntb.msk|x
Kill(68) = batbcfi.msk|x
Kill(69) = bastvet.rep|x
Kill(70) = bastnot.msk|x
[cg]
Data = 27-07-2020
Descrizione = Contabilita' Generale
Dischi = 1
Edit_19 = cg0 -0
Edit_20 = cg0 -1
Edit_26 = cg0 -4
Edit_5 = cg0 -5
Moduli = ba
OEM =
Patch = 982
PostProcess = bainst -0 CG
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/cg0982a1.zip Normal file

Binary file not shown.

5
cd/test/ef0982.txt Normal file
View File

@ -0,0 +1,5 @@
ef0.exe
ef1100a.msk
ef1.exe
Corretto aggiornamento effetti perchè non dia errore se mancano righe nel mezzo e li risistemi

38
cd/test/ef0982a.ini Normal file
View File

@ -0,0 +1,38 @@
[Main]
Demo=0
[ef0]
Edit_163 = ef0 -1
Edit_5 = ef0 -6
File(0) = ef0.exe|X
Patch = 982
Versione = 21511200
[ef1]
File(17) = ef1100a.msk|X
Patch = 982
Versione = 21511200
[ef2]
File(23) = ef1.exe|X
Patch = 982
Versione = 21511200
[ef99]
Kill(0) = efstbnp.msk|x
Kill(1) = eftbbnp.msk|x
Kill(2) = efstbnp.rep|x
[ef]
Data = 27-07-2020
Descrizione = Effetti
Dischi = 1
Moduli = ve
OEM =
Patch = 982
PostProcess = bainst -0 EF
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ef0982a1.zip Normal file

Binary file not shown.

8
cd/test/li0982.txt Normal file
View File

@ -0,0 +1,8 @@
limenu.men
li0100a.msk
li0.exe
li0400a.msk
li0300a.msk
li0200a.msk
Ristrutturato modulo li

24
cd/test/li0982a.ini Normal file
View File

@ -0,0 +1,24 @@
[Main]
Demo=0
[li0]
File(0) = li0.exe|X
File(1) = li0400a.msk|X
File(8) = limenu.men|X
File(9) = li0100a.msk|X
File(10) = li0300a.msk|X
File(11) = li0200a.msk|X
Patch = 982
Versione = 21511200
[li]
Data = 30-01-2020
Descrizione = Dichiarazioni d'intento
Dischi = 1
Moduli = cg9
OEM =
Patch = 982
PostProcess =
PreProcess =
Versione = 21511200

BIN
cd/test/li0982a1.zip Normal file

Binary file not shown.

6
cd/test/sy0982.txt Normal file
View File

@ -0,0 +1,6 @@
xvaga.dll
Esportate le funzioni
XVTDLL SLIST_ELT xvt_slist_find_str(SLIST list, const char* str);
XVTDLL BOOLEAN xvt_fsys_fupdate(const char* src, const char* dst);

21
cd/test/sy0982a.ini Normal file
View File

@ -0,0 +1,21 @@
[Main]
Demo=0
[sy1]
File(52) = xvaga.dll|X
Patch = 0982
Versione = 21511200
[sy]
Data = 27-07-2020
Descrizione = Sistema
Dischi = 1
Moduli =
OEM =
Patch = 982
PostProcess =
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/sy0982a1.zip Normal file

Binary file not shown.

7
cd/test/ve0982.txt Normal file
View File

@ -0,0 +1,7 @@
ve0.exe
ve0200b.msk
ve1.exe
ve5.exe
ve6.exe
Ristrutturato modulo li

148
cd/test/ve0982a.ini Normal file
View File

@ -0,0 +1,148 @@
[Main]
Demo=0
[ve0]
Edit_163 = ve0 -6
Edit_4 = ve0 -4
Edit_5 = ve0 -4
File(20) = ve0.exe|X
File(28) = ve0200b.msk|X
Patch = 982
Versione = 21511200
[ve1]
File(40) = ve1.exe|X
Patch = 982
Versione = 21511200
[ve5]
File(243) = ve5.exe|X
Patch = 982
Versione = 21511200
[ve6]
File(250) = ve6.exe|X
Patch = 982
Versione = 21511200
[ve99]
Kill(0) = batbimb.msk|x
Kill(1) = batbacr.msk|x
Kill(2) = bastctr.msk|x
Kill(3) = bastbnp.rep|x
Kill(4) = bastcau.msk|x
Kill(5) = bastfrr.msk|x
Kill(6) = bastfrd.rep|x
Kill(7) = batbcra.msk|x
Kill(8) = ve7701a.ini|x
Kill(9) = bastcra.rep|x
Kill(10) = eftbbnp.msk|x
Kill(11) = batbfca.msk|x
Kill(12) = bastfca.rep|x
Kill(13) = batbrfc.msk|x
Kill(14) = basttri.rep|x
Kill(15) = bastgmc.msk|x
Kill(16) = bastcra.msk|x
Kill(17) = bastasf.rep|x
Kill(18) = bastabe.rep|x
Kill(19) = batbbnp.msk|x
Kill(20) = bastctr.rep|x
Kill(21) = basttag.msk|x
Kill(22) = batbprs.msk|x
Kill(23) = bastasf.msk|x
Kill(24) = basteld.rep|x
Kill(25) = bastrfa.msk|x
Kill(26) = batbgca.msk|x
Kill(27) = efstbnp.rep|x
Kill(28) = ve7200a.msk|x
Kill(29) = basteld.msk|x
Kill(30) = bastubi.rep|x
Kill(31) = batbstd.msk|x
Kill(32) = batbgcg.msk|x
Kill(33) = ve7500a.msk|x
Kill(34) = batbtri.msk|x
Kill(35) = batbfid.msk|x
Kill(36) = ve7700a.msk|x
Kill(37) = ve7600a.msk|x
Kill(38) = batbabe.msk|x
Kill(39) = baststd.rep|x
Kill(40) = ve7400a.ini|x
Kill(41) = ve7200a.frm|x
Kill(42) = bastnum.msk|x
Kill(43) = bastrfa.rep|x
Kill(44) = batbcaa.msk|x
Kill(45) = batbfrd.msk|x
Kill(46) = bastcau.rep|x
Kill(47) = bastcaa.msk|x
Kill(48) = bastimb.msk|x
Kill(49) = ve7100a.msk|x
Kill(50) = bastfrm.rep|x
Kill(51) = batbubi.msk|x
Kill(52) = batbspp.msk|x
Kill(53) = basttag.rep|x
Kill(54) = bastfrd.msk|x
Kill(55) = ve7400conf.ini|x
Kill(56) = basttri.msk|x
Kill(57) = batbgmc.msk|x
Kill(58) = batbspt.msk|x
Kill(59) = ve7400a.msk|x
Kill(60) = bastfrm.msk|x
Kill(61) = bastbnp.msk|x
Kill(62) = batbums.msk|x
Kill(63) = bastabe.msk|x
Kill(64) = batbfsa.msk|x
Kill(65) = ve7300a.msk|x
Kill(66) = bastrfc.msk|x
Kill(67) = bastspp.msk|x
Kill(68) = bastrfc.rep|x
Kill(69) = baststd.msk|x
Kill(70) = basttip.rep|x
Kill(71) = bastums.msk|x
Kill(72) = bastnum.rep|x
Kill(73) = batbctr.msk|x
Kill(74) = batbnum.msk|x
Kill(75) = batbmre.msk|x
Kill(76) = bastums.rep|x
Kill(77) = bastimb.rep|x
Kill(78) = bastfrr.rep|x
Kill(79) = bastprs.msk|x
Kill(80) = batbprv.msk|x
Kill(81) = batbgsa.msk|x
Kill(82) = batbpro.msk|x
Kill(83) = ve7300a.frm|x
Kill(84) = bastfca.msk|x
Kill(85) = batbfrr.msk|x
Kill(86) = batbtag.msk|x
Kill(87) = bastgca.msk|x
Kill(88) = bastgcg.msk|x
Kill(89) = batbrfa.msk|x
Kill(90) = batbfrm.msk|x
Kill(91) = efstbnp.msk|x
Kill(92) = batbtip.msk|x
Kill(93) = ve7.exe|x
Kill(94) = batbcau.msk|x
Kill(95) = bastgmc.rep|x
Kill(96) = basttip.msk|x
Kill(97) = bastcaa.rep|x
Kill(98) = bastspp.rep|x
Kill(99) = batbcld.msk|x
Kill(100) = batbasf.msk|x
Kill(101) = bastubi.msk|x
Kill(102) = batbeld.msk|x
Kill(103) = bastgca.rep|x
Kill(104) = bastgcg.rep|x
Kill(105) = bastprs.rep|x
[ve]
Data = 27-07-2020
Descrizione = Vendite
Dischi = 1
Moduli = ba,cg9,pr9,mg9,sv9,in9,ef9
OEM =
Patch = 982
PostProcess = bainst -0 VE
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ve0982a1.zip Normal file

Binary file not shown.

View File

@ -488,7 +488,7 @@ void TRicl_saldi::calculate_clifo(const char tipo, const int gruppo, const int c
if (saldi_attuali)
sal.ultima_immissione_bilancio(_codes, gruppo, conto, sottoconto, indbil, _provv ? 2 :1, FALSE);
else
sal.saldo_periodo(gruppo, conto, sottoconto, _dal, _al, indbil, _provv);
sal.saldo_periodo(Competenza, gruppo, conto, sottoconto, _dal, _al, indbil, _provv);
r.set_conto(gruppo, conto, sottoconto, indbil);
r.set_saldi(sal);
#ifdef DBG
@ -542,7 +542,7 @@ void TRicl_saldi::calculate()
if (saldi_attuali)
sal.ultima_immissione_bilancio(_codes, gruppo, conto, sottoconto, indbil, _provv ? 2 :1, FALSE);
else
sal.saldo_periodo(gruppo, conto, sottoconto, _dal, _al, indbil, _provv);
sal.saldo_periodo(Competenza, gruppo, conto, sottoconto, _dal, _al, indbil, _provv);
r.set_conto(gruppo, conto, sottoconto, indbil);
r.set_saldi(sal);
#ifdef DBG

View File

@ -1923,9 +1923,11 @@ BEGIN
CHECKTYPE NORMAL
FLAG "U"
END
GROUPBOX DLG_NULL 76 4
STRING DLG_NULL 76 4
BEGIN
PROMPT 1 13 "Dati lettera esenzione"
FLAGS "DH" // NON PIU UTILIZZATI
END
STRING F_VSNRPROT 7
@ -1934,6 +1936,7 @@ BEGIN
FIELD LF_CFVEN->VSNRPROT
GROUP 7
HELP "Vostro nr. di protocollo della lettera"
FLAGS "DH" // NON PIU UTILIZZATI
END
DATE F_VSDATAREG
@ -1942,6 +1945,7 @@ BEGIN
FIELD LF_CFVEN->VSDATAREG
GROUP 7
HELP "Data di registrazione della lettera"
FLAGS "DH" // NON PIU UTILIZZATI
END
STRING F_NSNRPROT 7
@ -1950,19 +1954,21 @@ BEGIN
FIELD LF_CFVEN->NSNPROT
GROUP 7
HELP "Nostro nr. di protocollo della lettera"
FLAGS "DH" // NON PIU UTILIZZATI
END
DATE F_NSDATAREG
BEGIN
PROMPT 40 15 "Ns data registrazione "
PROMPT 40 13 "Ns data registrazione "
FIELD LF_CFVEN->NSDATAREG
GROUP 7
HELP "Data di registrazione della lettera"
FLAGS "DH" // NON PIU UTILIZZATI
END
NUMBER F_CODCFFATT 6
BEGIN
PROMPT 2 17 "Fatturare a "
PROMPT 2 13 "Fatturare a "
FIELD CODCFFATT
FLAGS "GR"
USE LF_CLIFO KEY 1
@ -1981,7 +1987,7 @@ END
STRING F_DESCFFATT 50 30
BEGIN
PROMPT 25 17 ""
PROMPT 25 13 ""
USE LF_CLIFO KEY 2
INPUT TIPOCF F_TIPOCF SELECT
INPUT RAGSOC F_DESCFFATT
@ -1997,7 +2003,7 @@ END
STRING F_CATFIN 2
BEGIN
PROMPT 2 18 "Categoria finanziaria "
PROMPT 2 14 "Categoria finanziaria "
FIELD LF_CFVEN->CATFIN
USE %CFI
INPUT CODTAB F_CATFIN

View File

@ -1295,6 +1295,24 @@ public:
~TTransfer_file();
};
class TConti_array : private TAssoc_array
{
public: // TObject
virtual bool ok() const { return items() != 0; }
public:
bool add(const TBill& conto, const real& importo);
real importo(const TBill& conto);
bool remove(const TBill& conto);
bool add_iva(bool det, const real& importo);
real importo_iva(bool det);
bool remove_iva(bool det);
TConti_array() {}
virtual ~TConti_array() {}
};
class TMovimentoPN : public TRelation
{
// class TMovimentoPN : public TRelation

View File

@ -2063,3 +2063,201 @@ int TMovimentoPN::remove()
return err;
}
///////////////////////////////////////////////////////////
// Aggiustamento movimenti rovinati o convertiti male
///////////////////////////////////////////////////////////
bool TConti_array::add(const TBill& conto, const real& importo)
{
const char* key = conto.string();
real* imp = (real*)objptr(key);
if (imp == nullptr)
TAssoc_array::add(key, importo);
else
*imp += importo;
return imp != nullptr;
}
real TConti_array::importo(const TBill& conto)
{
const char* key = conto.string();
const real* imp = (real*)objptr(key);
return imp ? *imp : ZERO;
}
bool TConti_array::remove(const TBill& conto)
{
const char* key = conto.string();
return TAssoc_array::remove(key);
}
bool TConti_array::add_iva(bool det, const real& importo)
{
real* imp = nullptr;
if (!importo.is_zero())
{
const char* const key = det ? "D" : "N";
imp = (real*)objptr(key);
if (imp == nullptr)
TAssoc_array::add(key, importo);
else
*imp += importo;
}
return imp != nullptr;
}
real TConti_array::importo_iva(bool det)
{
const char* const key = det ? "D" : "N";
const real* imp = (real*)objptr(key);
return imp ? *imp : ZERO;
}
bool TConti_array::remove_iva(bool det)
{
const char* const key = det ? "D" : "N";
return TAssoc_array::remove(key);
}
real TMovimentoPN::indetraibile_al(const TString& codind, const TCausale& caus, int annodoc) const
{
int tipodet = 0;
return ::indetraibile_al(codind, caus, annodoc, tipodet);
}
int TMovimentoPN::analizza_riga_IVA(const real& imptot, const real& ivatot, const TCausale& caus,
int annodoc, const TString& codiva, const TString& codind,
real& imp_det, real& iva_det, real& imp_ind, real& iva_ind) const
{
const real perc_ind = indetraibile_al(codind, caus, annodoc);
const bool corrispettivo = caus.corrispettivi();
TBill billind; caus.bill(RIGA_IVA_NON_DETRAIBILE, billind);
const bool iva_ind_al_costo = !billind.ok();
return analizza_IVA(imptot, ivatot, perc_ind, corrispettivo, iva_ind_al_costo,
codiva, imp_det, iva_det, imp_ind, iva_ind);
}
// Aggiusta i row types se sono andati persi o non sono stati convertiti
void TMovimentoPN::adjust_rowtypes()
{
const TRectype& mov = curr();
const char tipo = mov.get_char(MOV_TIPO);
const long codice = mov.get_long(MOV_CODCF);
const int annoiva = mov.get_int(MOV_ANNOIVA);
const int annodoc = mov.get_date(MOV_DATADOC).year();
const TCausale causale(mov.get(MOV_CODCAUS), annoiva);
TConti_array conti;
int r;
for (r = 0; r < _iva.rows(); r++)
{
const TRectype& row = iva(r);
const TBill bill(row);
const real imponibile(row.get(RMI_IMPONIBILE));
const real imposta(row.get(RMI_IMPOSTA));
const TString4 codiva = row.get(RMI_CODIVA);
const TString4 codind = row.get(RMI_TIPODET);
real imp_det, iva_det, imp_ind, iva_ind;
analizza_riga_IVA(imponibile, imposta, causale, annodoc, codiva, codind,
imp_det, iva_det, imp_ind, iva_ind);
conti.add(bill, imp_det + imp_ind);
conti.add_iva(false, iva_ind);
conti.add_iva(true, iva_det);
}
bool totale = FALSE;
bool ritfis = mov.get_real(MOV_RITFIS).is_zero();
bool ritsoc = mov.get_real(MOV_RITSOC).is_zero();
bool ivadet = conti.importo_iva(true).is_zero();
bool ivanon = conti.importo_iva(FALSE).is_zero();
for (r = 0; r < _cg.rows(); r++)
{
TRectype& row = cg(r);
const char rt = row.get_char(RMV_ROWTYPE);
switch (rt)
{
case 'F': ritfis = true; break;
case 'S': ritsoc = true; break;
case 'T': totale = true; break;
default: break;
}
if (rt > ' ') continue;
if (!totale && row.get_char(RMV_TIPOC) == tipo && row.get_long(RMV_SOTTOCONTO) == codice)
{
row.put(RMV_ROWTYPE, 'T');
totale = true;
continue;
}
const real importo(row.get(RMV_IMPORTO));
const TBill bill(row);
if (!ritfis && importo == mov.get_real(MOV_RITFIS))
{
TBill conto_rit; causale.bill(RIGA_PAG_RITFIS, conto_rit);
if (!conto_rit.ok() || conto_rit == bill)
{
row.put(RMV_ROWTYPE, 'F');
ritfis = true;
continue;
}
}
if (!ritsoc && importo == mov.get_real(MOV_RITSOC))
{
TBill conto_rit; causale.bill(RIGA_PAG_RITSOC, conto_rit);
if (!conto_rit.ok() || conto_rit == bill)
{
row.put(RMV_ROWTYPE, 'S');
ritsoc = true;
continue;
}
}
if (!conti.ok())
continue; // Ho esaurito i conti IVA
if (importo == conti.importo(bill))
{
row.put(RMV_ROWTYPE, 'I');
conti.remove(bill);
continue;
}
if (!ivadet && importo == conti.importo_iva(true))
{
row.put(RMV_ROWTYPE, 'D');
conti.remove_iva(true);
continue;
}
if (!ivanon && importo == conti.importo_iva(FALSE))
{
row.put(RMV_ROWTYPE, 'N');
conti.remove_iva(FALSE);
continue;
}
}
}
TMovimentoPN& TMovimentoPN::get_sum_imponibile_imposta(real& s_imponibili, real& s_imposte)
{
TRecord_array& iva = iva_rows();
s_imponibili = ZERO;
s_imposte = ZERO;
for (int i = iva.first_row(); i <= iva.rows(); ++i)
{
TRectype& r = iva[i];
s_imponibili += r.get_real("IMPONIBILE");
s_imposte += r.get_real("IMPOSTA");
}
return *this;
}

View File

@ -370,83 +370,6 @@ real TMovimento_contabile::imposta(const char * codiva) const
return imposta;
}
///////////////////////////////////////////////////////////
// Aggiustamento movimenti rovinati o convertiti male
///////////////////////////////////////////////////////////
class TConti_array : private TAssoc_array
{
public: // TObject
virtual bool ok() const { return items() != 0; }
public:
bool add(const TBill& conto, const real& importo);
real importo(const TBill& conto);
bool remove(const TBill& conto);
bool add_iva(bool det, const real& importo);
real importo_iva(bool det);
bool remove_iva(bool det);
TConti_array() {}
virtual ~TConti_array() {}
};
bool TConti_array::add(const TBill& conto, const real& importo)
{
const char* key = conto.string();
real* imp = (real*)objptr(key);
if (imp == nullptr)
TAssoc_array::add(key, importo);
else
*imp += importo;
return imp != nullptr;
}
real TConti_array::importo(const TBill& conto)
{
const char* key = conto.string();
const real* imp = (real*)objptr(key);
return imp ? *imp : ZERO;
}
bool TConti_array::remove(const TBill& conto)
{
const char* key = conto.string();
return TAssoc_array::remove(key);
}
bool TConti_array::add_iva(bool det, const real& importo)
{
real* imp = nullptr;
if (!importo.is_zero())
{
const char* const key = det ? "D" : "N";
imp = (real*)objptr(key);
if (imp == nullptr)
TAssoc_array::add(key, importo);
else
*imp += importo;
}
return imp != nullptr;
}
real TConti_array::importo_iva(bool det)
{
const char* const key = det ? "D" : "N";
const real* imp = (real*)objptr(key);
return imp ? *imp : ZERO;
}
bool TConti_array::remove_iva(bool det)
{
const char* const key = det ? "D" : "N";
return TAssoc_array::remove(key);
}
// Aggiusta i row types se sono andati persi o non sono stati convertiti
void TMovimento_contabile::adjust_rowtypes()
{

View File

@ -26,7 +26,8 @@ BEGIN
PROMPT 30 1 "Numero "
FIELD NPROGTR
KEY 1
USE LF_EFFETTI SELECT (TIPOCF=#F_TIPOCF)&&(BETWEEN(CODCF,#F_CODCF,#F_CODCF))
USE LF_EFFETTI
// SELECT (TIPOCF=#F_TIPOCF)&&(BETWEEN(CODCF,#F_CODCF,#F_CODCF))
JOIN LF_CLIFO INTO CODCF=CODCF TIPOCF=TIPOCF
INPUT NPROGTR F_NPROGTR
DISPLAY "Nr.progr." NPROGTR

View File

@ -98,8 +98,10 @@ int TEffetto::leggi(TLocalisamfile &f, const TRectype& r, word lockop)
if (err == NOERR)
{ // leggo dai record array
_righe.read(k_reff);
_righe.pack();
_cess.read(k_cess);
}
_cess.pack();
}
else // se ho trovato un errore
{
head() = r;

View File

@ -54,20 +54,20 @@ int TDistinta::read(const char tipo, const long numero, word lockop)
{
TISAM_recordset reff(query(tipo, numero));
TLocalisamfile& f = reff.cursor()->file();
int i = 0;
for (bool ok = reff.move_first(); ok; ok = reff.move_next())
int i = 0;
for (bool ok = reff.move_first(); ok; ok = reff.move_next(), i++)
{
const word lock = (i == 0 && lockop == _lock) ? _lock : _nolock; // Lock solo sulla prima riga
const int n = reff.get(EFF_NRIGADIST).as_int();
TEffetto* effetto = new TEffetto;
err = effetto->read(f, tipo, numero, n, lock);//legge un effetto per chiave 4
TEffetto effetto;
err = effetto.read(f, tipo, numero, n, lock);//legge un effetto per chiave 4
if (err == NOERR)
{
i = _righe_dist.add(effetto) + 1;
effetto->put(EFF_NRIGADIST, i);
_righe_dist.add(effetto, i);
effetto.put(EFF_NRIGADIST, i + 1);
}
else
delete effetto;
}
}
// se ho letto degli effetti della distinta ed ho

View File

@ -34,10 +34,9 @@
#include <progind.h>
#include <sheet.h>
#include "../cg/cg2101.h"
#include "../cg/cg2103.h"
#include "../cg/cglib.h"
#include "../cg/cglib.h"
#include "../cg/cgsaldac.h"
#include "../cg/cglib02.h"
#include "../ve/velib04.h"
#include "ef0301.h"
#include "ef0800a.h"

View File

@ -24,43 +24,6 @@
static XVT_SQLDB _db = NULL; // SEPA sqlite db
/////////////////////////////////////////////////////////////////////////////////////
// Utilities
/////////////////////////////////////////////////////////////////////////////////////
// Cerca una stringa all'interno di una SLIST (Potrebbe diventare una funzione di XVT.h)
static SLIST_ELT xvt_slist_find_str(SLIST list, const char* str)
{
SLIST_ELT e = NULL;
for (e = xvt_slist_get_first(list); e; e = xvt_slist_get_next(list, e))
{
const char* val = xvt_slist_get(list, e, NULL);
if (xvt_str_compare_ignoring_case(str, val) == 0)
break;
}
return e;
}
// Aggiorna il file dst se più vecchio di src (Potrebbe diventare una funzione di XVT.h)
bool xvt_fsys_fupdate(const char* src, const char* dst)
{
bool ok = false;
if (xvt_fsys_file_exists(src))
{
const long tsrc = xvt_fsys_file_attr(src, XVT_FILE_ATTR_MTIME);
if (tsrc > 0)
{
long tdst = 0;
if (xvt_fsys_file_exists(dst))
tdst = xvt_fsys_file_attr(dst, XVT_FILE_ATTR_MTIME);
if (tsrc > tdst)
ok = xvt_fsys_fcopy(src, dst) != 0;
}
}
return ok;
}
/////////////////////////////////////////////////////////////////////////////////////
// TJava_profile
/////////////////////////////////////////////////////////////////////////////////////

View File

@ -62,7 +62,7 @@ BEGIN
OUTPUT F_CAB CODTAB[6,10]
OUTPUT F_PRO CODTAB[11,12]
OUTPUT F_BANCA 4->S0
CHECTYPE NORMAL
END
STRING F_BANCA 50 47

View File

@ -6,7 +6,7 @@
#include "fe0100a.h"
#include "felib.h"
#include "cglib.h"
#include "../cg/cglib.h"
#include <alleg.h>
#include <anafis.h>

View File

@ -1634,8 +1634,10 @@ void TButton_control::create(WINDOW win, short cid,
mnemonic = txt[underscore+1];
txt.strip("&~");
}
const char* t = parse_caption(txt, bold, big, color);
if (width <= 0) width = strlen(t)+3;
const char* t = parse_caption(txt, bold, big, color);
if (width <= 0) width = (short) strlen(t)+3;
XI_RCT rct = coord2rct(get_interface(win), left, top, width, height);

View File

@ -130,21 +130,6 @@ int TDate::last_day(int month, int year)
return d;
}
void TDate::set_end_month()
{
_val = makedata(last_day(month(),year()),month(),year());
}
bool TDate::is_end_month() const
{
return day() == last_day(month(),year());
}
bool TDate::empty() const
{
return _val == 0;
}
int TDate::wday() const
{
// day of week (1=lunedi)

View File

@ -110,11 +110,20 @@ public:
// @cmember Ritorna l'ultimo giorno possibile del mese
static int last_day(int month, int year);
// @cmember Controlla se il giorno e' l'ultimo del mese
bool is_end_month() const;
bool is_end_month() const { return day() == last_day(month(), year());}
// @cmember Setta il giorno del mese all'ultimo possibile
void set_end_month();
void set_end_month() { _val = makedata(last_day(month(), year()), month(), year());}
// @cmember Controlla se il giorno e' primo dell'anno
bool is_start_year() const { return day() == 1 && month() == 1; }
// @cmember Setta il primo giorno dell'anno
void set_start_year(int y = 0) { _val = makedata(1, 1, y == 0 ? year() : y); }
// @cmember Controlla se il giorno e' l'ultimo dell'anno
bool is_end_year() const { return day() == 31 && month() == 12; }
// @cmember Setta l'ultimo giorno dell'anno
void set_end_year(int y = 0) { _val = makedata(31, 12, y == 0 ? year() : y); }
// @cmember Controlla se la data è nulla
bool empty() const ;
bool empty() const { return _val == 0;}
// @cmember Setta la il giorno
void set_day(int n);

View File

@ -105,6 +105,7 @@
// Virtuali
#define DOC_PLAFOND "PLAFOND"
#define DOC_FATID "FATID"
// modulo pe
#define DOC_SPESEUPD "SPESEUPD"
#define DOC_USEK "USEK"

View File

@ -27,6 +27,12 @@ class TDir : public TObject
// @author:(INTERNAL) Alessandro
// @access:(INTERNAL) Private Member
{
TString _name;
RecNoType _eod;
RecNoType _eox;
int _len;
int _flags;
TString _des;
// @cmember:(INTERNAL) Descrittore del file
FileDes _dir;
@ -61,10 +67,9 @@ public:
void set (const char * name, const RecNoType eod, const RecNoType flag, const char * des, const char * calc);
// @cmember Stampa la descrizione del direttorio sull'output selezionato
virtual void print_on(ostream& out) const;
// @cmember Legge la descrizione del direttorio dall' input selezionato
virtual void read_from(istream& in);
virtual void print_on(ostream& out) const;
// @cmember Legge la descrizione del direttorio dall' input selezionato
virtual void read_from(istream& in);
// @cmember Ritorna il nome del file selezionato
const char* name() const;
// @cmember Ritorna il nome dei file dati selezionato
@ -120,6 +125,42 @@ public:
// @doc EXTERNAL
class TFieldDes : public TSortable
{
TString16 _name;
word _len;
word _dec;
word _offset;
public:
inline TString & name() { return _name; }
inline word & len() { return _len; }
inline word & dec() { return _dec; }
inline word & offset() { return _offset; }
TFieldDes() : _name(""), _len(0), _dec(0), _offset(0) {}
TFieldDes(const char * name, word len, word dec, word offset) : _name(name), _len(len), _dec(dec), _offset(offset) {}
TFieldDes(const TFieldDes & fd) : _name(fd._name), _len(fd._len), _dec(fd._dec), _offset(fd._offset) {}
~TFieldDes() {}
};
class TKeyDes : public TSortable
{
bool _dupkeys;
TArray _fields;
public:
inline bool & dupkeys() { return _dupkeys; }
void set_field(const TToken_string & field) { _fields.insert(field); }
inline TString fieldname(int i) { return _fields.objptr(i) != NULL ? ((TToken_string &)_fields[i]).get(0) : EMPTY_STRING; }
inline byte from(int i) { return _fields.objptr(i) != NULL ? ((TToken_string &)_fields[i]).get_int(1) : 0; }
inline byte to(int i) { return _fields.objptr(i) != NULL ? ((TToken_string &)_fields[i]).get_int(2) : 0; }
TKeyDes(bool dupkeys = false) : _dupkeys(dupkeys) {}
TKeyDes(const TKeyDes & kd) : _dupkeys(kd._dupkeys), _fields(kd._fields) {}
~TKeyDes() {}
};
// @class TTrec | Classe per le gestione dei tracciati record dei file
//
// @base public | TSortable
@ -128,6 +169,9 @@ class TTrec : public TSortable
// @author:(INTERNAL) Alessandro
// @access:(INTERNAL) Private Member
{
TArray _fields;
TPointer_array _sorted_fields;
TArray _keys;
// @cmember:(INTERNAL) Descrittore del tracciato record
RecDes _rec;

View File

@ -870,12 +870,12 @@ bool list_custom_files(const char* ext, const char* classe, TString_array& files
return !files.empty();
}
bool select_custom_file(TFilename& path, const char* ext, const char* classe)
bool select_custom_file(TFilename& path, const char* ext, const char* library)
{
TArray_sheet sheet(-1, -1, 78, 20, TR("Selezione"), HR("Nome@16|Classe@8|Descrizione@50|Custom"));
TString_array& files = sheet.rows_array();
TFilename first = path.name(); first.ext(""); // Riga su cui posizionarsi
bool ok = list_custom_files(ext, classe, files);
bool ok = list_custom_files(ext, library, files);
if (ok)
{
@ -1633,11 +1633,8 @@ void TISAM_recordset::reset()
void TISAM_recordset::requery()
{
if (_cursor != NULL)
{
SAFE_DELETE(_cursor);
SAFE_DELETE(_relation);
}
SAFE_DELETE(_cursor);
SAFE_DELETE(_relation);
}
void TISAM_recordset::set(const char* use)
@ -1685,7 +1682,7 @@ TString& TISAM_recordset::add_between_filter(const TString& field, const TString
}
TISAM_recordset::TISAM_recordset(const char* use)
: _relation(NULL), _cursor(NULL)
: _relation(nullptr), _cursor(nullptr)
{
set(use);
}

View File

@ -183,7 +183,7 @@ public:
///////////////////////////////////////////////////////////
bool list_custom_files(const char* ext, const char* library, TString_array& files);
bool select_custom_file(TFilename& path, const char* ext, const char* library = NULL);
bool select_custom_file(TFilename& path, const char* ext, const char* classe = NULL);
const TString& logic2table(int logic_num);
int table2logic(const TString& name);
TRecordset* create_recordset(const TString& sql);

View File

@ -1496,7 +1496,7 @@ void TCursor::filter(
if (filterchanged)
{
_filter = fil;
SAFE_DELETE(_fexpr);
safe_delete(_fexpr);
_frefs.destroy();
TTypeexp type = (_filter.find('"') >= 0) ? _strexpr : _numexpr;
if (_filter.not_empty())
@ -1733,8 +1733,8 @@ TCursor::~TCursor()
}
::remove(_indexname);
}
SAFE_DELETE(_page);
SAFE_DELETE(_fexpr);
SAFE_DELETE(_page);
SAFE_DELETE(_fexpr);
}
@ -3260,8 +3260,8 @@ TSortedfile::TSortedfile(int logicnum, TRelation* rel, const char* ordexpr, cons
// @mfunc Distruttore
TSortedfile::~TSortedfile()
{
SAFE_DELETE(_curs);
SAFE_DELETE(_rel);
SAFE_DELETE(_curs);
SAFE_DELETE(_rel);
}
//

View File

@ -1976,8 +1976,15 @@ void TToken_string::destroy(int n)
if (sep >= n)
{
const char* p = strchr(s, _separator);
*s = '\0';
if (p != NULL) strcat(s, p+1);
if (p != NULL)
{
*s = '\0';
strcat(s, p + 1);
}
else
if (*(--s) == _separator)
*s = '\0';
}
}
restart();

View File

@ -674,7 +674,7 @@ public:
// @cmember Aggiunge una data
void add(const TDate d, int pos = -1);
// @cmember Aggiunge un booleano
void add(bool on, int pos = -1) { add(on ? "X" : ""); }
void add(bool on, int pos = -1) { add(on ? "X" : "", pos); }
// @cmember Inserisce una stringa
void insert_at(const char* s, int n);
// @cmember Toglie la stringa di posizione pos

View File

@ -627,11 +627,13 @@ void TViswin::repos_buttons ()
if (space < 0)
space = 0;
int x = space;
const int by = br.top;
short x = space;
const short by = br.top;
for (int b = 0; b < buttons; b++)
{
const PNT p = { by, x };
xvt_rect_set_pos(&br, p);
((TPushbutton_control&)_button[b]).set_rect(br);
x += space + width;

View File

@ -1,3 +1,3 @@
154
0
$letint|0|0|114|0|Lettere d'intento|||
$letint|0|0|132|0|Lettere d'intento|||

View File

@ -1,5 +1,5 @@
154
17
18
ANNO|2|4|0|Anno
NUMPROT|3|6|0|Numero protocollo
DATAREG|5|8|0|Data di registrazione
@ -9,7 +9,8 @@ CODCLI|3|6|0|Codice cliente
UFFIVA|9|3|0|Codice ufficio IVA
NOTE|11|10|0|Note
TIPOOP|2|1|0|Tipo operazione (1=singola,2=fino a,3=nel periodo dal/al)
IMPORTO|4|18|3|Importo
IMPORTO|4|18|2|Importo lettera d'intento
UTILIZZATO|4|18|2|Importo utilizzato
DAL|5|8|0|Data inizio periodo
AL|5|8|0|Data fine periodo
STAMPATO|8|1|0|Stampato

View File

@ -11,6 +11,7 @@
#define LETINT_NOTE "NOTE"
#define LETINT_TIPOOP "TIPOOP"
#define LETINT_IMPORTO "IMPORTO"
#define LETINT_UTILIZZATO "UTILIZZATO"
#define LETINT_DAL "DAL"
#define LETINT_AL "AL"
#define LETINT_STAMPATO "STAMPATO"

View File

@ -3,7 +3,9 @@
int main(int argc,char** argv)
{
const int r = (argc > 1) ? atoi(&argv[1][1]) : -1;
const char * s = argv[1]; s++;
int r = (argc > 1) ? atoi(s) : -1;
switch (r)
{
case 1: li0200(argc,argv) ; break; // Visualizzazione riepilogo plafond

View File

@ -1,8 +1,12 @@
#include <automask.h>
#include <relapp.h>
#include <utility.h>
#include <toolfld.h> // TButton_tool
#include <urldefid.h> // ID Bottoni
#include <doc.h>
#include "../ve/velib.h"
#include "lilib01.h"
#include "li0.h"
@ -13,12 +17,12 @@
/* Utility ***********************/
HIDDEN bool key_handler(TMask& m, KEY k)
{
// Per ora facciamo che il SHIFT+F12 attiva sempre il campo 3
if (k == K_SHIFT+K_F12)
m.enable(DLG_OK);
return true;
HIDDEN bool key_handler(TMask& m, KEY k)
{
// Per ora facciamo che il SHIFT+F12 attiva sempre il campo 3
if (k == K_SHIFT+K_F12)
m.enable(DLG_OK);
return true;
}
/*****************************************************************/
@ -70,26 +74,28 @@ void TVisLI_mask::load_sheet()
*/
int key = get(F_DACODCF).full() ? 2 : (get(F_DATAINI).full() ? 3 : (get(F_CODNUM).full() ? 5 : 1));
query << "KEY " << key << "\n";
TString queryFrom, queryTo;
switch (key)
{
case 2:
{
// 2: TIPOCF+CODCF+PROVV+ANNO+DATADOC+CODNUM+NDOC
queryFrom.cut(0) << "FROM TIPOCF='C' CODCF=#DACODCF PROVV='D'";
queryTo.cut(0) << "TO TIPOCF='C' CODCF=#ACODCF PROVV='D'";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
queryTo << " ANNO=#AANNO";
if(get(F_DATAINI).full())
{
queryFrom << " DATADOC=#DADATA";
if(get(F_CODNUM).full())
queryFrom << " CODNUM=#DACODNUM";
}
if(get(F_DATAFIN).full())
{
queryFrom.cut(0) << "FROM TIPOCF='C' CODCF=#DACODCF PROVV='D'";
queryTo.cut(0) << "TO TIPOCF='C' CODCF=#ACODCF PROVV='D'";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
queryTo << " ANNO=#AANNO";
if(get(F_DATAINI).full())
{
queryFrom << " DATADOC=#DADATA";
if(get(F_CODNUM).full())
queryFrom << " CODNUM=#DACODNUM";
}
if(get(F_DATAFIN).full())
{
queryTo << " DATADOC=#ADATA";
if(get(F_CODNUM).full())
queryTo << " CODNUM=#ACODNUM";
@ -100,11 +106,11 @@ void TVisLI_mask::load_sheet()
case 3:
{
// 3: DATADOC+PROVV+ANNO+CODNUM+NDOC
queryFrom.cut(0) << "DATADOC=#DADATA PROVV='D'";
queryFrom.cut(0) << "DATADOC=#DADATA PROVV='D'";
queryTo.cut(0) << "DATADOC=#ADATA PROVV='D'";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
queryTo << " ANNO=#AANNO";
if(get(F_CODNUM).full())
{
@ -117,12 +123,12 @@ void TVisLI_mask::load_sheet()
case 5:
{
// 5: PROVV+CODNUM+ANNO+NDOC
queryFrom.cut(0) << "PROVV='D' CODNUM=#DACODNUM";
queryFrom.cut(0) << "PROVV='D' CODNUM=#DACODNUM";
queryTo.cut(0) << "PROVV='D' CODNUM=#ACODNUM";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
queryTo << " ANNO=#AANNO";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
queryTo << " ANNO=#AANNO";
}
}
break;
@ -130,12 +136,12 @@ void TVisLI_mask::load_sheet()
default:
{
// 1: PROVV+ANNO+CODNUM+NDOC
queryFrom.cut(0) << "PROVV='D'";
queryFrom.cut(0) << "PROVV='D'";
queryTo.cut(0) << "PROVV='D'";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
queryTo << " ANNO=#AANNO";
if(get(F_ANNO).full())
{
queryFrom << " ANNO=#DAANNO";
queryTo << " ANNO=#AANNO";
}
}
break;
@ -145,16 +151,8 @@ void TVisLI_mask::load_sheet()
TString querySel;
bool tipo = get(F_TIPODOC).full();
bool stato = get(F_STATO).full();
querySel << ((tipo || stato) ? "\nSELECT " : "") << (tipo ? "TIPODOC==#TIPODOC&&" : "") << (stato ? "STR(STATO==#STATO)" : "");
/*
if(tipo || stato)
querySel = "\nSELECT ";
if(tipo)
querySel << "TIPODOC==#TIPODOC&&";
if(stato)
querySel << "STATO==#STATO";
else
*/
if(tipo && !stato)
querySel.cut(querySel.len()-2);
@ -197,8 +195,8 @@ void TVisLI_mask::load_sheet()
TString16 key; key << get(F_ANNO) << "|" << get(F_NUMPROT);
TRectype letint = cache().get(LF_LETINT, key);
// 2: TIPOCF+CODCF+PROVV+ANNO+DATADOC+CODNUM+NDOC
query << "KEY 2\n"
"FROM TIPOCF='C' CODCF=" << letint.get("CODCLI") << " PROVV='D' ANNO=" << letint.get("ANNO") << " DATADOC=" << letint.get("DAL") << "\n"
query << "KEY 2\n"
"FROM TIPOCF='C' CODCF=" << letint.get("CODCLI") << " PROVV='D' ANNO=" << letint.get("ANNO") << " DATADOC=" << letint.get("DAL") << "\n"
"TO TIPOCF='C' CODCF=" << letint.get("CODCLI") << " PROVV='D' ANNO=" << letint.get("ANNO") << " DATADOC="<< letint.get("ANNO") << "1231";
TISAM_recordset rec(query);
for(bool ok = rec.move_first(); ok; ok = rec.move_next())
@ -233,24 +231,17 @@ void TVisLI_mask::addRow(TSheet_field& sheet, TISAM_recordset& rec)
// Creo una nuova riga
TToken_string& row = sheet.row(-1);
// Data documento
row.add(rec.get("DATADOC").as_date(), sheet.cid2index(A_DATADOC));
// Anno documento
row.add(rec.get("ANNO").as_int(), sheet.cid2index(A_ANNO));
// Numero documento
row.add(rec.get("NDOC").as_string(), sheet.cid2index(A_NUMDOC));
// Numero documento
row.add(rec.get("CODNUM").as_string(), sheet.cid2index(A_CODNUM));
// Tipo documento
row.add(rec.get("TIPODOC").as_string(), sheet.cid2index(A_TIPODOC));
// Stato documento
row.add(rec.get("STATO").as_string(), sheet.cid2index(A_STATODOC));
// Tipo cliente
row.add("C", sheet.cid2index(A_TIPOCF));
// Codice cliente
row.add(rec.get("CODCF").as_int(), sheet.cid2index(A_CODCF));
// Ragione Sociale
static TString key; key.cut(0) << "C|" << rec.get("CODCF").as_string();
row.add(cache().get(LF_CLIFO, key, "RAGSOC"), sheet.cid2index(A_RAGSOC));
row.add(rec.get("DATADOC").as_date(), sheet.cid2index(A_DATADOC)); // Anno documento
row.add(rec.get("ANNO").as_int(), sheet.cid2index(A_ANNO)); // Numero documento
row.add(rec.get("NDOC").as_string(), sheet.cid2index(A_NUMDOC)); // Numero documento
row.add(rec.get("CODNUM").as_string(), sheet.cid2index(A_CODNUM)); // Tipo documento
row.add(rec.get("TIPODOC").as_string(), sheet.cid2index(A_TIPODOC)); // Stato documento
row.add(rec.get("STATO").as_string(), sheet.cid2index(A_STATODOC)); // Tipo cliente
row.add("C", sheet.cid2index(A_TIPOCF)); // Codice cliente
row.add(rec.get("CODCF").as_int(), sheet.cid2index(A_CODCF)); // Ragione Sociale
TToken_string key("C"); key.add(rec.get("CODCF").as_string());
row.add(cache().get(LF_CLIFO, key, CLI_RAGSOC), sheet.cid2index(A_RAGSOC));
// Totale documento
row.add(rec.get("G1:TOTDOC").as_real(), sheet.cid2index(A_TOTDOC));
@ -338,14 +329,50 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
case DLG_OK:
{
// Creo una maschera che richiede la data
TMask app("Creazione storico LI", 1, 50, 10);
app.add_button_tool(DLG_OK, "~Conferma", TOOL_OK);
app.add_button_tool(DLG_CANCEL, "Annulla", TOOL_CANCEL);
app.add_date(101, 0, "Data iniziale ", 1,1);
app.field(101).check_type(CHECK_REQUIRED);
TMask sto("Creazione storico LI", 1, 50, 14);
sto.add_button_tool(DLG_OK, "~Conferma", TOOL_OK);
sto.add_button_tool(DLG_CANCEL, "Annulla", TOOL_CANCEL);
TList_field & tipo = sto.add_list(F_TIPO, 0, "", 0, 0, 7, "H", "C", "Cliente");
TReal_field & anno = sto.add_number(F_ANNO_STO, 0, "Esercizio ", 1, 1, 4, "B");
TBrowse * b = new TBrowse(&anno, new TRelation("ESC"));
b->add_input_field(F_ANNO_STO, "CODTAB");
b->add_display_field("Codice esercizio", "CODTAB");
b->add_display_field("Data inizio esercizio", "D0");
b->add_display_field("Data fine esercizio", "D1");
b->add_output_field(F_ANNO_STO, "CODTAB");
anno.set_query_button(b);
anno.enable_check();
anno.check_type(CHECK_SEARCH);
TReal_field & from_cli = sto.add_number(F_FROM_CLI, 0, "Da cliente ", 1, 3, 6, "B");
TBrowse * bfc = new TBrowse(&from_cli, new TRelation(LF_CLIFO));
bfc->add_input_field(F_TIPO, CLI_TIPOCF, -1, true);
bfc->add_input_field(F_FROM_CLI, CLI_CODCF);
bfc->add_display_field("Codice cliente/fornitore", CLI_CODCF);
bfc->add_display_field("Ragione sociale@50", CLI_RAGSOC);
bfc->add_output_field(F_FROM_CLI, CLI_CODCF);
from_cli.set_query_button(bfc);
from_cli.enable_check();
from_cli.check_type(CHECK_SEARCH);
TReal_field & to_cli = sto.add_number(F_TO_CLI, 0, "A cliente ", 2, 5, 6, "B");
TBrowse * btc = new TBrowse(&to_cli, new TRelation(LF_CLIFO));
btc->add_input_field(F_TIPO, CLI_TIPOCF, -1, true);
btc->add_input_field(F_TO_CLI, CLI_CODCF);
btc->copy_display(bfc);
btc->add_output_field(F_TO_CLI, CLI_CODCF);
to_cli.set_query_button(btc);
to_cli.enable_check();
from_cli.check_type(CHECK_SEARCH);
// Lancio la maschera
if(app.run() == K_ENTER)
genera_li_storico(app.get_date(101));
if (sto.run() == K_ENTER)
genera_li_storico(sto.get_int(F_ANNO_STO), sto.get_long(F_FROM_CLI), sto.get_long(F_TO_CLI));
return false;
break;
}
case DLG_USER:
@ -359,11 +386,8 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
if (e == fe_button && enab)
{
o.disable(); // Tecnica anti doppio click!
TRectype doc(LF_DOC);
doc.put("PROVV", 'D');
doc.put("ANNO", anno);
doc.put("CODNUM", codnum);
doc.put("NDOC", numdoc);
TDocumento doc('D', anno, codnum, numdoc);
doc.edit();
o.enable();
}
@ -392,11 +416,7 @@ void TVisLI_app::main_loop()
open_files(LF_LETINT, LF_DOC, LF_RIGHEDOC);
TVisLI_mask m;
while (m.run() == K_ENTER)
{
// DO DA TING
}
while (m.run() == K_ENTER);
}
int li0100(int argc, char* argv[])

View File

@ -19,6 +19,12 @@
#define END_MASK 499
// maschera ricostruzione storico
#define F_ANNO_STO 101
#define F_FROM_CLI 102
#define F_TO_CLI 103
#define F_TIPO 104
#define F_RIGHE 301
#define START_SHEET 101

View File

@ -1,30 +1,30 @@
#include "li0100a.h"
TOOLBAR "topbar" 0 0 0 2
BUTTON DLG_RECALC 2 2
BEGIN
PROMPT 1 1 "Carica"
PICTURE TOOL_CONVERT
END
BUTTON DLG_OK 2 2
BEGIN
PROMPT 1 1 "Precarica"
PICTURE TOOL_ELABORA
END
#include <helpbar.h>
ENDPAGE
PAGE "Impostazioni" 0 2 0 0
LISTBOX F_TIPORIC 20
BEGIN
PROMPT 1 1 "Ricerca per "
ITEM "D|Estremi documenti"
ITEM "L|Lettera"
END
#include "li0100a.h"
TOOLBAR "topbar" 0 0 0 2
BUTTON DLG_RECALC 2 2
BEGIN
PROMPT 1 1 "Carica"
PICTURE TOOL_CONVERT
END
BUTTON DLG_OK 2 2
BEGIN
PROMPT 1 1 "Precarica"
PICTURE TOOL_ELABORA
END
#include <helpbar.h>
ENDPAGE
PAGE "Impostazioni" 0 2 0 0
LISTBOX F_TIPORIC 20
BEGIN
PROMPT 1 1 "Ricerca per "
ITEM "D|Estremi documenti"
ITEM "L|Lettera"
END
NUMBER F_NUMPROT 6
BEGIN
PROMPT 40 1 "Cod. lettera "
@ -46,27 +46,25 @@ BEGIN
OUTPUT F_ACODCF CODCLI
OUTPUT F_ARAGSOC LF_CLIFO->RAGSOC
FLAGS "DU"
END
DATE F_DATAINI
BEGIN
PROMPT 1 2 "Data iniziale"
VALIDATE DATE_CMP_FUNC <= F_DATAFIN
WARNING "La data iniziale non può essere maggiore della data finale"
END
DATE F_DATAFIN
BEGIN
PROMPT 40 2 "Data Finale "
VALIDATE DATE_CMP_FUNC >= F_DATAINI
WARNING "La data finale non può essere minore della data iniziale"
END
GROUPBOX DLG_NULL 80 5
BEGIN
PROMPT 0 3 "Documento"
END
END
DATE F_DATAINI
BEGIN
PROMPT 1 2 "Data iniziale"
END
DATE F_DATAFIN
BEGIN
PROMPT 40 2 "Data Finale "
VALIDATE DATE_CMP_FUNC >= F_DATAINI
WARNING "La data finale non può essere minore della data iniziale"
END
GROUPBOX DLG_NULL 80 5
BEGIN
PROMPT 0 3 "Documento"
END
STRING F_CODNUM 5
BEGIN
PROMPT 1 4 "Numerazione "
@ -124,8 +122,8 @@ BEGIN
NUM_EXPR #F_ANNO>0
FLAG "AP"
WARNING "Inserire un anno valido"
END
END
STRING F_STATO 1
BEGIN
PROMPT 24 6 "Stato "
@ -135,342 +133,342 @@ BEGIN
DISPLAY "Descrizione@50" S0
OUTPUT F_STATO CODTAB
FLAG "U"
END
GROUPBOX DLG_NULL 80 4
BEGIN
PROMPT 0 8 "Clienti"
END
NUMBER F_DACODCF 6
BEGIN
PROMPT 1 9 "Da Codice"
USE LF_CLIFO
INPUT TIPOCF "C" SELECT
INPUT CODCF F_DACODCF
DISPLAY "Codice" CODCF
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Occasionale@C" OCCAS
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
OUTPUT F_DACODCF CODCF
OUTPUT F_DARAGSOC RAGSOC
CHEKTYPE NORMAL
GROUP 1
FLAGS ""
END
STRING F_DARAGSOC 50 49
BEGIN
PROMPT 21 9 "R.Soc"
USE LF_CLIFO KEY 2
INPUT TIPOCF "C" SELECT
INPUT RAGSOC F_DARAGSOC
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Codice" CODCF
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
COPY OUTPUT F_DACODCF
ADD RUN CG0 -1
GROUP 1
FLAGS ""
END
NUMBER F_ACODCF 6
BEGIN
PROMPT 1 10 "A Codice "
USE LF_CLIFO
INPUT TIPOCF "C" SELECT
INPUT CODCF F_ACODCF
DISPLAY "Codice" CODCF
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Occasionale@C" OCCAS
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
OUTPUT F_ACODCF CODCF
OUTPUT F_ARAGSOC RAGSOC
CHEKTYPE NORMAL
GROUP 1
FLAGS ""
END
STRING F_ARAGSOC 50 49
BEGIN
PROMPT 21 10 "R.Soc"
USE LF_CLIFO KEY 2
INPUT TIPOCF "C" SELECT
INPUT RAGSOC F_ARAGSOC
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Codice" CODCF
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
COPY OUTPUT F_ACODCF
ADD RUN CG0 -1
GROUP 1
FLAGS ""
END
END
GROUPBOX DLG_NULL 80 4
BEGIN
PROMPT 0 8 "Clienti"
END
NUMBER F_DACODCF 6
BEGIN
PROMPT 1 9 "Da Codice"
USE LF_CLIFO
INPUT TIPOCF "C" SELECT
INPUT CODCF F_DACODCF
DISPLAY "Codice" CODCF
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Occasionale@C" OCCAS
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
OUTPUT F_DACODCF CODCF
OUTPUT F_DARAGSOC RAGSOC
CHEKTYPE NORMAL
GROUP 1
FLAGS ""
END
STRING F_DARAGSOC 50 49
BEGIN
PROMPT 21 9 "R.Soc"
USE LF_CLIFO KEY 2
INPUT TIPOCF "C" SELECT
INPUT RAGSOC F_DARAGSOC
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Codice" CODCF
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
COPY OUTPUT F_DACODCF
ADD RUN CG0 -1
GROUP 1
FLAGS ""
END
NUMBER F_ACODCF 6
BEGIN
PROMPT 1 10 "A Codice "
USE LF_CLIFO
INPUT TIPOCF "C" SELECT
INPUT CODCF F_ACODCF
DISPLAY "Codice" CODCF
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Occasionale@C" OCCAS
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
OUTPUT F_ACODCF CODCF
OUTPUT F_ARAGSOC RAGSOC
CHEKTYPE NORMAL
GROUP 1
FLAGS ""
END
STRING F_ARAGSOC 50 49
BEGIN
PROMPT 21 10 "R.Soc"
USE LF_CLIFO KEY 2
INPUT TIPOCF "C" SELECT
INPUT RAGSOC F_ARAGSOC
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Codice" CODCF
DISPLAY "Codice Fiscale@16" COFI
DISPLAY "Partita IVA@15" PAIV
COPY OUTPUT F_ACODCF
ADD RUN CG0 -1
GROUP 1
FLAGS ""
END
STRING DLG_PROFILE 256
BEGIN
PROMPT 1 -1 "Profilo "
PSELECT
FLAGS "H"
END
ENDPAGE
PAGE "Documenti/Lettere Intento" 0 2 0 0
SPREADSHEET F_RIGHE
BEGIN
PROMPT 0 0 "Righe movimenti"
ITEM "Data\n Doc.@8F"
ITEM "Anno\nDoc.@5F"
ITEM "Numero\nDocum.@5F"
ITEM "Cod.\nNum.@8F"
ITEM "Tipo\nDoc.@4F"
ITEM "Stato\nDoc.@5F"
ITEM "C/F@2"
ITEM "Codice@6"
ITEM "Ragione Sociale@35"
ITEM "Tot. Doc.@10"
ITEM "Num Prot1@8"
ITEM "Utilizzato1@10"
ITEM "Num Prot2@8"
ITEM "Utilizzato2@10"
ITEM "Num Prot3@8"
ITEM "Utilizzato3@10"
ITEM "Num Prot4@8"
ITEM "Utilizzato4@10"
ITEM "Num Prot5@8"
ITEM "Utilizzato5@10"
ITEM "Num Prot6@8"
ITEM "Utilizzato6@10"
ITEM "Num Prot7@8"
ITEM "Utilizzato7@10"
ITEM "Num Prot8@8"
ITEM "Utilizzato8@10"
ITEM "Num Prot9@8"
ITEM "Utilizzato9@10"
ITEM "Num Prot10@8"
ITEM "Utilizzato10@10"
END
ENDPAGE
ENDMASK
PAGE "Riga" -1 -1 69 14
DATE A_DATADOC
BEGIN
PROMPT 26 0 "Data documento."
FLAGS "D"
END
NUMBER A_ANNO 4
BEGIN
PROMPT 1 0 "Anno documento"
FLAGS "D"
END
NUMBER A_NUMDOC 10
BEGIN
PROMPT 1 0 "Numero documento"
FLAGS "D"
END
STRING A_CODNUM 5
BEGIN
PROMPT 1 0 "Codice numerazione documento"
FLAGS "D"
END
STRING A_TIPODOC 5
BEGIN
PROMPT 23 6 "Tipo doc. "
FLAGS "D"
END
STRING A_STATODOC 1
BEGIN
PROMPT 1 0 "Stato documento"
FLAGS "D"
END
STRING A_TIPOCF 1
BEGIN
PROMPT 1 1 "Tipo C/F "
FLAGS "D"
END
NUMBER A_CODCF 6
BEGIN
PROMPT 26 1 "Cod. C/F"
FLAGS "D"
END
STRING A_RAGSOC 50 47
BEGIN
FIELD RAGSOC
PROMPT 1 2 "Ragione Sociale"
FLAGS "D"
END
NUMBER A_TOTDOC 12 2
BEGIN
PROMPT 42 8 "Imponibile"
FLAGS "D"
END
NUMBER PLA1_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA1_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA2_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA2_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA3_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA3_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA4_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA4_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA5_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA5_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA6_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA6_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA7_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA7_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA8_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA8_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA9_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA9_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA10_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA10_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
ENDPAGE
TOOLBAR "topbar" 0 0 0 2
BUTTON DLG_OK 2 2
BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_USER 2 2
BEGIN
PROMPT 2 1 "Collega"
PICTURE TOOL_LINK
END
BUTTON DLG_DELREC 2 2
BEGIN
PROMPT 2 1 "Elimina"
PICTURE TOOL_DELREC
END
BUTTON DLG_CANCEL 2 2
BEGIN
PROMPT 4 1 ""
END
ENDPAGE
END
ENDPAGE
PAGE "Documenti/Lettere Intento" 0 2 0 0
SPREADSHEET F_RIGHE
BEGIN
PROMPT 0 0 "Righe movimenti"
ITEM "Data\n Doc.@8F"
ITEM "Anno\nDoc.@5F"
ITEM "Numero\nDocum.@5F"
ITEM "Cod.\nNum.@8F"
ITEM "Tipo\nDoc.@4F"
ITEM "Stato\nDoc.@5F"
ITEM "C/F@2"
ITEM "Codice@6"
ITEM "Ragione Sociale@35"
ITEM "Tot. Doc.@10"
ITEM "Num Prot1@8"
ITEM "Utilizzato1@10"
ITEM "Num Prot2@8"
ITEM "Utilizzato2@10"
ITEM "Num Prot3@8"
ITEM "Utilizzato3@10"
ITEM "Num Prot4@8"
ITEM "Utilizzato4@10"
ITEM "Num Prot5@8"
ITEM "Utilizzato5@10"
ITEM "Num Prot6@8"
ITEM "Utilizzato6@10"
ITEM "Num Prot7@8"
ITEM "Utilizzato7@10"
ITEM "Num Prot8@8"
ITEM "Utilizzato8@10"
ITEM "Num Prot9@8"
ITEM "Utilizzato9@10"
ITEM "Num Prot10@8"
ITEM "Utilizzato10@10"
END
ENDPAGE
ENDMASK
PAGE "Riga" -1 -1 69 14
DATE A_DATADOC
BEGIN
PROMPT 26 0 "Data documento."
FLAGS "D"
END
NUMBER A_ANNO 4
BEGIN
PROMPT 1 0 "Anno documento"
FLAGS "D"
END
NUMBER A_NUMDOC 10
BEGIN
PROMPT 1 0 "Numero documento"
FLAGS "D"
END
STRING A_CODNUM 5
BEGIN
PROMPT 1 0 "Codice numerazione documento"
FLAGS "D"
END
STRING A_TIPODOC 5
BEGIN
PROMPT 23 6 "Tipo doc. "
FLAGS "D"
END
STRING A_STATODOC 1
BEGIN
PROMPT 1 0 "Stato documento"
FLAGS "D"
END
STRING A_TIPOCF 1
BEGIN
PROMPT 1 1 "Tipo C/F "
FLAGS "D"
END
NUMBER A_CODCF 6
BEGIN
PROMPT 26 1 "Cod. C/F"
FLAGS "D"
END
STRING A_RAGSOC 50 47
BEGIN
FIELD RAGSOC
PROMPT 1 2 "Ragione Sociale"
FLAGS "D"
END
NUMBER A_TOTDOC 12 2
BEGIN
PROMPT 42 8 "Imponibile"
FLAGS "D"
END
NUMBER PLA1_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA1_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA2_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA2_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA3_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA3_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA4_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA4_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA5_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA5_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA6_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA6_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA7_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA7_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA8_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA8_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA9_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA9_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
NUMBER PLA10_NUMPROT 6
BEGIN
PROMPT 42 8 "Num Prot"
FLAGS "D"
END
NUMBER PLA10_QTA 12 2
BEGIN
PROMPT 42 8 "Util"
FLAGS "D"
END
ENDPAGE
TOOLBAR "topbar" 0 0 0 2
BUTTON DLG_OK 2 2
BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_USER 2 2
BEGIN
PROMPT 2 1 "Collega"
PICTURE TOOL_LINK
END
BUTTON DLG_DELREC 2 2
BEGIN
PROMPT 2 1 "Elimina"
PICTURE TOOL_DELREC
END
BUTTON DLG_CANCEL 2 2
BEGIN
PROMPT 4 1 ""
END
ENDPAGE
ENDMASK

View File

@ -6,6 +6,7 @@
#include "..\ve\velib.h"
#include <real.h>
#include "lilib01.h"
#include "letint.h"
#include "li0.h"
#include "li0200a.h"
@ -122,19 +123,48 @@ void TResDI_app::elab(TResDI_mask& m)
{
TRectype row_clifo(c_clifo.curr());
TLi_manager currentCli(row_clifo.get_char("TIPOCF"), row_clifo.get_long("CODCF"), aData); // Inizializzo l'oggetto per la gestione del plafond
if(currentCli.has_valid_plafond())
TLi_manager cli(row_clifo.get_long("CODCF"), aData.year()); // Inizializzo l'oggetto per la gestione del plafond
if (cli.has_valid_plafond())
{
real plafond = currentCli.get_plafond();
real resPlafond = plafond - currentCli.elab_util(tipi, stati, aData) - currentCli.elab_util(tipif, statif);
TArray arr = cli.get_plafond_array();
const int rows = arr.items();
for (int r = 0; r < rows; r++)
{
const TRectype & reclint = (const TRectype &) arr[r];
const int numprot = reclint.get_int(LETINT_NUMPROT);
real plafond = reclint.get_real(LETINT_IMPORTO);
real utilizzato = reclint.get_real(LETINT_UTILIZZATO);
real residuo = plafond - utilizzato;
const int tipo = reclint.get_int(LETINT_TIPOOP);
const TDate dal = reclint.get_date(LETINT_DAL);
const TDate al = reclint.get_date(LETINT_AL);
TString msg;
TString msg;
msg << "\nDichiarazione di intento cliente N." << row_clifo.get_long("CODCF") << "\nRagione sociale: " << row_clifo.get("RAGSOC") << "\nPlafond totale: " << static_cast<TCurrency>(plafond).string() << "\n";
log.log(0, msg);
msg = TString("Plafond disponibile: ") << static_cast<TCurrency>((resPlafond > ZERO ? resPlafond : ZERO )).string() << "";
log.log(0, msg);
msg = TString("Tipo dichiarazione: ") << (currentCli.is_soluzione() ? "Singola\n" : "A concorrenza\n");
log.log(0, msg);
msg << TR("Dichiarazione di intento cliente ") << row_clifo.get_long(CLI_CODCF) << " - "<< row_clifo.get(CLI_RAGSOC) << '\n';
log.log(0, msg);
msg.cut(0) << TR("Protocollo: ") << numprot << " - " << TR("Plafond disponibile: ") << residuo << "" << '\n';
log.log(0, msg);
msg.cut(0) << TR("Tipo dichiarazione: ");
switch (tipo)
{
case SOLUZIONE_UNICA:
msg << TR("Singola") << '\n';
break;
case FINO_A_PLAFOND:
msg << TR("A concorrenza ") << TR("Dal ") << dal << '\n';
break;
case A_TEMPO:
msg << TR("Dal ") << dal << TR("Al ") << al << '\n';
break;
default:
break;
}
log.log(0, msg);
log.log(0, "");
}
}
}
log.print_or_preview();

View File

@ -1,140 +1,140 @@
#include "li0200a.h"
TOOLBAR "topbar" 0 0 0 2
#include <stdbar.h>
ENDPAGE
PAGE "Impostazioni dichiarazioni d'intento" 0 2 0 0
STRING F_TABIVA_CODTAB 4
BEGIN
PROMPT 1 1 "Codice IVA plafond:"
FIELD CODTAB
KEY 1
USE %IVA
FLAGS "U"
INPUT CODTAB F_TABIVA_CODTAB
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
DISPLAY "Tipo" S1
DISPLAY "%@5" R0
DISPLAY "Vent." S6
DISPLAY "Sospeso" B2
OUTPUT F_TABIVA_CODTAB CODTAB
HELP "Inserire il codice IVA"
CHECKTYPE REQUIRED
VALIDATE ZEROFILL_FUNC 2
END
#include "li0200a.h"
TOOLBAR "topbar" 0 0 0 2
#include <stdbar.h>
ENDPAGE
PAGE "Impostazioni dichiarazioni d'intento" 0 2 0 0
STRING F_TABIVA_CODTAB 4
BEGIN
PROMPT 1 1 "Codice IVA plafond:"
FIELD CODTAB
KEY 1
USE %IVA
FLAGS "U"
INPUT CODTAB F_TABIVA_CODTAB
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
DISPLAY "Tipo" S1
DISPLAY "%@5" R0
DISPLAY "Vent." S6
DISPLAY "Sospeso" B2
OUTPUT F_TABIVA_CODTAB CODTAB
HELP "Inserire il codice IVA"
CHECKTYPE REQUIRED
VALIDATE ZEROFILL_FUNC 2
END
DATE F_A_DATA
BEGIN
PROMPT 1 2 "A data "
CHECKTYPE REQUIRED
END
NUMBER F_CODICE_CLIFO_DA 6
BEGIN
PROMPT 1 3 "Da cod. cliente: "
FLAG "UR"
USE LF_CLIFO
INPUT TIPOCF "C"
INPUT CODCF F_CODICE_CLIFO_DA
DISPLAY "Cliente" CODCF
DISPLAY "Ragione sociale@60" RAGSOC
OUTPUT F_CODICE_CLIFO_DA CODCF
GROUP 1
END
NUMBER F_CODICE_CLIFO_A 6
BEGIN
PROMPT 32 3 "a: "
FLAG "UR"
USE LF_CLIFO
INPUT TIPOCF "C"
INPUT CODCF F_CODICE_CLIFO_A
COPY DISPLAY F_CODICE_CLIFO_DA
OUTPUT F_CODICE_CLIFO_A CODCF
NUM_EXPR #F_CODICE_CLIFO_A>=#F_CODICE_CLIFO_DA
WARNING "Digitare un codice maggiore o uguale al campo 'da codice cliente'"
GROUP 1
END
SPREADSHEET DOCUMENTI_STATO 45 10
BEGIN
PROMPT 1 5 ""
ITEM "Tipo Numerazione"
ITEM "Da stato"
ITEM "A stato"
END
ENDPAGE
ENDMASK
PAGE "Riga tipo numerazione" -1 -1 78 8
STRING F_TIPODOC 4
BEGIN
PROMPT 2 1 "Tipo Documento "
FIELD TIPODOC
HELP "Codice tipo documento"
USE %TIP
INPUT CODTAB F_TIPODOC
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_TIPODOC CODTAB
CHECKTYPE REQUIRED
END
STRING F_STATODOCDA 4
BEGIN
PROMPT 2 2 "Da Numerazione "
FIELD CODTAB
KEY 1
USE %STD
FLAGS "U"
INPUT CODTAB F_STATODOCA
DISPLAY "Stato" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_STATODOCDA CODTAB
//CHECKTYPE REQUIRED
END
STRING F_STATODOCA 4
BEGIN
PROMPT 2 3 "A Numerazione "
FIELD CODTAB
KEY 1
USE %STD
FLAGS "U"
INPUT CODTAB F_STATODOCA
DISPLAY "Stato" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_STATODOCA CODTAB
NUM_EXPR #F_STATODOCA>=#F_STATODOCDA
//CHECKTYPE REQUIRED
END
ENDPAGE
TOOLBAR "Documento" 0 0 0 2
BUTTON DLG_OK 2 2
BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_DELREC 2 2
BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_CANCEL 2 2
BEGIN
PROMPT 1 1 ""
END
ENDPAGE
ENDMASK
END
NUMBER F_CODICE_CLIFO_DA 6
BEGIN
PROMPT 1 3 "Da cod. cliente: "
FLAG "UR"
USE LF_CLIFO
INPUT TIPOCF "C"
INPUT CODCF F_CODICE_CLIFO_DA
DISPLAY "Cliente" CODCF
DISPLAY "Ragione sociale@60" RAGSOC
OUTPUT F_CODICE_CLIFO_DA CODCF
GROUP 1
END
NUMBER F_CODICE_CLIFO_A 6
BEGIN
PROMPT 32 3 "a: "
FLAG "UR"
USE LF_CLIFO
INPUT TIPOCF "C"
INPUT CODCF F_CODICE_CLIFO_A
COPY DISPLAY F_CODICE_CLIFO_DA
OUTPUT F_CODICE_CLIFO_A CODCF
NUM_EXPR #F_CODICE_CLIFO_A>=#F_CODICE_CLIFO_DA
WARNING "Digitare un codice maggiore o uguale al campo 'da codice cliente'"
GROUP 1
END
SPREADSHEET DOCUMENTI_STATO 45 10
BEGIN
PROMPT 1 5 ""
ITEM "Tipo Numerazione"
ITEM "Da stato"
ITEM "A stato"
END
ENDPAGE
ENDMASK
PAGE "Riga tipo numerazione" -1 -1 78 8
STRING F_TIPODOC 4
BEGIN
PROMPT 2 1 "Tipo Documento "
FIELD TIPODOC
HELP "Codice tipo documento"
USE %TIP
INPUT CODTAB F_TIPODOC
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_TIPODOC CODTAB
CHECKTYPE REQUIRED
END
STRING F_STATODOCDA 4
BEGIN
PROMPT 2 2 "Da Numerazione "
FIELD CODTAB
KEY 1
USE %STD
FLAGS "U"
INPUT CODTAB F_STATODOCA
DISPLAY "Stato" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_STATODOCDA CODTAB
//CHECKTYPE REQUIRED
END
STRING F_STATODOCA 4
BEGIN
PROMPT 2 3 "A Numerazione "
FIELD CODTAB
KEY 1
USE %STD
FLAGS "U"
INPUT CODTAB F_STATODOCA
DISPLAY "Stato" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_STATODOCA CODTAB
NUM_EXPR #F_STATODOCA>=#F_STATODOCDA
//CHECKTYPE REQUIRED
END
ENDPAGE
TOOLBAR "Documento" 0 0 0 2
BUTTON DLG_OK 2 2
BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_DELREC 2 2
BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_CANCEL 2 2
BEGIN
PROMPT 1 1 ""
END
ENDPAGE
ENDMASK

View File

@ -35,6 +35,7 @@ bool TLetint_mask::on_key(KEY k)
keyforced = true;
enable(DLG_SAVEREC);
enable(F_NUMPROT);
enable(F_UTILIZZATO);
}
if (k == K_SHIFT+K_F11)
keyforced = false;
@ -180,6 +181,7 @@ protected:
virtual TMask* get_mask(int mode) { return _mask; }
virtual bool changing_mask(int mode) { return false; }
virtual bool protected_record(TRectype &rec);
virtual void init_query_mode(TMask& m);
virtual void init_modify_mode(TMask& m);
virtual bool get_next_key(TToken_string& key);
@ -231,18 +233,23 @@ bool TLetint::protected_record(TRectype& rec) //evita la cancellazione del reco
return prot;
}
void TLetint::init_query_mode(TMask& m) //evita la registrazione di un record modificato se STAMPATO
{
m.disable(F_UTILIZZATO);
}
void TLetint::init_modify_mode(TMask& m) //evita la registrazione di un record modificato se STAMPATO
{
const TRectype& rec = get_relation()->curr();
const bool stampato = rec.get_bool(LETINT_STAMPATO);
const TRectype& rec = get_relation()->curr();
const bool stampato = rec.get_bool(LETINT_STAMPATO);
if (stampato)
{
m.disable(DLG_SAVEREC);
m.disable(DLG_DELREC);
TString msg = TR("Dichiarazione già stampata sul registro dell'esercizio ");
xvtil_statbar_set(msg);
}
m.disable(DLG_SAVEREC);
m.disable(DLG_DELREC);
TString msg = TR("Dichiarazione già stampata sul registro dell'esercizio ");
xvtil_statbar_set(msg);
}
m.disable(F_UTILIZZATO);
}

View File

@ -30,3 +30,5 @@
#define F_PROTINTS 124
#define F_NOTE 125
#define B_CHIUSA 126
#define F_UTILIZZATO 127
#define F_DISPONIBILE 128

View File

@ -244,9 +244,24 @@ BEGIN
CHECKTYPE REQUIRED
END
CURRENCY F_UTILIZZATO 18
BEGIN
PROMPT 1 18 "Utilizzato "
FIELD UTILIZZATO
FLAGS "D"
END
CURRENCY F_DISPONIBILE 18
BEGIN
PROMPT 1 19 "Disponibile "
NUM_EXPR #F_IMPORTO-#F_UTILIZZATO
DRIVENBY F_IMPORTO F_UTILIZZATO
FLAGS "DG"
END
DATE F_DAL
BEGIN
PROMPT 42 17 "Data inizio periodo"
PROMPT 42 18 "Data inizio periodo"
FIELD DAL
CHECKTYPE REQUIRED
VALIDATE DATE_CMP_FUNC >= F_VSDATA
@ -256,7 +271,7 @@ END
DATE F_AL
BEGIN
PROMPT 42 18 "Data fine periodo "
PROMPT 42 19 "Data fine periodo "
FIELD AL
CHECKTYPE REQUIRED
FLAGS "D"

File diff suppressed because it is too large Load Diff

View File

@ -9,102 +9,106 @@
#include <relation.h>
#endif
#ifndef __VELIB04_H
#include "../ve/velib04.h"
#ifndef __RECARRAY_H
#include <recarray.h>
#endif
class TDocumento;
class TLista_documenti;
#ifndef __REPUTILS_H
#include <reputils.h>
#endif
#include <map>
#include <unordered_map>
#define SOLUZIONE_UNICA 1
#define FINO_A_PLAFOND 2
#define A_TEMPO 3
enum plafStruct { _planno, _plnumprot, _plimporto, _plchiusura, _plNC };
enum plafStruct { _planno, _plnumprot, _plimporto};
class TLi_manager : TObject
// Ritorna il codice iva del plafond
const TString & iva_plafond();
// Controllo se il codice iva è uguale a quello impostato per il calcolo del plafond
bool check_iva_plafond(const TString& cod);
// controlla la visualizzazione immediata dei messaggi
void lint_batch(const bool on = true);
// azzera i messaggi
void lint_reset_msg();
// restituisce i messaggi
const TToken_string & lint_get_msg();
// Ricostruisce il plafond dall'anno
void genera_li_storico(const int anno, const long from_cli = 0L, const long to_cli = 0L, const char tipocf = 'C');
class TLi_manager : public TObject
{
TToken_string _tipi;
TToken_string _stati;
bool _valid_plafond;
bool _soluzione;
bool _elab_pr;
const char _tipocf;
const long _codcli;
char _tipocf;
long _codcli;
int _anno;
bool _dirty;
TDate _ini_dic_int;
TDate _fin_dic_int;
real _plafond;
real _utilizzato;
TString_array _days;
TArray _plafonds;
protected:
void clear_letint();
void read(const TRectype & filter);
int flush();
const TString _codiva_def;
const TString _codiva_alt;
// Elenco di plafond con eventuale
// Chiave ANNO|NUMERO(6)
std::map<TString, real> _plafondi;
std::map<int, TString> _modifiche; // Progressivo, TToken_string(chiave,stato);
void elab_tipi_stati(); // Preparo due token string con tipi[0] -> stati[0], ...
public:
// Getters
char tipo() const { return _tipocf; }
long codice() const { return _codcli; }
int anno() const { return _anno; }
bool doc_ok(const TDocumento & doc) const;
// Ritorno il plafond
const real get_plafond() { return _plafond; }
// Ritorno l'utilizzo
const real get_utilizzo() { return _utilizzato; }
// Ritorno il plafond
const real get_residuo() { return _plafond - _utilizzato; }
// Ritorno se il plafond è valido
bool has_valid_plafond() const { return _valid_plafond; }
// Ritorna se è una dichiarazione di tipo soluzione
bool is_soluzione() const { return _soluzione; }
// Funzione che unisce consPlaf e incrPlaf
const TToken_string& get_use(TDocumento& d, const bool write = false);
// "Consuma" il plafond
const TToken_string& cons_plaf(real& plaf_used, const bool write = false);
// Da una nota credito passata incremento il plafond
const TToken_string& incr_plaf(TDocumento& d, real imp_nc = ZERO, const bool write = false);
// Storna un documento che riceve
const TToken_string& storna_doc(const TDocumento& d, real imp_dc = ZERO, const bool write = false);
// Storna i documenti dopo a quello che riceve
//void stornaDocs(const TDocumento& d, const bool write = false);
// Ricalcola i documenti dopo quello che riceve
//bool recalcAfter(const TDocumento& d, TLog_report& lerr);
// ritorna lettera d'intento modificata
const bool dirty() const { return _dirty; }
// imposta lettera d'intento modificata
void set_dirty(bool on = true) { _dirty = on; }
// imposta l'anno
void set_anno(const int anno);
// Ritorna la lettera d'intento
TRectype & get_lint(const int numprot);
// Ritorna la lettera d'intento
const TArray & get_plafond_array() const { return _plafonds; }
// Utilizza il plafond
bool utilizza_plafond(const TDocumento & d, TToken_string & plafs, const real importo);
// Functions
// Vado a estrapolare il plafond
void elab_plafond();
// Testo se con i documenti passati supero il plafond
bool test_plafond(TLista_documenti& dout, TLog_report& lerr);
// Controllo se il codice iva è uguale a quello impostato per il calcolo del plafond
bool check_iva(const TString& cod) const { return cod == _codiva_def || cod == _codiva_alt; }
// Controllo se il plafond che la NC passata rilascia non è già stato utilizzato
bool check_utilizzo(TDocumento& d, real imp_nc = ZERO);
// Aggiunge a una lettera d'intento
void sub2lint(TRectype & reclint, const real & utilizzo) { add2lint(reclint, utilizzo, false); }
// Aggiungono a una lettera d'intento
void add2lint(TRectype & reclint, const real & utilizzo, const bool add = true);
// Calcolo il rimanente del plafond
const real get_pla_res();
// Calcolo il rimanente del plafond su tipi e stati documento passati
const real get_pla_res(TToken_string tipi, TToken_string stati);
// Funzione che effettivamente effettua il calcolodalla data della dichiarazione alla data passata
const real elab_pla_res(TToken_string t = "", TToken_string s = "", TDate ad = 0L);
// Ritorna la quantità di plafond utilizzato dalla data della dichiarazione alla data passata
const real elab_util(TToken_string tipi, TToken_string stati, TDate ad = 0L);
// Modifica una lettera e salva la modifica in "modifiche"
void change_stato(const TString& key, const bool stato);
// Controlla se ci sono delle modifiche da salvare nei plafonds
bool has_modifiche() const { return !_modifiche.empty(); }
// Annullo le modifiche
void revert_modifiche();
// Vuoto le modifiche
void clear_modifiche() { _modifiche.clear(); }
// Funzione che aggiorna il residuo plafond dichiarazione dalla data alla data
void TLi_manager::rebuild_plafond(bool update_docs = true, const int anno = 0);
// Funzione che effettivamente effettua il calcolodalla data della dichiarazione alla data passata
const real elab_util(TDate ad = 0L);
bool plafond_write(TDocumento& d);
bool plafond_rewrite(TDocumento& d);
bool rewrite(TDocumento& d) { return write_rewrite(d, true); }
bool write(TDocumento& d) { return write_rewrite(d, false); }
bool write_rewrite(TDocumento& d, bool rewrite = false);
bool remove(TDocumento& d);
// Costructors/Destructors
TLi_manager(const char t, const long c, TDate ini_dic, TDate fin_dic);
TLi_manager(const char t, const long c, TDate fin_dic); // Sets iniDicInt as 01/01/finDic.year()
virtual ~TLi_manager() {}
void read(const char t = ' ', const long c = 0L, TDate iniDic = TDate(NULLDATE), TDate finDic = TDate(NULLDATE));
// Costructors/Destructors
TLi_manager(const long c, const int anno = 0) : TLi_manager('C', c, anno) {}
TLi_manager(const char t = 'C' , const long c = 0L, const int anno = 0);
virtual ~TLi_manager();
};
static void create_tipi_stati(TToken_string& tipi, TToken_string& stati);
bool genera_li_storico(const TDate& data_ini);
bool popola_plafond(TLista_documenti& din, const TDate& data_elab);
void scrivi_plafond(TLista_documenti& din, const TDate& data_elab);
#endif

View File

@ -6,6 +6,6 @@ Flags = "F"
Item_01 = "Dichiarazioni d'intento", "li0 -3", ""
Item_02 = "Stampa dichiarazioni", "li0 -4", ""
Item_03 = "Riepilogo dichiarazioni", "li0 -1", ""
Item_04 = "Riepilogo Documenti/Lettere", "li0", ""
Item_04 = "Riepilogo Documenti/Lettere", "li0 -0", ""
Item_03 = "Impostazioni", "li0 -2", ""

View File

@ -179,8 +179,6 @@ void TCli_for::init()
// _ven_tipo = new TRecfield(_ven_rec, CFV_TIPOCF);
// _ven_codice = new TRecfield(_ven_rec, CFV_CODCF);
_use_lettere = main_app().has_module(LIAUT, CHK_DONGLE);
if (_use_lettere)
_use_lettere = ini_get_bool(CONFIG_DITTA, "ve", "USELETTERE");
}
const TString& TCli_for::find_listino_al(const TDate& datadoc) const

View File

@ -21,7 +21,7 @@
#include <occas.h>
#endif
class TDocumento;
class TDocumento;
class TOccasionale : public TRectype
{

View File

@ -7,7 +7,6 @@
#include <toolfld.h>
#include <utility.h>
#include <urldefid.h>
#include "../li/lilib01.h"
#include "ve0100.h"
#include "veini.h"
@ -529,12 +528,6 @@ int TMotore_application::write( const TMask& m ) // C 90
}
}
// Aggiunte per il controllo plafond
if(has_module(LIAUT, CHK_DONGLE) && d.tipo().is_fattura() && ini_get_bool(CONFIG_DITTA, "ve", "USELETTERE") && check_plafond_write(d) == -1)
{
return _isnowarning;
}
const int err = TRelation_application::write(m);
if (err == NOERR)
@ -559,25 +552,19 @@ int TMotore_application::rewrite( const TMask& m ) // C 90
{
TDocumento& d = (TDocumento &) _rel->curr();
TDocumento_mask& mask = (TDocumento_mask&) m;
int err = NOERR;
if (d.bloccato())
return NOERR;
mask.mask2doc();
d = ((TDocumento_mask&)m).doc(); // Trasferisce il documento da maschera a record
// Aggiunte per il controllo plafond
if(has_module(LIAUT, CHK_DONGLE) && d.tipo().is_fattura() && ini_get_bool(CONFIG_DITTA, "ve", "USELETTERE") && check_plafond_rewrite(d) == -1)
if (!d.bloccato())
{
return _isnowarning;
}
const int err = TRelation_application::rewrite(m);
if (err == NOERR)
{
do_elab(d);
mask.update_father_rows();
mask.save_father_rows();
mask.mask2doc();
d = ((TDocumento_mask&)m).doc(); // Trasferisce il documento da maschera a record
err = TRelation_application::rewrite(m);
if (err == NOERR)
{
do_elab(d);
mask.update_father_rows();
mask.save_father_rows();
}
}
return err;
}
@ -585,15 +572,14 @@ int TMotore_application::rewrite( const TMask& m ) // C 90
bool TMotore_application::remove() // C 90
{
TDocumento& d = (TDocumento &) _rel->curr();
bool ok = check_plafond_delete(d);
if(ok)
{
d.put(DOC_NOTE, "DELETING");
do_elab(d);
ok = TRelation_application::remove();
if(ok)
edit_mask().save_father_rows();
}
d.put(DOC_NOTE, "DELETING");
do_elab(d);
bool ok = TRelation_application::remove();
if (ok)
edit_mask().save_father_rows();
return ok;
}
@ -1315,226 +1301,6 @@ void TMotore_application::preview()
save_and_print(true, screenvis);
}
int TMotore_application::check_plafond_write(TDocumento& d)
{
TLi_manager plafond(d.tipocf(), d.codcf(), d.data());
if(!plafond.has_valid_plafond()) // Se il cliente non mi interessa
return NOERR;
TAssoc_array tab_iva = d.tabella_iva(true);
real pla_util = ZERO;
for (TRiepilogo_iva * totali = dynamic_cast<TRiepilogo_iva *>(tab_iva.get()); totali != nullptr; totali = dynamic_cast<TRiepilogo_iva *>(tab_iva.get()))
{
if(plafond.check_iva(totali->cod_iva().codice())) // Se l'iva del documento è diversa non mi interessa
{
pla_util += totali->imp_orig();
}
}
if(pla_util <= ZERO)
{
return NOERR;
}
real pla_res = plafond.get_pla_res();
TToken_string used;
if(d.tipo().nota_credito())
{
used = plafond.incr_plaf(d, pla_util, true);
}
else
{
// Il controllo è andato bene, adesso mi segno i plafond che ho utilizzato nel memo del documento
used = plafond.cons_plaf(pla_util, true);
}
if(used.starts_with("ERRORE"))
{
plafond.revert_modifiche();
TString msg("Attenzione il plafond è stato superato di ");
msg << TCurrency(-(pla_res - pla_util)).string() << "";
warning_box(msg);
return -1;
}
else
{
d.put("PLAFOND", used);
return NOERR;
}
}
int TMotore_application::check_plafond_rewrite(TDocumento& d)
{
TLi_manager plafond(d.tipocf(), d.codcf(), d.data());
if(!plafond.has_valid_plafond()) // Se il cliente non mi interessa
return NOERR;
TAssoc_array tab_iva = d.tabella_iva(true);
TDocumento old_doc;
real pla_util = ZERO;
for (TRiepilogo_iva * totali = dynamic_cast<TRiepilogo_iva *>(tab_iva.get()); totali != nullptr; totali = dynamic_cast<TRiepilogo_iva *>(tab_iva.get()))
if(plafond.check_iva(totali->cod_iva().codice())) // Se l'iva del documento è diversa non mi interessa
pla_util += totali->imp_orig();
if(pla_util <= ZERO)
return NOERR;
// Prima di tutto controllo che non stia salvando la stessa roba che ho già, confronto il totale dei plafond con il totale da calcolare
TToken_string le_plafs(d.get("PLAFOND"), ',');
real tot_plaf = ZERO;
for(int i = 0; i < le_plafs.items(); i++)
{
// É + ottimizzato rispetto a farlo in una linea sola?
//static TToken_string thisPlaf; thisPlaf.cut(0) << lePlafs.get(i);
tot_plaf += static_cast<real>(static_cast<TToken_string>(le_plafs.get(i)).get(_plimporto));
}
// Calcolo le differenze tra il plafond attuale da verificare e quello precedente
if(tot_plaf == pla_util)
return NOERR;
real pla_res = plafond.get_pla_res();
TToken_string used;
/* Devo gestire queste modifiche dividendo in 4 parti:
* 1) > vecchio Doc : faccio la differenza nuovo - vecchio e provo a generare un used nuovo
* 2) > vecchio NC : aggiungo alla parte che già storno
* 3) < vecchio Doc : storno parte del plafond già utilizzato
* 4) < vecchio NC : verifico che il plafond stornato con questa NC non sia stato utilizzato, in caso negativo tutto OK, positivo blocco.
*/
if(tot_plaf < pla_util)
{
if(d.tipo().nota_credito()) // 2
{
pla_util -= tot_plaf;
used = plafond.incr_plaf(d, pla_util, true);
}
else // 1
{
pla_util -= tot_plaf;
used = plafond.cons_plaf(pla_util, true);
}
}
else
{
if(d.tipo().nota_credito()) // 4
{
if(plafond.check_utilizzo(d, pla_util))
{
TString msg = "Attenzione! Si sta cercando di modificare una Nota di Credito che influisce le seguenti lettere di intento: \n";
for(int i = 0; i < le_plafs.items(); i++)
{
msg << i+1 << " - N." << le_plafs.get(_plnumprot) << "\n";
}
msg << "Vuoi continuare?";
if(yesno_box(msg))
{
used = plafond.storna_doc(d, tot_plaf - pla_util, true);
}
else
return -1;
}
else
return -1;
}
else // 3
{
used = plafond.storna_doc(d, tot_plaf - pla_util, true);
}
}
if(used.starts_with("ERRORE"))
{
plafond.revert_modifiche();
warning_box(used);
return -1;
}
else
{
d.put("PLAFOND", used);
return NOERR;
}
}
bool TMotore_application::check_plafond_delete(TDocumento& d)
{
TLi_manager plafond(d.tipocf(), d.codcf(), d.data());
if(d.get("PLAFOND").blank() || !plafond.has_valid_plafond()) // Se la fattura non ha nulla scritto in plafond non mi interessa
return true;
TAssoc_array tab_iva = d.tabella_iva(true);
TDocumento old_doc;
// Prima di tutto controllo che non stia salvando la stessa roba che ho già, confronto il totale dei plafond con il totale da calcolare
TToken_string le_plafs(d.get("PLAFOND"), ',');
real totPlaf = ZERO;
for(int i = 0; i < le_plafs.items(); i++)
{
// É + ottimizzato rispetto a farlo in una linea sola?
//static TToken_string thisPlaf; thisPlaf.cut(0) << lePlafs.get(i);
totPlaf += static_cast<real>(static_cast<TToken_string>(le_plafs.get(i)).get(_plimporto));
}
// Calcolo le differenze tra il plafond attuale da verificare e quello precedente
if(totPlaf == ZERO)
return true;
real pla_res = plafond.get_pla_res();
TToken_string used;
/* Devo gestire queste modifiche dividendo in 4 parti:
* 1) < vecchio Doc : storno parte del plafond già utilizzato
* 2) < vecchio NC : verifico che il plafond stornato con questa NC non sia stato utilizzato, in caso negativo tutto OK, positivo blocco.
*/
if(d.tipo().nota_credito()) // 2
{
if(plafond.check_utilizzo(d, totPlaf))
{
TString msg = "Attenzione! Si sta cercando di modificare una Nota di Credito che influisce le seguenti lettere di intento: \n";
for(int i = 0; i < le_plafs.items(); i++)
{
TToken_string this_plaf(le_plafs.get(i));
msg << i+1 << " - N." << this_plaf.get(_plnumprot) << "\n";
}
msg << "Vuoi continuare?";
if(yesno_box(msg))
{
used = plafond.storna_doc(d, totPlaf, true);
}
else
return false;
}
else
return false;
}
else // 1
{
real plaf_sto = ZERO;
for(int i = 0; i < le_plafs.items(); i++)
{
TToken_string this_plaf(le_plafs.get(i));
plaf_sto += static_cast<real>(this_plaf.get(_plNC));
}
if(plaf_sto > ZERO)
{
if(!yesno_box(TR("Attenzione! Si sta cercando di eliminare un documento per cui sono presenti una o più note di variazione per un totale di %s€\nContinuare?"), TCurrency(plaf_sto).string()))
return false;
}
used = plafond.storna_doc(d, totPlaf, true);
}
if(used.starts_with("ERRORE"))
{
plafond.revert_modifiche();
warning_box(used);
return false;
}
return true;
}
int ve0100( int argc, char* argv[])
{
TMotore_application a;

View File

@ -109,10 +109,6 @@ public:
bool TMotore_application::get_next_key(TToken_string& key);
// virtual const char* get_next_key( );
// Test Plafond
int check_plafond_write(TDocumento& d);
int check_plafond_rewrite(TDocumento& d);
bool check_plafond_delete(TDocumento& d);
};
inline TMotore_application& app() { return (TMotore_application &) main_app(); }

View File

@ -77,22 +77,16 @@ BEGIN
FIELD LIVPERART
END
BOOLEAN F_USELETTERE
BEGIN
PROMPT 2 14 "Utilizzo lettere d'intento"
FIELD USELETTERE
END
CURRENCY F_IMPMINFAT 10
BEGIN
PROMPT 2 15 "Importo minimo fatture "
PROMPT 2 14 "Importo minimo fatture "
FIELD IMPMINFAT
PICTURE "."
END
CURRENCY F_IMPMINEFF 10
BEGIN
PROMPT 2 16 "Importo minimo per effetti "
PROMPT 2 15 "Importo minimo per effetti "
FIELD IMPMINEFF
PICTURE "."
END

View File

@ -7,7 +7,7 @@
#include <recset.h>
#include <tabmod.h>
#include "../cg/cglib01.h"
#include "../cg/cglib.h"
///////////////////////////////////////////////////////////
// Applicazione per gestione maschere di modulo

View File

@ -7,7 +7,7 @@
#include <reprint.h>
#include <tabutil.h>
#include "../cg/cg2103.h"
#include "../cg/cglib.h"
#include "velib.h"
#include "ve1.h"

View File

@ -9,7 +9,7 @@
#include <textset.h>
#include <utility.h>
#include "../cg/cglib01.h"
#include "../cg/cglib.h"
#include "velib07.h"
///////////////////////////////////////////////////////////

View File

@ -4,12 +4,8 @@
int main( int argc, char** argv )
{
//int r = (argc > 1) ? argv[1][1]-'0' : -1;
/*
if(argv[1][2] > 0)
r = r * 10 + argv[1][2]-'0';
*/
int r = (argc > 1) ? atoi(++argv[1]) : -1;
const char * s = argv[1]; s++;
int r = (argc > 1) ? atoi(s) : -1;
switch (r)
{

View File

@ -1,6 +1,7 @@
//#include <recset.h>
#include <reputils.h>
#include <dongle.h>
#include <utility.h>
#include "velib04.h"
#include "ve6200.h"
@ -26,7 +27,7 @@ bool TFatturazione_bolle_app::create()
}
bool TFatturazione_bolle_app::process(TProgress_monitor& iw, TElaborazione & eld,
TLista_documenti& din, const TDate& data_elab)
TLista_documenti& din, const TDate& data_elab, TLog_report & log)
{
// Crea documenti di output
TLista_documenti dout;
@ -34,50 +35,18 @@ bool TFatturazione_bolle_app::process(TProgress_monitor& iw, TElaborazione & eld
if (eld.elabora(din, dout, data_elab))
{
TString msg;
msg << din.items() << TR(" documenti raggruppati in ") << dout.items();
iw.set_text(msg); // Messaggio sul cliente
log.log(0, msg);
iw.set_text(msg); // Messaggio sul cliente
do_events(); // Attende visualizzazione
lint_batch(true);
lint_reset_msg();
int err = dout.write(); // Scrive documenti di output
// Test Plafond
TToken_string tipi, stati;
create_tipi_stati(tipi, stati);
int clifo = din[0].clifor().codice();
TDate aData(data_elab);
TLi_manager currentCli('C', clifo, aData); // Inizializzo l'oggetto per la gestione del plafond
real plafond, res_plafond, tot_fat;
if (currentCli.has_valid_plafond())
{
plafond = currentCli.get_plafond();
res_plafond = plafond - currentCli.elab_util(tipi, stati, aData);
for (int i = 0; i < din.items(); ++i)
tot_fat += din[i].totale_doc();
TLog_report lerr;
if (tot_fat > res_plafond)
{
bool plur = din.items() > 1;
TString err;
err << "Errore durante la generazione del plafond:\n" <<
(plur ? "I documenti da elaborare superano" : "Il documento da elaborare supera") << " il plafond per questo cliente.\n"
"Plafond rimanente: %s\n" <<
(plur ? "Totale fatture: %s\n" : "Totale fattura: %s\n") <<
(plur ? "Le fatture non sono state create." : "La fattura non e' stata creata.");
return error_box(err, res_plafond.string(), tot_fat.string());
}
// Una volta che di documenti sono elaborati ci scrivo sopra il valore del plafond
scrivi_plafond(dout, data_elab);
//if (!popola_plafond(dout, data_elab))
//{
// return error_box("Errore durante la generazione del plafond, le fatture non son state create");
//}
}
int err = dout.write(); // Scrive documenti di output
if (err == NOERR)
lint_batch(false);
if (err == NOERR)
{
err = din.rewrite(); // Aggiorna stato dei documenti di input
if (err != NOERR)
@ -85,384 +54,431 @@ bool TFatturazione_bolle_app::process(TProgress_monitor& iw, TElaborazione & eld
}
else
ok = error_box("Errore %d durante l'aggiornamento dei documenti da raggruppare!", err);
}
const TString & str = lint_get_msg();
if (str.full())
{
TToken_string errmsg(str, '\n');
const int items = errmsg.items();
for (int i = 0; i < items; i++)
log.log(0, errmsg.get());
}
}
return ok;
}
void TFatturazione_bolle_app::process_by_cli(const TMask& m)
{
TProgress_monitor iw(0, "Inizializzazione...\n ");
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
const long dc = m.get_long(F_CODICE_CLIFO_DA);
const long ac = m.get_long(F_CODICE_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString16 dz(m.get(F_CODICE_ZONA_DA));
const TString16 az(m.get(F_CODICE_ZONA_A));
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TString st_da = m.get(F_DATA_DOCUMENTO_A); // qui verificare
const TDate ad = st_da.not_empty() ? (TDate)(const char*)st_da : data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
TElaborazione& eld = *elab(m.get(F_CODICE_ELAB));
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TTipo_documento t(eld.tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
TLog_report log;
{
TProgress_monitor iw(0, "Inizializzazione...\n ");
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
const int tot_cli = clienti.leggi_doc(eld, dd, ad, dc, ac, da, aa, dz, az);
TString msg(80);
iw.set_max(tot_cli);
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
msg = TR("Elaborazione documenti del cliente ");
msg << codcli << " ...";
iw.set_text(msg); // Messaggio sul cliente
do_events(); // Attende visualizzazione
const long dc = m.get_long(F_CODICE_CLIFO_DA);
const long ac = m.get_long(F_CODICE_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString16 dz(m.get(F_CODICE_ZONA_DA));
const TString16 az(m.get(F_CODICE_ZONA_A));
TLista_documenti din; // Legge tutti i documenti di input
din.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
if (din.items() > 0)
{
if (m.get(F_ORDINAMENTO) == "Z")
din.sort(DOC_ZONA "|" DOC_DATADOC "|" DOC_NDOC);
bool ok = process(iw, eld, din, data_elab);
if (!ok) // In caso di errore termina qui l'elaborazione.
break;
}
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TString st_da = m.get(F_DATA_DOCUMENTO_A); // qui verificare
const TDate ad = st_da.not_empty() ? (TDate)(const char*)st_da : data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
if (!iw.add_status())
break;
}
delete &eld;
TElaborazione& eld = *elab(m.get(F_CODICE_ELAB));
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TTipo_documento t(eld.tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
const int tot_cli = clienti.leggi_doc(eld, dd, ad, dc, ac, da, aa, dz, az);
TString msg(80);
iw.set_max(tot_cli);
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
msg = TR("Elaborazione documenti del cliente ");
msg << codcli << " ...";
log.log(0, msg);
iw.set_text(msg); // Messaggio sul cliente
do_events(); // Attende visualizzazione
TLista_documenti din; // Legge tutti i documenti di input
din.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
if (din.items() > 0)
{
if (m.get(F_ORDINAMENTO) == "Z")
din.sort(DOC_ZONA "|" DOC_DATADOC "|" DOC_NDOC);
bool ok = process(iw, eld, din, data_elab, log);
if (!ok) // In caso di errore termina qui l'elaborazione.
break;
}
if (!iw.add_status())
break;
}
delete &eld;
}
log.print_or_preview();
}
void TFatturazione_bolle_app::process_by_ragsoc(const TMask& m)
{
TProgress_monitor iw(0, "Inizializzazione...\n ");
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
const TString dr = m.get(F_RAGSOC_CLIFO_DA);
const TString ar = m.get(F_RAGSOC_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString16 dz(m.get(F_CODICE_ZONA_DA));
const TString16 az(m.get(F_CODICE_ZONA_A));
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TString st_da = m.get(F_DATA_DOCUMENTO_A); // qui verificare
const TDate ad = st_da.not_empty() ? (TDate)(const char*)st_da : data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
TElaborazione * e = elab(m.get(F_CODICE_ELAB));
TElaborazione & eld = *e;
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TTipo_documento t(eld.tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
const int tot_cli = clienti.leggi_ragsoc(dr, ar, da, aa, dz, az);
TString msg(80);
iw.set_max(tot_cli);
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
msg = TR("Elaborazione documenti del cliente ");
msg << codcli << " ...";
iw.set_text(msg); // Messaggio sul cliente
do_events(); // Attende visualizzazione
TLista_documenti din; // Legge tutti i documenti di input
din.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
if (din.items() > 0)
{
if (m.get(F_ORDINAMENTO) == "Z")
din.sort(DOC_ZONA "|" DOC_DATADOC "|" DOC_NDOC);
bool ok = process(iw, eld, din, data_elab);
if (!ok) // In caso di errore termina qui l'elaborazione.
break;
}
TLog_report log;
{
TProgress_monitor iw(0, "Inizializzazione...\n ");
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
if (!iw.add_status())
break;
}
delete e;
const TString dr = m.get(F_RAGSOC_CLIFO_DA);
const TString ar = m.get(F_RAGSOC_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString16 dz(m.get(F_CODICE_ZONA_DA));
const TString16 az(m.get(F_CODICE_ZONA_A));
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TString st_da = m.get(F_DATA_DOCUMENTO_A); // qui verificare
const TDate ad = st_da.not_empty() ? (TDate)(const char*)st_da : data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
TElaborazione * e = elab(m.get(F_CODICE_ELAB));
TElaborazione & eld = *e;
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TTipo_documento t(eld.tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
const int tot_cli = clienti.leggi_ragsoc(dr, ar, da, aa, dz, az);
TString msg(80);
iw.set_max(tot_cli);
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
msg = TR("Elaborazione documenti del cliente ");
msg << codcli << " ...";
log.log(0, msg);
iw.set_text(msg); // Messaggio sul cliente
do_events(); // Attende visualizzazione
TLista_documenti din; // Legge tutti i documenti di input
din.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
if (din.items() > 0)
{
if (m.get(F_ORDINAMENTO) == "Z")
din.sort(DOC_ZONA "|" DOC_DATADOC "|" DOC_NDOC);
bool ok = process(iw, eld, din, data_elab, log);
if (!ok) // In caso di errore termina qui l'elaborazione.
break;
}
if (!iw.add_status())
break;
}
delete e;
}
log.print_or_preview();
}
void TFatturazione_bolle_app::process_by_doc(const TMask& m)
{
TProgress_monitor iw(0, TR("Inizializzazione...\n "));
TLog_report log;
{
TProgress_monitor iw(0, TR("Inizializzazione...\n "));
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
long dc = m.get_long(F_CODICE_CLIFO_DA);
long ac = m.get_long(F_CODICE_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString8 dz(m.get(F_CODICE_ZONA_DA));
const TString8 az(m.get(F_CODICE_ZONA_A));
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TDate ad = m.get_date(F_DATA_DOCUMENTO_A);
if (!ad.ok()) ad = data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
long dc = m.get_long(F_CODICE_CLIFO_DA);
long ac = m.get_long(F_CODICE_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString8 dz(m.get(F_CODICE_ZONA_DA));
const TString8 az(m.get(F_CODICE_ZONA_A));
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TDate ad = m.get_date(F_DATA_DOCUMENTO_A);
if (!ad.ok()) ad = data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
TElaborazione * e = elab(m.get(F_CODICE_ELAB));
TElaborazione & eld = *e;
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TElaborazione * e = elab(m.get(F_CODICE_ELAB));
TElaborazione & eld = *e;
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TTipo_documento t(eld.tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
const int tot_cli = clienti.leggi(dc, ac);
TLista_documenti din, dout; // Legge tutti i documenti di input
TString msg(80);
TTipo_documento t(eld.tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
const int tot_cli = clienti.leggi(dc, ac);
TLista_documenti din, dout; // Legge tutti i documenti di input
iw.set_max(tot_cli);
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
msg = TR("Elaborazione documenti del cliente");
msg << ' ' << codcli << "...";
log.log(0, msg);
iw.set_text(msg); // Messaggio sul cliente
do_events(); // Attende visualizzazione
TString msg(80);
iw.set_max(tot_cli);
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
msg = TR("Elaborazione documenti del cliente");
msg << ' ' << codcli << "...";
iw.set_text(msg); // Messaggio sul cliente
do_events(); // Attende visualizzazione
TLista_documenti list;
list.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
TLista_documenti list;
list.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
for (int i = list.items()-1; i >= 0; i--)
{
const TDocumento& doc = list[i];
bool to_del = FALSE;
const int agente = doc.get_int(DOC_CODAG);
if (agente > 0)
{
if (da > 0 && agente < da) to_del = true;
if (aa > 0 && agente > aa) to_del = true;
}
const TString8 zona = doc.get(DOC_ZONA);
if (zona.full())
{
if (dz.not_empty() && zona < dz) to_del = true;
if (az.not_empty() && zona > az) to_del = true;
}
if (to_del)
list.destroy(i);
}
const int items = list.items();
for (int j = 0; j < items; j++)
din.add(list[j]);
for (int i = list.items() - 1; i >= 0; i--)
{
const TDocumento& doc = list[i];
if (!iw.add_status())
break;
}
if (din.items() > 0 && !iw.is_cancelled())
{
if (m.get(F_ORDINAMENTO) == "Z")
din.sort(DOC_ZONA "|" DOC_DATADOC "|" DOC_NDOC);
process(iw, eld, din, data_elab);
}
delete e;
bool to_del = FALSE;
const int agente = doc.get_int(DOC_CODAG);
if (agente > 0)
{
if (da > 0 && agente < da) to_del = true;
if (aa > 0 && agente > aa) to_del = true;
}
const TString8 zona = doc.get(DOC_ZONA);
if (zona.full())
{
if (dz.not_empty() && zona < dz) to_del = true;
if (az.not_empty() && zona > az) to_del = true;
}
if (to_del)
list.destroy(i);
}
const int items = list.items();
for (int j = 0; j < items; j++)
din.add(list[j]);
if (!iw.add_status())
break;
}
if (din.items() > 0 && !iw.is_cancelled())
{
if (m.get(F_ORDINAMENTO) == "Z")
din.sort(DOC_ZONA "|" DOC_DATADOC "|" DOC_NDOC);
process(iw, eld, din, data_elab, log);
}
delete e;
}
log.print_or_preview();
}
void TFatturazione_bolle_app::process_by_fatt(const TMask& m)
{
TWait_cursor hourglass;
TLog_report log;
{
TWait_cursor hourglass;
TElaborazione* e = elab(m.get(F_CODICE_ELAB));
TElaborazione& eld = *e;
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TElaborazione* e = elab(m.get(F_CODICE_ELAB));
TElaborazione& eld = *e;
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
const TTipo_documento t(eld.tipo_iniziale(0));
const char tipocffatt = t.tipocf() == 'C' ? 'F' : 'C';
const TTipo_documento t(eld.tipo_iniziale(0));
const char tipocffatt = t.tipocf() == 'C' ? 'F' : 'C';
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
long dc = m.get_long(F_CODICE_CLIFO_DA);
long ac = m.get_long(F_CODICE_CLIFO_A);
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
long dc = m.get_long(F_CODICE_CLIFO_DA);
long ac = m.get_long(F_CODICE_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString& dz = m.get(F_CODICE_ZONA_DA);
const TString& az = m.get(F_CODICE_ZONA_A);
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = codnum.full() ? m.get_long(F_NUMERO_DOCUMENTO_DA) : 0;
const long an = codnum.full() ? m.get_long(F_NUMERO_DOCUMENTO_A) : 0;
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString& dz = m.get(F_CODICE_ZONA_DA);
const TString& az = m.get(F_CODICE_ZONA_A);
TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
if (!dd.ok())
dd = TDate(1,1,anno);
TDate ad = m.get_date(F_DATA_DOCUMENTO_A);
if (!ad.ok())
ad = data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = codnum.full() ? m.get_long(F_NUMERO_DOCUMENTO_DA) : 0;
const long an = codnum.full() ? m.get_long(F_NUMERO_DOCUMENTO_A) : 0;
const int nkey = (dn > 0 || an > 0) ? 1 : 3;
TString query;
query << "USE DOC KEY " << nkey << " SELECT (TIPOCFFATT=\"" << tipocffatt << "\")";
TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
if (!dd.ok())
dd = TDate(1, 1, anno);
TDate ad = m.get_date(F_DATA_DOCUMENTO_A);
if (!ad.ok())
ad = data_elab;
if (dc > 0 || ac > 0)
query << "&&(BETWEEN(CODCFFATT," << dc << ',' << ac << "))";
query << "&&(BETWEEN(DATADOC," << dd.date2ansi() << ',' << ad.date2ansi() << "))";
const int nkey = (dn > 0 || an > 0) ? 1 : 3;
TString query;
query << "USE DOC KEY " << nkey << " SELECT (TIPOCFFATT=\"" << tipocffatt << "\")";
if (da > 0 || aa > 0)
query << "&&(BETWEEN(CODAG," << da << "," << aa << "))";
if (dz.full() || az.full())
query << "&&(BETWEEN(ZONA,\"" << dz << "\",\"" << az << "\"))";
if (dc > 0 || ac > 0)
query << "&&(BETWEEN(CODCFFATT," << dc << ',' << ac << "))";
if (nkey == 3 && codnum.full())
query << "&&(CODNUM=\"" << codnum << "\")";
query << "&&(BETWEEN(DATADOC," << dd.date2ansi() << ',' << ad.date2ansi() << "))";
query << "\nBY " << DOC_CODCFFATT;
if (eld.usa_doc_rif())
query << ' ' << DOC_DATADOCRIF;
if (da > 0 || aa > 0)
query << "&&(BETWEEN(CODAG," << da << "," << aa << "))";
if (nkey == 1)
{
query << "\nFROM PROVV=D ANNO=" << anno << " CODNUM=" << codnum << " NDOC=" << dn;
query << "\nTO PROVV=D ANNO=" << anno << " CODNUM=" << codnum << " NDOC=" << an;
}
else
{
query << "\nFROM DATADOC=" << dd.date2ansi();
query << "\nTO DATADOC=" << ad.date2ansi();
}
if (dz.full() || az.full())
query << "&&(BETWEEN(ZONA,\"" << dz << "\",\"" << az << "\"))";
if (nkey == 3 && codnum.full())
query << "&&(CODNUM=\"" << codnum << "\")";
query << "\nBY " << DOC_CODCFFATT;
if (eld.usa_doc_rif())
query << ' ' << DOC_DATADOCRIF;
if (nkey == 1)
{
query << "\nFROM PROVV=D ANNO=" << anno << " CODNUM=" << codnum << " NDOC=" << dn;
query << "\nTO PROVV=D ANNO=" << anno << " CODNUM=" << codnum << " NDOC=" << an;
}
else
{
query << "\nFROM DATADOC=" << dd.date2ansi();
query << "\nTO DATADOC=" << ad.date2ansi();
}
TISAM_recordset docs(query);
const TRectype& head = docs.cursor()->curr();
TISAM_recordset docs(query);
const TRectype& head = docs.cursor()->curr();
TProgress_monitor iw(docs.items(), TR("Elaborazione documenti da fatturare"), true);
long last_clifo = 0; // Ultimo cliente elaborato
TLista_documenti din; // Lista dei documenti dell'ultimo cliente
TProgress_monitor iw(docs.items(), TR("Elaborazione documenti da fatturare"), true);
for (bool ok = docs.move_first(); ok; ok = docs.move_next())
{
const long clifo = docs.get(DOC_CODCFFATT).as_int();
if (clifo > 0 && clifo >= dc && (clifo <= ac || ac <= 0)) // Cliente da fatturare non nullo e valido
{
if (clifo != last_clifo) // Cambio cliente
{
if (din.items() > 0) // Ci sono documenti da elaborare?
{
process(iw, eld, din, data_elab, log); // Elaborali ...
din.destroy(-1); // ... e poi buttali
}
last_clifo = clifo;
}
long last_clifo = 0; // Ultimo cliente elaborato
TLista_documenti din; // Lista dei documenti dell'ultimo cliente
if (!iw.add_status(1))
break;
for (bool ok = docs.move_first(); ok; ok = docs.move_next())
{
const long clifo = docs.get(DOC_CODCFFATT).as_int();
if (clifo > 0 && clifo >= dc && (clifo <= ac || ac <= 0)) // Cliente da fatturare non nullo e valido
{
if (clifo != last_clifo) // Cambio cliente
{
if (din.items() > 0) // Ci sono documenti da elaborare?
{
process(iw, eld, din, data_elab); // Elaborali ...
din.destroy(-1); // ... e poi buttali
}
last_clifo = clifo;
}
// Controlla se il documento e' in uno stato valido per l'elaborazione
const TString4 tipodoc = head.get(DOC_TIPODOC);
const char statodoc = head.get_char(DOC_STATO);
for (int i = tipidoc.items() - 1; i >= 0; i--)
{
if (tipodoc == tipidoc.get(i) && statodoc == statidoc.get_char(i))
{
din.add(head);
break;
}
}
}
}
if (!iw.add_status(1))
break;
// Controlla se il documento e' in uno stato valido per l'elaborazione
const TString4 tipodoc = head.get(DOC_TIPODOC);
const char statodoc = head.get_char(DOC_STATO);
for (int i = tipidoc.items()-1; i>=0; i--)
{
if (tipodoc == tipidoc.get(i) && statodoc == statidoc.get_char(i))
{
din.add(head);
break;
}
}
}
}
// Termina l'elaborazione dei documenti dell'ultimo cliente
if (din.items() > 0 && !iw.is_cancelled())
process(iw, eld, din, data_elab);
delete e;
// Termina l'elaborazione dei documenti dell'ultimo cliente
if (din.items() > 0 && !iw.is_cancelled())
process(iw, eld, din, data_elab, log);
safe_delete(e);
}
log.print_or_preview();
}
// Effettuo un test per i clienti che hanno un plafond attivo, se trovo delle bolle che fuoriescono chiedo se continuare
bool TFatturazione_bolle_app::test_dicint(const TMask& m)
{
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
const long dc = m.get_long(F_CODICE_CLIFO_DA);
const long ac = m.get_long(F_CODICE_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString16 dz(m.get(F_CODICE_ZONA_DA));
const TString16 az(m.get(F_CODICE_ZONA_A));
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TString st_da = m.get(F_DATA_DOCUMENTO_A); // qui verificare
const TDate ad = st_da.not_empty() ? (TDate)(const char*)st_da : data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
TElaborazione& eld = *elab(m.get(F_CODICE_ELAB));
TToken_string tipidoc(24), statidoc(10);
eld.tipi_stati_iniziali(tipidoc, statidoc);
TTipo_documento t(eld.tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
bool ok = true;
const int tot_cli = clienti.leggi_doc(eld, dd, ad, dc, ac, da, aa, dz, az);
if (has_module(LIAUT, CHK_DONGLE))
{
const TDate data_elab = m.get_date(F_DATA_ELAB);
const int anno = data_elab.year();
TString msg(80);
const long dc = m.get_long(F_CODICE_CLIFO_DA);
const long ac = m.get_long(F_CODICE_CLIFO_A);
const int da = m.get_int(F_CODICE_AGENTE_DA);
const int aa = m.get_int(F_CODICE_AGENTE_A);
const TString16 dz(m.get(F_CODICE_ZONA_DA));
const TString16 az(m.get(F_CODICE_ZONA_A));
TLog_report lerr(TR("Errori controllo plafond e CONAI"));
lerr.log(0,"\n");
bool err = false;
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
const TDate dd = m.get_date(F_DATA_DOCUMENTO_DA);
TString st_da = m.get(F_DATA_DOCUMENTO_A); // qui verificare
const TDate ad = st_da.not_empty() ? (TDate)(const char*)st_da : data_elab;
const TString& codnum = m.get(F_CODICE_NUMERAZIONE);
const long dn = m.get_long(F_NUMERO_DOCUMENTO_DA);
const long an = m.get_long(F_NUMERO_DOCUMENTO_A);
TLi_manager currentCli(tipocf, codcli, ad); // Inizializzo l'oggetto per la gestione del plafond
TElaborazione * eld = elab(m.get(F_CODICE_ELAB));
TToken_string tipidoc(24), statidoc(10);
eld->tipi_stati_iniziali(tipidoc, statidoc);
if (currentCli.has_valid_plafond())
{
TLista_documenti din; // Legge tutti i documenti di input
din.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
if (din.items() > 0)
{
err |= currentCli.test_plafond(din, lerr);
}
}
}
TTipo_documento t(eld->tipo_iniziale(0));
char tipocf(t.tipocf());
TLista_cf clienti(tipocf);
const int tot_cli = clienti.leggi_doc(*eld, dd, ad, dc, ac, da, aa, dz, az);
TLog_report lerr(TR("Errori controllo plafond"));
delete &eld;
if(err)
{
lerr.print_or_preview();
return false;
}
return true;
lerr.log(0, "\n");
for (int c = 0; c < tot_cli; c++)
{
const long codcli = clienti[c]; // Codice cliente in esame
TLi_manager cli('C', codcli, data_elab.year()); // Inizializzo l'oggetto per la gestione del plafond
if (cli.has_valid_plafond())
{
real plafond, res_plafond, utilizzo;
TLista_documenti din; // Legge tutti i documenti di input
din.read('D', tipocf, codcli, anno, tipidoc, statidoc, dd, ad, codnum, dn, an);
bool cli_ok = true;
lint_batch(true);
lint_reset_msg();
plafond = cli.get_plafond();
res_plafond = cli.get_residuo();
for (int i = 0; i < din.items(); i++)
{
const real importo_utilizzato = din[i].importo_plafond();
TToken_string plafs(din[i].get(DOC_PLAFOND), ',');
const TDate datadoc = din[i].get_date(DOC_DATADOC);
utilizzo += importo_utilizzato;
cli_ok = cli.utilizza_plafond(din[i], plafs, importo_utilizzato);
}
cli.set_dirty(false);
lint_batch(false);
if (!cli_ok || utilizzo > res_plafond)
{
bool plur = din.items() > 1;
TString msg;
const TString & str = lint_get_msg();
msg << TR("Errore durante la generazione del plafond:") << '\n';
msg << (plur ? TR("I documenti da elaborare superano") : TR("Il documento da elaborare supera"));
msg << TR(" il plafond del cliente.") << ' ' << codcli << '\n';
msg << TR("Plafond rimanente: ") << res_plafond << '\n';
msg << TR("Totale plafond in fattura : ") << utilizzo << '\n';
msg << (plur ? TR("Le fatture non sono state create.") : TR("La fattura non e' stata creata.")) << '\n';
lerr.log(0, msg);
ok = false;
}
}
}
safe_delete(eld);
if (!ok)
lerr.print_or_preview();
}
return ok;
}
// Effettuo un test per i clienti che hanno un plafond attivo, se trovo delle bolle che fuoriescono chiedo se continuare
bool TFatturazione_bolle_app::test_CONAI(const TMask& m)
@ -582,33 +598,30 @@ void TFatturazione_bolle_app::main_loop()
while (m.run() == K_ENTER)
{
if(has_module(LIAUT, CHK_DONGLE) && ini_get_bool(CONFIG_DITTA, "ve", "USELETTERE") && !test_dicint(m)) // Controllo se ho documenti al di fuori del plafond
{
continue;
}
if (!test_CONAI(m))
continue;
const TString& select_from = m.get(F_SELEZIONE);
if (select_from != _default_selection)
ini_set_string(CONFIG_DITTA, "ve", "FATBOLSEL", _default_selection = select_from);
const TString& orderby = m.get(F_ORDINAMENTO);
if (orderby == "R")
process_by_ragsoc(m);
else
{
if (clifo_da_fatt(m))
{
process_by_fatt(m);
}
else
{
if (select_from == "D")
process_by_doc(m);
else
process_by_cli(m);
}
}
if (test_dicint(m) && test_CONAI(m))
{
const TString& select_from = m.get(F_SELEZIONE);
const TString& orderby = m.get(F_ORDINAMENTO);
if (select_from != _default_selection)
ini_set_string(CONFIG_DITTA, "ve", "FATBOLSEL", _default_selection = select_from);
if (orderby == "R")
process_by_ragsoc(m);
else
{
if (clifo_da_fatt(m))
{
process_by_fatt(m);
}
else
{
if (select_from == "D")
process_by_doc(m);
else
process_by_cli(m);
}
}
}
}
}

View File

@ -23,7 +23,7 @@ protected:
virtual TFatturazione_bolle * elab(const TString & cod) const { return new TFatturazione_bolle(cod);}
bool clifo_da_fatt(const TMask& m) const;
bool process(TProgress_monitor& iw, TElaborazione & eld, TLista_documenti& din, const TDate& data_elab);
bool process(TProgress_monitor& iw, TElaborazione & eld, TLista_documenti& din, const TDate& data_elab, TLog_report & log);
public:
void process_by_cli(const TMask& m);

View File

@ -6,7 +6,7 @@
#include <reprint.h>
#include <utility.h>
#include "../cg/cglib01.h"
#include "../cg/cglib.h"
#include "../mg/mglib.h"
#include "ve6.h"

View File

@ -3,7 +3,7 @@
#include <applicat.h>
#include <execp.h>
#include "../cg/cg2103.h"
#include "../cg/cglib.h"
#include "../mg/anamag.h"
#include <mov.h>

View File

@ -31,7 +31,7 @@ public:
// Controlla se lo stato ed il tipo del documento sono validi e rispettano la selezione
bool doc_tipo_stato_ok(const TRectype& doc);
// Constructor and Distructor
TEliminazione_documenti_mask(): TAutomask("ve61000a") {}
TEliminazione_documenti_mask(): TAutomask("ve6b00a") {}
~TEliminazione_documenti_mask() {}
};

View File

@ -58,7 +58,9 @@ class TSelect_color_mask;
#include <rdoc.h>
#endif
#include <map>
#ifndef __LILIB01_H
#include "../li/lilib01.h"
#endif
#define RIGA_MERCE 'M'
#define RIGA_SPESEDOC 'S'
@ -710,9 +712,7 @@ public:
TRiga_documento(TDocumento* doc, const char* tipo = NULL);
TRiga_documento(const TRiga_documento & row);
/* Maialata inguardabile: guai a chi la riporta!
TRiga_documento(const TRiga_documento& rec, TDocumento* doc, const char* tipo = NULL); */
virtual ~TRiga_documento() {}
virtual ~TRiga_documento() {}
};
enum TTipo_importo { _lordo, _netto, _imposta };
@ -772,6 +772,7 @@ class TDocumento : public TMultiple_rectype // velib03
char _stato_originale;
TCli_for _cli_for;
TLi_manager *_plafond;
TOccasionale _occas;
TPagamento _pag;
TAssoc_array _tabella_iva; // tabella di imponibili ed imposte
@ -842,6 +843,9 @@ public:
const TRiepilogo_iva * riepilogo_iva(const char * cod) const { return (const TRiepilogo_iva *) _tabella_iva.objptr(cod); }
const TRiepilogo_iva * riepilogo_iva(int index) const { return (index >= 0 && index < _cod_iva.items()) ? riepilogo_iva(_cod_iva.row(index)) : NULL; }
TCli_for& clifor(bool force_reload = false) const;
TLi_manager & plafond(bool force_reload = false);
const real importo_plafond() const;
const real importo_plafond_salvato() const;
TOccasionale& occas() const;
const TAgente& agente(bool first = true) const;
const TString& riferimento(TString& rif) const { return tipo().riferimento(*this, rif); }

View File

@ -5,8 +5,7 @@
#include <tabutil.h>
#include <utility.h>
#include "velib.h"
#include "../cg/cglib.h"
#include "../db/dblib.h"
#include "../pr/prlib.h"
#include "../li/letint.h"
@ -18,11 +17,11 @@
#include <causali.h>
#include "veini.h"
#include "velib.h"
#include "sconti.h"
#include "vepriv.h"
#include "veuml.h"
#include <set>
///////////////////////////////////////////////////////////
// TTipo_documento_cache
@ -252,6 +251,7 @@ void TDocumento::init()
_codcf = new TRecfield(*this, DOC_CODCF);
_cod_occas = new TRecfield(*this, DOC_OCFPI);
_plafond = nullptr;
_sconto = _esenzione = _valfisc = nullptr;
_stato_originale = ' ';
_dirty_deny = false;
@ -309,6 +309,7 @@ TDocumento::~TDocumento()
safe_delete(_sconto);
safe_delete(_esenzione);
safe_delete(_valfisc);
safe_delete(_plafond);
}
const TString& TDocumento::codiva_spese() const
@ -937,21 +938,14 @@ void TDocumento::update_esenzione()
{
if (clifor().use_lettere())
{
bool to_update = false;
const TString4 codiva = codesiva();
for (int i = physical_rows(); !to_update && i > 0; i--)
{
const TString & cod = row(i).get(RDOC_CODIVA);
to_update = cod.full() && cod != codiva;
}
if (to_update)
for (int i = physical_rows(); i > 0; i--)
for (int i = physical_rows(); i > 0; i--)
{
TRiga_documento & rdoc = row(i);
const TString& cod = rdoc.get(RDOC_CODIVA);
if (cod.full())
if (!rdoc.is_descrizione() && cod.blank())
{
if (codiva.full())
rdoc.put(RDOC_CODIVA, codiva);
@ -995,78 +989,71 @@ void TDocumento::update_esenzione()
}
}
}
}
}
}
}
void TDocumento::set_riga_esenzione()
{
TCli_for & c = clifor();
const TCodiceIVA codes(c.vendite().get(CFV_ASSFIS));
TString16 v_esenzione;
TString16 v_data_esenzione;
TString16 n_registrazione;
TString16 n_data_registrazione;
const bool multi_plaf = c.use_lettere() && get("PLAFOND").full(); // Gestione multiplafond su documento
if (codes.codice().full() && !multi_plaf)
{
TCli_for & c = clifor();
if (c.use_lettere())
{
get_protocolli_esenzione(v_esenzione, v_data_esenzione, n_registrazione, n_data_registrazione);
}
// Tradotto: se ha il cod. esenzione AND (i protocolli pieni OR multiplaf)
bool esente = codes.tipo().not_empty() && ((v_esenzione.not_empty() &&
v_data_esenzione.not_empty() && n_registrazione.not_empty() &&
n_data_registrazione.not_empty()) || multi_plaf);
if (esente)
{
esente = false;
const TString4 codiva = codes.codice();
for (int i = physical_rows(); !esente && i > 0; i--)
esente = row(i).get(RDOC_CODIVA) == codiva;
}
if (!esente)
{
if (_esenzione != NULL)
{
delete _esenzione;
_esenzione = NULL;
}
}
else
{
static TString4 _tipo_riga_es;
static TString80 _des_esenz;
static real _bollo_es;
if (_tipo_riga_es.empty())
{
TConfig conf(CONFIG_STUDIO, "ve");
_tipo_riga_es = conf.get("TRESENZ", "ve");
_bollo_es = (real)conf.get("BOLLIES", "ve");
if (_tipo_riga_es.empty())
{
_tipo_riga_es = "05";
conf.set("TRESENZ", _tipo_riga_es);
warning_box("Il tipo riga esenzione non risultava impostato.\n L'applicazione userà automaticamente il tipo %s", (const char*) _tipo_riga_es);
}
_des_esenz = conf.get("DESESENZ", "ve");
if (_des_esenz.not_empty())
_des_esenz.insert(" ");
_des_esenz.insert("Fattura non imponibile");
}
if (_esenzione == NULL)
_esenzione = new TRiga_documento(this, _tipo_riga_es);
TString d = _des_esenz;
TToken_string le_plafs(get("PLAFOND"), ',');
d << (multi_plaf ? " come dalle vostre dichiarazioni:\n" : " come da vostra dichiarazione:\n");
for(int i = 0; i < le_plafs.items(); i++)
const TCodiceIVA codes(c.vendite().get(CFV_ASSFIS));
bool esente = false;
if (codes.tipo().not_empty() || iva_plafond().not_empty())
for (int i = physical_rows(); !esente && i > 0; i--)
esente = check_iva_plafond(row(i).get(RDOC_CODIVA));
if (!esente)
safe_delete(_esenzione);
else
{
static TToken_string this_plaf; this_plaf.cut(0) << le_plafs.get(i);
static TString key; key.cut(0) << this_plaf.get(0) << "|" << this_plaf.get(1);
TRectype plaf = cache().get(LF_LETINT, key);
d << "N. di protocollo di invio: " << plaf.get(LETINT_PROTINTF) << "-" << plaf.get(LETINT_PROTINTS) << " del " << plaf.get(LETINT_VSDATA) << "\n";
static TString4 _tipo_riga_es;
static TString80 _des_esenz;
static real _bollo_es;
if (_tipo_riga_es.empty())
{
TConfig conf(CONFIG_STUDIO, "ve");
_tipo_riga_es = conf.get("TRESENZ", "ve");
_bollo_es = (real)conf.get("BOLLIES", "ve");
if (_tipo_riga_es.empty())
{
_tipo_riga_es = "05";
conf.set("TRESENZ", _tipo_riga_es);
warning_box("Il tipo riga esenzione non risultava impostato.\n L'applicazione userà automaticamente il tipo %s", (const char*)_tipo_riga_es);
}
_des_esenz = conf.get("DESESENZ", "ve");
if (_des_esenz.not_empty())
_des_esenz.insert(" ");
_des_esenz.insert("Fattura non imponibile");
}
if (_esenzione == NULL)
_esenzione = new TRiga_documento(this, _tipo_riga_es);
TString d = _des_esenz;
TToken_string plafs(get(DOC_PLAFOND), ',');
const int items = plafs.items();
d << (items > 1 ? TR("come dalle vostre dichiarazioni:\n") : TR(" come da vostra dichiarazione:\n"));
for (int i = 0; i < items; i++)
{
TToken_string plaf(plafs.get(i));
real utilizzo = plaf.get_real(_plimporto);
if (utilizzo != ZERO)
{
TToken_string key(plaf.get(_planno)); key.add(plaf.get(_plnumprot));
const TRectype & rec_plaf = cache().get(LF_LETINT, key);
d << TR("N. di protocollo di invio: ") << rec_plaf.get(LETINT_PROTINTF) << TR("-") << rec_plaf.get(LETINT_PROTINTS) << " del " << rec_plaf.get(LETINT_VSDATA) << "\n";
}
}
_esenzione->set_descr(d);
}
_esenzione->set_descr(d);
}
}
}
void TDocumento::set_riga_valfisc()
@ -1553,16 +1540,7 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
if (!dcons.ok())
r.put(RDOC_DATACONS, datacons);
}
/* dal 27-9-2013 considero singolarmente i campi di analitica replicati sulle righe
if (r.get(RDOC_CODCMS).blank() && r.get(RDOC_FASCMS).blank() && r.get(RDOC_CODCOSTO).blank())
{
r.put(RDOC_CODCMS, codcms);
r.put(RDOC_FASCMS, fascms);
r.put(RDOC_CODCOSTO, codcos);
}
*/
if (r.get(RDOC_CODCMS).blank()) r.put(RDOC_CODCMS, codcms);
if (r.get(RDOC_CODCMS).blank()) r.put(RDOC_CODCMS, codcms);
if (r.get(RDOC_FASCMS).blank()) r.put(RDOC_FASCMS, fascms);
if (r.get(RDOC_CODCOSTO).blank()) r.put(RDOC_CODCOSTO, codcos);
}
@ -1570,7 +1548,10 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
((TDocumento *)this)->put(DOC_DOCEVASO, docevaso); // Tutte le righe evase -> doc evaso
} // Almeno una riga aperta -> doc aperto
err = TMultiple_rectype::write_rewrite(f, re);
// Aggiunte per il controllo plafond
((TDocumento &)*this).plafond().write_rewrite((TDocumento &)*this, re);
err = TMultiple_rectype::write_rewrite(f, re);
if (!doc_bloccato && err == NOERR)
{
@ -1673,6 +1654,7 @@ int TDocumento::remove(TBaseisamfile& f) const
TDocumento& myself = *((TDocumento *)this);
myself.update_provvigioni(true);
}
((TDocumento &)*this).plafond().remove((TDocumento &)*this);
}
return TMultiple_rectype::remove(f);
}
@ -2677,21 +2659,25 @@ void TDocumento::put_str(const char* fieldname, const char* val)
}
else
dirty_fields();
} else
if (fn == DOC_CODCF)
{
const TString8 v(val);
put(DOC_SPESEUPD, TRectype::get(DOC_CODCF) == v);
TAuto_variable_rectype::put_str(fieldname, v);
dirty_fields();
}
else
{
TAuto_variable_rectype::put_str(fieldname, val);
dirty_fields();
if (fn == DOC_SCONTOPERC)
set_riga_sconto();
}
else
if (fn == DOC_CODCF)
{
put(DOC_SPESEUPD, TRectype::get(DOC_CODCF) == val);
TAuto_variable_rectype::put_str(fieldname, val);
dirty_fields();
plafond();
}
else
{
TAuto_variable_rectype::put_str(fieldname, val);
dirty_fields();
if (fn == DOC_SCONTOPERC)
set_riga_sconto();
else
if (fn == DOC_DATADOC)
plafond();
}
}
const TString& TDocumento::get_str(const char* fieldname) const
@ -2720,6 +2706,55 @@ TCli_for& TDocumento::clifor(bool force_reload) const
return cf;
}
const real TDocumento::importo_plafond() const
{
real importo_plafond;
FOR_EACH_PHYSICAL_RDOC(*this, r, row)
// Se l'iva del documento è diversa non mi interessa
if (!row->is_descrizione() && !row->is_descrizione())
{
const TString & codiva = row->iva().codice();
if (codiva.full() && check_iva_plafond(codiva))
importo_plafond += row->imponibile();
}
if (is_nota_credito())
importo_plafond = -importo_plafond;
return importo_plafond;
}
const real TDocumento::importo_plafond_salvato() const
{
real importo_plafond;
TToken_string plafs(get(DOC_PLAFOND), ',');
const int items = plafs.items();
for (int i = 0; i < items; i++)
{
TToken_string plaf(plafs.get(i));
importo_plafond += plaf.get_real(_plimporto);
}
return importo_plafond;
}
TLi_manager & TDocumento::plafond(bool force_reload)
{
const char tipo = tipocf();
const long codice = codcf();
const TDate data = get_date(DOC_DATADOC);
const int anno = data.year();
if (_plafond == nullptr)
_plafond = new TLi_manager(tipo, codice, anno);
else
if (force_reload || _plafond->tipo() != tipo || _plafond->codice() != codice ||
anno != _plafond->anno())
_plafond->read(tipo, codice, anno);
return *_plafond;
}
TOccasionale& TDocumento::occas() const
{
const TString16 occ_code = cod_occas(); // Codice occasionale in testata

View File

@ -436,16 +436,17 @@ bool TFatturazione_bolle::elabora(TLista_documenti& doc_in, TLista_documenti& do
if (oname == RDOC_CODIVA)
{
const TString4 codesiva = campione.codesiva();
FOR_EACH_PHYSICAL_RDOC(campione, i, rdoc)
{
// Elabora solo righe articolo, spese o prestazioni valide
if (!rdoc->is_descrizione())
if (!rdoc->is_descrizione() && rdoc->get(RDOC_CODIVA).blank())
{
if (codesiva.full())
{
if (rdoc->imponibile().is_zero())
/* if (rdoc->imponibile().is_zero())
rdoc->zero(RDOC_CODIVA);
else
else */
rdoc->put(RDOC_CODIVA, codesiva);
}
else
@ -552,7 +553,7 @@ bool TFatturazione_bolle::elabora(TLista_documenti& doc_in, TLista_documenti& do
// Aggiungilo alla lista dei documenti in uscita
od = doc_out.add(new_doc);
new_doc->put("FATID", od + 1);
new_doc->put(DOC_FATID, od + 1);
}
if (change_clifo())
@ -634,13 +635,13 @@ bool TFatturazione_bolle::elabora(TLista_documenti& doc_in, TLista_documenti& do
docrefs.destroy(i);
}
else
d.put("FATID", 0);
d.put(DOC_FATID, 0);
}
for (int i = doc_out.items() - 1; i >= 0; i--) // Aggiorna esenzione
{
TDocumento& d = doc_out[i];
d.update_esenzione();
}
}
return doc_out.items() > 0;
}

View File

@ -6,7 +6,6 @@
#include "../ca/movana.h"
#include "../ca/rmovana.h"
#include "../ca/rrip.h"
#include "../cg/cg2101.h"
#include "../cg/cglib.h"
#include "../mg/anamag.h"

View File

@ -2036,23 +2036,6 @@ bool codartmag_handler( TMask_field& f, KEY key )
{
TMask & m = f.mask();
/* Modo vecchio con funzionamento dubbiamente legato a !mask.is_running
TSheet_field& s = *m.get_sheet();
TDocumento_mask& mask= (TDocumento_mask&)s.mask();
bool to_check = key == K_TAB && f.focusdirty();
if (!to_check)
to_check = !mask.is_running();
if (to_check)
{
const bool artmag = !f.empty() && TRiga_documento::tipo(m.get(FR_TIPORIGA)).is_merce();
m.show(FR_UMQTA, artmag);
m.show(FR_UMQTA2, !artmag);
mask.update_giacenza();
}
*/
if (key == K_TAB)
{
// const bool artmag = !f.empty() && TRiga_documento::tipo(m.get(FR_TIPORIGA)).is_merce();
@ -2068,7 +2051,6 @@ bool codartmag_handler( TMask_field& f, KEY key )
mask.update_giacenza();
}
}
return true;
}

Some files were not shown because too many files have changed in this diff Show More