Revert "Patch level : 12.0 nopatch"
This reverts commit 1ad8ac1a4a80635dc83461232aed59a76f5172c8.
This commit is contained in:
parent
1ad8ac1a4a
commit
9770d9ee6b
@ -156,7 +156,8 @@
|
||||
<OutputFile>$(IntDir)$(TargetName).xml</OutputFile>
|
||||
</Xdcmake>
|
||||
<PostBuildEvent>
|
||||
<Command>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool.exe" sign /a /s MY /n "Sirio Informatica e Sistemi SPA" /t http://timestamp.verisign.com/scripts/timstamp.dll /v "$(TargetPath)"</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@ -13,15 +13,15 @@
|
||||
<Filter Include="Menu">
|
||||
<UniqueIdentifier>{022385bd-474b-4d1f-a01c-6d799bae0328}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sources">
|
||||
<UniqueIdentifier>{06bc8aeb-f506-4c2e-85fb-bdeb92f2c77e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SQL">
|
||||
<UniqueIdentifier>{28870b23-e896-4312-855b-049305092f1d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Recdesc">
|
||||
<UniqueIdentifier>{95c95f84-ca93-4c2f-b1cf-e94922dfa7ef}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Src">
|
||||
<UniqueIdentifier>{06bc8aeb-f506-4c2e-85fb-bdeb92f2c77e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\f9\f90.h">
|
||||
@ -57,19 +57,19 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\f9\f90.cpp">
|
||||
<Filter>Src</Filter>
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\f9\f90100.cpp">
|
||||
<Filter>Src</Filter>
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\f9\f90200.cpp">
|
||||
<Filter>Src</Filter>
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\f9\f90300.cpp">
|
||||
<Filter>Src</Filter>
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\f9\f90400.cpp">
|
||||
<Filter>Src</Filter>
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -1,11 +1,9 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1169
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastrip", "fastrip.vcxproj", "{68251613-3B9A-4F87-9F40-827C46267ADE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "patchdef", "patchdef.vcxproj", "{2DCB2E4A-EFB6-4561-8D87-C5ADBDB76533}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "patchdef", "patchdef.vcxproj", "{F0F108C3-BE88-4AB4-995A-3A921586A7A6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -17,15 +15,12 @@ Global
|
||||
{68251613-3B9A-4F87-9F40-827C46267ADE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{68251613-3B9A-4F87-9F40-827C46267ADE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{68251613-3B9A-4F87-9F40-827C46267ADE}.Release|Win32.Build.0 = Release|Win32
|
||||
{2DCB2E4A-EFB6-4561-8D87-C5ADBDB76533}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2DCB2E4A-EFB6-4561-8D87-C5ADBDB76533}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2DCB2E4A-EFB6-4561-8D87-C5ADBDB76533}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2DCB2E4A-EFB6-4561-8D87-C5ADBDB76533}.Release|Win32.Build.0 = Release|Win32
|
||||
{F0F108C3-BE88-4AB4-995A-3A921586A7A6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F0F108C3-BE88-4AB4-995A-3A921586A7A6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F0F108C3-BE88-4AB4-995A-3A921586A7A6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F0F108C3-BE88-4AB4-995A-3A921586A7A6}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A31D73DA-2F36-4A6A-8CA0-91657BB33948}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -39,6 +39,12 @@
|
||||
<ClCompile Include="..\src\fe\felib.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib01.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\fp\fp0300.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
@ -54,8 +60,6 @@
|
||||
<ClCompile Include="..\src\fp\fp0600.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib01.cpp" />
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\fp\fp0.h">
|
||||
|
@ -70,7 +70,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<StringPooling>
|
||||
</StringPooling>
|
||||
<DisableSpecificWarnings>
|
||||
@ -178,9 +178,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="fplib.vcxproj">
|
||||
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
|
||||
</ProjectReference>
|
||||
@ -192,6 +189,8 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\cg\cglib01.cpp" />
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp" />
|
||||
<ClCompile Include="..\src\fp\fp1200.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</ExcludedFromBuild>
|
||||
|
@ -24,6 +24,12 @@
|
||||
<ClCompile Include="..\src\fp\fp1100.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib01.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\fp\fp1200.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
|
@ -177,7 +177,6 @@
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\li\li0300.cpp" />
|
||||
<ClCompile Include="..\src\li\li0700.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MskCompiler Include="..\src\li\li0100a.uml" />
|
||||
@ -188,7 +187,6 @@
|
||||
<MskCompiler Include="..\src\li\li0600a.uml" />
|
||||
<MskCompiler Include="..\src\li\li0600b.uml" />
|
||||
<MskCompiler Include="..\src\li\li0300a.uml" />
|
||||
<MskCompiler Include="..\src\li\li0700a.uml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\li\letint.h" />
|
||||
@ -201,7 +199,6 @@
|
||||
<ClInclude Include="..\src\li\li0600a.h" />
|
||||
<ClInclude Include="..\src\li\li0600b.h" />
|
||||
<ClInclude Include="..\src\li\li0300a.h" />
|
||||
<ClInclude Include="..\src\li\li0700a.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<TrrCompiler Include="..\src\li\f154.trr" />
|
||||
@ -239,9 +236,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lilib.vcxproj">
|
||||
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -55,9 +55,6 @@
|
||||
<ClCompile Include="..\src\li\li0100.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\li\li0700.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MskCompiler Include="..\src\li\li0400a.uml">
|
||||
@ -84,9 +81,6 @@
|
||||
<MskCompiler Include="..\src\li\li0200a.uml">
|
||||
<Filter>Masks</Filter>
|
||||
</MskCompiler>
|
||||
<MskCompiler Include="..\src\li\li0700a.uml">
|
||||
<Filter>Masks</Filter>
|
||||
</MskCompiler>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\li\letint.h">
|
||||
@ -119,9 +113,6 @@
|
||||
<ClInclude Include="..\src\li\li0100a.h">
|
||||
<Filter>Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\li\li0700a.h">
|
||||
<Filter>Headers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<TrrCompiler Include="..\src\li\f154.trr">
|
||||
|
15
build/lv.sln
15
build/lv.sln
@ -1,8 +1,6 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1169
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lv0", "lv0.vcxproj", "{2DB7F8EF-BABB-4A27-BC7D-8821B0D285C6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lv2", "lv2.vcxproj", "{8F2CFD2E-BDE5-44CC-B27D-BCEC31F5E55D}"
|
||||
@ -23,8 +21,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedoc", "vedoc.vcxproj", "{
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedocext", "vedocext.vcxproj", "{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cglib", "cglib.vcxproj", "{7B80F974-CE2E-4BD9-855A-44FF139FF288}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -71,15 +67,8 @@ Global
|
||||
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.Build.0 = Release|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {483BBFE6-95C6-4A0D-8547-A56B2ACBFE7F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -120,6 +120,7 @@
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
@ -451,9 +452,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="vedoc.vcxproj">
|
||||
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -122,6 +122,7 @@
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
@ -219,9 +220,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="vedoc.vcxproj">
|
||||
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -119,6 +119,7 @@
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
@ -247,9 +248,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="vedoc.vcxproj">
|
||||
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -120,6 +120,7 @@
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
@ -228,9 +229,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="vedoc.vcxproj">
|
||||
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -123,6 +123,7 @@
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
@ -229,9 +230,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="vedoc.vcxproj">
|
||||
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -43,11 +43,11 @@
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\exed\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -44,11 +44,11 @@
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\exed\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -148,12 +148,6 @@
|
||||
<SrcReleaseCompiler Include="..\src\lv\lvbolacr.src" />
|
||||
<SrcReleaseCompiler Include="..\src\lv\lvbollac.src" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbolaca.src" />
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbolacp.src" />
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbolacr.src" />
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbollac.src" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="CampoRules.targets" />
|
||||
|
@ -7,17 +7,17 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbolaca.src">
|
||||
<SrcReleaseCompiler Include="..\lv\lvbolaca.src">
|
||||
<Filter>Sources</Filter>
|
||||
</SrcSimpleCompiler>
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbolacp.src">
|
||||
</SrcReleaseCompiler>
|
||||
<SrcReleaseCompiler Include="..\lv\lvbolacp.src">
|
||||
<Filter>Sources</Filter>
|
||||
</SrcSimpleCompiler>
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbolacr.src">
|
||||
</SrcReleaseCompiler>
|
||||
<SrcReleaseCompiler Include="..\lv\lvbolacr.src">
|
||||
<Filter>Sources</Filter>
|
||||
</SrcSimpleCompiler>
|
||||
<SrcSimpleCompiler Include="..\src\lv\lvbollac.src">
|
||||
</SrcReleaseCompiler>
|
||||
<SrcReleaseCompiler Include="..\lv\lvbollac.src">
|
||||
<Filter>Sources</Filter>
|
||||
</SrcSimpleCompiler>
|
||||
</SrcReleaseCompiler>
|
||||
</ItemGroup>
|
||||
</Project>
|
15
build/np.sln
15
build/np.sln
@ -1,14 +1,10 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1169
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "np0", "np0.vcxproj", "{3D726EFE-764B-4B24-A4ED-DCD41B9BB386}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cglib", "cglib.vcxproj", "{7B80F974-CE2E-4BD9-855A-44FF139FF288}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -23,15 +19,8 @@ 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
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {2059D4F2-C03A-44B1-B57D-CC2F215AA63A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -123,6 +123,7 @@
|
||||
<AssemblerListingLocation>.\../debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\../debug/</ProgramDataBaseFileName>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
@ -213,6 +214,8 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cg2101.cpp" />
|
||||
<ClCompile Include="..\src\cg\cg2103.cpp" />
|
||||
<ClCompile Include="..\src\cg\cg3100.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@ -226,7 +229,11 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cg3601.cpp" />
|
||||
<ClCompile Include="..\src\cg\cglib01.cpp" />
|
||||
<ClCompile Include="..\src\cg\cglib02.cpp" />
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp" />
|
||||
<ClCompile Include="..\src\cg\cgsalda3.cpp" />
|
||||
<ClCompile Include="..\src\cg\cgsaldac.cpp" />
|
||||
<ClCompile Include="..\src\np\np0.cpp" />
|
||||
<ClCompile Include="..\src\np\np0100.cpp" />
|
||||
<ClCompile Include="..\src\np\np0200.cpp" />
|
||||
@ -242,9 +249,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -104,6 +104,21 @@
|
||||
<ClCompile Include="..\src\np\np0200.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib01.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib02.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cg2101.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cg2103.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\np\np0300.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -128,6 +143,9 @@
|
||||
<ClCompile Include="..\src\cg\cg3100.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cgsaldac.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cg3601.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
15
build/pa.sln
15
build/pa.sln
@ -1,8 +1,6 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1169
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pa0", "pa0.vcxproj", "{9C91BACF-9A70-4973-B8CC-FA3D2AF9867C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}"
|
||||
@ -11,8 +9,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedoc", "vedoc.vcxproj", "{
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedocext", "vedocext.vcxproj", "{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cglib", "cglib.vcxproj", "{7B80F974-CE2E-4BD9-855A-44FF139FF288}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -35,15 +31,8 @@ Global
|
||||
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.Build.0 = Release|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {69D00821-F954-46BE-90AE-936C60E6BB70}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -68,6 +68,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;WIN32;__LONGDOUBLE__;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
@ -190,9 +191,6 @@
|
||||
<ProjectReference Include="AgaLib.vcxproj">
|
||||
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="cglib.vcxproj">
|
||||
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="vedoc.vcxproj">
|
||||
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -167,7 +167,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\ve\ve0.h" />
|
||||
<ClInclude Include="..\src\ve\veuml.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -11,9 +11,6 @@
|
||||
<Filter Include="Src">
|
||||
<UniqueIdentifier>{4d816024-06a3-4d7c-963b-7dd4af001f48}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Headers">
|
||||
<UniqueIdentifier>{eac085d5-88d2-4aeb-8abb-48e2d4128862}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SrcCompiler Include="..\src\ve\bollac.src">
|
||||
@ -50,11 +47,8 @@
|
||||
</SrcCompiler>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\ve\veuml.h">
|
||||
<Filter>Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\ve\ve0.h">
|
||||
<Filter>Headers</Filter>
|
||||
<Filter>Sources</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -39,7 +39,7 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exed\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir>
|
||||
|
@ -158,6 +158,13 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cg2101.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib02.cpp" />
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp" />
|
||||
<ClCompile Include="..\src\cg\cgsaldac.cpp" />
|
||||
<ClCompile Include="..\src\gv\gvlib.cpp" />
|
||||
<ClCompile Include="..\src\ve\ve8.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
@ -19,6 +19,15 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\cg\cg2101.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib02.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cglib03.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ve\ve8.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
@ -34,6 +43,9 @@
|
||||
<ClCompile Include="..\src\gv\gvlib.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cg\cgsaldac.cpp">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MskCompiler Include="..\src\ve\ve8100.uml">
|
||||
|
@ -298,12 +298,6 @@
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">msk232 %(FullPath) $(TargetDir)%(Filename).msk</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)%(Filename).msk;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\src\ve\verig16.uml">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">msk232 %(FullPath) $(TargetDir)%(Filename).msk</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)%(Filename).msk;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling line mask %(FullPath)...</Message>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<IniCompiler Include="..\src\ve\verig01.ini" />
|
||||
@ -320,11 +314,9 @@
|
||||
<IniCompiler Include="..\src\ve\verig13.ini" />
|
||||
<IniCompiler Include="..\src\ve\verig14.ini" />
|
||||
<IniCompiler Include="..\src\ve\verig15.ini" />
|
||||
<IniCompiler Include="..\src\ve\verig16.ini" />
|
||||
<IniCompiler Include="..\src\ve\verig23.ini" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\ve\verig.h" />
|
||||
<ClInclude Include="..\src\ve\verigdef.h" />
|
||||
<ClInclude Include="..\src\ve\veuml.h" />
|
||||
</ItemGroup>
|
||||
|
@ -64,9 +64,6 @@
|
||||
<IniCompiler Include="..\src\ve\verig02.ini">
|
||||
<Filter>Ini</Filter>
|
||||
</IniCompiler>
|
||||
<IniCompiler Include="..\src\ve\verig16.ini">
|
||||
<Filter>Ini</Filter>
|
||||
</IniCompiler>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\src\ve\verig00.uml">
|
||||
@ -117,9 +114,6 @@
|
||||
<CustomBuild Include="..\src\ve\verig23.uml">
|
||||
<Filter>Mask</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\src\ve\verig16.uml">
|
||||
<Filter>Mask</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MskCompiler Include="..\src\ve\verig.uml">
|
||||
@ -133,9 +127,6 @@
|
||||
<ClInclude Include="..\src\ve\veuml.h">
|
||||
<Filter>Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\ve\verig.h">
|
||||
<Filter>Headers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<TxtCompiler Include="..\src\ve\vetabcom.txt">
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#include <applicat.h>
|
||||
#include <dongle.h>
|
||||
#include <relapp.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <reputils.h>
|
||||
@ -79,8 +78,6 @@ protected:
|
||||
void repair_file(int i);
|
||||
void save_file(const char * file);
|
||||
|
||||
virtual void show_log();
|
||||
|
||||
void open_log();
|
||||
void write_log(const char* line, const int severity = 0);
|
||||
void close_log();
|
||||
@ -387,24 +384,6 @@ bool TManutenzione_app::destroy()
|
||||
return TApplication::destroy();
|
||||
}
|
||||
|
||||
void TManutenzione_app::show_log()
|
||||
{
|
||||
if (db_log())
|
||||
{
|
||||
if (admin())
|
||||
{
|
||||
TLog_mask m;
|
||||
|
||||
m.run();
|
||||
}
|
||||
else
|
||||
message_box(TR("Il log delle transazioni è visualizzabile dall'amministratore"));
|
||||
}
|
||||
else
|
||||
message_box(TR("Il log delle transazioni è disattivato"));
|
||||
}
|
||||
|
||||
|
||||
void TManutenzione_app::open_log()
|
||||
{
|
||||
_print_log = false;
|
||||
|
@ -136,7 +136,7 @@ protected:
|
||||
bool dir_gen() const;
|
||||
bool trc_gen() const;
|
||||
bool export_manager(const TString generalErrors) const;
|
||||
bool show_export_log();
|
||||
bool show_log();
|
||||
void log(int severity, const char* msg);
|
||||
|
||||
public:
|
||||
@ -980,7 +980,7 @@ bool TMSSQLExport_app::export_manager(TString generalErrors) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TMSSQLExport_app::show_export_log()
|
||||
bool TMSSQLExport_app::show_log()
|
||||
{
|
||||
if (_log)
|
||||
{
|
||||
@ -1089,7 +1089,7 @@ void TMSSQLExport_app::main_loop()
|
||||
}
|
||||
message_box("Migrazione effettuata correttamente!");
|
||||
} while (loop);
|
||||
show_export_log();
|
||||
show_log();
|
||||
}
|
||||
else
|
||||
message_box("Fallita connessione");
|
||||
|
@ -492,6 +492,7 @@ void TSknet_sync::sync_anamag()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Controllo se esistono varianti e le aggiungo
|
||||
query.cut(0) << "SELECT * FROM tieArtVarianti where origine=" << their_origin() << " AND " << where_time_import() << ";";
|
||||
@ -636,11 +637,57 @@ void TSknet_sync::sync_anamag()
|
||||
if (!flag)
|
||||
flag = yesno_box("Attenzione trovato articolo con categoria CONAI vuota: %s\nSopprimere eventuali prossimi messaggi?", (const char*)codart);
|
||||
}
|
||||
/*
|
||||
|
||||
art.first(); // Useless??
|
||||
rart.zero();
|
||||
rart.put(ANAMAG_CODART, odbc.get("Cod_PK").as_string());
|
||||
if (odbc.get("Cod_PK").as_string().blank())
|
||||
continue;
|
||||
if (rart.read(art, _isequal) == NOERR)
|
||||
{
|
||||
static TString catCON;
|
||||
// Metodo del cazzo, format crasha e non ho tempo, magari in un futuro sistemarlo (se non ho visto male funziona solo su linux)
|
||||
TString a = odbc.get("CatAC").as_string().left(4); a.lpad(4);
|
||||
TString b = odbc.get("CatAL").as_string().left(4); b.lpad(4);
|
||||
TString c = odbc.get("CatCA").as_string().left(4); c.lpad(4);
|
||||
TString d = odbc.get("CatLE").as_string().left(4); d.lpad(4);
|
||||
TString e = odbc.get("CatPL").as_string().left(4); e.lpad(4);
|
||||
TString f = odbc.get("CatVE").as_string().left(4); f.lpad(4);
|
||||
catCON.cut(0) << a << b << c << d << e << f;
|
||||
|
||||
/ *
|
||||
catCON.format("%4 s%4 s%4 s%4 s%4 s%4 s",
|
||||
odbc.get("CatAC").as_string().left(4), // Categoria Acciaio
|
||||
odbc.get("CatAL").as_string().left(4), // Categoria Alluminio
|
||||
odbc.get("CatCA").as_string().left(4), // Categoria Carta
|
||||
odbc.get("CatLE").as_string().left(4), // Categoria Legno
|
||||
odbc.get("CatPL").as_string().left(4), // Categoria Plastica
|
||||
odbc.get("CatVE").as_string().left(4) // Categoria Vetro
|
||||
);
|
||||
* /
|
||||
|
||||
rart.put(ANAMAG_CONAISC, catCON);
|
||||
rart.put(ANAMAG_CONACC, odbc.get("PesoAC").as_real()); // Peso Acciaio
|
||||
rart.put(ANAMAG_CONALL, odbc.get("PesoAL").as_real()); // Peso Alluminio
|
||||
rart.put(ANAMAG_CONCAR, odbc.get("PesoCA").as_real()); // Peso Carta
|
||||
rart.put(ANAMAG_CONLEG, odbc.get("PesoLE").as_real()); // Peso Legno
|
||||
rart.put(ANAMAG_CONPLA, odbc.get("PesoPL").as_real()); // Peso Plastica
|
||||
rart.put(ANAMAG_CONVET, odbc.get("PesoVE").as_real()); // Peso Vetro
|
||||
art.rewrite(rart);
|
||||
}
|
||||
else
|
||||
// EROR! EROR!
|
||||
{
|
||||
bool tolla = true;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*static bool ClifoEvaluator(const TISAM_recordset& rec, const char* fldname, const char* expr, TVariant& var)
|
||||
static bool ClifoEvaluator(const TISAM_recordset& rec, const char* fldname, const char* expr, TVariant& var)
|
||||
{
|
||||
const TAnagrafica& a = _anagr.anag(rec);
|
||||
|
||||
@ -757,7 +804,7 @@ void TSknet_sync::sync_anamag()
|
||||
}
|
||||
|
||||
return false;
|
||||
} */
|
||||
}
|
||||
|
||||
const TString& TSknet_sync::comune(const TRecordset& recset, const char* fld_cap, const char* fld_den) const
|
||||
{
|
||||
@ -863,12 +910,12 @@ void TSknet_sync::load_clifo(const char tipocf)
|
||||
cfv.put(CFV_PADESTIN, odbc.get("CodDest").as_string());
|
||||
|
||||
const int tipo = odbc.get("Tipo").as_int(); // 1=Fisica; 2=Giuridica; 3=Altro
|
||||
|
||||
if (tipo == 1)
|
||||
{
|
||||
clifo.put(CLI_SESSO, odbc.get("Sesso").as_string());
|
||||
clifo.put(CLI_DATANASC, odbc.get("DTNascita").as_date());
|
||||
clifo.put(CLI_COMNASC, comune(odbc, "", "ComuneNascita"));(CLI_TIPOPERS, 'F');
|
||||
clifo.put(CLI_COMNASC, comune(odbc, "", "ComuneNascita"));
|
||||
clifo.put(CLI_TIPOPERS, 'F');
|
||||
}
|
||||
else
|
||||
clifo.put(CLI_TIPOPERS, 'G');
|
||||
@ -1328,7 +1375,54 @@ void TSknet_sync::sync_val()
|
||||
sync_table("%VAL", "tieValute", fields);
|
||||
}
|
||||
|
||||
|
||||
//auto find_codalt_sknet = [](TRectype& rcodcor, TLocalisamfile& codcor, const TString& tipocf, long codcf, const TString& codart, TString& codartmag, bool& checked)
|
||||
//{
|
||||
// // Testo quanti sono. Non ho altro modo?
|
||||
// const bool items = rcodcor.next(codcor) == NOERR && rcodcor.get(CODCORR_CODARTALT) == codart;
|
||||
// if (items)
|
||||
// {
|
||||
// rcodcor.prev(codcor);
|
||||
// // Prima cerco subito se ho un codice per questo cliente.
|
||||
// // Altrimenti prendo quello che non e' un codice di pack, se c'e' altrimenti riprendo sempre il primo.
|
||||
// TSQL_recordset codici(TString() << "SELECT * FROM CODCORR WHERE CODARTALT = '" << codart << "' AND TIPOCF = '" << tipocf << "' AND CODCF = '" << codcf << "'");
|
||||
// if (codici.items() == 1)
|
||||
// {
|
||||
// codartmag = codici.get(codici.find_column(CODCORR_CODART)).as_string();
|
||||
// checked = true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// TString last_cod = rcodcor.get(CODCORR_CODART);
|
||||
//
|
||||
// // Codice di PACK di cinque cifre.
|
||||
// static auto is_pack_code = [&]()
|
||||
// {
|
||||
// bool flag = last_cod.len() == 5;
|
||||
// for (int i = 0; i < 5 && flag; ++i) flag &= xvt_chr_is_digit(last_cod[i]);
|
||||
// return flag;
|
||||
// };
|
||||
//
|
||||
// checked = true; // Se va tutto bene ho il nuovo codartmag.
|
||||
// while (is_pack_code())
|
||||
// {
|
||||
// if (rcodcor.next(codcor) == NOERR && rcodcor.get(CODCORR_CODARTALT) == codart)
|
||||
// {
|
||||
// last_cod = rcodcor.get(CODCORR_CODART);
|
||||
// continue;
|
||||
// }
|
||||
// checked = false;
|
||||
// break;
|
||||
// }
|
||||
// if (checked)
|
||||
// {
|
||||
// if (rcodcor.next(codcor) != NOERR || rcodcor.get(CODCORR_CODARTALT) != codart) // Controllo che sia effettivamente l'unico altrimenenti ciaone.
|
||||
// codartmag = last_cod;
|
||||
// else
|
||||
// checked = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//};
|
||||
|
||||
void TSknet_sync::sync_doc()
|
||||
{
|
||||
|
@ -50,8 +50,11 @@ bool TRic_saldi_msk::on_field_event(TOperable_field& o, TField_event e, long jol
|
||||
|
||||
const long recset_items = recset.items();
|
||||
TProgind pi(recset_items, "Ricerca movimenti che interessano l'esercizio selezionato...", true, true);
|
||||
for (bool ok = recset.move_first(); pi.addstatus(1) && ok; ok = recset.move_next())
|
||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
|
||||
const TDate curr_date = recset.get(MOVANA_DATACOMP).as_date();
|
||||
const TDate fcomp_date = recset.get(MOVANA_DATAFCOMP).as_date();
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "cg0800a.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
BUTTON DLG_PRINT 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 "Stampa"
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
TPrimanota_application::TPrimanota_application()
|
||||
: _rel(nullptr), _mode(0), _iva(nessuna_iva), _causale(nullptr), _giornale(nullptr),
|
||||
_lastreg(0), _last_dreg(TODAY), _last_dcom(TODAY), _automatico(nullptr), _swap_mask(false), _is_set_fpcheck(false), _f1_ini(false), _f1_liq(false),
|
||||
_skip_giornale_check(false), _skip_bollato_check(false), _pro_mask(nullptr)
|
||||
_skip_giornale_check(false), _skip_bollato_check(false)
|
||||
{
|
||||
memset(_msk, 0, sizeof(_msk));
|
||||
}
|
||||
@ -697,7 +697,7 @@ void TPrimanota_application::init_mask(TMask& m)
|
||||
_sal_dirty = false; // Azzero il flag di modifica del saldaconto
|
||||
fill_sheet(m); // Riempe righe contabili coi conti della causale
|
||||
m.hide(F_LINKDOC);
|
||||
has_f1_db(m);
|
||||
set_has_f1_db(&m);
|
||||
}
|
||||
|
||||
void TPrimanota_application::init_query_mode(TMask& m)
|
||||
@ -736,7 +736,7 @@ void TPrimanota_application::init_query_mode(TMask& m)
|
||||
m.set(F_CODCAUS, ini.get(MOV_CODCAUS));
|
||||
m.send_key(K_SPACE, DLG_NEWREC);
|
||||
}
|
||||
has_f1_db(m);
|
||||
set_has_f1_db(&m);
|
||||
}
|
||||
|
||||
|
||||
@ -1491,14 +1491,18 @@ void TPrimanota_application::check_saldi()
|
||||
|
||||
void TPrimanota_application::write_fppro()
|
||||
{
|
||||
if (main_app().has_module(FPAUT) && !ini_get_bool(CONFIG_INSTALL, "Main", "SkipFPPRO"))
|
||||
#ifdef DBG
|
||||
if (!ini_get_bool(CONFIG_INSTALL, "Main", "SkipFPPRO"))
|
||||
{
|
||||
#endif
|
||||
// Controllo se la registrazione ha avuto effetto anche su FPPRO allora salvo riferimento sul mov
|
||||
if (save_fppro() > 0 && !save_dbmov())
|
||||
message_box(
|
||||
"ATTENZIONE: non e' stato possibile salvare i riferimenti del documento in ingresso per questo movimento.\n"
|
||||
"Movimento registrato senza collegamento ai documenti in ingresso.");
|
||||
#ifdef DBG
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool TPrimanota_application::has_tot_doc(TToken_string& fppro_keys)
|
||||
@ -1555,7 +1559,7 @@ void TPrimanota_application::set_movcoll(const long movcoll, const long numreg)
|
||||
}
|
||||
int TPrimanota_application::controlli_f1(const TMask& m)
|
||||
{
|
||||
if (iva_mask(m) && m.get(F_PROKEY).full() && has_f1_db(m) && fp_db().sq_is_connect() && check_causale(m.get(F_CODCAUS)))
|
||||
if (m.find_by_id(F_PROKEY) != nullptr && m.get(F_PROKEY).full() && has_f1_db((TMask*)&m) && fp_db().sq_is_connect() && check_causale(m.get(F_CODCAUS)))
|
||||
{
|
||||
TToken_string keys(m.get(F_PROKEY), ';');
|
||||
const TDate dataoraric = fppro_db().set_keys(keys).get_dataorarioric();
|
||||
@ -1783,7 +1787,7 @@ void TPrimanota_application::clean_fppro()
|
||||
|
||||
// Controlli: solo in mod modifica; che abbia fp-f1 (no F8); che non sono in salvataggio
|
||||
if (_mode != MODE_MOD
|
||||
|| !has_f1_db(msk)
|
||||
|| !has_f1_db(&msk)
|
||||
|| last_key != K_DEL && last_key != K_SAVE && last_key != K_ELIMMAS && last_key != K_QUIT && !scollega())
|
||||
return;
|
||||
|
||||
@ -1798,17 +1802,27 @@ void TPrimanota_application::clean_fppro()
|
||||
fp_db().sq_commit();
|
||||
}
|
||||
|
||||
bool TPrimanota_application::has_f1() const
|
||||
void TPrimanota_application::set_has_f1_db(TMask* m)
|
||||
{
|
||||
return has_module(F1AUT) && get_db_indirizzo().full();
|
||||
if (m->find_by_id(F_DATAREG) != nullptr && !m->get(F_DATAREG).empty())
|
||||
{
|
||||
if (TDate(m->get(F_DATAREG)) >= TDate(get_data_start_fatt()))
|
||||
_isf1 = has_module(F1AUT) && !get_db_indirizzo().empty();
|
||||
else
|
||||
_isf1 = false;
|
||||
_is_set_fpcheck = true;
|
||||
}
|
||||
else if (!_is_set_fpcheck)
|
||||
{
|
||||
_isf1 = false;
|
||||
_is_set_fpcheck = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool TPrimanota_application::has_f1_db(const TMask & m)
|
||||
bool TPrimanota_application::has_f1_db(TMask* m)
|
||||
{
|
||||
const TDate datareg = m.get_date(F_DATAREG);
|
||||
|
||||
_is_set_fpcheck = true;
|
||||
return datareg.ok() && (datareg >= get_data_start_fatt()) && has_f1();
|
||||
set_has_f1_db(m);
|
||||
return _isf1;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::remove()
|
||||
@ -2657,7 +2671,7 @@ int TPrimanota_application::save_fppro()
|
||||
TMask& msk = curr_mask();
|
||||
|
||||
// Provo a vedere se hanno l'FP: se c'è l'indirizzo controllo che non sia F8 se non c'è non hanno l'FP
|
||||
if (!has_f1_db(msk))
|
||||
if (!has_f1_db(&msk))
|
||||
return pro_nofp;
|
||||
|
||||
// Anzitutto guardo la modalita' in cui sono
|
||||
@ -2722,7 +2736,7 @@ int TPrimanota_application::save_fppro()
|
||||
items = fp_db().sq_items();
|
||||
}
|
||||
|
||||
if(has_f1_db(msk) && items != 1)
|
||||
if(has_f1_db(&msk) && items != 1)
|
||||
{
|
||||
const bool forza = noyes_box("Attenzione, al movimento non e' stato abbinato nessun documento elettronico.\n"
|
||||
"Per consentire una corretta archiviazione sostitutiva si consiglia di provvedere al controllo della registrazione e di procedere\n"
|
||||
|
@ -13,14 +13,12 @@ BEGIN
|
||||
PROMPT 2 1 "Contabilizzaz."
|
||||
PICTURE TOOL_EXPORT
|
||||
MODULE F1
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
BUTTON DLG_LINK 2 2
|
||||
BEGIN
|
||||
PROMPT 3 1 "Collega in Prima nota"
|
||||
PICTURE TOOL_LINK
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 2 2
|
||||
|
@ -1451,7 +1451,7 @@ real TPrimanota_application::calcola_imp() const
|
||||
FOR_EACH_ARRAY_ROW(rows, r, row) if (!row->empty_items())
|
||||
{
|
||||
imponibili += row->get_real(cid2index(IVA_IMPONIBILE));
|
||||
if (_causale->reg().tipo_registro() != acquisto || !row->get_bool(cid2index(IVA_REVCHARGE)))
|
||||
if (!row->get_bool(cid2index(IVA_REVCHARGE)))
|
||||
imposte += row->get(cid2index(IVA_IMPOSTA));
|
||||
}
|
||||
|
||||
@ -3891,10 +3891,10 @@ bool TPrimanota_application::quadratura_handler(TMask_field& f, KEY key)
|
||||
return true;
|
||||
}
|
||||
|
||||
void TPrimanota_application::write_righe_iva_f1(TMask& cg_msk, const TPro_msk & msk)
|
||||
void TPrimanota_application::write_righe_iva_f1(TMask& cg_msk, const shared_ptr<TPro_msk>& msk)
|
||||
{
|
||||
TSheet_field& sf = cg_msk.sfield(F_SHEETIVA);
|
||||
const vector<TPro_msk::riga_iva_s>& righe = msk.get_righeiva();
|
||||
const vector<TPro_msk::riga_iva_s>& righe = msk->get_righeiva();
|
||||
int i = 0;
|
||||
|
||||
for (auto it = righe.begin(); it != righe.end(); ++it)
|
||||
@ -3913,11 +3913,11 @@ void TPrimanota_application::write_righe_iva_f1(TMask& cg_msk, const TPro_msk &
|
||||
}
|
||||
}
|
||||
}
|
||||
bool TPrimanota_application::write_scad_f1(const TMask& cg_msk, const TPro_msk & msk)
|
||||
bool TPrimanota_application::write_scad_f1(const TMask& cg_msk, const shared_ptr<TPro_msk>& msk)
|
||||
{
|
||||
TSheet_field& sf = cg_msk.sfield(FS_RATESHEET);
|
||||
const int items = sf.items();
|
||||
const vector<TPro_msk::scadenza_s>& righe = msk.get_scadenze();
|
||||
const vector<TPro_msk::scadenza_s>& righe = msk->get_scadenze();
|
||||
int i = 0;
|
||||
|
||||
for (auto it = righe.begin(); it != righe.end(); ++it, ++i)
|
||||
@ -3934,28 +3934,28 @@ bool TPrimanota_application::write_scad_f1(const TMask& cg_msk, const TPro_msk &
|
||||
return !righe.empty();
|
||||
}
|
||||
|
||||
void TPrimanota_application::write_clifo(TMask& cg_msk, const TPro_msk & msk)
|
||||
void TPrimanota_application::write_clifo(TMask& cg_msk, const shared_ptr<TPro_msk>& msk)
|
||||
{
|
||||
bool ok = false;
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
TToken_string keys(msk.get_fpprokeys(), ';');
|
||||
TToken_string keys(msk->get_fpprokeys(), ';');
|
||||
TString codforn = TFppro(keys).get_codforn();
|
||||
|
||||
if (codforn.empty())
|
||||
codforn = msk.get_codforn();
|
||||
codforn = msk->get_codforn();
|
||||
if (codforn.empty())
|
||||
{
|
||||
clifo.setkey(5);
|
||||
clifo.put(CLI_TIPOCF, "F");
|
||||
clifo.put(CLI_PAIV, msk.get_piva());
|
||||
clifo.put(CLI_PAIV, msk->get_piva());
|
||||
clifo.read();
|
||||
ok = clifo.get(CLI_PAIV) == msk.get_piva();
|
||||
ok = clifo.get(CLI_PAIV) == msk->get_piva();
|
||||
if(!ok)
|
||||
{
|
||||
clifo.zero();
|
||||
clifo.setkey(5);
|
||||
clifo.put(CLI_TIPOCF, "F");
|
||||
clifo.put(CLI_PAIV, msk.get_piva());
|
||||
clifo.put(CLI_PAIV, msk->get_piva());
|
||||
clifo.put(CLI_STATOPAIV, "IT");
|
||||
clifo.read();
|
||||
}
|
||||
@ -3967,7 +3967,7 @@ void TPrimanota_application::write_clifo(TMask& cg_msk, const TPro_msk & msk)
|
||||
clifo.put(CLI_CODCF, codforn);
|
||||
clifo.read();
|
||||
}
|
||||
ok = clifo.get(CLI_PAIV) == msk.get_piva();
|
||||
ok = clifo.get(CLI_PAIV) == msk->get_piva();
|
||||
if (ok && (cg_msk.get(F_CODCLIFOR).empty() || cg_msk.get(F_CODCLIFOR) != codforn))
|
||||
{
|
||||
cg_msk.set(F_CODCLIFOR, clifo.get(CLI_CODCF));
|
||||
@ -3982,14 +3982,14 @@ void TPrimanota_application::write_clifo(TMask& cg_msk, const TPro_msk & msk)
|
||||
}
|
||||
}
|
||||
|
||||
void TPrimanota_application::set_totale(TMask& cg_msk, TPro_msk & msk)
|
||||
void TPrimanota_application::set_totale(TMask& cg_msk, const shared_ptr<TPro_msk>& msk)
|
||||
{
|
||||
real totale = msk.get_totdoc();
|
||||
real totale = msk->get_totdoc();
|
||||
|
||||
if(totale == ZERO)
|
||||
totale = app().calcola_imp();
|
||||
|
||||
const real rit = msk.get_ritenute();
|
||||
const real rit = msk->get_ritenute();
|
||||
|
||||
if (rit != ZERO)
|
||||
{
|
||||
@ -3997,18 +3997,18 @@ void TPrimanota_application::set_totale(TMask& cg_msk, TPro_msk & msk)
|
||||
cg_msk.set(F_RITFIS, rit);
|
||||
app().add_cgs_ritenute(cgrowtype_ritfis);
|
||||
}
|
||||
else if (msk.is_doc_split())
|
||||
totale = msk.get_tot_imp_riva();
|
||||
else if (msk->is_doc_split())
|
||||
totale = msk->get_tot_imp_riva();
|
||||
cg_msk.set(F_TOTALE, totale);
|
||||
}
|
||||
|
||||
void TPrimanota_application::riporta_dati_f1(TMask& cg_msk, TPro_msk & msk)
|
||||
void TPrimanota_application::riporta_dati_f1(TMask& cg_msk, const shared_ptr<TPro_msk>& msk)
|
||||
{
|
||||
const bool bring = msk.should_bring_back();
|
||||
const bool bring = msk->should_bring_back();
|
||||
|
||||
if (bring)
|
||||
{
|
||||
if (msk.get_numdoc().full() && cg_msk.get(F_CODCLIFOR).empty())
|
||||
if (msk->get_numdoc().full() && cg_msk.get(F_CODCLIFOR).empty())
|
||||
write_clifo(cg_msk, msk);
|
||||
write_righe_iva_f1(cg_msk, msk);
|
||||
set_totale(cg_msk, msk);
|
||||
@ -4019,12 +4019,12 @@ void TPrimanota_application::riporta_dati_f1(TMask& cg_msk, TPro_msk & msk)
|
||||
// Li riporto anche con il collega in prima nota, e in quel caso solo se i campi non sono gia valorizzati
|
||||
if (bring || cg_msk.get(F_NUMDOC).empty())
|
||||
{
|
||||
cg_msk.set(F_NUMDOCEXT, msk.get_numdoc());
|
||||
cg_msk.set(F_NUMDOC, msk.get_numdoc().right(7));
|
||||
cg_msk.set(F_NUMDOCEXT, msk->get_numdoc());
|
||||
cg_msk.set(F_NUMDOC, msk->get_numdoc().right(7));
|
||||
}
|
||||
|
||||
if (bring || cg_msk.get(F_DATADOC).empty())
|
||||
cg_msk.set(F_DATADOC, msk.get_datadoc());
|
||||
cg_msk.set(F_DATADOC, msk->get_datadoc());
|
||||
}
|
||||
|
||||
void TPrimanota_application::insert_part_scad(TConfig& ini)
|
||||
@ -4080,10 +4080,9 @@ bool TPrimanota_application::fppro_mask(TMask_field& f, KEY key)
|
||||
if (!app().has_module(FPAUT) || key != K_SPACE && key != K_TAB || !check_causale(cg_msk.get(F_CODCAUS)))
|
||||
return true;
|
||||
|
||||
TPro_msk * msk = app()._pro_mask;
|
||||
|
||||
if (msk == nullptr)
|
||||
app()._pro_mask = msk = new TPro_msk(cg_msk);
|
||||
auto msk = std::make_shared<TPro_msk>(cg_msk);
|
||||
|
||||
app()._pro_mask = msk;
|
||||
|
||||
const TString datadoc = cg_msk.get(F_DATADOC);
|
||||
|
||||
@ -4093,13 +4092,16 @@ bool TPrimanota_application::fppro_mask(TMask_field& f, KEY key)
|
||||
msk->field(F_DATESEARCH).show();
|
||||
msk->set(F_DATESEARCH, datadoc);
|
||||
}
|
||||
msk->run();
|
||||
// Riporto dati FPPRO su maschera Prima Nota (solo se hai F1)
|
||||
// Se non hai F1 collego senza riportarti i dati (solo le chiavi db)
|
||||
riporta_dati_f1(cg_msk, *msk);
|
||||
cg_msk.set(F_PROKEY, msk->get_fpprokeys());
|
||||
is_collegato(cg_msk.field(F_COLFPPRO));
|
||||
cg_msk.set(F_ANNORIF, cg_msk.get(F_ANNOIVA));
|
||||
if (msk->load_fppro_mask(msk.get()))
|
||||
{
|
||||
msk->run();
|
||||
// Riporto dati FPPRO su maschera Prima Nota (solo se hai F1)
|
||||
// Se non hai F1 collego senza riportarti i dati (solo le chiavi db)
|
||||
riporta_dati_f1(cg_msk, msk);
|
||||
cg_msk.set(F_PROKEY, msk->get_fpprokeys());
|
||||
is_collegato(cg_msk.field(F_COLFPPRO));
|
||||
cg_msk.set(F_ANNORIF, cg_msk.get(F_ANNOIVA));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4148,40 +4150,42 @@ bool TPrimanota_application::is_collegato(TMask_field& f)
|
||||
return has_prokey;
|
||||
}
|
||||
|
||||
bool TPro_msk::load_fppro_mask(TMask & msk)
|
||||
bool TPro_msk::load_fppro_mask(TMask* msk, KEY k)
|
||||
{
|
||||
// Provo a vedere se hanno l'FP: se c'è l'indirizzo controllo che non sia F8 se non c'è non hanno l'FP
|
||||
if (k != 32)
|
||||
return false;
|
||||
if (!fp_db().sq_is_connect())
|
||||
{
|
||||
message_box("Attenzione connessione al database non riuscita.\nImpossibile collegarsi ai documenti in entrata.");
|
||||
return false;
|
||||
}
|
||||
|
||||
const int forn = msk.get_int(F_CODCLIFORS);
|
||||
const int forn = msk->get_int(F_CODCLIFORS);
|
||||
|
||||
if (forn == 0)
|
||||
{
|
||||
msk.set(F_ENABSEARCH, "X");
|
||||
abilita_piva();
|
||||
msk->set(F_ENABSEARCH, "X");
|
||||
abilita_piva(msk);
|
||||
//message_box("Inserire prima il fornitore");
|
||||
//return false;
|
||||
}
|
||||
|
||||
const TString& codfisc = msk.get(F_COFIS);
|
||||
const TString& stato_piva = msk.get(F_STATOPAIVS);
|
||||
const TString& piva = msk.get(F_PIVAS);
|
||||
const TString& codfisc = msk->get(F_COFIS);
|
||||
const TString& stato_piva = msk->get(F_STATOPAIVS);
|
||||
const TString& piva = msk->get(F_PIVAS);
|
||||
TString query;
|
||||
TString date = "";
|
||||
|
||||
if (msk.get_bool(F_ENABDATE))
|
||||
date = msk.get_date(F_DATESEARCH);
|
||||
if(!msk.get_bool(F_ENABSEARCH))
|
||||
query = query_fppro(msk.get(F_CODCLIFORS), date);
|
||||
if (msk->get_bool(F_ENABDATE))
|
||||
date = msk->get_date(F_DATESEARCH);
|
||||
if(!msk->get_bool(F_ENABSEARCH))
|
||||
query = query_fppro(msk->get(F_CODCLIFORS), date);
|
||||
else
|
||||
query = query_fppro(stato_piva, piva, date);
|
||||
fp_db().sq_set_exec(query, false);
|
||||
|
||||
TSheet_field& sf = msk.sfield(F_SHEETFPPROS);
|
||||
TSheet_field& sf = msk->sfield(F_SHEETFPPROS);
|
||||
|
||||
sf.hide();
|
||||
if (sf.items() > 0)
|
||||
@ -4189,7 +4193,7 @@ bool TPro_msk::load_fppro_mask(TMask & msk)
|
||||
while (fp_db().sq_next())
|
||||
{
|
||||
TString numreg = fp_db().sq_get("PZ_NUMREGCONT");
|
||||
const bool show_all = msk.get_bool(F_SHOWALL);
|
||||
const bool show_all = msk->get_bool(F_SHOWALL);
|
||||
|
||||
if (numreg != "0" && !show_all)
|
||||
continue;
|
||||
@ -4200,8 +4204,8 @@ bool TPro_msk::load_fppro_mask(TMask & msk)
|
||||
keys.add(fp_db().sq_get("PZ_KEYHEADERFATT")); keys.add(fp_db().sq_get("PZ_KEYBODYFATT"));
|
||||
row.add("", 0);
|
||||
row.add(fp_db().sq_get("P7_TIPODOC"));
|
||||
row.add(fp_db().sq_get_date("P1_DATAORARIC"));
|
||||
row.add(fp_db().sq_get_date("PZ_DATA"));
|
||||
row.add(TDate(fp_db().sq_get_date("P1_DATAORARIC")));
|
||||
row.add(TDate(fp_db().sq_get_date("PZ_DATA")));
|
||||
row.add(fp_db().sq_get("PQ_IMPTOTDOC"));
|
||||
row.add(fppro_db().set_keys(keys).get_ritenute());
|
||||
row.add(fp_db().sq_get("PZ_NUMERO"));
|
||||
@ -4218,9 +4222,19 @@ bool TPro_msk::load_fppro_mask(TMask & msk)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPro_msk::riporta(TMask_field& f)
|
||||
bool TPro_msk::fppro_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
TMask& msk = f.mask();
|
||||
|
||||
const bool load = load_fppro_mask(&msk, k);
|
||||
return load;
|
||||
}
|
||||
|
||||
bool TPro_msk::riporta_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k != 32)
|
||||
return true;
|
||||
TMask& msk = f.mask();
|
||||
//if (msk.curr_page() != 3)
|
||||
//return true;
|
||||
bool ok = false;
|
||||
@ -4231,10 +4245,13 @@ bool TPro_msk::riporta(TMask_field& f)
|
||||
if(*row->get(0) == 'X')
|
||||
{
|
||||
//TProtocollo protocollo(TDate(row->get(2)).year(), row->get(9), row->get(10));
|
||||
app().pro_mask()->set_doc(row->get(cid2index(F_NUMEROS)), row->get(cid2index(F_DATAS)),
|
||||
app()._pro_mask->set_doc(row->get(cid2index(F_NUMEROS)), row->get(cid2index(F_DATAS)),
|
||||
row->get(cid2index(F_IMPTOTDOCS)), row->get(cid2index(F_RITENUTE)), "", row->get(cid2index(F_KEYFPPROS)),
|
||||
msk.get(F_CODCLIFORS), row->get(cid2index(F_FISCIVACODS)));
|
||||
_riporta = f.dlg() == DLG_OK;
|
||||
if (f.dlg() == DLG_OK)
|
||||
app()._pro_mask->_riporta = true;
|
||||
else
|
||||
app()._pro_mask->_riporta = false;
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
@ -4248,6 +4265,35 @@ bool TPro_msk::riporta(TMask_field& f)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPro_msk::collega_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
return riporta_handler(f, k);
|
||||
}
|
||||
|
||||
bool TPro_msk::piva_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
TMask& msk = f.mask();
|
||||
bool ok = true;
|
||||
|
||||
if(k == K_TAB && f.active() && f.focusdirty())
|
||||
{
|
||||
ok = load_fppro_mask(&msk, K_SPACE);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TPro_msk::date_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
TMask& msk = f.mask();
|
||||
bool ok = true;
|
||||
|
||||
if (k == K_TAB && f.active() && f.focusdirty())
|
||||
{
|
||||
ok = load_fppro_mask(&msk, K_SPACE);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void TPro_msk::fppro_selfatt() const
|
||||
{
|
||||
const TMask& mask = *this;
|
||||
@ -4265,43 +4311,21 @@ void TPro_msk::fppro_selfatt() const
|
||||
|
||||
bool TPro_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
TMask & m = o.mask();
|
||||
|
||||
switch (o.dlg())
|
||||
{
|
||||
case DLG_CONFIG:
|
||||
if (e == fe_button)
|
||||
load_fppro_mask(m);
|
||||
break;
|
||||
case DLG_OK:
|
||||
if (e == fe_button)
|
||||
riporta(o);
|
||||
break;
|
||||
case DLG_LINK:
|
||||
if (e == fe_button)
|
||||
riporta(o);
|
||||
break;
|
||||
case F_PIVAS:
|
||||
if (e == fe_modify)
|
||||
load_fppro_mask(m);
|
||||
break;
|
||||
case F_DATESEARCH:
|
||||
if (e == fe_modify)
|
||||
load_fppro_mask(m);
|
||||
break;
|
||||
case F_SELFPPROS:
|
||||
case F_SELFPPROS:
|
||||
if (e == fe_modify)
|
||||
fppro_selfatt();
|
||||
break;
|
||||
case F_SHOWALL:
|
||||
if (e == fe_modify)
|
||||
load_fppro_mask(m);
|
||||
load_fppro_mask(this, K_SPACE);
|
||||
break;
|
||||
case F_ENABSEARCH:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
abilita_piva();
|
||||
load_fppro_mask(m);
|
||||
abilita_piva(this);
|
||||
load_fppro_mask(this);
|
||||
}
|
||||
break;
|
||||
case F_ENABDATE:
|
||||
@ -4309,7 +4333,7 @@ bool TPro_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
field(F_DATESEARCH).show(o.mask().get_bool(F_ENABDATE));
|
||||
if (!o.mask().get_bool(F_ENABDATE))
|
||||
load_fppro_mask(m);
|
||||
load_fppro_mask(this);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -4476,25 +4500,29 @@ TString& TPro_msk::query_string()
|
||||
return query;
|
||||
}
|
||||
|
||||
void TPro_msk::abilita_piva()
|
||||
void TPro_msk::abilita_piva(TMask* msk)
|
||||
{
|
||||
if (get_bool(F_ENABSEARCH))
|
||||
if (msk->get_bool(F_ENABSEARCH))
|
||||
{
|
||||
enable(F_PIVAS);
|
||||
enable(F_STATOPAIVS);
|
||||
msk->enable(F_PIVAS);
|
||||
msk->enable(F_STATOPAIVS);
|
||||
}
|
||||
else
|
||||
{
|
||||
enable(F_PIVAS, false);
|
||||
enable(F_STATOPAIVS, false);
|
||||
msk->enable(F_PIVAS, false);
|
||||
msk->enable(F_STATOPAIVS, false);
|
||||
}
|
||||
}
|
||||
|
||||
TPro_msk::TPro_msk(TMask& cg_msk) : TAutomask("cg2100t"), _riporta(false), _codforn("")
|
||||
{
|
||||
TMask::set_handler(DLG_CONFIG, fppro_handler);
|
||||
TMask::set_handler(DLG_OK, riporta_handler);
|
||||
if (!app().has_module(F1AUT))
|
||||
field(DLG_OK).disable();
|
||||
|
||||
TMask::set_handler(DLG_LINK, collega_handler);
|
||||
TMask::set_handler(F_PIVAS, piva_handler);
|
||||
TMask::set_handler(F_DATESEARCH, date_handler);
|
||||
TMask::set(F_CODCLIFORS, cg_msk.get(F_CODCLIFOR));
|
||||
TMask::set(F_COFIS, cg_msk.get(F_COFI));
|
||||
TMask::set(F_STATOPAIVS, cg_msk.get(F_STATOPAIV));
|
||||
|
183
src/cg/cg2102.h
183
src/cg/cg2102.h
@ -31,88 +31,11 @@
|
||||
|
||||
#define K_ELIMMAS 0 // Key per eliminazione massima
|
||||
|
||||
class TPro_msk;
|
||||
class TDati_mov_auto;
|
||||
|
||||
enum CGMaskType { _query = 0, _no_iva = 1, _iva = 2, _occas = 3};
|
||||
|
||||
class TPro_msk : public TAutomask
|
||||
{
|
||||
public:
|
||||
struct riga_iva_s;
|
||||
struct scadenza_s;
|
||||
private:
|
||||
TString _numero;
|
||||
TDate _datadoc;
|
||||
real _totdoc;
|
||||
real _ritenute;
|
||||
TProtocollo _protfppro;
|
||||
TString _fpprokeys;
|
||||
TString _piva;
|
||||
TString _codforn;
|
||||
vector<riga_iva_s> _righe_iva;
|
||||
vector<scadenza_s> _scadenze;
|
||||
bool _riporta;
|
||||
|
||||
// Handlers per aggancio FPPRO
|
||||
// Bottone riporta doc FPPRO in testata Prima Nota
|
||||
// static bool riporta_handler(TMask_field& f, KEY k);
|
||||
// static bool collega_handler(TMask_field& f, KEY k);
|
||||
// static bool piva_handler(TMask_field& f, KEY k);
|
||||
// static bool date_handler(TMask_field& f, KEY k);
|
||||
// Non permette la selezione multipla
|
||||
void fppro_selfatt() const;
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
public:
|
||||
struct riga_iva_s
|
||||
{
|
||||
real imponibile;
|
||||
real imposta;
|
||||
real aliquota;
|
||||
TString4 natura;
|
||||
char esigibilita;
|
||||
};
|
||||
struct scadenza_s
|
||||
{
|
||||
TDate data;
|
||||
real importo;
|
||||
};
|
||||
|
||||
bool should_bring_back() const { return _riporta; }
|
||||
bool is_doc_split() ;
|
||||
|
||||
void set_righeiva(const char* fpprokeys);
|
||||
void set_scadenze(const char* fpprokeys);
|
||||
void set_doc(const char* numero, const char* datadoc, const char* totdoc, const char* ritenute, const char* protfppro, const char* fpprokeys, const char* codforn, const char* piva);
|
||||
|
||||
TString get_numdoc() const { return _numero; }
|
||||
TDate get_datadoc() const { return _datadoc; }
|
||||
real get_totdoc() const { return _totdoc; }
|
||||
real get_ritenute() const { return _ritenute; }
|
||||
TString get_fpprokeys() const { return _fpprokeys; }
|
||||
TString get_codforn() const { return _codforn; }
|
||||
TString get_piva() const { return _piva; }
|
||||
const vector<riga_iva_s>& get_righeiva() const { return _righe_iva; }
|
||||
const TProtocollo& get_protocollo() const { return _protfppro; }
|
||||
const vector<scadenza_s>& get_scadenze() const { return _scadenze; }
|
||||
real get_tot_imp_riva() ;
|
||||
|
||||
void add_rigaiva(const real& imponibile, const real& imposta, const real& aliquota, const TString4& natura, char esigib);
|
||||
void add_scad(const TDate& date, const real& importo);
|
||||
|
||||
static TString& query_fppro(const TString& codforn, const TString& date);
|
||||
static TString& query_fppro(const TString& stato_piva, const TString& piva, const TString& date);
|
||||
static TString& query_fppro(const TString& codforn, const TString& stato_piva, const TString& piva, const TString& where_str, const TString& date, const TString& keyprginvio, const TString& keyheaderfatt, const TString& keybodyfatt, bool order = true, bool piva_research = false);
|
||||
static TString& query_string();
|
||||
|
||||
void abilita_piva();
|
||||
|
||||
// Carica documenti FPPRO sulla maschera
|
||||
bool riporta(TMask_field& f);
|
||||
bool load_fppro_mask(TMask & msk);
|
||||
|
||||
TPro_msk(TMask& cg_msk);
|
||||
};
|
||||
|
||||
class TPrimanota_application : public TRelation_application
|
||||
{
|
||||
TMovimentoPN* _rel; // Relazione principale
|
||||
@ -167,7 +90,7 @@ class TPrimanota_application : public TRelation_application
|
||||
|
||||
TAssoc_array _colori; // Colori delle righe
|
||||
bool _isf1;
|
||||
TPro_msk * _pro_mask;
|
||||
shared_ptr<TPro_msk> _pro_mask;
|
||||
bool _is_set_fpcheck;
|
||||
int _last_date;
|
||||
bool _f1_ini;
|
||||
@ -257,11 +180,11 @@ class TPrimanota_application : public TRelation_application
|
||||
|
||||
// Gestione F1
|
||||
|
||||
static void write_righe_iva_f1(TMask& cg_msk, const TPro_msk & msk);
|
||||
static bool write_scad_f1(const TMask& cg_msk, const TPro_msk & msk);
|
||||
static void write_clifo(TMask& cg_msk, const TPro_msk & msk);
|
||||
static void set_totale(TMask& cg_msk, TPro_msk & msk);
|
||||
static void riporta_dati_f1(TMask& cg_msk, TPro_msk & msk);
|
||||
static void write_righe_iva_f1(TMask& cg_msk, const shared_ptr<TPro_msk>& msk);
|
||||
static bool write_scad_f1(const TMask& cg_msk, const shared_ptr<TPro_msk>& msk);
|
||||
static void write_clifo(TMask& cg_msk, const shared_ptr<TPro_msk>& msk);
|
||||
static void set_totale(TMask& cg_msk, const shared_ptr<TPro_msk>& msk);
|
||||
static void riporta_dati_f1(TMask& cg_msk, const shared_ptr<TPro_msk>& msk);
|
||||
void insert_part_scad(TConfig& ini);
|
||||
// Handlers per aggancio FPPRO
|
||||
// Bottone per maschera FPPRO
|
||||
@ -299,10 +222,9 @@ protected: // TApplication
|
||||
static bool scollega(bool set = false);
|
||||
// Pulisce il mov e db dai firerimenti FPPRO (in MODE_MOD per edit/delete)
|
||||
void clean_fppro();
|
||||
// Ha f1 ?
|
||||
bool has_f1() const;
|
||||
// controlla il db
|
||||
bool has_f1_db(const TMask & m);
|
||||
// setta variabili prima del controllo has_f1_db
|
||||
void set_has_f1_db(TMask* m);
|
||||
bool has_f1_db(TMask* m);
|
||||
// Controlli prima di write e rewrite
|
||||
int controlli_f1(const TMask& m);
|
||||
|
||||
@ -477,12 +399,93 @@ public:
|
||||
TString_array& pag_rows() { return _pag_rows; }
|
||||
TImporto get_cgs_imp(int n) const;
|
||||
|
||||
TPro_msk * pro_mask() const { return _pro_mask; }
|
||||
|
||||
TImporto imposte_split_pay() const;
|
||||
|
||||
TPrimanota_application();
|
||||
virtual ~TPrimanota_application() { safe_delete(_pro_mask); }
|
||||
virtual ~TPrimanota_application() { }
|
||||
};
|
||||
|
||||
class TPro_msk : public TAutomask
|
||||
{
|
||||
public:
|
||||
struct riga_iva_s;
|
||||
struct scadenza_s;
|
||||
private:
|
||||
TString _numero;
|
||||
TDate _datadoc;
|
||||
real _totdoc;
|
||||
real _ritenute;
|
||||
TProtocollo _protfppro;
|
||||
TString _fpprokeys;
|
||||
TString _piva;
|
||||
TString _codforn;
|
||||
vector<riga_iva_s> _righe_iva;
|
||||
vector<scadenza_s> _scadenze;
|
||||
bool _riporta;
|
||||
|
||||
// Handlers per aggancio FPPRO
|
||||
// Bottone carica documenti in maschera FPPRO
|
||||
static bool fppro_handler(TMask_field& f, KEY k);
|
||||
// Bottone riporta doc FPPRO in testata Prima Nota
|
||||
static bool riporta_handler(TMask_field& f, KEY k);
|
||||
static bool collega_handler(TMask_field& f, KEY k);
|
||||
static bool piva_handler(TMask_field& f, KEY k);
|
||||
static bool date_handler(TMask_field& f, KEY k);
|
||||
// Non permette la selezione multipla
|
||||
void fppro_selfatt() const;
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
public:
|
||||
struct riga_iva_s
|
||||
{
|
||||
real imponibile;
|
||||
real imposta;
|
||||
real aliquota;
|
||||
TString4 natura;
|
||||
char esigibilita;
|
||||
};
|
||||
struct scadenza_s
|
||||
{
|
||||
TDate data;
|
||||
real importo;
|
||||
};
|
||||
|
||||
bool should_bring_back() const { return _riporta; }
|
||||
bool is_doc_split();
|
||||
|
||||
void set_righeiva(const char* fpprokeys);
|
||||
void set_scadenze(const char* fpprokeys);
|
||||
void set_doc(const char* numero, const char* datadoc, const char* totdoc, const char* ritenute, const char* protfppro, const char* fpprokeys, const char* codforn, const char* piva);
|
||||
|
||||
TString get_numdoc() const { return _numero; }
|
||||
TDate get_datadoc() const { return _datadoc; }
|
||||
real get_totdoc() const { return _totdoc; }
|
||||
real get_ritenute() const { return _ritenute; }
|
||||
TString get_fpprokeys() const { return _fpprokeys; }
|
||||
TString get_codforn() const { return _codforn; }
|
||||
TString get_piva() const { return _piva; }
|
||||
const vector<riga_iva_s>& get_righeiva() const { return _righe_iva; }
|
||||
TProtocollo& get_protocollo() { return _protfppro; }
|
||||
vector<scadenza_s>& get_scadenze() { return _scadenze; }
|
||||
real get_tot_imp_riva();
|
||||
|
||||
|
||||
void add_rigaiva(const real& imponibile, const real& imposta, const real& aliquota, const TString4& natura, char esigib);
|
||||
void add_scad(const TDate& date, const real& importo);
|
||||
|
||||
|
||||
static TString& query_fppro(const TString& codforn, const TString& date);
|
||||
static TString& query_fppro(const TString& stato_piva, const TString& piva, const TString& date);
|
||||
static TString& query_fppro(const TString& codforn, const TString& stato_piva, const TString& piva, const TString& where_str, const TString& date, const TString& keyprginvio, const TString& keyheaderfatt, const TString& keybodyfatt, bool order = true, bool piva_research = false);
|
||||
static TString& query_string();
|
||||
|
||||
static void abilita_piva(TMask* msk);
|
||||
|
||||
// Carica documenti FPPRO sulla maschera
|
||||
static bool load_fppro_mask(TMask* msk, KEY k = 32);
|
||||
|
||||
TPro_msk() = delete;
|
||||
TPro_msk(TMask& cg_msk);
|
||||
};
|
||||
|
||||
bool& is_f1();
|
||||
|
@ -68,8 +68,7 @@ class TListaMov_application : public TPrintapp
|
||||
int _ricser;
|
||||
bool _settata_prima_riga, _causale_gia_stampata,_mov_di_sola_iva;
|
||||
int _cur1,_cur2,_cur2b,_cur3,_cur4,_decidi,/*_tipod,*/_controllo_mov_errati;
|
||||
int _numero_riga, _alleg, _scelta_stampa, _nr, _n;
|
||||
tiporeg _tiporegistro;
|
||||
int _numero_riga, _alleg, _tiporegistro, _scelta_stampa, _nr, _n;
|
||||
int _provvis;
|
||||
liste _tipo_lista;
|
||||
word _flags;
|
||||
@ -117,6 +116,7 @@ public:
|
||||
bool RicercaDoc(const char* cod) const;
|
||||
const TString& SimboloValuta (const char* cod) const;
|
||||
const TString& DescrDoc(const char* cod) const;
|
||||
const TString& AttivitaRegistro(const char * cod, int anno) const;
|
||||
|
||||
TListaMov_application(char tipost);
|
||||
virtual ~TListaMov_application() {}
|
||||
@ -427,6 +427,19 @@ const TString& TListaMov_application::SimboloValuta(const char* cod) const
|
||||
const TString& TListaMov_application::DescrDoc(const char* tipo) const
|
||||
{ return cache().get(TAB_TPD, tipo, "S0"); }
|
||||
|
||||
const TString& TListaMov_application::AttivitaRegistro(const char* cod, int anno) const
|
||||
{
|
||||
TString8 key; key.format("%04d%-3s", anno, cod);
|
||||
return cache().get("REG", key, "S8");
|
||||
}
|
||||
|
||||
HIDDEN int tipo_registro(const char* cod, int anno)
|
||||
{
|
||||
TString8 codtab; codtab.format("%4d%-3s", anno, cod);
|
||||
const TString& tipo_reg = cache().get("REG", codtab, "I0");
|
||||
return atoi(tipo_reg);
|
||||
}
|
||||
|
||||
static bool between(const TString& code, const TString& mini, const TString& maxi)
|
||||
{
|
||||
if (mini.full() && code < mini)
|
||||
@ -495,11 +508,11 @@ bool TListaMov_application::filter_func_fatture (const TRelation* rel)
|
||||
|
||||
const int ann_reg = mov.get_int(MOV_ANNOIVA);
|
||||
const TString4 cod_reg = mov.get(MOV_REG);
|
||||
const tiporeg tipo_reg = cached_registro(cod_reg, ann_reg).tipo_registro();
|
||||
const int tipo_reg = tipo_registro(cod_reg, ann_reg);
|
||||
|
||||
// Considera solo iva acquisti o vendite
|
||||
if (tipo_reg != vendita && tipo_reg != acquisto)
|
||||
return false;
|
||||
if (tipo_reg != 1 && tipo_reg != 2)
|
||||
return FALSE;
|
||||
|
||||
if (app()._annoes > 0) //anno esercizio specificato nella maschera
|
||||
{
|
||||
@ -550,10 +563,8 @@ bool TListaMov_application::filter_func (const TRelation * rel)
|
||||
{
|
||||
const TString& cod_reg = mov.get(MOV_REG);
|
||||
const int ann_reg = mov.get_int(MOV_ANNOIVA);
|
||||
const tiporeg tipo_reg = cached_registro(cod_reg, ann_reg).tipo_registro();
|
||||
|
||||
// Considera solo iva acquisti o vendite
|
||||
if (tipo_reg != vendita && tipo_reg != acquisto)
|
||||
const int tipo_reg = tipo_registro(cod_reg, ann_reg);
|
||||
if (tipo_reg == 1 || tipo_reg == 2)
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -642,10 +653,9 @@ void TListaMov_application::stampa_errori_rmov()
|
||||
else set_row(_nr++, FR("@11gCodice C/F non presente in Anagrafica"));
|
||||
if (_registro.not_empty()) //se su mov e' indicato il codice registro
|
||||
{
|
||||
const TRegistro & reg = cached_registro(_registro, _ae);
|
||||
const tiporeg tipo = reg.tipo_registro();
|
||||
|
||||
if ((tipo == vendita && t != 'C') || (tipo == acquisto && t != 'F'))
|
||||
TRegistro rg (_registro, _ae);
|
||||
const int tiporeg = rg.tipo();
|
||||
if ((tiporeg == 1 && t != 'C') || (tiporeg == 2 && t != 'F'))
|
||||
set_row(_nr++, FR("@11gTipo C/F non compatibile con tipo registro"));
|
||||
}
|
||||
}
|
||||
@ -732,14 +742,14 @@ void TListaMov_application::stampa_errori_iva(int* nr, const TRigaiva& riva)
|
||||
const int tipocr = riva._tipocr;
|
||||
|
||||
if (tipodet == 1 || tipodet == 3 || tipodet == 5 || tipodet == 9)
|
||||
if (_tiporegistro != acquisto)
|
||||
if (_tiporegistro != 2)
|
||||
set_row(++(*nr), FR("@11gCodice di indetraibilita' errato"));
|
||||
|
||||
if (_tiporegistro == vendita)
|
||||
if (_tiporegistro == 1)
|
||||
if (tipocr != 0 && tipocr != 1 && tipocr != 4 && tipocr != 9)
|
||||
set_row(++(*nr), FR("@11gTipo costo/ricavo non valido"));
|
||||
|
||||
if (_tiporegistro == acquisto)
|
||||
if (_tiporegistro == 2)
|
||||
if (tipocr != 0 && tipocr != 1 && tipocr != 2 && tipocr != 3 && tipocr != 5 && tipocr != 8 && tipocr != 9)
|
||||
set_row(++(*nr), FR("@11gTipo costo/ricavo non valido"));
|
||||
}
|
||||
@ -799,11 +809,11 @@ void TListaMov_application::set_page(int file, int count)
|
||||
TString16 reg = current_cursor()->curr(LF_MOV).get(MOV_REG);
|
||||
int anno = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOIVA);
|
||||
char prov = current_cursor()->curr(LF_MOV).get_char(MOV_PROVVIS);
|
||||
const tiporeg tipo = cached_registro(reg, anno).tipo_registro();
|
||||
int tipo = tipo_registro(reg, anno);
|
||||
|
||||
TEsercizi_contabili esc;
|
||||
|
||||
esc.date2esc(data); // qui verificare
|
||||
if ( (tipo == vendita) || (tipo == acquisto) )
|
||||
if ( (tipo == 1) || (tipo == 2) )
|
||||
{
|
||||
set_row (_n, FR("@103greg @3s"),FLD(LF_MOV,MOV_REG));
|
||||
set_row (_n, FR("@111gpr @5n"),FLD(LF_MOV,MOV_PROTIVA));
|
||||
@ -877,8 +887,7 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
_codcf = curmov.get_long(MOV_CODCF);
|
||||
_numero = curmov.get_long(MOV_NUMREG);
|
||||
_codval = curmov.get(MOV_CODVALI);
|
||||
_tiporegistro = cached_registro(_registro, _anno).tipo_registro();
|
||||
|
||||
_tiporegistro = tipo_registro(_registro, _anno);
|
||||
|
||||
_causale_gia_stampata = FALSE;
|
||||
TEsercizi_contabili esc;
|
||||
@ -1005,9 +1014,11 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
_descr_causale = caus.get(CAU_DESCR);
|
||||
_alleg_causale = caus.get_bool(CAU_ALLEG);
|
||||
_tipodocumento = caus.get(CAU_TIPODOC);
|
||||
_tiporegistro = cached_registro(_registro, _anno).tipo_registro();
|
||||
if ((_tiporegistro != vendita) && (_tiporegistro != acquisto))//se si tratta di un movimento di sola prima nota
|
||||
return true;
|
||||
|
||||
_tiporegistro = tipo_registro (_registro, _anno);
|
||||
|
||||
if ((_tiporegistro != 1)&&(_tiporegistro != 2))//se si tratta di un movimento di sola prima nota
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (file == LF_RMOV)
|
||||
@ -1054,10 +1065,10 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
_numr = curmov.get_long(MOV_NUMREG);
|
||||
_tipo_elenco = curmov.get(MOV_TIPO);
|
||||
_codcf = curmov.get_long(MOV_CODCF);
|
||||
const tiporeg tiporeg = cached_registro(codreg, anno).tipo_registro();
|
||||
const TString8 attreg = cached_registro(codreg, anno).attivita();
|
||||
const int tiporeg = tipo_registro (codreg, anno);
|
||||
const TString8 attreg = AttivitaRegistro (codreg, anno);
|
||||
|
||||
if (tiporeg == vendita || tiporeg == acquisto)//se si tratta di un movimento iva
|
||||
if (tiporeg == 1 || tiporeg == 2)//se si tratta di un movimento iva
|
||||
{
|
||||
_tipoatt = TipoAttivita(attreg, get_firm());
|
||||
_tipo_elenco = curmov.get(MOV_TIPO);
|
||||
@ -1886,18 +1897,18 @@ bool TListaMov_application::segnala_errori_iva()
|
||||
return true;
|
||||
}
|
||||
if (tipodet == 1 || tipodet == 3 || tipodet == 5 || tipodet == 9)
|
||||
if (_tiporegistro != acquisto)
|
||||
if (_tiporegistro != 2)
|
||||
{
|
||||
rmoviva.readat(nrec);
|
||||
return true;
|
||||
}
|
||||
if (_tiporegistro == vendita)
|
||||
if (_tiporegistro == 1)
|
||||
if (tipocr != 0 && tipocr != 1 && tipocr != 4 && tipocr != 9)
|
||||
{
|
||||
rmoviva.readat(nrec);
|
||||
return true;
|
||||
}
|
||||
if (_tiporegistro == acquisto)
|
||||
if (_tiporegistro == 2)
|
||||
if (tipocr != 0 && tipocr != 1 && tipocr != 2 && tipocr != 3 && tipocr != 5 && tipocr != 8 && tipocr != 9)
|
||||
{
|
||||
rmoviva.readat(nrec);
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include "cg3.h"
|
||||
#include "cg3300.h"
|
||||
#include "cglib.h"
|
||||
|
||||
#include "cg3300a.h"
|
||||
#include "cg3300b.h"
|
||||
@ -470,19 +469,18 @@ void TStampa_allegati::ricalcola(int anno_dic)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
|
||||
const tiporeg tipo = cached_registro(reg).tipo_registro();
|
||||
|
||||
if ((tipo != acquisto) && (tipo != vendita))
|
||||
const int tiporeg = reg.get_int("I0");
|
||||
if ((tiporeg != 2) && (tiporeg != 1))
|
||||
continue;
|
||||
|
||||
if (tiporeg == vendita)
|
||||
if (tiporeg == 1)
|
||||
{
|
||||
if (cached_registro(reg).sospeso())
|
||||
continue;
|
||||
vendite = true;
|
||||
bool sosp = reg.get_bool ("B0");
|
||||
if (sosp) continue;
|
||||
vendite = TRUE;
|
||||
}
|
||||
else
|
||||
vendite = false;
|
||||
vendite = FALSE;
|
||||
|
||||
tipodoc = cau.get (CAU_TIPODOC);
|
||||
if (corrispettivo (tipodoc))
|
||||
|
@ -45,6 +45,7 @@ HIDDEN const int SEZA132 = 108;
|
||||
HIDDEN const int TOTAVERE132 = 110;
|
||||
|
||||
enum descr { causale, conto, operazione };
|
||||
enum tipo_sospensione { nessuna, sospensione_normale, vol_affari, liquidazione };
|
||||
|
||||
class TContoOccas : public TBill
|
||||
{
|
||||
@ -242,9 +243,8 @@ bool TStampa_giornale::filter_func(const TRelation * r)
|
||||
return false;
|
||||
|
||||
// Scarto i movimenti che hanno il registro ai soli fini della liquidazione
|
||||
const TRegistro & reg = cached_registro(r->lfile("REG").curr().get("CODTAB"));
|
||||
const tipo_sospensione ts = reg.sospensione();
|
||||
|
||||
const TRectype& reg = r->lfile("REG").curr();
|
||||
const tipo_sospensione ts = reg.get_bool("B1") ? (tipo_sospensione) reg.get_int("I9") : nessuna;
|
||||
if (ts == liquidazione)
|
||||
return false;
|
||||
|
||||
|
@ -84,6 +84,7 @@ class TLista_fatture : public TPrintapp
|
||||
|
||||
protected:
|
||||
long select_firm_range(long from, long to);
|
||||
int tiporeg(const TString& );
|
||||
static bool mix_handler(TMask_field&, KEY);
|
||||
static bool date_handler(TMask_field&, KEY);
|
||||
static bool to_ditt_handler(TMask_field&, KEY);
|
||||
@ -116,6 +117,12 @@ public:
|
||||
|
||||
inline TLista_fatture& app() { return (TLista_fatture&) main_app(); }
|
||||
|
||||
int TLista_fatture::tiporeg(const TString& reg)
|
||||
{
|
||||
TString8 s; s.format("%4d%-3s",_date_from.year(),(const char*)reg);
|
||||
return atoi(cache().get("REG", s, "I0"));
|
||||
}
|
||||
|
||||
bool TLista_fatture::filter_func1(const TRelation *r)
|
||||
{
|
||||
TLista_fatture& a = app();
|
||||
@ -137,8 +144,8 @@ bool TLista_fatture::filter_func1(const TRelation *r)
|
||||
if (riv.get(RMI_TIPODET).blank() || percind.is_zero())
|
||||
return false;
|
||||
|
||||
const tiporeg tipo = cached_registro(rg).tipo_registro();
|
||||
if (tipo != acquisto)
|
||||
const int tiporeg = a.tiporeg(rg);
|
||||
if (tiporeg != 2)
|
||||
return false;
|
||||
}
|
||||
else // Tipo costo/ricavo
|
||||
@ -436,9 +443,8 @@ bool TLista_fatture::preprocess_page(int file, int counter)
|
||||
if (_tipo == intra)
|
||||
{
|
||||
TString4 codiva = rec.get(RMI_CODIVA);
|
||||
const tiporeg tipomov = cached_registro(mov.get(MOV_REG)).tipo_registro();
|
||||
|
||||
if (tipomov == acquisto && tipodet == 9)
|
||||
const int tipomov = tiporeg(mov.get(MOV_REG));
|
||||
if (tipomov == 2 && tipodet == 9)
|
||||
codiva = "~A19"; // Speciale per acquisti indeducibili art. 19
|
||||
const bool is_key = _intra_items.is_key(codiva); // Esiste l'elemento ?
|
||||
// Se si' allora prendi quello, altrimenti prendine uno nuovo
|
||||
@ -463,10 +469,8 @@ bool TLista_fatture::preprocess_page(int file, int counter)
|
||||
_tot_iva += iva;
|
||||
_tp_imp += imp;
|
||||
_tp_iva += iva;
|
||||
|
||||
const tiporeg tipomov = cached_registro(mov.get(MOV_REG)).tipo_registro();
|
||||
|
||||
if (_tipo == indetraibile && tipomov == acquisto && tipodet > 0)
|
||||
const int tipomov = tiporeg(mov.get(MOV_REG));
|
||||
if (_tipo == indetraibile && tipomov == 2 && tipodet > 0)
|
||||
{
|
||||
TString4 codiva = rec.get(RMI_CODIVA);
|
||||
_Iva_item * iva_row = (_Iva_item *) _indetr.objptr(codiva);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <saldi.h>
|
||||
#include <causali.h>
|
||||
|
||||
#include "cglib.h"
|
||||
#include "cglib02.h"
|
||||
|
||||
struct therec
|
||||
{
|
||||
@ -89,7 +89,7 @@ bool CG4100_App::sort_sal()
|
||||
sal.set_anno_es(year);
|
||||
sal.clear_saldi(year);
|
||||
long numreg = 0L;
|
||||
tiposal tsal = saldo_normale;
|
||||
tiposal tsal = normale;
|
||||
char provvis;
|
||||
TDate datareg;
|
||||
|
||||
@ -127,11 +127,20 @@ bool CG4100_App::sort_sal()
|
||||
mov.put(MOV_NUMREG, numreg);
|
||||
mov.read();
|
||||
CHECK(mov.good(),"Archivi movimenti e righe inconsistenti");
|
||||
const TString& codcaus = mov.get(MOV_CODCAUS);
|
||||
|
||||
tsal = saldo_normale; // Tipo saldo normale per default
|
||||
if(codcaus.full())
|
||||
tsal = cached_causale(codcaus, year).tipo_saldo();
|
||||
// Tipo saldo normale per default
|
||||
tsal = normale;
|
||||
const TString& codcaus = mov.get(MOV_CODCAUS);
|
||||
const TRectype& causale = cache().get(LF_CAUSALI, codcaus);
|
||||
if (!causale.empty())
|
||||
{
|
||||
const char ac = causale.get_char(CAU_MOVAP);
|
||||
if (ac == 'A')
|
||||
tsal = apertura; else
|
||||
if (ac == 'C')
|
||||
tsal = chiusura;
|
||||
}
|
||||
|
||||
scaricato = mov.get_bool(MOV_SCARCON);
|
||||
provvis = mov.get_char(MOV_PROVVIS);
|
||||
datareg = mov.get_date(MOV_DATAREG);
|
||||
|
@ -209,12 +209,16 @@ bool TGestAutoTrasp_mask::on_field_event(TOperable_field& o, TField_event e, lon
|
||||
if (e == fe_close) // Controllo sulla presenza dei codici causale nello spreadsheet
|
||||
{
|
||||
TSheet_field& sf = sfield(F_SHEET_CAUSALI);
|
||||
bool error = true;
|
||||
for (int i = 0; error && i < sf.items(); i++)
|
||||
bool error = TRUE;
|
||||
for (int i=0; i < sf.items(); i++)
|
||||
{
|
||||
const TString16 c = sf.get_str_row_cell(i, F_CAUDEF);
|
||||
|
||||
error = c.blank();
|
||||
TToken_string& tt = sf.row(i);
|
||||
const TString16 c = tt.get(F_CAUDEF - F_CAUMOV);
|
||||
if (!c.blank())
|
||||
{
|
||||
error = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (error)
|
||||
{
|
||||
|
@ -450,7 +450,7 @@ int TParaliq_app::read(TMask& m)
|
||||
TCursor cur(&relpla, "", 1, &pla, &pla);
|
||||
const TRecnotype items = cur.items();
|
||||
|
||||
sf.reset();
|
||||
sf.destroy();
|
||||
if (items == 0)
|
||||
init_array(sf); // Carica tutti i codici attività
|
||||
else
|
||||
|
@ -1102,11 +1102,11 @@ void TRic_tab::ricevi_movPN(const TString& key, char uselab)
|
||||
_sld.set_data_ulmov(datareg);
|
||||
|
||||
const char movap = ricerca_causale(codcaus);
|
||||
tiposal tsal = saldo_normale;
|
||||
if (movap == 'A')
|
||||
_sld.set_tipo_saldo(apertura);
|
||||
else if (movap == 'C')
|
||||
_sld.set_tipo_saldo(chiusura);
|
||||
|
||||
if (codcaus.full())
|
||||
tsal = cached_causale(codcaus, annoes).tipo_saldo();
|
||||
_sld.set_tipo_saldo(tsal);
|
||||
scrivi_righePN(nreg);
|
||||
|
||||
_sld.registra();
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "cg7401.h"
|
||||
#include "cgpim.h"
|
||||
#include "cglib.h"
|
||||
|
||||
#include "cg7400a.h"
|
||||
#include <attiv.h>
|
||||
@ -17,6 +16,8 @@
|
||||
#define REP_SANMARINO 4
|
||||
#define REP_RIPACQ 5
|
||||
|
||||
enum tipo_sospensione { nessuna, sospensione_normale, vol_affari, liquidazione };
|
||||
|
||||
class TQuadro_VF_recordset : public TQuadro_IVA_recordset
|
||||
{
|
||||
TQuadro_IVA_mask * _mask;
|
||||
|
@ -5,13 +5,14 @@
|
||||
|
||||
#include "cg7401.h"
|
||||
#include "cgpim.h"
|
||||
#include "cglib.h"
|
||||
|
||||
#include "cg7400a.h"
|
||||
#include "rmoviva.h"
|
||||
|
||||
#define REP_QUADRO 1
|
||||
|
||||
enum tipo_sospensione { nessuna, sospensione_normale, vol_affari, liquidazione };
|
||||
|
||||
class TQuadro_VJ_recordset : public TQuadro_IVA_recordset
|
||||
{
|
||||
TQuadro_IVA_mask * _mask;
|
||||
|
@ -977,7 +977,6 @@ class TRiepilogoIVA_report : public TReport
|
||||
|
||||
protected:
|
||||
virtual bool use_mask() { return false; }
|
||||
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
||||
|
||||
public:
|
||||
virtual bool set_recordset(TRecordset * set);
|
||||
|
@ -19,58 +19,6 @@ bool TRiepilogoIVA_report::set_recordset(TRecordset * set)
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TRiepilogoIVA_report::get_usr_val(const TString& name, TVariant& var) const
|
||||
{
|
||||
TRiepilogoIVA_recordset * rs = (TRiepilogoIVA_recordset *)recordset();
|
||||
|
||||
if (name == "#FROMDATE")
|
||||
{
|
||||
var = rs->from();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (name == "#TODATE")
|
||||
{
|
||||
var = rs->to();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (name == "#ANNO")
|
||||
{
|
||||
var = rs->anno();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (name == "#CODATT")
|
||||
{
|
||||
var = rs->codatt();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (name == "#DAMESE")
|
||||
{
|
||||
var = (long)rs->da_mese();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (name == "#AMESE")
|
||||
{
|
||||
var = (long)rs->a_mese();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return TReport::get_usr_val(name, var);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRiepilogoIVA_recordset
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -129,8 +77,6 @@ void TRiepilogoIVA_recordset::requery()
|
||||
recset.set_var("#ANNO", (long)anno(), true);
|
||||
if (codatt().full())
|
||||
recset.set_var("#CODATT", codatt(), true);
|
||||
else
|
||||
recset.set_var("#CODATT", "", true);
|
||||
recset.set_var("#DAMESE", (long)da_mese(), true);
|
||||
recset.set_var("#AMESE", (long)a_mese(), true);
|
||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <rmoviva.h>
|
||||
|
||||
#include "..\cg\cgsaldac.h"
|
||||
#include "..\cg\cglib.h"
|
||||
#include "..\cg\cg2103.h"
|
||||
#include "..\ve\velib.h"
|
||||
|
||||
#include "cm1100a.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "../ce/collces.h"
|
||||
#include "../ve/velib.h"
|
||||
#include "../cg/cglib.h"
|
||||
#include "../cg/cg2103.h"
|
||||
|
||||
#include "../ca/movana.h"
|
||||
#include "../ca/rmovana.h"
|
||||
|
@ -202,7 +202,7 @@ bool TFppro::associa_mov(const int numreg) const
|
||||
const char* TFppro::get_tipoprot() const
|
||||
{
|
||||
TString query;
|
||||
TString tipo;
|
||||
static TString tipo;
|
||||
query << "SELECT PZ_TIPOPROT AS TIPOPROT FROM FPPRO00F\r\n" << where_str();
|
||||
_db->sq_set_exec(query);
|
||||
return tipo.cut(0) = _db->sq_get("TIPOPROT");
|
||||
|
File diff suppressed because it is too large
Load Diff
226
src/f9/f90100.h
226
src/f9/f90100.h
@ -9,16 +9,12 @@
|
||||
|
||||
#include "f9lib.h"
|
||||
|
||||
|
||||
inline bool open_mov(const long numreg);
|
||||
|
||||
/** class TEstrai_mask
|
||||
* \brief Piccola maschera "creata a runtime" per avviare l'estrazione. runtime ? cazzata
|
||||
* \brief Piccola maschera "creata a runtime" per avviare l'estrazione.
|
||||
*/
|
||||
|
||||
class TEstrai_mask : public TMask
|
||||
{
|
||||
TEstrazione * _estrazione; // Oggetto estrazione in corso di elaborazione
|
||||
unique_ptr<TEstrazione> _estrazione; // Oggetto estrazione in corso di elaborazione
|
||||
|
||||
void enable_fields(bool en = true);
|
||||
|
||||
@ -47,111 +43,31 @@ public:
|
||||
TEstrai_mask();
|
||||
};
|
||||
|
||||
class TControllo_mask : public TAutomask
|
||||
{
|
||||
TArray _controllo_mov; // Usare import_error_list().
|
||||
char _ordin;
|
||||
char _verso;
|
||||
bool _sel_esclusi;
|
||||
bool _is_escluso;
|
||||
TString _cod_soc;
|
||||
TString _id_estr;
|
||||
char _tipo_doc_err{};
|
||||
TDate _datada;
|
||||
TDate _dataa;
|
||||
|
||||
void associa();
|
||||
void conferma_esclusi() const;
|
||||
|
||||
TArray & import_error_list();
|
||||
void fill();
|
||||
void fill_fppro_sheet() const;
|
||||
TMask& get_win_order();
|
||||
void open_win_order();
|
||||
|
||||
int selected_mov();
|
||||
int selected_fat() const;
|
||||
|
||||
/** Gestisce la selezione multipla negli sheet di controllo movimenti */
|
||||
void selfatt(TOperable_field& o, long jolly) const;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
public:
|
||||
TControllo_mask(const char* codsoc, const char* id_estr, bool esclusi = false);
|
||||
};
|
||||
|
||||
class TApri_estr_msk : public TAutomask
|
||||
{
|
||||
TString _idestr;
|
||||
TDate _dataestr;
|
||||
bool _provv;
|
||||
char _tipodoc;
|
||||
TString _statoestr;
|
||||
TDate _datadal;
|
||||
TDate _dataal;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
|
||||
bool inall_handler() const;
|
||||
bool inescludi_handler() const;
|
||||
bool inselect_handler() const;
|
||||
void conferma_esclusi() const;
|
||||
public:
|
||||
void fill_estr() const;
|
||||
void fill_res() const;
|
||||
void set_from_row_estrazione(TToken_string& row_estrazione);
|
||||
|
||||
TApri_estr_msk();
|
||||
};
|
||||
|
||||
class TMonitor_mask : public TAutomask
|
||||
{
|
||||
friend class TF9_app;
|
||||
vector<TToken_string> _fppro;
|
||||
std::unique_ptr<TApri_estr_msk> _inclusi_mask;
|
||||
|
||||
// Configurazione mask
|
||||
static bool save_conf_handler(TMask_field& f, KEY key);
|
||||
|
||||
// Metodi per la maschera 'Apri Estr.'
|
||||
|
||||
void open_apri_estr_win();
|
||||
|
||||
// Controllo estr. mask
|
||||
void controllo_errori() const;
|
||||
static void delete_estr_fld(const TString& idestr);
|
||||
void delete_pack(bool all = false) const;
|
||||
|
||||
// Riempie sheet per visualizzare le estrazioni
|
||||
void fill() const;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
static void open_win_estr();
|
||||
static void open_win_conf();
|
||||
void sel() const;
|
||||
|
||||
public:
|
||||
TMonitor_mask();
|
||||
};
|
||||
|
||||
class TF9_app : public TSkeleton_application
|
||||
{
|
||||
//friend class TEstrai_mask;
|
||||
friend class TMonitor_mask;
|
||||
friend class TEstrai_mask;
|
||||
friend class TControllo_mask;
|
||||
friend class TApri_estr_msk;
|
||||
friend class TEstrazione;
|
||||
|
||||
TEstrai_mask * _estr_msk;
|
||||
TMonitor_mask * _msk;
|
||||
|
||||
|
||||
unique_ptr<TEstrai_mask> _estr_msk;
|
||||
unique_ptr<TMonitor_mask> _msk;
|
||||
vector<movimento_t> _movs;
|
||||
TArray _esclusi; // Vettore con i movimenti esclusi
|
||||
TArray _esclusi_vect;
|
||||
vector<TToken_string> _esclusi; // Vettore con i movimenti esclusi
|
||||
vector<TToken_string> _esclusi_vect;
|
||||
TToken_string _mov_escl;
|
||||
char _tipodoc_escl;
|
||||
char _flagprov_escl;
|
||||
TString _log;
|
||||
|
||||
TEstrazione* _estr_escluso;
|
||||
|
||||
|
||||
char get_tipodoc_escl() const { return _tipodoc_escl; }
|
||||
TipoIVA get_tipoiva_escl() const { return get_tipodoc_escl() == 'A' ? iva_acquisti : iva_vendite; }
|
||||
@ -159,16 +75,6 @@ class TF9_app : public TSkeleton_application
|
||||
// Dato il codice stato estrazione (es. "01") viene restituito il suo significato a parole (es. "in diagnostica").
|
||||
static const char* traduci_stato(const TString& cod);
|
||||
static bool is_stato_errore(const TString& stato_etr);
|
||||
// Controllo e aggiornamento tabelle F9
|
||||
bool create_tables() const; // Creazione tabelle F9.
|
||||
bool check_tabelle_f9() const; // Controllo esistenza delle tabelle e in caso le crea.
|
||||
bool aggiorna_tab_f9(int version) const; // Aggiorna modifiche alle tabelle F9 come descritto in cima al file f90100.cpp.
|
||||
bool check_tab_version() const; // Controllo della versione e in caso aggiorna le tabelle.
|
||||
bool check_table() const; // Controllo e aggiornamento versione sql. Chiamata in main_loop.
|
||||
|
||||
protected:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
|
||||
public:
|
||||
/** Mostra la finestrella per l'inserimento delle opzioni per l'estrazione e avviarla. */
|
||||
@ -203,13 +109,121 @@ public:
|
||||
/** Segna su mov che il movimento e' stato estratto. */
|
||||
bool segna_estratti(bool escluso = false, int numreg = 0);
|
||||
|
||||
// Controllo e aggiornamento tabelle F9
|
||||
private:
|
||||
bool create_tables() const; // Creazione tabelle F9.
|
||||
bool check_tabelle_f9() const; // Controllo esistenza delle tabelle e in caso le crea.
|
||||
bool aggiorna_tab_f9(int version) const; // Aggiorna modifiche alle tabelle F9 come descritto in cima al file f90100.cpp.
|
||||
bool check_tab_version() const; // Controllo della versione e in caso aggiorna le tabelle.
|
||||
bool check_table() const; // Controllo e aggiornamento versione sql. Chiamata in main_loop.
|
||||
|
||||
public:
|
||||
void main_loop() override;
|
||||
|
||||
TF9_app();
|
||||
};
|
||||
|
||||
inline TF9_app& f9_app() { return (TF9_app &)main_app();}
|
||||
inline TF9_app& f9_app()
|
||||
{
|
||||
static TF9_app* app = nullptr;
|
||||
if (app == nullptr)
|
||||
app = (TF9_app*)&main_app();
|
||||
return *app;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class TApri_estr_msk;
|
||||
class TMonitor_mask : public TAutomask
|
||||
{
|
||||
friend class TF9_app;
|
||||
vector<TToken_string> _fppro;
|
||||
std::unique_ptr<TApri_estr_msk> _inclusi_mask;
|
||||
|
||||
// Configurazione mask
|
||||
static bool save_conf_handler(TMask_field& f, KEY key);
|
||||
|
||||
// Metodi per la maschera 'Apri Estr.'
|
||||
|
||||
void open_apri_estr_win();
|
||||
|
||||
// Controllo estr. mask
|
||||
void controllo_errori() const;
|
||||
static void delete_estr_fld(const TString& idestr);
|
||||
void delete_pack(bool all = false) const;
|
||||
|
||||
// Riempie sheet per visualizzare le estrazioni
|
||||
void fill() const;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
static void open_win_estr();
|
||||
static void open_win_conf();
|
||||
void sel() const;
|
||||
|
||||
public:
|
||||
TMonitor_mask();
|
||||
};
|
||||
|
||||
class TControllo_mask : public TAutomask
|
||||
{
|
||||
vector<TToken_string> _controllo_mov; // Usare import_error_list().
|
||||
char _ordin;
|
||||
char _verso;
|
||||
int _selected_mov;
|
||||
bool _sel_esclusi;
|
||||
bool _is_escluso;
|
||||
TString _cod_soc;
|
||||
TString _id_estr;
|
||||
char _tipo_doc_err{};
|
||||
TDate _datada;
|
||||
TDate _dataa;
|
||||
|
||||
void associa();
|
||||
void conferma_esclusi() const;
|
||||
|
||||
vector<TToken_string>& import_error_list();
|
||||
void fill();
|
||||
void fill_fppro_sheet() const;
|
||||
TMask& get_win_order();
|
||||
void open_win_order();
|
||||
|
||||
TToken_string* selected_mov();
|
||||
TToken_string* selected_fat() const;
|
||||
|
||||
/** Gestisce la selezione multipla negli sheet di controllo movimenti */
|
||||
void selfatt(TOperable_field& o, long jolly) const;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
public:
|
||||
TControllo_mask(const char* codsoc, const char* id_estr, bool esclusi = false);
|
||||
};
|
||||
|
||||
class TApri_estr_msk : public TAutomask
|
||||
{
|
||||
TString _idestr;
|
||||
TDate _dataestr;
|
||||
bool _provv;
|
||||
char _tipodoc;
|
||||
TString _statoestr;
|
||||
TDate _datadal;
|
||||
TDate _dataal;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
|
||||
bool inall_handler() const;
|
||||
bool inescludi_handler() const;
|
||||
bool inselect_handler() const;
|
||||
void conferma_esclusi() const;
|
||||
public:
|
||||
void fill_estr() const;
|
||||
void fill_res() const;
|
||||
void set_from_row_estrazione(TToken_string& row_estrazione);
|
||||
|
||||
TApri_estr_msk();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
inline bool open_mov(const TRectype& mov)
|
||||
{
|
||||
|
@ -6,12 +6,14 @@ BUTTON B_ORDER 2 2
|
||||
BEGIN
|
||||
PROMPT 1 5 "Ordinamento"
|
||||
PICTURE TOOL_EDIT
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
BUTTON B_ASSOC 2 2
|
||||
BEGIN
|
||||
PROMPT 1 6 "Associa mov."
|
||||
PICTURE TOOL_SAVEREC
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
BUTTON DLG_NULL 2 2
|
||||
@ -24,18 +26,21 @@ BUTTON B_SELESCL 2 2
|
||||
BEGIN
|
||||
PROMPT 1 8 "Sel. esclusi"
|
||||
PICTURE TOOL_MULTISEL
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
BUTTON B_ESCL 2 2
|
||||
BEGIN
|
||||
PROMPT 1 7 "Conf. esclusi"
|
||||
PICTURE TOOL_WARNING
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
BUTTON B_ALLESCL 2 2
|
||||
BEGIN
|
||||
PROMPT 1 7 "Sel. tutti"
|
||||
PICTURE TOOL_MULTISEL
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
#include <helpbar.h>
|
||||
@ -53,19 +58,19 @@ BEGIN
|
||||
PROMPT 0 1 "Movimenti da controllare"
|
||||
ITEM " "
|
||||
ITEM "Numero\nReg.@8"
|
||||
ITEM "Data\nReg.@10"
|
||||
ITEM "Data\nDoc.@10"
|
||||
ITEM "Codice\nCaus."
|
||||
ITEM "Mese\nliquidazione"
|
||||
ITEM "Numero\nDocumento@12"
|
||||
ITEM "Totale\nDocumento@18"
|
||||
ITEM "Cliente/\nFornitore"
|
||||
ITEM "Ragione\nSociale@50"
|
||||
ITEM "Cod. regis./\nprot.IVA@10"
|
||||
ITEM "Descrizione@50"
|
||||
ITEM "Escludi"
|
||||
ITEM "Escluso"
|
||||
ITEM "Descrizione\nErrore@50"
|
||||
ITEM "Data\nReg.@8"
|
||||
ITEM "Data\nDoc.@8"
|
||||
ITEM "Codice\nCaus.@8"
|
||||
ITEM "Mese\nliquidazione@8"
|
||||
ITEM "Numero\nDocumento@8"
|
||||
ITEM "Totale\nDocumento@8"
|
||||
ITEM "Cliente/\nFornitore@8"
|
||||
ITEM "Ragione\nSociale@8"
|
||||
ITEM "Cod. regis./\nprot.IVA@8"
|
||||
ITEM "Descrizione@8"
|
||||
ITEM "ESCLUDI@5"
|
||||
ITEM "ESCLUSO@6"
|
||||
ITEM "Descrizione\nErrore"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
@ -82,9 +87,9 @@ BEGIN
|
||||
ITEM "Num. Doc.@12"
|
||||
ITEM "Tot. Doc.@9"
|
||||
ITEM "Fornitore@6"
|
||||
ITEM "Rag. Soc.@50"
|
||||
ITEM "Rag. Soc.@20"
|
||||
ITEM "Stato P.IVA"
|
||||
ITEM "P.IVA@15"
|
||||
ITEM "P.IVA@8"
|
||||
ITEM "@1"
|
||||
END
|
||||
|
||||
@ -173,7 +178,7 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BOOLEAN F_CESCLUSO
|
||||
STRING F_CESCLUSO 2
|
||||
BEGIN
|
||||
PROMPT 1 1 "ESCLUSO"
|
||||
FLAG "D"
|
||||
|
@ -64,7 +64,7 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATA F_EDATAREG
|
||||
DATA FE_DATAREG
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
FLAGS "D"
|
||||
|
@ -111,23 +111,24 @@ BEGIN
|
||||
PROMPT 0 4 "Movimenti estratti"
|
||||
ITEM " "
|
||||
ITEM "Numero\nReg.@8"
|
||||
ITEM "Data\nReg.@0"
|
||||
ITEM "Data\nDoc.@10"
|
||||
ITEM "Codice\nCaus."
|
||||
ITEM "Tipo\nDoc."
|
||||
ITEM "Mese\nliquidazione"
|
||||
ITEM "Numero\nDocumento@12"
|
||||
ITEM "Totale\nDocumento@18"
|
||||
ITEM "Cliente/\nFornitore"
|
||||
ITEM "Ragione\nSociale@50"
|
||||
ITEM "Cod. regis./\nprot.IVA@10"
|
||||
ITEM "Descrizione@50"
|
||||
ITEM "Escludi"
|
||||
ITEM "Escluso"
|
||||
ITEM "Data\nReg.@8"
|
||||
ITEM "Data\nDoc.@8"
|
||||
ITEM "Codice\nCaus.@8"
|
||||
ITEM "Tipo Doc.@5"
|
||||
ITEM "Mese\nliquidazione@8"
|
||||
ITEM "Numero\nDocumento@8"
|
||||
ITEM "Totale\nDocumento@8"
|
||||
ITEM "Cliente/\nFornitore@8"
|
||||
ITEM "Ragione\nSociale@8"
|
||||
ITEM "Cod. regis./\nprot.IVA@8"
|
||||
ITEM "Descrizione@8"
|
||||
ITEM "ESCLUDI@5"
|
||||
ITEM "ESCLUSO@6"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
||||
PAGE "Risultato estrazione" 0 0 0 0
|
||||
|
||||
SPREADSHEET S_RES -1 -1
|
||||
@ -135,23 +136,26 @@ BEGIN
|
||||
PROMPT 0 0 "Movimenti"
|
||||
ITEM "Estratto"
|
||||
ITEM "Numero\nReg.@8"
|
||||
ITEM "Data\nReg.@10"
|
||||
ITEM "Data\nDoc.@10"
|
||||
ITEM "Codice\nCaus."
|
||||
ITEM "Tipo\nDoc."
|
||||
ITEM "Data\nReg.@8"
|
||||
ITEM "Data\nDoc.@8"
|
||||
ITEM "Codice\nCaus.@8"
|
||||
ITEM "Tipo Doc.@5"
|
||||
ITEM "Mese\nliquidazione@8"
|
||||
ITEM "Numero\nDocumento@12"
|
||||
ITEM "Totale\nDocumento@18"
|
||||
ITEM "Cliente/\nFornitore"
|
||||
ITEM "Ragione\nSociale@50"
|
||||
ITEM "Cod. regis./\nprot.IVA@10"
|
||||
ITEM "Descrizione@50"
|
||||
ITEM "Numero\nDocumento@8"
|
||||
ITEM "Totale\nDocumento@8"
|
||||
ITEM "Cliente/\nFornitore@8"
|
||||
ITEM "Ragione\nSociale@8"
|
||||
ITEM "Cod. regis./\nprot.IVA@8"
|
||||
ITEM "Descrizione@8"
|
||||
ITEM "Descrizione Estrazione@30"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
||||
|
||||
|
||||
|
||||
|
||||
PAGE "Mov Inclusi" -1 -1 78 13
|
||||
|
||||
BOOLEAN FI_SEL
|
||||
@ -238,17 +242,14 @@ BEGIN
|
||||
ITEM "S|SI"
|
||||
ITEM "N|NO"
|
||||
FLAGS "D"
|
||||
PROMPT 1 1 "Escludi"
|
||||
FLAG "D"
|
||||
END
|
||||
|
||||
BOOLEAN FI_IESCLUSO
|
||||
BEGIN
|
||||
PROMPT 1 1 "Escluso"
|
||||
FLAGS "D"
|
||||
PROMPT 1 1 "ESCLUSO"
|
||||
FLAG "D"
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
@ -275,6 +276,9 @@ END
|
||||
ENPAGE
|
||||
ENDMASK
|
||||
|
||||
|
||||
|
||||
|
||||
PAGE "Risultato estratti" -1 -1 78 13
|
||||
|
||||
BOOLEAN F_RSEL
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
|
||||
class TF9_categorie_doc_msk : public TAutomask
|
||||
{
|
||||
std::shared_ptr<TArray_sheet> _annessi_sheet;
|
||||
TCategorie_doc _categorie_doc;
|
||||
bool _mod_precaricate;
|
||||
|
||||
@ -46,7 +47,7 @@ class TF9_categorie_doc_msk : public TAutomask
|
||||
void check_duplicate_tipodoc() const;
|
||||
void delete_annesso(const TString& catdoc_padre);
|
||||
void edit_annesso(const TString& catdoc_padre);
|
||||
TArray_sheet * get_sheet_annesso(const TString& catdoc);
|
||||
void fill_annessi(const TString& catdoc);
|
||||
void load_table() const;
|
||||
void new_annesso(const TString& catdoc_padre);
|
||||
void salva_tabella() const;
|
||||
@ -88,10 +89,9 @@ bool TF9_categorie_doc_msk::on_field_event(TOperable_field& o, TField_event e, l
|
||||
{
|
||||
TSheet_field& sf = sfield(S_CLASSDOC);
|
||||
const TString catdoc_padre(sf.row(sf.selected()).get(1));
|
||||
TArray_sheet * sa = get_sheet_annesso(catdoc_padre);
|
||||
fill_annessi(catdoc_padre);
|
||||
int key;
|
||||
|
||||
while ((key = sa->run()) != K_ESC)
|
||||
while ((key = _annessi_sheet->run()) != K_ESC)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
@ -168,34 +168,26 @@ void TF9_categorie_doc_msk::check_duplicate_tipodoc() const
|
||||
|
||||
void TF9_categorie_doc_msk::delete_annesso(const TString& catdoc_padre)
|
||||
{
|
||||
TArray_sheet *sa = get_sheet_annesso(catdoc_padre);
|
||||
|
||||
if (sa->items() > 0)
|
||||
if (_annessi_sheet->items() > 0)
|
||||
{
|
||||
const int r = sa->selected();
|
||||
|
||||
const int r = _annessi_sheet->selected();
|
||||
const TString & cod_annesso = _annessi_sheet->row(r).get(0);
|
||||
if (yesno_box("Eliminare l'annesso : %s", (const char*) cod_annesso))
|
||||
{
|
||||
|
||||
_categorie_doc.del_annesso(catdoc_padre, cod_annesso);
|
||||
fill_annessi(catdoc_padre); }
|
||||
fill_annessi(catdoc_padre);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TF9_categorie_doc_msk::edit_annesso(const TString& catdoc_padre)
|
||||
{
|
||||
TArray_sheet * sa = get_sheet_annesso(catdoc_padre);
|
||||
|
||||
if (sa->items() > 0)
|
||||
if (_annessi_sheet->items() > 0)
|
||||
{
|
||||
TString title; title << TR("Modifica annesso per ") << catdoc_padre;
|
||||
TString title; title << "Modifica annesso per " << catdoc_padre;
|
||||
TNew_annesso_msk new_ann(title);
|
||||
|
||||
new_ann.edit_mode();
|
||||
|
||||
TToken_string& r = sa->row(sa->selected());
|
||||
|
||||
TToken_string& r = _annessi_sheet->row(_annessi_sheet->selected());
|
||||
new_ann.fill_field(r.get(0), r.get(1), r.get(2), r.get_bool(3));
|
||||
if (new_ann.run() == K_ENTER)
|
||||
{
|
||||
@ -209,14 +201,11 @@ void TF9_categorie_doc_msk::edit_annesso(const TString& catdoc_padre)
|
||||
}
|
||||
}
|
||||
|
||||
TArray_sheet * TF9_categorie_doc_msk::get_sheet_annesso(const TString& catdoc)
|
||||
void TF9_categorie_doc_msk::fill_annessi(const TString& catdoc)
|
||||
{
|
||||
TArray_sheet * sa = nullptr;
|
||||
|
||||
_categorie_doc.set_mode_sheet(0x1E);
|
||||
sa = _categorie_doc.get_sheet_ann(catdoc);
|
||||
sa->add_button(DLG_EDIT, TR("~Modifica"), K_ENTER, TOOL_EDIT);
|
||||
return sa;
|
||||
_annessi_sheet = _categorie_doc.get_sheet_ann(catdoc);
|
||||
_annessi_sheet->add_button(DLG_EDIT, TR("~Modifica"), K_ENTER, TOOL_EDIT);
|
||||
}
|
||||
|
||||
void TF9_categorie_doc_msk::load_table() const
|
||||
@ -259,10 +248,9 @@ void TF9_categorie_doc_msk::new_annesso(const TString& catdoc_padre)
|
||||
const TString& descr = new_ann.get(102);
|
||||
const TString& tipo = new_ann.get(103);
|
||||
const bool obblig = new_ann.get_bool(104);
|
||||
|
||||
correct_spell_catdoc(catann);
|
||||
_categorie_doc.add_annesso(catdoc_padre, catann, descr, tipo, obblig);
|
||||
// fill_annessi(catdoc_padre);
|
||||
fill_annessi(catdoc_padre);
|
||||
}
|
||||
else
|
||||
warning_box("E' gia' presente un annesso con lo stesso nome per la categoria %s", (const char*)catdoc_padre);
|
||||
@ -333,10 +321,7 @@ void TF9_categorie_doc::add_error_log(TString& query)
|
||||
bool TF9_categorie_doc::precarica_tabella_default()
|
||||
{
|
||||
TCategorie_doc preload;
|
||||
TString_array sa;
|
||||
|
||||
preload.get_array_rows(sa);
|
||||
if (sa.items() == 0 ||
|
||||
if (preload.get_array_rows().items() == 0 ||
|
||||
noyes_box("Attenzione questa procedura cancellera' le categorie documentali gia' presenti\ne carichera' quelle di default. Si desidera continuare?"))
|
||||
{
|
||||
preload.remove_all();
|
||||
@ -381,7 +366,8 @@ void TF9_categorie_doc::main_loop()
|
||||
DRT_CAUSSO ", "
|
||||
DRT_CAUSCON ", "
|
||||
DRT_TIPOCAU ", "
|
||||
DRT_OPCEE ")\nVALUES('" << get_ambiente() << "', '" <<
|
||||
DRT_OPCEE ")\nVALUES('" <<
|
||||
F9CONF.get_ambiente() << "', '" <<
|
||||
row->get(1) << "', '" << // Catdoc
|
||||
escape(row->get(2)) << "', '" << // Descr
|
||||
row->get(3) << "', '" << // Classe doc sost.
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "f90.h"
|
||||
|
||||
// #include <Windows.h>
|
||||
#include <Windows.h>
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
@ -27,14 +27,15 @@ class TImport_msk : public TAutomask
|
||||
{
|
||||
friend class TGestione_doc_cartacei_f9_msk;
|
||||
|
||||
TCategorie_doc _cats;
|
||||
|
||||
map<TString, unique_ptr<TArray_sheet>> _annessi;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
|
||||
static bool catdocann_handler(TMask_field& field, KEY key);
|
||||
static bool catannpadre_handler(TMask_field& field, KEY key);
|
||||
static bool ok_handler(TMask_field& field, KEY key);
|
||||
|
||||
static const char* select_catdoc();
|
||||
|
||||
public:
|
||||
void set_fields(const TString& impaddress, const TString& impnumreg, bool isannesso = false, const TString& catannpadre = "",
|
||||
@ -45,55 +46,60 @@ public:
|
||||
|
||||
bool TImport_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
TImport_msk & msk = (TImport_msk&)o.mask();
|
||||
|
||||
switch (o.dlg())
|
||||
{
|
||||
case F_IMPADDRESS:
|
||||
if (e == fe_modify)
|
||||
return fexist(o.get());
|
||||
break;
|
||||
case F_IMPNUMREG:
|
||||
if (e == fe_modify)
|
||||
case F_ISANNESSO:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
const bool on = o.mask().get_bool(F_ISANNESSO);
|
||||
o.mask().enable(F_CATDOCANN, on);
|
||||
}
|
||||
break;
|
||||
case F_IMPNUMREG:
|
||||
if(e == fe_modify)
|
||||
{
|
||||
const std::shared_ptr<TCategorie_doc::classe_doc> c = TCategorie_doc().mov2cat(o.get_int());
|
||||
if (c != nullptr)
|
||||
{
|
||||
TClasse_doc * c = _cats.mov2cat(o.get_long());
|
||||
|
||||
if (c != nullptr)
|
||||
{
|
||||
msk.set(F_CATANNPADRE, c->catdoc());
|
||||
msk.reset(F_CATDOCANN);
|
||||
}
|
||||
else
|
||||
{
|
||||
message_box(TR("Questo tipo di registrazione non corrisponde a nessuna delle categorie documentali inserite."));
|
||||
msk.reset(F_CATANNPADRE);
|
||||
msk.reset(F_CATDOCANN);
|
||||
}
|
||||
set(F_CATANNPADRE, c->catdoc);
|
||||
set(F_CATDOCANN, "");
|
||||
}
|
||||
case F_CATDOCANN:
|
||||
if (e == fe_modify)
|
||||
else
|
||||
{
|
||||
if (msk.get(F_CATANNPADRE).full())
|
||||
message_box("Questo tipo di registrazione non corrisponde a nessuna delle categorie documentali inserite.");
|
||||
set(F_CATANNPADRE, "");
|
||||
set(F_CATDOCANN, "");
|
||||
}
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TImport_msk::catdocann_handler(TMask_field& field, KEY key)
|
||||
{
|
||||
static const char* msg_notexist = "Non esistono tipologie di annessi per questa categoria documentale.";
|
||||
static const char* msg_inspadre = "Questa registrazione non e' riconosciuta in nessuna categoria documentale.\nImpossible inserire un annesso.\n"
|
||||
"Si prega di inserire prima una cat. documentale che comprenda questo tipo di registrazione\naggiungendo anche eventuali tipologie di annessi.";
|
||||
TCategorie_doc cd;
|
||||
TImport_msk& msk = (TImport_msk&)field.mask();
|
||||
if (key == K_TAB && field.dirty() && field.full())
|
||||
{
|
||||
if (msk.get(F_CATANNPADRE).full())
|
||||
{
|
||||
const TString_array names_ann = cd.get_array_ann(msk.get(F_CATANNPADRE));
|
||||
if (names_ann.items() > 0)
|
||||
{
|
||||
bool ok = false;
|
||||
FOR_EACH_ARRAY_ITEM(names_ann, nr, ann)
|
||||
{
|
||||
TString_array names_ann;
|
||||
|
||||
_cats.get_array_ann(msk.get(F_CATANNPADRE), names_ann);
|
||||
if (names_ann.items() > 0)
|
||||
{
|
||||
if (names_ann.find(o.get()) < 0)
|
||||
{
|
||||
msk.error_box(TR("La categoria inserita e' inesistente"));
|
||||
o.reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
warning_box(TR("Non esistono tipologie di annessi per questa categoria documentale."));
|
||||
if (field.get() == (*(TToken_string*)ann).get(0))
|
||||
ok = true;
|
||||
}
|
||||
else
|
||||
if (!ok)
|
||||
{
|
||||
warning_box(TR("Questa registrazione non e' riconosciuta in nessuna categoria documentale.\nImpossible inserire un annesso.\n"
|
||||
"Si prega di inserire prima una cat. documentale che comprenda questo tipo di registrazione\naggiungendo anche eventuali tipologie di annessi."));
|
||||
o.reset();
|
||||
msk.error_box("La categoria inserita e' inesistente");
|
||||
field.set("");
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -121,78 +127,63 @@ bool TImport_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
|
||||
if (cd.get_ann(catdoc_padre,s, annesso))
|
||||
{
|
||||
TArray_sheet* annessi = _cats.get_sheet_ann(msk.get(F_CATANNPADRE));
|
||||
|
||||
if (annessi && annessi->items() > 0)
|
||||
{
|
||||
if (annessi->run() == K_ENTER)
|
||||
{
|
||||
const char* s = annessi->row(annessi->selected()).get(0);
|
||||
TAnnesso annesso;
|
||||
|
||||
if (_cats.get_annesso(s, annesso))
|
||||
{
|
||||
if (annesso.op_cee() != "RC")
|
||||
msk.set(F_CATDOCANN, annesso.catdoc());
|
||||
else
|
||||
warning_box("Impossibile importare un annesso cartaceo per un prospetto integrativo per Reverse Charge.");
|
||||
}
|
||||
else
|
||||
warning_box("Errore nell'acquisire la categoria annesso");
|
||||
}
|
||||
}
|
||||
if (annesso.opcee != "RC")
|
||||
msk.set(F_CATDOCANN, annesso.catdoc);
|
||||
else
|
||||
warning_box(TR("Non esistono tipologie di annessi per questa categoria documentale."));
|
||||
warning_box("Impossibile importare un annesso cartaceo per un prospetto integrativo per Reverse Charge.");
|
||||
}
|
||||
else
|
||||
warning_box(TR("Questa registrazione non e' riconosciuta in nessuna categoria documentale.\nImpossible inserire un annesso.\n"
|
||||
"Si prega di inserire prima una cat. documentale che comprenda questo tipo di registrazione\naggiungendo anche eventuali tipologie di annessi."));
|
||||
}
|
||||
break;
|
||||
case F_CATANNPADRE:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
const TString_array &name_cats = _cats.get_name_catdocs();
|
||||
|
||||
if (name_cats.find(o.get()) < 0)
|
||||
{
|
||||
msk.error_box("La categoria inserita e' inesistente");
|
||||
o.reset();
|
||||
warning_box("Errore nell'acquisire la categoria annesso");
|
||||
}
|
||||
}
|
||||
else
|
||||
if (e == fe_button)
|
||||
{
|
||||
TArray_sheet & catdocs = _cats.get_sheet_catdocs();
|
||||
|
||||
if (catdocs.run() == K_ENTER)
|
||||
{
|
||||
o.set(catdocs.row().get(0));
|
||||
msk.reset(F_CATDOCANN);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
warning_box(msg_notexist);
|
||||
}
|
||||
else
|
||||
warning_box(msg_inspadre);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TImport_msk::catdocann_handler(TMask_field& field, KEY key)
|
||||
bool TImport_msk::catannpadre_handler(TMask_field& field, KEY key)
|
||||
{
|
||||
|
||||
TCategorie_doc cd;
|
||||
TImport_msk& msk = (TImport_msk&)field.mask();
|
||||
if (key == K_TAB && field.dirty() && field.full())
|
||||
{
|
||||
|
||||
std::set<TString>& name_cats = cd.get_name_catdocs();
|
||||
|
||||
const bool ok = name_cats.find(field.get()) != name_cats.end();
|
||||
if (!ok)
|
||||
{
|
||||
msk.error_box("La categoria inserita e' inesistente");
|
||||
field.set("");
|
||||
}
|
||||
}
|
||||
if (key == K_F9)
|
||||
{
|
||||
field.set(select_catdoc());
|
||||
msk.set(F_CATDOCANN, "");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void TImport_msk::set_fields(const TString & impaddress, const TString & impnumreg, const bool isannesso,
|
||||
const TString & catannpadre, const TString & catdocann)
|
||||
bool TImport_msk::ok_handler(TMask_field& field, KEY key)
|
||||
{
|
||||
field.mask().send_key(K_ENTER, DLG_OK);
|
||||
return true;
|
||||
}
|
||||
|
||||
const char* TImport_msk::select_catdoc()
|
||||
{
|
||||
auto catdocs = TCategorie_doc().get_sheet_catdocs();
|
||||
if (catdocs->run() == K_ENTER)
|
||||
return catdocs->row().get(0);
|
||||
return "";
|
||||
}
|
||||
|
||||
void TImport_msk::set_fields(const TString& impaddress, const TString& impnumreg, const bool isannesso,
|
||||
const TString& catannpadre, const TString& catdocann)
|
||||
{
|
||||
set(F_IMPADDRESS, impaddress);
|
||||
set(F_IMPNUMREG, impnumreg);
|
||||
@ -203,6 +194,7 @@ void TImport_msk::set_fields(const TString & impaddress, const TString & impnumr
|
||||
|
||||
TImport_msk::TImport_msk(): TAutomask("f90300b")
|
||||
{
|
||||
TMask::set_handler(F_CATANNPADRE, catannpadre_handler);
|
||||
TMask::set_handler(F_CATDOCANN, catdocann_handler);
|
||||
}
|
||||
|
||||
@ -231,22 +223,25 @@ class TGestione_doc_cartacei_f9_msk : public TAutomask
|
||||
TString loaddate;
|
||||
TString user;
|
||||
};
|
||||
TString_array _extensions; // todo: controllare che con TString funzioni l'ordinamento, quindi la find
|
||||
const TString& _addr_cart; // Indirizzo cartella doc. cartacei F9
|
||||
std::unique_ptr<TMask> _config_msk;
|
||||
std::unique_ptr<std::set<TString>> _extensions; // todo: controllare che con TString funzioni l'ordinamento, quindi la find
|
||||
std::unique_ptr<TImport_msk> _import_msk;
|
||||
std::map<TString, doc_cart_t> _list_file;
|
||||
std::map<TString, ann_cart_t> _list_ann;
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
|
||||
void check_deleted();
|
||||
bool check_file_exist(const TString& file) const;
|
||||
void delete_file();
|
||||
void edit_ann();
|
||||
void edit_file();
|
||||
void fill();
|
||||
void fill_annessi();
|
||||
void fill_docs();
|
||||
TToken_string& get_valid_extensions();
|
||||
void check_addr_cart();
|
||||
static void check_deleted();
|
||||
bool check_file_exist(const TString& file) const;
|
||||
void delete_file();
|
||||
void edit_ann();
|
||||
void edit_file();
|
||||
void fill();
|
||||
void fill_annessi();
|
||||
void fill_docs();
|
||||
static TToken_string& get_valid_extensions();
|
||||
void load_extensions();
|
||||
static bool load_file(const TFilename& file, const TString& numreg, bool is_annesso, const TString& catannpadre, const TString& catdocann);
|
||||
void open_config_win();
|
||||
@ -291,17 +286,25 @@ bool TGestione_doc_cartacei_f9_msk::on_field_event(TOperable_field& o, TField_ev
|
||||
return true;
|
||||
}
|
||||
|
||||
void TGestione_doc_cartacei_f9_msk::check_addr_cart()
|
||||
{
|
||||
const TFilename f(_addr_cart);
|
||||
if (f.full() && !f.exist())
|
||||
{
|
||||
warning_box("Cartella documenti cartacei non trovata.\nSalvare nuovamente le impostazioni.");
|
||||
open_config_win();
|
||||
}
|
||||
}
|
||||
|
||||
void TGestione_doc_cartacei_f9_msk::check_deleted()
|
||||
{
|
||||
// Controllo che non ci siano file nella cartella eliminati da piu' di un mese, altrimenti li elimino
|
||||
TString_array result;
|
||||
TFilename addr_cart(get_addr_cart());
|
||||
|
||||
addr_cart << "eliminati";
|
||||
if (dexist(addr_cart))
|
||||
TFilename s; s << TFilename(F9CONF.get_addr_cart()).slash_terminate() << "eliminati\\";
|
||||
if (s.exist())
|
||||
{
|
||||
list_files(addr_cart, result);
|
||||
FOR_EACH_ARRAY_ITEM(result, nr, obj)
|
||||
list_files(s, result);
|
||||
FOR_EACH_ARRAY_ITEM(result, nr, file)
|
||||
{
|
||||
const char* deletedfile = *(TString*)(file);
|
||||
tm *time = altime(deletedfile);
|
||||
@ -315,9 +318,8 @@ void TGestione_doc_cartacei_f9_msk::check_deleted()
|
||||
|
||||
bool TGestione_doc_cartacei_f9_msk::check_file_exist(const TString& file) const
|
||||
{
|
||||
TFilename path(get_addr_cart());
|
||||
|
||||
path.add(file);
|
||||
TFilename path(_addr_cart);
|
||||
path.slash_terminate() << file;
|
||||
return path.exist();
|
||||
}
|
||||
|
||||
@ -346,9 +348,9 @@ void TGestione_doc_cartacei_f9_msk::delete_file()
|
||||
f9annessi.put(F9A_FILENAME, filename);
|
||||
f9annessi.read();
|
||||
}
|
||||
TFilename filecart(get_addr_cart());
|
||||
TFilename filecart(F9CONF.get_addr_cart());
|
||||
filecart.slash_terminate();
|
||||
TFilename deleted(filecart);
|
||||
|
||||
filecart << filename;
|
||||
deleted << "eliminati" << SLASH;
|
||||
if (!deleted.exist())
|
||||
@ -581,23 +583,33 @@ void TGestione_doc_cartacei_f9_msk::fill_docs()
|
||||
|
||||
TToken_string& TGestione_doc_cartacei_f9_msk::get_valid_extensions()
|
||||
{
|
||||
TToken_string & ext = get_tmp_string(128);
|
||||
|
||||
ext.separator(',');
|
||||
ext = get_estensioni();
|
||||
static TToken_string ext(F9CONF.get_estensioni(), ',');
|
||||
if (ext.items() == 0)
|
||||
{
|
||||
ext = ".pdf, .doc, .docx, .xls, .xlsx, .jpg, .jpeg, .png";
|
||||
set_estensioni(ext);
|
||||
F9CONF.set_estensioni(ext);
|
||||
}
|
||||
ext.strip_spaces();
|
||||
ext.replace(" ", "");
|
||||
return ext;
|
||||
}
|
||||
|
||||
void TGestione_doc_cartacei_f9_msk::load_extensions()
|
||||
{
|
||||
if (_extensions.items() == 0)
|
||||
_extensions.tok2arr(get_valid_extensions());
|
||||
if (_extensions == nullptr)
|
||||
{
|
||||
_extensions = std::make_unique<std::set<TString>>();
|
||||
TToken_string& ext = get_valid_extensions();
|
||||
for (int i = 0; i < ext.items(); ++i)
|
||||
{
|
||||
TString e = ext.get(i);
|
||||
if (!e.empty())
|
||||
{
|
||||
if (e.starts_with("."))
|
||||
e.ltrim(1);
|
||||
_extensions->insert(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool TGestione_doc_cartacei_f9_msk::load_file(const TFilename& file, const TString& numreg, const bool is_annesso,
|
||||
@ -608,31 +620,64 @@ bool TGestione_doc_cartacei_f9_msk::load_file(const TFilename& file, const TStri
|
||||
|
||||
void TGestione_doc_cartacei_f9_msk::open_config_win()
|
||||
{
|
||||
TMask config_msk("Configurazione", 1, 78, 14);
|
||||
|
||||
// Creazione maschera
|
||||
config_msk.add_button_tool(DLG_OK, "Conferma", TOOL_OK);
|
||||
config_msk.add_button_tool(DLG_NULL, "", 0);
|
||||
config_msk.add_button_tool(DLG_QUIT, "Esci", TOOL_QUIT);
|
||||
config_msk.add_groupbox(DLG_NULL, 0, "@BCartella documenti cartacei", 1, 0, 76, 4);
|
||||
config_msk.add_static(DLG_NULL, 0, "@BInserire nome cartella, all'interno della area dati della ditta", 2, 1);
|
||||
config_msk.add_string(101, 0, "", 2, 2, 64, "", 30);
|
||||
config_msk.add_groupbox(DLG_NULL, 0, "", 1, 4, 76, 4, "");
|
||||
config_msk.add_static(DLG_NULL, 0, "@BInserire estensioni file riconosciute, separate da virgola.", 2, 5);
|
||||
config_msk.add_string(102, 0, "Estensioni:", 2, 6, 255, "", 60);
|
||||
config_msk.set(101, get_addr_cart());
|
||||
config_msk.set(102, get_estensioni());
|
||||
if(_config_msk == nullptr)
|
||||
{
|
||||
_config_msk = std::make_unique<TMask>("Configurazione", 1, 78, 14);
|
||||
_config_msk->add_button_tool(DLG_OK, "Conferma", TOOL_OK);
|
||||
_config_msk->add_button_tool(DLG_NULL, "", 0);
|
||||
_config_msk->add_button_tool(DLG_QUIT, "Esci", TOOL_QUIT);
|
||||
|
||||
_config_msk->add_groupbox(DLG_NULL, 0, "@BCartella documenti cartacei", 1, 0, 76, 4);
|
||||
_config_msk->add_static (DLG_NULL, 0, "@BInserire nome cartella, all'interno della area dati della ditta", 2, 1);
|
||||
_config_msk->add_string (102, 0, "", 2, 2, 64, "", 30);
|
||||
_config_msk->add_groupbox(DLG_NULL, 0, "", 1, 4, 76, 4, "");
|
||||
_config_msk->add_static (DLG_NULL, 0, "@BInserire estensioni file riconosciute, separate da virgola.", 2, 5);
|
||||
_config_msk->add_string (101, 0, "Estensioni:", 2, 6, 255, "", 60);
|
||||
|
||||
_config_msk->set(101, F9CONF.get_estensioni());
|
||||
TString s = F9CONF.get_addr_cart();
|
||||
s.rtrim(1);
|
||||
s.ltrim(s.rfind('\\') + 1);
|
||||
_config_msk->set(102, s);
|
||||
}
|
||||
|
||||
// Esecuzione maschera
|
||||
while (config_msk.run() == K_ENTER)
|
||||
while (true)
|
||||
{
|
||||
set_addr_cart(config_msk.get(101));
|
||||
set_estensioni(config_msk.get(102));
|
||||
if (config_msk.get(101).empty())
|
||||
if (_config_msk->run() != K_ENTER)
|
||||
{
|
||||
warning_box("Si prega di inserire il nome della cartella per i documenti cartacei.");
|
||||
continue;
|
||||
if (_config_msk->get(102).empty())
|
||||
{
|
||||
warning_box("Si prega di inserire il nome della cartella per i documenti cartacei.");
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
F9CONF.set_estensioni(_config_msk->get(101));
|
||||
TString dir = _config_msk->get(102);
|
||||
if (dir.empty())
|
||||
{
|
||||
if(yesno_box("Nome cartella vuoto.\nCreare cartella con nome 'Cartacei_F9'?"))
|
||||
_config_msk->set(102, dir = "Cartacei_F9");
|
||||
else continue;
|
||||
}
|
||||
|
||||
TFilename path(prefix().get_studio());
|
||||
path.add(dir).slash_terminate();
|
||||
if (!path.exist())
|
||||
{
|
||||
if (dir == "Cartacei_F9" || yesno_box("Il percorso indicato e' inesistente.\nCreare la cartella con questo nome?"))
|
||||
{
|
||||
if (!make_dir(path))
|
||||
{
|
||||
warning_box("Impossibile creare il percorso specificato.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else continue;
|
||||
}
|
||||
F9CONF.set_addr_cart(path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -644,18 +689,16 @@ void TGestione_doc_cartacei_f9_msk::open_import_win()
|
||||
while(_import_msk->run() == K_ENTER)
|
||||
{
|
||||
const TString& file = _import_msk->get(F_IMPADDRESS);
|
||||
|
||||
const TString& numreg = _import_msk->get(F_IMPNUMREG);
|
||||
const bool is_annesso = _import_msk->get_bool(F_ISANNESSO);
|
||||
const TString& catannpadre = _import_msk->get(F_CATANNPADRE);
|
||||
const TString& catdocann = _import_msk->get(F_CATDOCANN);
|
||||
if (!file.empty())
|
||||
{
|
||||
const long numreg = _import_msk->get_long(F_IMPNUMREG);
|
||||
const bool is_annesso = _import_msk->get_bool(F_ISANNESSO);
|
||||
const TString& catannpadre = _import_msk->get(F_CATANNPADRE);
|
||||
const TString& catdocann = _import_msk->get(F_CATDOCANN);
|
||||
TFilename f(file);
|
||||
|
||||
if (verify_extension(f))
|
||||
{
|
||||
if(numreg != 0L)
|
||||
if(!numreg.empty())
|
||||
{
|
||||
if (!is_annesso || catannpadre.full() && catdocann.full())
|
||||
{
|
||||
@ -675,7 +718,7 @@ void TGestione_doc_cartacei_f9_msk::open_import_win()
|
||||
warning_box("Questo file e' in un formato non accettato.");
|
||||
}
|
||||
else
|
||||
warning_box("");
|
||||
warning_box("Si prega di inserire il nome del file.");
|
||||
}
|
||||
fill();
|
||||
}
|
||||
@ -694,20 +737,26 @@ void TGestione_doc_cartacei_f9_msk::remove_file_from_f9cart(const std::set<TStri
|
||||
|
||||
bool TGestione_doc_cartacei_f9_msk::verify_extension(const TFilename& file)
|
||||
{
|
||||
return _extensions.find(file.ext()) >= 0;
|
||||
load_extensions();
|
||||
return _extensions->find(file.ext()) != _extensions->end();
|
||||
}
|
||||
|
||||
TGestione_doc_cartacei_f9_msk::TGestione_doc_cartacei_f9_msk(): TAutomask("f90300a")
|
||||
TGestione_doc_cartacei_f9_msk::TGestione_doc_cartacei_f9_msk(): TAutomask("f90300a"), _addr_cart(F9CONF.get_addr_cart())
|
||||
{
|
||||
if (get_addr_cart(false))
|
||||
if (_addr_cart.empty())
|
||||
{
|
||||
message_box("Inserire nome cartella documenti cartacei.");
|
||||
open_config_win();
|
||||
}
|
||||
else
|
||||
check_addr_cart();
|
||||
check_deleted();
|
||||
fill();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// TGestione_doc_cartacei_f9_app
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -15,9 +15,8 @@ END
|
||||
STRING F_IMPADDRESS 255 64
|
||||
BEGIN
|
||||
PROMPT 2 2 "Apri: "
|
||||
WARNING "Inserire il nome di un file esistente"
|
||||
FSELECT ""
|
||||
FLAG "BR"
|
||||
FLAG "B"
|
||||
END
|
||||
|
||||
NUMBER F_IMPNUMREG 7
|
||||
@ -40,14 +39,12 @@ END
|
||||
BOOLEAN F_ISANNESSO
|
||||
BEGIN
|
||||
PROMPT 2 4 "Annesso"
|
||||
MESSAGE FALSE CLEAR,F_CATANNPADRE
|
||||
MESSAGE TRUE ENABLE,F_CATANNPADRE
|
||||
END
|
||||
|
||||
STRING F_CATANNPADRE 10
|
||||
BEGIN
|
||||
PROMPT 2 5 "Cat.doc. padre"
|
||||
FLAGS "DR"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CATDOCANN 10
|
||||
|
@ -15,9 +15,11 @@ class TF9_test_app : public TSkeleton_application
|
||||
{
|
||||
public:
|
||||
void main_loop() override;
|
||||
TF9_test_app() {};
|
||||
TF9_test_app() = default;
|
||||
};
|
||||
|
||||
|
||||
|
||||
void TF9_test_app::main_loop()
|
||||
{
|
||||
TLocalisamfile f(LF_F9ANNESSI);
|
||||
@ -40,17 +42,14 @@ void TF9_test_app::main_loop()
|
||||
TF9_doccart d;
|
||||
TString_array sa;
|
||||
//CHECK(d.mov2listann(search_numreg, sa) && sa.items() == 2, "COSA STAI LEGGENDO??");
|
||||
|
||||
FOR_EACH_ARRAY_ITEM(sa, nr, file)
|
||||
{
|
||||
TString namefile = (*(TToken_string*)file).get(1);
|
||||
TLocalisamfile ann(LF_F9ANNESSI);
|
||||
|
||||
ann.put(F9A_NUMREG, search_numreg);
|
||||
ann.put(F9A_FILENAME, namefile);
|
||||
CHECK(ann.read() == NOERR, "Non esiste questo numreg??");
|
||||
filename = ann.get(F9A_FILENAME);
|
||||
|
||||
TString rec; rec <<
|
||||
filename << "\n" <<
|
||||
ann.get(F9A_NUMREG) << "\n" <<
|
||||
@ -58,7 +57,6 @@ void TF9_test_app::main_loop()
|
||||
ann.get(F9A_CATDOCANN) << "\n" <<
|
||||
ann.get(F9A_LOADDATE) << "\n" <<
|
||||
ann.get(F9A_USER);
|
||||
|
||||
CHECK(filename == "annmid.pdf" || filename == "annmid2.pdf", "YOU'RE WRONG");
|
||||
//message_box(rec);
|
||||
}
|
||||
@ -68,169 +66,156 @@ void TF9_test_app::main_loop()
|
||||
if (noyes_box("Attenzione: procedere all'eliminazione e caricamento di categorie documentali e annessi di prova?"))
|
||||
{
|
||||
TCategorie_doc preload;
|
||||
|
||||
preload.remove_all();
|
||||
preload.reload();
|
||||
preload.add_categoria("FATTACQ", "FATTURE DI ACQUISTI", "FTA", "TD01", "", "FA");
|
||||
preload.add_categoria("FATTVEN", "FATTURE DI VENDITA", "FTV", "TD01", "", "FV");
|
||||
preload.add_categoria("NOTCREDACQ", "Nota credito di acquisto", "FTA", "TD04", "", "NC");
|
||||
preload.add_categoria("NOTDEBVEN", "Nota debito di vendita", "FTV", "TD05", "", "ND");
|
||||
preload.add_categoria("FATTCORR", "Fattura corrispettivi", "FTA", "TD01", "", "CR");
|
||||
preload.add_categoria("ACQREV", "Fattura acq. con rev. charge", "FTA", "TD01", "052", "FA");
|
||||
preload.add_categoria("FATTACQ", "FATTURE DI ACQUISTI", "FTA", "TD01", "", "FA");
|
||||
preload.add_categoria("FATTVEN", "FATTURE DI VENDITA", "FTV", "TD01", "", "FV");
|
||||
preload.add_categoria("NOTCREDACQ", "Nota credito di acquisto", "FTA", "TD04", "", "NC");
|
||||
preload.add_categoria("NOTDEBVEN", "Nota debito di vendita", "FTV", "TD05", "", "ND");
|
||||
preload.add_categoria("FATTCORR", "Fattura corrispettivi", "FTA", "TD01", "", "CR");
|
||||
preload.add_categoria("ACQREV", "Fattura acq. con rev. charge", "FTA", "TD01", "052", "FA");
|
||||
|
||||
preload.add_annesso("FATTACQ", "GENACQ", "Annesso generico acq", "DC");
|
||||
preload.add_annesso("FATTVEN", "GENVEN", "Annesso gen. ven.", "DC");
|
||||
preload.add_annesso("ACQREV", "INTREVC", "Prosp. integr. rev.ch.", "RC", true);
|
||||
preload.add_annesso("FATTACQ", "LEASING", "Annesso leasing", "DC");
|
||||
preload.add_annesso("FATTACQ", "GENACQ", "Annesso generico acq", "DC");
|
||||
preload.add_annesso("FATTVEN", "GENVEN", "Annesso gen. ven.", "DC");
|
||||
preload.add_annesso("ACQREV", "INTREVC", "Prosp. integr. rev.ch.", "RC", true);
|
||||
preload.add_annesso("FATTACQ", "LEASING", "Annesso leasing", "DC");
|
||||
|
||||
TString_array sa;
|
||||
CHECK(preload.get_array_rows().items() > 0, "Errore aggiunta o caricamento categorie documentali.");
|
||||
TCategorie_doc::annesso annesso;
|
||||
if (preload.get_ann("FATTACQ","GENACQ", annesso))
|
||||
{ }
|
||||
TCategorie_doc::classe_doc get_classe_doc_right{ "ACQREV", "Fattura acq. con rev. charge", "FTA", "TD01", "052", "FA" };
|
||||
std::shared_ptr<TCategorie_doc::classe_doc> get_classe_doc = preload.get_classe_doc("ACQREV");
|
||||
CHECK(get_classe_doc->catdoc == get_classe_doc_right.catdoc &&
|
||||
get_classe_doc->descr == get_classe_doc_right.descr &&
|
||||
get_classe_doc->class_sost == get_classe_doc_right.class_sost &&
|
||||
get_classe_doc->caus_sost == get_classe_doc_right.caus_sost &&
|
||||
get_classe_doc->causcont == get_classe_doc_right.causcont &&
|
||||
get_classe_doc->tipocaus == get_classe_doc_right.tipocaus, "get_classe_doc failed"
|
||||
);
|
||||
std::set<TString> get_name_catdocs = preload.get_name_catdocs();
|
||||
CHECK(get_name_catdocs.find("FATTACQ") != get_name_catdocs.end() &&
|
||||
get_name_catdocs.find("FATTVEN") != get_name_catdocs.end() &&
|
||||
get_name_catdocs.find("NOTCREDACQ") != get_name_catdocs.end() &&
|
||||
get_name_catdocs.find("NOTDEBVEN") != get_name_catdocs.end() &&
|
||||
get_name_catdocs.find("FATTCORR") != get_name_catdocs.end() &&
|
||||
get_name_catdocs.find("ACQREV") != get_name_catdocs.end(), "Get catdocs failed"
|
||||
);
|
||||
std::shared_ptr<TCategorie_doc::classe_doc> mov2cat = preload.mov2cat(95752);
|
||||
CHECK(mov2cat, "mov2cat failed: classe doc is null");
|
||||
mov2cat = preload.mov2cat(96955); // Rev. charge causale 052
|
||||
CHECK(mov2cat->causcont == "052", "Error retriving cat.doc. from numreg for causale.");
|
||||
|
||||
preload.get_array_rows(sa);
|
||||
CHECK(sa.items() > 0, "Errore aggiunta o caricamento categorie documentali.");
|
||||
const TString cat_selected = "FATTACQ";
|
||||
TCategorie_doc catdoc;
|
||||
std::shared_ptr<TArray_sheet> annessi = catdoc.get_sheet_ann(cat_selected);
|
||||
CHECK(annessi->items() == 2, "TCategorie_doc::get_sheet_ann() failed: retrived %d elements instead of 2", (int)annessi->items());
|
||||
|
||||
TAnnesso annesso;
|
||||
std::shared_ptr<TArray_sheet> sheet_catdocs = catdoc.get_sheet_catdocs();
|
||||
CHECK(sheet_catdocs->items() == 6, "TCategorie_doc::get_sheet_catdocs() failed: retrived %d elements instead of 6", (int)sheet_catdocs->items());
|
||||
|
||||
if (preload.get_annesso("ACQREV", annesso))
|
||||
|
||||
TRecord_categorie rec(TRecord_categorie::catdocs);
|
||||
TRecord_categorie rec2(TRecord_categorie::annessi);
|
||||
rec.put("NAME", "FATTACQ");
|
||||
rec.read();
|
||||
TString name = rec.get("NAME");
|
||||
TString descr = rec.get("DESCR");
|
||||
TString classdo = rec.get("CLASSDOCSOS");
|
||||
TString caussos = rec.get("CAUSSOS");
|
||||
TString causcon = rec.get("CAUSCONT");
|
||||
TString tipodoc = rec.get("TIPODOC");
|
||||
CHECK(name == "FATTACQ" && descr.starts_with("FATTURE") && classdo == "FTA" && caussos == "TD01"&& causcon.blank() && tipodoc == "FA", "TRecord_categorie failed to retrieve FATTACQ");
|
||||
rec2.put("CATDOC", "FATTACQ");
|
||||
bool ok = rec2.read();
|
||||
CHECK(ok, "TRecord_categorie (annessi) failed to retrieve annessi FATTACQ");
|
||||
for (; ok; ok = rec2.next())
|
||||
{
|
||||
TClasse_doc get_classe_doc_right("ACQREV", "Fattura acq. con rev. charge", "FTA", "TD01", "052", "FA");
|
||||
TClasse_doc * get_classe_doc = preload.get_classe_doc("ACQREV");
|
||||
|
||||
CHECK(get_classe_doc->catdoc() == get_classe_doc_right.catdoc() &&
|
||||
get_classe_doc->descr() == get_classe_doc_right.descr() &&
|
||||
get_classe_doc->class_sost() == get_classe_doc_right.class_sost() &&
|
||||
get_classe_doc->caus_sost() == get_classe_doc_right.caus_sost() &&
|
||||
get_classe_doc->caus_cont() == get_classe_doc_right.caus_cont() &&
|
||||
get_classe_doc->tipo_caus() == get_classe_doc_right.tipo_caus(), "get_classe_doc failed"
|
||||
);
|
||||
|
||||
const TString_array & get_name_catdocs = preload.get_name_catdocs();
|
||||
|
||||
CHECK(get_name_catdocs.find("FATTACQ") >= 0 &&
|
||||
get_name_catdocs.find("FATTVEN") >= 0 &&
|
||||
get_name_catdocs.find("NOTCREDACQ") >= 0 &&
|
||||
get_name_catdocs.find("NOTDEBVEN") >= 0 &&
|
||||
get_name_catdocs.find("FATTCORR") >= 0 &&
|
||||
get_name_catdocs.find("ACQREV") >= 0, "Get catdocs failed");
|
||||
|
||||
TClasse_doc * mov2cat = preload.mov2cat(95752L);
|
||||
|
||||
CHECK(mov2cat, "mov2cat failed: classe doc is null");
|
||||
mov2cat = preload.mov2cat(96955L); // Rev. charge causale 052
|
||||
CHECK(mov2cat->caus_cont() == "052", "Error retriving cat.doc. from numreg for causale.");
|
||||
|
||||
const TString cat_selected = "FATTACQ";
|
||||
TCategorie_doc catdoc;
|
||||
const TArray_sheet * annessi = catdoc.get_sheet_ann(cat_selected);
|
||||
|
||||
CHECK(annessi->items() == 2, format(FR("TCategorie_doc::get_sheet_ann() failed: retrived %d elements instead of 2"), annessi->items()));
|
||||
|
||||
const TArray_sheet & sc = catdoc.get_sheet_catdocs();
|
||||
|
||||
CHECK(sc.items() == 6, format(FR("TCategorie_doc::get_sheet_catdocs() failed: retrived %d elements instead of 6"), sc.items()));
|
||||
|
||||
|
||||
TRecord_categorie rec(TRecord_categorie::catdocs);
|
||||
TRecord_categorie rec2(TRecord_categorie::annessi);
|
||||
rec.put("NAME", "FATTACQ");
|
||||
rec.read();
|
||||
TString name = rec.get("NAME");
|
||||
TString descr = rec.get("DESCR");
|
||||
TString classdo = rec.get("CLASSDOCSOS");
|
||||
TString caussos = rec.get("CAUSSOS");
|
||||
TString causcon = rec.get("CAUSCONT");
|
||||
TString tipodoc = rec.get("TIPODOC");
|
||||
CHECK(name == "FATTACQ" && descr.starts_with("FATTURE") && classdo == "FTA" && caussos == "TD01"&& causcon.blank() && tipodoc == "FA", "TRecord_categorie failed to retrieve FATTACQ");
|
||||
rec2.put("CATDOC", "FATTACQ");
|
||||
bool ok = rec2.read();
|
||||
CHECK(ok, "TRecord_categorie (annessi) failed to retrieve annessi FATTACQ");
|
||||
for (; ok; ok = rec2.next())
|
||||
{
|
||||
TString s_catdoc = rec2.get("CATDOC");
|
||||
TString s_name = rec2.get("NAME");
|
||||
TString s_descr = rec2.get("DESCR");
|
||||
TString s_tipoann = rec2.get("TIPOANN");
|
||||
bool s_obblig = rec2.get("OBBLIG") == "X";
|
||||
CHECK(s_catdoc == "FATTACQ" && s_tipoann == "DC" && !s_obblig && (s_name == "GENACQ" && s_descr.starts_with("Annesso generico") ||
|
||||
s_name == "LEASING" && s_descr.starts_with("Annesso lea")),
|
||||
"TRecord_categorie (annessi) failed to retrive annessi FATTACQ");
|
||||
}
|
||||
TString s_catdoc = rec2.get("CATDOC");
|
||||
TString s_name = rec2.get("NAME");
|
||||
TString s_descr = rec2.get("DESCR");
|
||||
TString s_tipoann = rec2.get("TIPOANN");
|
||||
bool s_obblig = rec2.get("OBBLIG") == "X";
|
||||
CHECK(s_catdoc == "FATTACQ" && s_tipoann == "DC" && !s_obblig && (s_name == "GENACQ" && s_descr.starts_with("Annesso generico") ||
|
||||
s_name == "LEASING" && s_descr.starts_with("Annesso lea")),
|
||||
"TRecord_categorie (annessi) failed to retrive annessi FATTACQ");
|
||||
}
|
||||
|
||||
if (false)
|
||||
{
|
||||
TF9_doccart doccart;
|
||||
TString old_numreg; old_numreg << 95752;
|
||||
TFilename doc;
|
||||
TString_array list_annessi;
|
||||
vector<annesso_t> vect_annessi;
|
||||
//TFilename f_doc; f_doc << "asd";
|
||||
//bool annesso;
|
||||
//bool doc_ae = doccart.doc_already_exists(f_doc, old_numreg, annesso);
|
||||
bool movdoc = doccart.mov2doc(old_numreg, doc);
|
||||
TString msg("Error retriving filename from reg n. "); msg << old_numreg;
|
||||
CHECK(movdoc && TString(doc.name()) == "ve1300_F01_0000000011_0002237.pdf", (const char*)msg);
|
||||
|
||||
old_numreg.cut(0) << 95222; // Doppio annesso
|
||||
bool movann = doccart.mov2listann(old_numreg, list_annessi);
|
||||
//CHECK(movann && list_annessi.items() == 2, "Error retriving list annessi from numreg %s", (const char*)old_numreg);
|
||||
bool movannvect = doccart.mov2listann_vect(old_numreg, vect_annessi);
|
||||
//CHECK(movannvect && vect_annessi.size() == 2, "Error retriving vector annessi from numreg %s", (const char*)old_numreg);
|
||||
|
||||
|
||||
/*TCategorie_doc::annesso annesso;
|
||||
annesso.catdoc = "INTEGREV";
|
||||
annesso.catdocpadre = "FATTREV";
|
||||
annesso.descr = "Integrazione Rev. Charge";
|
||||
annesso.opcee = "RC";
|
||||
annesso.obblig = true;
|
||||
TEstrazione::make_prosp_int_revc(96951, annesso);*/
|
||||
}
|
||||
|
||||
if (false)
|
||||
{
|
||||
TF9Prospetto_integr prosp;
|
||||
if (prosp("96951", "96952"))
|
||||
{
|
||||
TFilename tmp; tmp.tempdir();
|
||||
tmp.add(prosp.filename().name());
|
||||
tmp.ext("pdf");
|
||||
#ifndef DBG
|
||||
bool exp = prosp.export_pdf(tmp);
|
||||
#else
|
||||
bool exp = prosp.preview();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
clifo.put(CLI_TIPOCF, "C");
|
||||
clifo.put(CLI_CODCF, 230);
|
||||
int iss = clifo.read();
|
||||
TString statopaiv;
|
||||
TString idfisc;
|
||||
TString paiv;
|
||||
TString codfisc;
|
||||
TAnnesso a;
|
||||
TCategorie_doc categorie_doc;
|
||||
|
||||
if (categorie_doc.get_annesso("INTREVC", a))
|
||||
{
|
||||
TFilename path("c:/u/dati/");
|
||||
TEstrazione e(get_ambiente(), true, 'A', EMPTY_STRING, get_addr_cart(), false, path);
|
||||
|
||||
e.make_prosp_int_revc(153480, a);
|
||||
}
|
||||
|
||||
TString s = TEstrai_mask::get_numdoc_exp_fp(105396);
|
||||
|
||||
message_box("TESTS COMPLETELY SUCCESSFUL");
|
||||
}
|
||||
|
||||
if (false)
|
||||
{
|
||||
TF9_doccart doccart;
|
||||
TString old_numreg; old_numreg << 95752;
|
||||
TFilename doc;
|
||||
TString_array list_annessi;
|
||||
vector<annesso_t> vect_annessi;
|
||||
//TFilename f_doc; f_doc << "asd";
|
||||
//bool annesso;
|
||||
//bool doc_ae = doccart.doc_already_exists(f_doc, old_numreg, annesso);
|
||||
bool movdoc = doccart.mov2doc(old_numreg, doc);
|
||||
TString msg("Error retriving filename from reg n. "); msg << old_numreg;
|
||||
CHECK(movdoc && TString(doc.name()) == "ve1300_F01_0000000011_0002237.pdf", (const char*)msg);
|
||||
|
||||
old_numreg.cut(0) << 95222; // Doppio annesso
|
||||
bool movann = doccart.mov2listann(old_numreg, list_annessi);
|
||||
//CHECK(movann && list_annessi.items() == 2, "Error retriving list annessi from numreg %s", (const char*)old_numreg);
|
||||
bool movannvect = doccart.mov2listann_vect(old_numreg, vect_annessi);
|
||||
//CHECK(movannvect && vect_annessi.size() == 2, "Error retriving vector annessi from numreg %s", (const char*)old_numreg);
|
||||
|
||||
|
||||
/*TCategorie_doc::annesso annesso;
|
||||
annesso.catdoc = "INTEGREV";
|
||||
annesso.catdocpadre = "FATTREV";
|
||||
annesso.descr = "Integrazione Rev. Charge";
|
||||
annesso.opcee = "RC";
|
||||
annesso.obblig = true;
|
||||
TEstrazione::make_prosp_int_revc(96951, annesso);*/
|
||||
}
|
||||
|
||||
if(false)
|
||||
{
|
||||
TF9Prospetto_integr prosp;
|
||||
if (prosp("96951", "96952"))
|
||||
{
|
||||
TFilename tmp; tmp.tempdir();
|
||||
tmp.add(prosp.filename().name());
|
||||
tmp.ext("pdf");
|
||||
#ifndef DBG
|
||||
bool exp = prosp.export_pdf(tmp);
|
||||
#else
|
||||
bool exp = prosp.preview();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
clifo.put(CLI_TIPOCF, "C");
|
||||
clifo.put(CLI_CODCF, 230);
|
||||
int iss = clifo.read();
|
||||
TString statopaiv;
|
||||
TString idfisc;
|
||||
TString paiv;
|
||||
TString codfisc;
|
||||
//TEstrazione::fill_id(clifo, statopaiv, idfisc, paiv, codfisc);
|
||||
|
||||
TCategorie_doc::annesso annesso;
|
||||
TCategorie_doc categorie_doc;
|
||||
|
||||
if(categorie_doc.get_ann("FATTACQ","INTREVC", annesso))
|
||||
TEstrazione::make_prosp_int_revc(153480, annesso);
|
||||
|
||||
TString s = TEstrai_mask::get_numdoc_exp_fp(105396);
|
||||
|
||||
message_box("TESTS COMPLETELY SUCCESSFUL");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int f90400(const int argc, char* argv[])
|
||||
{
|
||||
TF9_test_app test_app;
|
||||
|
||||
test_app.run(argc, argv, "F9 Test Application");
|
||||
return 0;
|
||||
test_app.run(argc, argv, "F9 Test Application");
|
||||
return 0;
|
||||
}
|
||||
|
431
src/f9/f9lib.h
431
src/f9/f9lib.h
@ -17,7 +17,7 @@
|
||||
#define INI_CATDOC "CATDOC"
|
||||
#define INI_ANNESSI "ANNCAT"
|
||||
|
||||
inline bool is_italiano(const TString & statopaiv) { return statopaiv.blank() || statopaiv == "IT"; }
|
||||
#define IS_ITALIANO(statopaiv) ((statopaiv) == "IT" || !(statopaiv).full())
|
||||
|
||||
// Controlla eventuali apostrofi e li raddoppia
|
||||
const char* check_str(const TString& str);
|
||||
@ -92,107 +92,87 @@ enum state_fppro
|
||||
err_read_db = 999 // Errore lettura da fppro
|
||||
};
|
||||
|
||||
const TString & get_ambiente();
|
||||
const TString & get_addr_doc();
|
||||
const TString & get_addr_doc_loc();
|
||||
bool get_has_cartexp();
|
||||
|
||||
const TString & get_addr_cart(bool check = false);
|
||||
const TString & get_estensioni();
|
||||
|
||||
void set_ambiente(const TString& cod_amb);
|
||||
void set_addr_doc(const TString& path);
|
||||
void set_addr_doc_loc(const TString& path);
|
||||
void set_has_cartexp(bool flag);
|
||||
|
||||
void set_addr_cart(const TString& path);
|
||||
void set_estensioni(const TString& ext);
|
||||
|
||||
class TClasse_doc : public TObject
|
||||
class TF9_config
|
||||
{
|
||||
TString _catdoc; // Codice cat. documentale.
|
||||
TString _descr; // Descrizione documento.
|
||||
TString _class_sost; // { FTA | FTV } - classe documentale sostitutiva.
|
||||
TString _caus_sost; // causale per sostitutiva (TD01...).
|
||||
TString _caus_cont; // Codice causale.
|
||||
TString _tipo_caus; // Usato come tipo documento (FA, FV, CR, ...).
|
||||
// todo: controllare che siano sqlsafe
|
||||
// Config in f90100:
|
||||
|
||||
protected :
|
||||
void copy(const TClasse_doc & c);
|
||||
TString _ambiente; // Codice ambiente (codsoc)
|
||||
TString _addr_doc; // Indirizzo documenti cartacei WebApp (Server)
|
||||
TString _addr_doc_loc; // Indirizzo documenti cartacei WebApp (Locale)
|
||||
bool _cartexp;
|
||||
|
||||
// Config in f90300:
|
||||
|
||||
TString _addr_cart; // Indirizzo cartella documenti cartacei
|
||||
TString _estensioni; // Estensioni valide per il caricamenti dei doc. cart.
|
||||
|
||||
public:
|
||||
const TString & catdoc() { return _catdoc; }
|
||||
const TString & descr() { return _descr; }
|
||||
const TString & class_sost() { return _class_sost; }
|
||||
const TString & caus_sost() { return _caus_sost; }
|
||||
const TString & caus_cont() { return _caus_cont; }
|
||||
const TString & tipo_caus() { return _tipo_caus; }
|
||||
const TClasse_doc & operator = (const TClasse_doc & c) { copy(c); return c; }
|
||||
const TString& get_ambiente() const { return _ambiente; }
|
||||
const TString& get_addr_doc() const { return _addr_doc; }
|
||||
const TString& get_addr_doc_loc() const { return _addr_doc_loc; }
|
||||
bool get_has_cartexp() const { return _cartexp; }
|
||||
|
||||
// @cmember Costruttori
|
||||
TClasse_doc() {};
|
||||
TClasse_doc(const char * catdoc, const char * descr,
|
||||
const char * class_sost, const char * caus_sost,
|
||||
const char * caus_cont, const char * tipo_caus)
|
||||
: _catdoc(catdoc), _descr(descr), _class_sost(class_sost),
|
||||
_caus_sost(caus_sost), _caus_cont(caus_cont),
|
||||
_tipo_caus(tipo_caus)
|
||||
{};
|
||||
TClasse_doc(const TClasse_doc & c) { copy(c); }
|
||||
const TString& get_addr_cart() const { return _addr_cart; }
|
||||
const TString& get_estensioni() const { return _estensioni; }
|
||||
|
||||
void set_ambiente(const TString& cod_amb);
|
||||
void set_addr_doc(const TString& path);
|
||||
void set_addr_doc_loc(const TString& path);
|
||||
void set_has_cartexp(bool flag);
|
||||
|
||||
void set_addr_cart(const TString& path);
|
||||
void set_estensioni(const TString& ext);
|
||||
|
||||
TF9_config();
|
||||
};
|
||||
|
||||
class TAnnesso : public TObject
|
||||
extern TF9_config F9CONF;
|
||||
|
||||
class TCategorie_doc
|
||||
{
|
||||
TString _catdoc_padre;
|
||||
TString _catdoc; // Codice cat. documentale.
|
||||
TString _descr; // Descrizione documento.
|
||||
TString _op_cee; // { RV | DC } - Usato come classificazione annesso (Reverse, ann. cartaceo).
|
||||
bool _obblig{ false }; // Definisce se deve essere per forza presente l'annesso.
|
||||
public:
|
||||
struct classe_doc
|
||||
{
|
||||
TString catdoc; // Codice cat. documentale.
|
||||
TString descr; // Descrizione documento.
|
||||
TString class_sost; // { FTA | FTV } - classe documentale sostitutiva.
|
||||
TString caus_sost; // causale per sostitutiva (TD01...).
|
||||
TString causcont; // Codice causale.
|
||||
TString tipocaus; // Usato come tipo documento (FA, FV, CR, ...).
|
||||
};
|
||||
struct annesso
|
||||
{
|
||||
TString catdocpadre;
|
||||
TString catdoc; // Codice cat. documentale.
|
||||
TString descr; // Descrizione documento.
|
||||
TString opcee; // { RV | DC } - Usato come classificazione annesso (Reverse, ann. cartaceo).
|
||||
bool obblig{ false }; // Definisce se deve essere per forza presente l'annesso.
|
||||
};
|
||||
private:
|
||||
std::vector<std::shared_ptr<classe_doc>> _rows;
|
||||
std::vector<std::pair<TString, std::shared_ptr<TArray_sheet>>> _sheets_annessi;
|
||||
std::shared_ptr<TArray_sheet> _sheet_catdocs;
|
||||
std::shared_ptr<std::set<TString>> _name_catdocs;
|
||||
int _mode_sheet;
|
||||
|
||||
std::shared_ptr<classe_doc> find_causcont(const TString& caus); // OK
|
||||
std::shared_ptr<classe_doc> find_tipodoc(const TString& tipodoc); // OK
|
||||
|
||||
std::vector<pair<TString, std::shared_ptr<TArray_sheet>>>::iterator find_sheet_annessi(const TString& catdoc); // OK
|
||||
|
||||
void load_all();
|
||||
void save_ann();
|
||||
void save_cat();
|
||||
|
||||
static const char* traduci_caus_sost(const TString& caus);
|
||||
static const char* traduci_class_ann(const TString& class_ann);
|
||||
static const char* traduci_class_sost(const TString& class_sost);
|
||||
|
||||
protected:
|
||||
void copy(const TAnnesso & a);
|
||||
std::map<TString, annesso> _rows_annessi;
|
||||
|
||||
public:
|
||||
const TString & catdoc_padre() { return _catdoc_padre; }
|
||||
const TString & catdoc() { return _catdoc; }
|
||||
const TString & descr() { return _descr; }
|
||||
const TString & op_cee() { return _op_cee; }
|
||||
bool & obblig() { return _obblig; }
|
||||
const TAnnesso & operator = (const TAnnesso & a) { copy(a); return a; }
|
||||
|
||||
// @cmember Costruttori
|
||||
TAnnesso() : _obblig(false) {};
|
||||
TAnnesso(const char * catdoc_padre, const char * catdoc,
|
||||
const char * descr, const char * op_cee, bool obblig = false)
|
||||
: _catdoc_padre(catdoc_padre), _catdoc(catdoc), _descr(descr),
|
||||
_op_cee(op_cee), _obblig(obblig)
|
||||
{};
|
||||
TAnnesso(const TAnnesso & a) { copy(a); }
|
||||
};
|
||||
|
||||
class TCategorie_doc :public TObject
|
||||
{
|
||||
TAssoc_array _rows;
|
||||
TAssoc_array _sheets_annessi; // Assoc array di Array sheet
|
||||
TArray_sheet _sheet_catdocs;
|
||||
TString_array _name_catdocs;
|
||||
int _mode_sheet;
|
||||
TAssoc_array _rows_annessi; // Assoc array di Assoc_array di Annessi
|
||||
|
||||
TClasse_doc * find_causcont(const char * caus) const {return (TClasse_doc *)_rows.objptr(caus); } // OK
|
||||
TClasse_doc * find_tipodoc(const char * tipodoc); // OK
|
||||
TArray_sheet * find_sheet_annessi(const char * catdoc) { return (TArray_sheet *)_sheets_annessi.objptr(catdoc); } // OK
|
||||
|
||||
void load();
|
||||
void save_ann();
|
||||
void save_cat();
|
||||
|
||||
const char * traduci_caus_sost(const TString& caus);
|
||||
const char * traduci_class_ann(const TString& class_ann);
|
||||
const char * traduci_class_sost(const TString& class_sost);
|
||||
|
||||
protected:
|
||||
TAnnesso * find_annesso(const char * catdoc_padre, const char* catdoc_ann);
|
||||
std::map<TString, annesso>::iterator find_annesso(const TString& catdoc_padre, const char* catdoc_ann);
|
||||
|
||||
public:
|
||||
void add_annesso(const TString& catdoc_padre, const TString& catdoc_ann, const TString& descr,
|
||||
@ -219,131 +199,130 @@ public:
|
||||
static void remove_all_cat();
|
||||
void set_mode_sheet(const int mode) { _mode_sheet = mode; }
|
||||
|
||||
TCategorie_doc();
|
||||
TCategorie_doc();
|
||||
};
|
||||
|
||||
class TRecord_categorie : public TCategorie_doc
|
||||
{
|
||||
public:
|
||||
enum type { catdocs = 0, annessi = 1 };
|
||||
private:
|
||||
type _table;
|
||||
struct recordtype
|
||||
{
|
||||
TString_array head;
|
||||
TToken_string record;
|
||||
} _categorie, _annessi;
|
||||
TString_array _result_set;
|
||||
int _next_pos{ 0 };
|
||||
|
||||
public:
|
||||
TString get(const char* field);
|
||||
bool next();
|
||||
void put(const char* field, const char* value);
|
||||
bool read(bool traduci = false);
|
||||
|
||||
TRecord_categorie(type table = catdocs);
|
||||
};
|
||||
|
||||
struct movimento_t
|
||||
{
|
||||
enum err_mov
|
||||
{
|
||||
no_err, // Estratto normalmente.
|
||||
escluso, // Movimento con flag escluso.
|
||||
no_catdoc, // Nessuna cat. doc. riconosciuta per questo movimento, o non e' una fattura.
|
||||
no_doc, // Il mov. di vendita non ha un documento generatore.
|
||||
notfound_elet, // Non trovata fatt. elettronica mov vendita.
|
||||
no_fa, // Movimento di acquisto non e' una fattura.
|
||||
no_fv, // Movimento di vendita non e' una fattura.
|
||||
no_cartaceo, // Movimento cartaceo che non ha bisogno di essere estratto.
|
||||
pura_iva, // Movimento di sola IVA (integrazione Rev. Charge)
|
||||
no_filecart, // Il documento cartaceo non ha associato un file, o questo non e' stato trovato.
|
||||
annesso_nexist // Un annesso obbligatorio e' mancante.
|
||||
};
|
||||
|
||||
class TRecord_categorie : public TCategorie_doc
|
||||
bool err{ false };
|
||||
int numreg;
|
||||
TDate datareg;
|
||||
TDate datadoc;
|
||||
TString codcaus;
|
||||
int meseliq;
|
||||
TString numdoc;
|
||||
real tot;
|
||||
int codcf;
|
||||
TString ragsoc;
|
||||
TString reg_protiva;
|
||||
TString descr;
|
||||
state_fppro state{ null_state };
|
||||
TString descr_err{}; // Messaggio di errore visibile dal controllo estrazione.
|
||||
bool estratto{ true };
|
||||
err_mov descr_estr{ no_err }; // Messaggio di informazioni visibile dal 'Apri Estr.'
|
||||
std::shared_ptr<TCategorie_doc::classe_doc> catdoc{ nullptr };
|
||||
bool cartaceo{ false };
|
||||
TFilename nomefilecart{};
|
||||
vector<annesso_t> annessi{};
|
||||
|
||||
static const char* err_mov2name(const err_mov descr_estr)
|
||||
{
|
||||
public:
|
||||
enum type { catdocs = 0, annessi = 1 };
|
||||
private:
|
||||
type _table;
|
||||
struct recordtype
|
||||
switch (descr_estr)
|
||||
{
|
||||
TString_array head;
|
||||
TToken_string record;
|
||||
} _categorie, _annessi;
|
||||
TString_array _result_set;
|
||||
int _next_pos{ 0 };
|
||||
case no_err:
|
||||
return "OK";
|
||||
case escluso:
|
||||
return "Il movimento e' segnato come escluso. Saltato.";
|
||||
case no_catdoc:
|
||||
return "Nessuna categoria documentale riconosciuta per questo movimento, o non e' una fattura.";
|
||||
case no_doc:
|
||||
return "Il mov. di vendita non ha un documento generatore";
|
||||
case notfound_elet:
|
||||
return "Non trovata fatt. elettronica mov vendita";
|
||||
case no_fa:
|
||||
return "Questo movimento di acquisto non e' una fattura";
|
||||
case no_fv:
|
||||
return "Movimento di vendita non e' una fattura.";
|
||||
case no_cartaceo:
|
||||
return "Movimento cartaceo che non ha bisogno di essere estratto";
|
||||
case pura_iva:
|
||||
return "Movimento di sola IVA. (Le integrazioni Rev. Charge sono gestite come annessi alle vendite)";
|
||||
case annesso_nexist:
|
||||
return "Un annesso obbligatorio e' mancante.";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
TString get(const char* field);
|
||||
bool next();
|
||||
void put(const char* field, const char* value);
|
||||
bool read(bool traduci = false);
|
||||
|
||||
TRecord_categorie(type table = catdocs);
|
||||
};
|
||||
|
||||
struct movimento_t
|
||||
const char* get_descr_estr() const
|
||||
{
|
||||
enum err_mov
|
||||
{
|
||||
no_err, // Estratto normalmente.
|
||||
escluso, // Movimento con flag escluso.
|
||||
no_catdoc, // Nessuna cat. doc. riconosciuta per questo movimento, o non e' una fattura.
|
||||
no_doc, // Il mov. di vendita non ha un documento generatore.
|
||||
notfound_elet, // Non trovata fatt. elettronica mov vendita.
|
||||
no_fa, // Movimento di acquisto non e' una fattura.
|
||||
no_fv, // Movimento di vendita non e' una fattura.
|
||||
no_cartaceo, // Movimento cartaceo che non ha bisogno di essere estratto.
|
||||
pura_iva, // Movimento di sola IVA (integrazione Rev. Charge)
|
||||
no_filecart, // Il documento cartaceo non ha associato un file, o questo non e' stato trovato.
|
||||
annesso_nexist // Un annesso obbligatorio e' mancante.
|
||||
};
|
||||
return err_mov2name(descr_estr);
|
||||
}
|
||||
|
||||
bool err{ false };
|
||||
int numreg;
|
||||
TDate datareg;
|
||||
TDate datadoc;
|
||||
TString codcaus;
|
||||
int meseliq;
|
||||
TString numdoc;
|
||||
real tot;
|
||||
int codcf;
|
||||
TString ragsoc;
|
||||
TString reg_protiva;
|
||||
TString descr;
|
||||
state_fppro state{ null_state };
|
||||
TString descr_err{}; // Messaggio di errore visibile dal controllo estrazione.
|
||||
bool estratto{ true };
|
||||
err_mov descr_estr{ no_err }; // Messaggio di informazioni visibile dal 'Apri Estr.'
|
||||
TClasse_doc * catdoc{ nullptr };
|
||||
bool cartaceo{ false };
|
||||
TFilename nomefilecart{};
|
||||
vector<annesso_t> annessi{};
|
||||
|
||||
static const char* err_mov2name(const err_mov descr_estr)
|
||||
TString get(const int i) const
|
||||
{
|
||||
TString a;
|
||||
switch (i)
|
||||
{
|
||||
switch (descr_estr)
|
||||
{
|
||||
case no_err:
|
||||
return "OK";
|
||||
case escluso:
|
||||
return "Il movimento e' segnato come escluso. Saltato.";
|
||||
case no_catdoc:
|
||||
return "Nessuna categoria documentale riconosciuta per questo movimento, o non e' una fattura.";
|
||||
case no_doc:
|
||||
return "Il mov. di vendita non ha un documento generatore";
|
||||
case notfound_elet:
|
||||
return "Non trovata fatt. elettronica mov vendita";
|
||||
case no_fa:
|
||||
return "Questo movimento di acquisto non e' una fattura";
|
||||
case no_fv:
|
||||
return "Movimento di vendita non e' una fattura.";
|
||||
case no_cartaceo:
|
||||
return "Movimento cartaceo che non ha bisogno di essere estratto";
|
||||
case pura_iva:
|
||||
return "Movimento di sola IVA. (Le integrazioni Rev. Charge sono gestite come annessi alle vendite)";
|
||||
case annesso_nexist:
|
||||
return "Un annesso obbligatorio e' mancante.";
|
||||
default: return "";
|
||||
}
|
||||
case 0: return err;
|
||||
case 1: return a << numreg;
|
||||
case 2: return (const char*)datareg;
|
||||
case 3: return (const char*)datadoc;
|
||||
case 4: return codcaus;
|
||||
case 5: return a << meseliq;
|
||||
case 6: return numdoc;
|
||||
case 7:
|
||||
a << tot;
|
||||
if (a == "0")
|
||||
a << ".0";
|
||||
return a;
|
||||
case 8: return a << codcf;
|
||||
case 9: return ragsoc;
|
||||
case 10: return reg_protiva;
|
||||
case 11: return descr;
|
||||
case 14: return descr_err;
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
const char* get_descr_estr() const
|
||||
{
|
||||
return err_mov2name(descr_estr);
|
||||
}
|
||||
|
||||
TString get(const int i) const
|
||||
{
|
||||
TString a;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: return err;
|
||||
case 1: return a << numreg;
|
||||
case 2: return (const char*)datareg;
|
||||
case 3: return (const char*)datadoc;
|
||||
case 4: return codcaus;
|
||||
case 5: return a << meseliq;
|
||||
case 6: return numdoc;
|
||||
case 7:
|
||||
a << tot;
|
||||
if (a == "0")
|
||||
a << ".0";
|
||||
return a;
|
||||
case 8: return a << codcf;
|
||||
case 9: return ragsoc;
|
||||
case 10: return reg_protiva;
|
||||
case 11: return descr;
|
||||
case 14: return descr_err;
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
bool is_cartaceo() const { return false; } // todo
|
||||
bool is_cartaceo() const { return false; } // todo
|
||||
};
|
||||
|
||||
class TEstrazione : public TObject
|
||||
@ -355,18 +334,17 @@ class TEstrazione : public TObject
|
||||
const TString _descr;
|
||||
bool _has_cartacei;
|
||||
TFilename _spotlite_path;
|
||||
TCategorie_doc _doc_cats;
|
||||
|
||||
/** Aggiorna stato estrazione. Utilizzato ad esempio dopo la diagnostica per riportare
|
||||
* il nuovo stato sul db.
|
||||
*/
|
||||
bool update_drd_stato_estr() const;
|
||||
const char* caus_sos(const TLocalisamfile& mov, TipoIVA iva);
|
||||
void check_annessi(movimento_t& mov_i, int numreg); // Controllo se ci sono tutti gli annessi obbligatori.
|
||||
static const char* caus_sos(const TLocalisamfile& mov, TipoIVA iva);
|
||||
static void check_annessi(movimento_t& mov_i, int numreg); // Controllo se ci sono tutti gli annessi obbligatori.
|
||||
// Controllo se esistono tutti gli annessi cartacei obbligatori e se ci sono annessi reverse charge li genero.
|
||||
bool check_annessi_oblig(const TString& catdoc, int numreg, _Out_ TToken_string& ann_nexist);
|
||||
bool check_cartaceo_acq(const movimento_t& movimento);
|
||||
bool check_documento_vendita(const TLocalisamfile& mov, _Out_ bool& exist_doc);
|
||||
static bool check_annessi_oblig(const TString& catdoc, int numreg, _Out_ TToken_string& ann_nexist);
|
||||
static bool check_cartaceo_acq(const movimento_t& movimento);
|
||||
static bool check_documento_vendita(const TLocalisamfile& mov, _Out_ bool& exist_doc);
|
||||
/** CHECK RIFERIMENTO FPPRO
|
||||
* Per le fatture di acquisto controllo se ho il riferimento nell'FPPRO.
|
||||
* Altrimenti cerco di capire se riesco a trovare il corrispondente del movimento
|
||||
@ -390,7 +368,7 @@ class TEstrazione : public TObject
|
||||
bool grab_pdf_from_spotlite(const movimento_t& movimento, TFilename& file) const;
|
||||
|
||||
public:
|
||||
bool make_prosp_int_revc(long numreg, TAnnesso & annesso);
|
||||
static bool make_prosp_int_revc(int numreg, TCategorie_doc::annesso& annesso);
|
||||
|
||||
private:
|
||||
|
||||
@ -407,7 +385,7 @@ private:
|
||||
static bool pura_iva(const TLocalisamfile& mov);
|
||||
void write_errorsql_log(const TString& query) const;
|
||||
|
||||
TCategorie_doc& categorie_doc(bool reload = false);
|
||||
static TCategorie_doc& categorie_doc(bool reload = false);
|
||||
|
||||
public:
|
||||
|
||||
@ -477,7 +455,7 @@ public:
|
||||
void add() { add_str("NULL"); }
|
||||
bool send();
|
||||
static bool del_err(const TString& codsoc, const TString& id_estr, int numreg);
|
||||
static char get_errori(const TString& codsoc, const TString& id_estr, TArray & controllo_mov);
|
||||
static char get_errori(const TString& codsoc, const TString& id_estr, vector<TToken_string>& controllo_mov);
|
||||
TF9_dberr();
|
||||
};
|
||||
|
||||
@ -508,24 +486,23 @@ class TF9_doccart
|
||||
|
||||
public:
|
||||
static bool add_cart(const TFilename& file, const TString& numreg, bool is_annesso = false,
|
||||
const TString& catannpadre = "", const TString& catdocann = "", bool suppress_errors = true);
|
||||
bool doc_already_exists(const TFilename& file, TString& numreg, bool& annesso);
|
||||
bool mov2doc(const TString& numreg, TFilename& doc);
|
||||
bool mov2listann(const TString& numreg, TString_array& list_annessi);
|
||||
bool mov2listann_vect(const TString& numreg, vector<annesso_t>& list_annessi);
|
||||
const TString& catannpadre = "", const TString& catdocann = "", bool suppress_errors = true);
|
||||
bool doc_already_exists(const TFilename& file, _Out_ TString& numreg, _Out_ bool& annesso);
|
||||
bool mov2doc(const TString& numreg, _Out_ TFilename& doc);
|
||||
bool mov2listann(const TString& numreg, _Out_ TString_array& list_annessi);
|
||||
bool mov2listann_vect(const TString& numreg, _Out_ vector<annesso_t>& list_annessi);
|
||||
|
||||
static TString get_full_path_file_cartaceo(const TString& filename)
|
||||
{
|
||||
TString & s = get_tmp_string(256);
|
||||
|
||||
s = get_addr_cart();
|
||||
s << filename;
|
||||
return s;
|
||||
return TString() << TFilename(F9CONF.get_addr_cart()).slash_terminate() << filename;
|
||||
}
|
||||
|
||||
TF9_doccart() : _tdocs(LF_F9DOCS), _tannessi(LF_F9ANNESSI) { }
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// TProspetto_recset
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -560,8 +537,8 @@ class TProspetto_recset final : public TSQL_recordset
|
||||
real _totimponibile;
|
||||
real _totimposta;
|
||||
|
||||
static void format_string(TString& str_out, const TString& str) { str_out.cut(0) << "'" << check_str(str) << "'"; }
|
||||
static void format_string(TString& str_out, const char* str) { format_string(str_out, TString(str)); }
|
||||
static void format_string(TString& str_out, const TString& str) { str_out.cut(0) << "'" << check_str(str) << "'"; }
|
||||
static void format_string(TString& str_out, const char* str) { format_string(str_out, TString(str)); }
|
||||
static void format_string(TString& str_out, const TDate& date) { TString dt; dt << date.date2ansi(); format_string(str_out, dt); }
|
||||
|
||||
void precarica_tabelle();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,9 @@
|
||||
#include <Windows.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "f9lib.h"
|
||||
|
||||
#include <applicat.h>
|
||||
#include <dongle.h>
|
||||
#include <modaut.h>
|
||||
|
||||
#include "applicat.h"
|
||||
#include "docf9.h"
|
||||
#include "annessif9.h"
|
||||
#include "f901tab.h"
|
||||
@ -14,96 +12,62 @@
|
||||
#include "comuni.h"
|
||||
#include "clifo.h"
|
||||
#include "report.h"
|
||||
#include "utility.h"
|
||||
|
||||
#define AMBIENTE "CODSOC" // Codice ambiente (codsoc)
|
||||
#define ADDRCART "ADDRCART"
|
||||
#define ADDRDOC "ADDDOC" // Indirizzo documenti cartacei Server
|
||||
#define ADDRDOCLOC "ADDDOCLOC" // Indirizzo documenti cartacei Locale
|
||||
#define ESTENSIONI "DOCUMENTI_EXT" //
|
||||
#define CARTEXP "CARTEXP" // Flag esporta documenti cartacei
|
||||
#define CHECKVEND "CHECKVEND" // Flag controlli per vendite (quando hai fatt. con Campo)
|
||||
#define VIEWMOV "VIEWMOVPRE" // Flag visualizza movimenti prima di estrarre
|
||||
#define AMBIENTE_F9 "CODSOC" // Codice ambiente (codsoc)
|
||||
#define ADDRCART_F9 "ADDRCART"
|
||||
#define ADDRDOC_F9 "ADDDOC" // Indirizzo documenti cartacei Server
|
||||
#define ADDRDOCLOC_F9 "ADDDOCLOC" // Indirizzo documenti cartacei Locale
|
||||
#define ESTENSIONI_F9 "DOCUMENTI_EXT" //
|
||||
#define CARTEXP_F9 "CARTEXP" // Flag esporta documenti cartacei
|
||||
#define CHECKVEND_F9 "CHECKVEND" // Flag controlli per vendite (quando hai fatt. con Campo)
|
||||
#define VIEWMOV_F9 "VIEWMOVPRE" // Flag visualizza movimenti prima di estrarre
|
||||
|
||||
const TString & get_ambiente()
|
||||
{
|
||||
return ini_get_string(CONFIG_DITTA, mod2name(F9AUT), AMBIENTE);
|
||||
TF9_config F9CONF;
|
||||
|
||||
void TF9_config::set_ambiente(const TString& cod_amb)
|
||||
{
|
||||
ini_set_string(CONFIG_DITTA, "F9", AMBIENTE_F9, cod_amb);
|
||||
_ambiente = cod_amb;
|
||||
}
|
||||
|
||||
const TString& get_addr_doc()
|
||||
void TF9_config::set_addr_doc(const TString& path)
|
||||
{
|
||||
return ini_get_string(CONFIG_DITTA, mod2name(F9AUT), ADDRDOC);
|
||||
ini_set_string(CONFIG_DITTA, "F9", ADDRDOC_F9, path);
|
||||
_addr_doc = path;
|
||||
}
|
||||
|
||||
const TString& get_addr_doc_loc()
|
||||
void TF9_config::set_addr_doc_loc(const TString& path)
|
||||
{
|
||||
return ini_get_string(CONFIG_DITTA, mod2name(F9AUT), ADDRDOCLOC);
|
||||
ini_set_string(CONFIG_DITTA, "F9", ADDRDOCLOC_F9, path);
|
||||
_addr_doc_loc = path;
|
||||
}
|
||||
|
||||
bool get_has_cartexp()
|
||||
void TF9_config::set_has_cartexp(const bool flag)
|
||||
{
|
||||
return ini_get_bool(CONFIG_DITTA, mod2name(F9AUT), CARTEXP);
|
||||
ini_set_bool(CONFIG_DITTA, "F9", CARTEXP_F9, flag);
|
||||
_cartexp = flag;
|
||||
}
|
||||
|
||||
const TString & get_addr_cart(bool check)
|
||||
void TF9_config::set_addr_cart(const TString& path)
|
||||
{
|
||||
if (check)
|
||||
{
|
||||
TFilename path(prefix().get_studio());
|
||||
TString & dir = get_tmp_string(256);
|
||||
|
||||
dir = ini_get_string(CONFIG_DITTA, mod2name(F9AUT), ADDRCART, "Cartacei_F9");
|
||||
path.add(dir);
|
||||
if (!dexist(path) && !make_dir(path))
|
||||
warning_box(TR("Impossibile creare la cartella %s."), path);
|
||||
return dir;
|
||||
}
|
||||
else
|
||||
return ini_get_string(CONFIG_DITTA, mod2name(F9AUT), ADDRCART);
|
||||
ini_set_string(CONFIG_DITTA, "F9", ADDRCART_F9, path);
|
||||
_addr_cart = path;
|
||||
}
|
||||
|
||||
const TString & get_estensioni()
|
||||
void TF9_config::set_estensioni(const TString& ext)
|
||||
{
|
||||
return ini_get_string(CONFIG_DITTA, mod2name(F9AUT), ESTENSIONI);
|
||||
ini_set_string(CONFIG_DITTA, "F9", ESTENSIONI_F9, ext);
|
||||
_estensioni = ext;
|
||||
}
|
||||
|
||||
void set_ambiente(const TString& cod_amb)
|
||||
TF9_config::TF9_config()
|
||||
{
|
||||
ini_set_string(CONFIG_DITTA, mod2name(F9AUT), AMBIENTE, cod_amb);
|
||||
}
|
||||
|
||||
void set_addr_doc(const TString& path)
|
||||
{
|
||||
TFilename s(path);
|
||||
|
||||
s.slash_terminate();
|
||||
ini_set_string(CONFIG_DITTA, mod2name(F9AUT), ADDRDOC, s);
|
||||
}
|
||||
|
||||
void set_addr_doc_loc(const TString& path)
|
||||
{
|
||||
TFilename s(path);
|
||||
|
||||
s.slash_terminate();
|
||||
ini_set_string(CONFIG_DITTA, mod2name(F9AUT), ADDRDOCLOC, s);
|
||||
}
|
||||
|
||||
void set_has_cartexp(const bool flag)
|
||||
{
|
||||
ini_set_bool(CONFIG_DITTA, mod2name(F9AUT), CARTEXP, flag);
|
||||
}
|
||||
|
||||
void set_addr_cart(const TString& path)
|
||||
{
|
||||
TFilename s(path);
|
||||
|
||||
s.slash_terminate();
|
||||
ini_set_string(CONFIG_DITTA, mod2name(F9AUT), ADDRCART, s);
|
||||
}
|
||||
|
||||
void set_estensioni(const TString& ext)
|
||||
{
|
||||
ini_set_string(CONFIG_DITTA, mod2name(F9AUT), ESTENSIONI, ext);
|
||||
_ambiente = ini_get_string(CONFIG_DITTA, "F9", AMBIENTE_F9);
|
||||
_addr_cart = ini_get_string(CONFIG_DITTA, "F9", ADDRCART_F9);
|
||||
_addr_doc = ini_get_string(CONFIG_DITTA, "F9", ADDRDOC_F9);
|
||||
_addr_doc_loc = ini_get_string(CONFIG_DITTA, "F9", ADDRDOCLOC_F9);
|
||||
_cartexp = ini_get_bool (CONFIG_DITTA, "F9", CARTEXP_F9);
|
||||
_estensioni = ini_get_string(CONFIG_DITTA, "F9", ESTENSIONI_F9);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -223,20 +187,15 @@ bool TF9_doccart::doc_already_exists(const TFilename& file, _Out_ TString& numre
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TF9_doccart::mov2doc(const TString& numreg, TFilename & doc)
|
||||
bool TF9_doccart::mov2doc(const TString& numreg, _Out_ TFilename& doc)
|
||||
{
|
||||
_tdocs.zero();
|
||||
_tdocs.setkey(1); // Ricerca per NUMREG
|
||||
_tdocs.put(F9C_NUMREG, numreg);
|
||||
const bool ok = _tdocs.read() == NOERR;
|
||||
|
||||
doc.cut(0);
|
||||
if (ok)
|
||||
{
|
||||
doc = get_addr_cart();
|
||||
doc << _tdocs.get(F9C_FILENAME);
|
||||
}
|
||||
else
|
||||
doc.cut(0);
|
||||
doc << TFilename(F9CONF.get_addr_cart()).slash_terminate() << _tdocs.get(F9C_FILENAME);
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -313,7 +272,6 @@ void TIva_insert_prepared_stat::add_value(const char* field, const TString& valu
|
||||
void TIva_insert_prepared_stat::write()
|
||||
{
|
||||
TString vals_appo;
|
||||
|
||||
_query.cut(0) << "INSERT INTO " F9_IVA " (\n";
|
||||
int count = 0;
|
||||
bool first = true;
|
||||
@ -630,23 +588,31 @@ bool TF9Prospetto_integr::operator()(const char* numreg_acq, const char* numreg_
|
||||
if (_rep.load(_f_report))
|
||||
{
|
||||
TFilename fprosp; fprosp.tempdir().slash_terminate() << make_name_rep();
|
||||
TProspetto_recset * _prosp_rs = new TProspetto_recset(numreg_acq, numreg_ven);
|
||||
TProspetto_recset* _prosp_rs = new TProspetto_recset(numreg_acq, numreg_ven);
|
||||
|
||||
_items = _prosp_rs->items();
|
||||
if (_items == 0)
|
||||
{
|
||||
ofstream log("TF9Prospetto_integr_error.txt", ios::app);
|
||||
|
||||
FILE* log = fopen("TF9Prospetto_integr_error.txt", "a");
|
||||
if (!_prosp_rs->last_exec())
|
||||
{
|
||||
log << "\n" << _prosp_rs->get_err_msg() << "\n";
|
||||
if (log != nullptr)
|
||||
{
|
||||
TString msg("\n"); msg << _prosp_rs->get_err_msg() << "\n";
|
||||
fwrite((const char*)msg, sizeof(char), msg.len(), log);
|
||||
}
|
||||
fclose(log);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
log << "\n" << _prosp_rs->get_query() << "\n - Nessun record trovato!\n\n";
|
||||
|
||||
else if (log != nullptr)
|
||||
{
|
||||
TString msg("\n"); msg << _prosp_rs->get_query() << "\n - Nessun record trovato!\n\n";
|
||||
fwrite(msg, sizeof(char), msg.len(), log);
|
||||
}
|
||||
fclose(log);
|
||||
return false;
|
||||
}
|
||||
|
||||
_rep.set_recordset(_prosp_rs);
|
||||
_book.add(_rep);
|
||||
}
|
||||
|
@ -244,6 +244,10 @@ TExclusion_mode TSpesometro_msk::validate_mov(const TRectype& mov)
|
||||
if (anno < 2012)
|
||||
return segnala_movimento(mov, em_data_limite);
|
||||
|
||||
#ifdef DBG
|
||||
if (mov.get_long(MOV_NUMREG) ==14224)
|
||||
int sn = 1;
|
||||
#endif
|
||||
const char tipocf = mov.get_char(MOV_TIPO);
|
||||
const real impmin = get_real(F_IMPMIN);
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <reputils.h>
|
||||
|
||||
#include "felib.h"
|
||||
#include "../cg/cglib.h"
|
||||
#include "../cg/cg2103.h"
|
||||
|
||||
#include <alleg.h>
|
||||
#include <causali.h>
|
||||
|
@ -93,6 +93,30 @@ bool fe_is_nota_variazione(const TRectype& mov)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool fe_decode_cofi(const TString& cofi, char& sex_nasc, TDate& dt_nasc, TString& com_nasc)
|
||||
{
|
||||
if (cofi.len() != 16 || !cf_check("", cofi))
|
||||
return false;
|
||||
|
||||
const TFixed_string wm = "ABCDEHLMPRST"; // Controllo data di nascita
|
||||
|
||||
int anno = atoi(cofi.mid(6,2));
|
||||
anno += anno < 25? 2000 : 1900;
|
||||
const int mese = wm.find(cofi[8])+1;
|
||||
int giorno = atoi(cofi.mid(9,2));
|
||||
if (giorno > 40)
|
||||
{
|
||||
giorno -= 40;
|
||||
sex_nasc = 'F';
|
||||
}
|
||||
else
|
||||
sex_nasc = 'M';
|
||||
|
||||
com_nasc = cofi.mid(11,4);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSpesometro_set
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -58,5 +58,6 @@ public:
|
||||
|
||||
// Utility
|
||||
bool fe_is_nota_variazione(const TRectype& rec);
|
||||
bool fe_decode_cofi(const TString& cofi, char& sex_nasc, TDate& dt_nasc, TString& com_nasc);
|
||||
|
||||
#endif
|
@ -178,9 +178,9 @@ void TPA_mask::fill()
|
||||
|
||||
query << "USE 33 KEY 3 \n" <<
|
||||
"SELECT 33.TIPOCF==\"C\" \n" <<
|
||||
// "JOIN 20 INTO TIPOCF==TIPOCF CODCF==CODCF \n" <<
|
||||
// "JOIN 17 TO 33 INTO TIPOCF==TIPOCF CODCF==CODCF \n" <<
|
||||
// "JOIN %TIP TO 33 ALIAS 400 INTO CODTAB==TIPODOC \n" <<
|
||||
"JOIN 20 INTO TIPOCF==TIPOCF CODCF==CODCF \n" <<
|
||||
"JOIN 17 TO 33 INTO TIPOCF==TIPOCF CODCF==CODCF \n" <<
|
||||
"JOIN %TIP TO 33 ALIAS 400 INTO CODTAB==TIPODOC \n" <<
|
||||
"FROM DATADOC=#DADATADOC \n" <<
|
||||
"TO DATADOC=#ADATADOC";
|
||||
|
||||
@ -202,9 +202,8 @@ void TPA_mask::fill()
|
||||
{
|
||||
if (!pi.add_status())
|
||||
break;
|
||||
|
||||
const TDocumentoEsteso& doc(rec.cursor()->curr());
|
||||
const TTipo_documento& td = doc.tipo();
|
||||
const TRectype& doc = rec.cursor()->curr();
|
||||
const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC));
|
||||
|
||||
// Controllo che la numerazione sia tra quelle giuste
|
||||
|
||||
@ -225,28 +224,26 @@ void TPA_mask::fill()
|
||||
continue;
|
||||
}
|
||||
|
||||
// TToken_string & row = docs.row();
|
||||
const int nrow = docs.set_row_cell(S_SELECTED, !sent);
|
||||
|
||||
docs.set_row_cell(S_ANNO, doc.get_long(DOC_ANNO), nrow);
|
||||
docs.set_row_cell(S_CODNUM, doc.get(DOC_CODNUM), nrow);
|
||||
docs.set_row_cell(S_TIPODOC, doc.tipo().codice(), nrow);
|
||||
|
||||
TString tipodoc = doc.get(DOC_TIPODOCSDI);
|
||||
TToken_string& row = docs.row(-1);
|
||||
row = sent ? " " : "X";
|
||||
row.add(rec.get(DOC_ANNO).as_int(), 1);
|
||||
row.add(rec.get(DOC_CODNUM).as_string());
|
||||
row.add(rec.get(DOC_TIPODOC).as_string());
|
||||
|
||||
TString tipodoc = rec.get(DOC_TIPODOCSDI).as_string();
|
||||
|
||||
if (tipodoc.blank())
|
||||
tipodoc = td.tipo_doc_sdi();
|
||||
if (today <data_inizio && (tipodoc == "TD24" || tipodoc == "TD25" || tipodoc == "TD27"))
|
||||
tipodoc = "TD01";
|
||||
docs.set_row_cell(S_CODSDI, tipodoc, nrow);
|
||||
docs.set_row_cell(S_NDOC, doc.numero(), nrow);
|
||||
docs.set_row_cell(S_DATADOC, doc.get_date(DOC_DATADOC), nrow);
|
||||
docs.set_row_cell(S_CLIENTE, doc.clifor().codice(), nrow);
|
||||
docs.set_row_cell(S_RAGSOC, doc.clifor().get(CLI_RAGSOC), nrow);
|
||||
|
||||
const TString cod_ind_sped = doc.get(DOC_CODINDSP);
|
||||
const TString & rif = doc.get_dest_sdi();
|
||||
row.add(tipodoc);
|
||||
row.add(rec.get(DOC_NDOC).as_int());
|
||||
row.add(rec.get(DOC_DATADOC).as_date());
|
||||
row.add(rec.get(CFV_CODCF).as_int());
|
||||
row.add(rec.get("20." CLI_RAGSOC).as_string());
|
||||
|
||||
TString cod_ind_sped = rec.get(DOC_CODINDSP).as_string();
|
||||
TString rif = get_dest_sdi(rec.get(CFV_TIPOCF).as_string()[0], rec.get(CFV_CODCF).as_int(), cod_ind_sped);
|
||||
// Se è ancora vuoto potrebbe essere estero
|
||||
if(rif.empty())
|
||||
{
|
||||
@ -260,26 +257,29 @@ void TPA_mask::fill()
|
||||
docs.set_back_and_fore_color(COLOR_RED, COLOR_WHITE, rec.current_row(), docs.cid2index(S_UFFICIO));
|
||||
fat_no_cod++;
|
||||
}
|
||||
docs.set_row_cell(S_UFFICIO, rif, nrow);
|
||||
docs.set_row_cell(S_RIFAMM, doc.clifor().get(CFV_PARIFAMM), nrow);
|
||||
docs.set_row_cell(S_COFI, doc.clifor().get(CLI_COFI), nrow);
|
||||
;
|
||||
row.add(rif);
|
||||
row.add(rec.get("17." CFV_PARIFAMM).as_string());
|
||||
row.add(rec.get("20." CLI_COFI).as_string());
|
||||
|
||||
bool split = doc.clifor().get_bool(CLI_SPLITPAY);
|
||||
|
||||
if (split)
|
||||
bool split = rec.get("20." CLI_SPLITPAY).as_bool();
|
||||
if (split)
|
||||
{
|
||||
const long numreg = doc.get_long(DOC_NUMREG);
|
||||
const TRectype& mov = cache().get(LF_MOV, numreg);
|
||||
|
||||
split = is_split_payment(mov);
|
||||
const long numreg = rec.get(DOC_NUMREG).as_int();
|
||||
if (numreg > 0)
|
||||
{
|
||||
const TRectype& mov = cache().get(LF_MOV, numreg);
|
||||
split = is_split_payment(mov);
|
||||
}
|
||||
}
|
||||
docs.set_row_cell(S_SPLITPAY, split, nrow);
|
||||
row.add(split ? "X" : " ");
|
||||
|
||||
const bool attach = doc.get(DOC_COLL_GOLEM).full();
|
||||
const bool attach = !rec.get("COLL_GOLEM").is_empty();
|
||||
row.add(attach ? "X" : " ");
|
||||
|
||||
row.add(!td.invio_xml() ? "X" : "");
|
||||
}
|
||||
|
||||
docs.set_row_cell(S_ATTACH, attach, nrow);
|
||||
docs.set_row_cell(S_ONLYGEN, !td.invio_xml(), nrow);
|
||||
}
|
||||
docs.force_update();
|
||||
docs.show();
|
||||
|
||||
@ -305,7 +305,7 @@ void TPA_mask::set_pronto()
|
||||
continue;
|
||||
|
||||
static TString campo_hfatt, campo_bfatt, query;
|
||||
TDocumentoEsteso doc('D', riga->get_int(xvtil_cid2index(S_ANNO)), riga->get(xvtil_cid2index(S_CODNUM)), riga->get_long(xvtil_cid2index(S_NDOC)));
|
||||
TDocumento doc('D', riga->get_int(xvtil_cid2index(S_ANNO)), riga->get(xvtil_cid2index(S_CODNUM)), riga->get_long(xvtil_cid2index(S_NDOC)));
|
||||
|
||||
if (chiave_paf(doc, campo_hfatt, campo_bfatt))
|
||||
{
|
||||
@ -335,8 +335,6 @@ void TPA_mask::connect_keys()
|
||||
}
|
||||
|
||||
TProgress_monitor pi(sht.items(), "Esportazione Fatture");
|
||||
TString campo_hfatt, campo_bfatt, query;
|
||||
|
||||
FOR_EACH_ARRAY_ROW(sht, r, riga)
|
||||
{
|
||||
if (!pi.add_status())
|
||||
@ -345,9 +343,8 @@ void TPA_mask::connect_keys()
|
||||
if (!riga->starts_with("X"))
|
||||
continue;
|
||||
|
||||
TDocumentoEsteso doc('D', riga->get_int(xvtil_cid2index(S_ANNO)), riga->get(xvtil_cid2index(S_CODNUM)), riga->get_long(xvtil_cid2index(S_NDOC)));
|
||||
|
||||
|
||||
TDocumento doc('D', riga->get_int(xvtil_cid2index(S_ANNO)), riga->get(xvtil_cid2index(S_CODNUM)), riga->get_long(xvtil_cid2index(S_NDOC)));
|
||||
static TString campo_hfatt, campo_bfatt, query;
|
||||
if (chiave_paf(doc, campo_hfatt, campo_bfatt))
|
||||
{
|
||||
// Come prima cosa controllo che effettivamente la chiave di questo doc sia in giro per il mondo
|
||||
@ -361,7 +358,7 @@ void TPA_mask::connect_keys()
|
||||
|
||||
// Provo a cercare il documento nel paf07 come un vero uomo
|
||||
query.cut(0) << "SELECT P7_KEYPRGINVIO, P7_KEYHEADERFATT, P7_KEYBODYFATT FROM PAF0700F WHERE P7_KEYHEADERFATT = '" << campo_hfatt
|
||||
<< "' AND P7_TIPODOC = '" << doc.tipo_doc_sdi() << "' AND P7_DATA = '" << doc.data().date2ansi() << "' AND P7_NUMERO LIKE '%" << doc.numero() << "%'";
|
||||
<< "' AND P7_TIPODOC = '" << tipo_doc_sdi(doc) << "' AND P7_DATA = '" << doc.data().date2ansi() << "' AND P7_NUMERO LIKE '%" << doc.numero() << "%'";
|
||||
|
||||
if (fp_db().sq_set_exec(query, false))
|
||||
{
|
||||
@ -447,6 +444,7 @@ void TPA_mask::connect_keys()
|
||||
void TPA_mask::export_paf()
|
||||
{
|
||||
int ndocs = 0;
|
||||
TLocalisamfile doc(LF_DOC);
|
||||
static const int col_cod_sdi = sfield(F_DOCS).cid2index(S_CODSDI);
|
||||
TString_array& sht = sfield(F_DOCS).rows_array();
|
||||
TDoc_fp elab;
|
||||
@ -466,15 +464,15 @@ void TPA_mask::export_paf()
|
||||
const long ndoc = riga->get_long(sfield(F_DOCS).cid2index(S_NDOC));
|
||||
const TFixed_string codnum(riga->get(sfield(F_DOCS).cid2index(S_CODNUM))); // lascio sapientemente per ultima la get di una stringa
|
||||
const TDoc_key key(anno, codnum, ndoc);
|
||||
// Verifico che il codice sdi nello sheet sia lo stesso sulla testata del documento in caso contrario lo aggiorno
|
||||
TDocumento doc(key);
|
||||
|
||||
if (doc.read(doc) == NOERR)
|
||||
// Verifico che il codice sdi nello sheet sia lo stesso sulla testata del documento in caso contrario lo aggiorno
|
||||
TRectype rec_doc = elab.key_to_doc(key);
|
||||
if (rec_doc.read(doc) == NOERR)
|
||||
{
|
||||
if (doc.get(DOC_TIPODOCSDI) != riga->get(col_cod_sdi))
|
||||
if (rec_doc.get(DOC_TIPODOCSDI).compare(riga->get(col_cod_sdi)) != 0)
|
||||
{
|
||||
doc.put(DOC_TIPODOCSDI, riga->get(col_cod_sdi));
|
||||
doc.rewrite();
|
||||
rec_doc.put(DOC_TIPODOCSDI, riga->get(col_cod_sdi));
|
||||
rec_doc.rewrite(doc);
|
||||
}
|
||||
|
||||
if (elab.doc_to_paf(key))
|
||||
@ -663,25 +661,33 @@ void TPA_mask::set_err_paf()
|
||||
// Vado a riportare sui paf l'errore
|
||||
TSheet_field& sfld = sfield(F_DOCS);
|
||||
TString_array& sht = sfld.rows_array();
|
||||
|
||||
TLocalisamfile fdoc(LF_DOC);
|
||||
if (!sht.empty())
|
||||
{
|
||||
TProgress_monitor pi(sht.items(), "Cambio stato fatture");
|
||||
|
||||
FOR_EACH_ARRAY_ROW(sht, r, riga)
|
||||
{
|
||||
if (pi.add_status() && riga->get_bool(0))
|
||||
if (!pi.add_status())
|
||||
break;
|
||||
|
||||
if (riga->starts_with("X"))
|
||||
{
|
||||
// Ricontrollo che la fattura sia presente in Campo prima di cambiare stato
|
||||
const int anno = riga->get_int(sfield(F_DOCS).cid2index(S_ANNO));
|
||||
const long ndoc = riga->get_long(sfield(F_DOCS).cid2index(S_NDOC));
|
||||
const TString & codnum = riga->get(sfield(F_DOCS).cid2index(S_CODNUM)); // lascio sapientemente per ultima la get di una stringa
|
||||
const TFixed_string codnum(riga->get(sfield(F_DOCS).cid2index(S_CODNUM))); // lascio sapientemente per ultima la get di una stringa
|
||||
const TDoc_key key(anno, codnum, ndoc);
|
||||
const TDocumentoEsteso doc(key);
|
||||
|
||||
// Ricontrollo che la fattura sia presente in Campo prima di cambiare stato
|
||||
fdoc.zero();
|
||||
fdoc.put(DOC_PROVV, key.provv());
|
||||
fdoc.put(DOC_ANNO, key.anno());
|
||||
fdoc.put(DOC_CODNUM, key.codnum());
|
||||
fdoc.put(DOC_NDOC, key.ndoc());
|
||||
|
||||
TString hfatt, bfatt;
|
||||
TPaf_record paf0100f("PAF0100F");
|
||||
|
||||
if (doc.ok() && chiave_paf(doc, hfatt, bfatt) && paf0100f.search(nullptr, hfatt, bfatt))
|
||||
if (fdoc.read() == NOERR && chiave_paf(fdoc.curr(), hfatt, bfatt) && paf0100f.search(nullptr, hfatt, bfatt))
|
||||
{
|
||||
static TString query;
|
||||
query.cut(0) <<
|
||||
|
@ -96,9 +96,9 @@ void TBolliinfatt_mask::fill()
|
||||
"SELECT 33.TIPOCF==\"C\"" <<
|
||||
TISAM_recordset::add_between_filter(DOC_CODNUM, get(F_DACODNUM), get(F_ACODNUM)) <<
|
||||
" \n" <<
|
||||
/* "JOIN 20 INTO TIPOCF==TIPOCF CODCF==CODCF \n" <<
|
||||
"JOIN 20 INTO TIPOCF==TIPOCF CODCF==CODCF \n" <<
|
||||
"JOIN 17 TO 33 INTO TIPOCF==TIPOCF CODCF==CODCF \n" <<
|
||||
"JOIN %TIP TO 33 ALIAS 400 INTO CODTAB==TIPODOC \n" << */
|
||||
"JOIN %TIP TO 33 ALIAS 400 INTO CODTAB==TIPODOC \n" <<
|
||||
"FROM DATADOC=#DADATADOC \n" <<
|
||||
"TO DATADOC=#ADATADOC";
|
||||
|
||||
@ -109,11 +109,13 @@ void TBolliinfatt_mask::fill()
|
||||
rec.set_var("#DACODNUM", get(F_DACODNUM));
|
||||
rec.set_var("#ACODNUM", get(F_ACODNUM));
|
||||
|
||||
TProgress_monitor pi(rec.items(), nullptr);
|
||||
TProgress_monitor pi(rec.items(), nullptr);
|
||||
|
||||
for (bool okc = rec.move_first(); pi.add_status() && okc; okc = rec.move_next())
|
||||
for (bool okc = rec.move_first(); okc; okc = rec.move_next())
|
||||
{
|
||||
const TDocumentoEsteso & doc = TDocumentoEsteso(rec.cursor()->curr());
|
||||
if (!pi.add_status())
|
||||
break;
|
||||
const TRectype& doc = rec.cursor()->curr();
|
||||
const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC));
|
||||
bool sent = false;
|
||||
|
||||
@ -128,22 +130,21 @@ void TBolliinfatt_mask::fill()
|
||||
}
|
||||
|
||||
TToken_string& row = docs.row(-1);
|
||||
|
||||
row.add(doc.get_int(DOC_ANNO));
|
||||
row.add(doc.get(DOC_CODNUM));
|
||||
row.add(doc.get(DOC_TIPODOC));
|
||||
|
||||
const TString & tipo_doc_sdi = doc.get(DOC_TIPODOCSDI);
|
||||
|
||||
row.add(tipo_doc_sdi.full() ? tipo_doc_sdi : td.tipo_doc_sdi());
|
||||
row.add(doc.get_int(DOC_NDOC));
|
||||
row.add(doc.get_date(DOC_DATADOC));
|
||||
row.add(doc.totale_doc());
|
||||
row.add(doc.imposta());
|
||||
row.add(doc.get_long(DOC_CODCF));
|
||||
row.add(doc.clifor().get(CLI_RAGSOC));
|
||||
row.add(rec.get(DOC_ANNO).as_int());
|
||||
row.add(rec.get(DOC_CODNUM).as_string());
|
||||
row.add(rec.get(DOC_TIPODOC).as_string());
|
||||
if (!rec.get(DOC_TIPODOCSDI).is_empty())
|
||||
row.add(rec.get(DOC_TIPODOCSDI).as_string());
|
||||
else
|
||||
row.add(td.tipo_doc_sdi());
|
||||
row.add(rec.get(DOC_NDOC).as_int());
|
||||
row.add(rec.get(DOC_DATADOC).as_date());
|
||||
row.add(rec.get("33.TOTDOC").as_real());
|
||||
row.add(rec.get("33.IMPOSTE").as_real());
|
||||
row.add(rec.get(CFV_CODCF).as_int());
|
||||
row.add(rec.get("20." CLI_RAGSOC).as_string());
|
||||
row.add(fp_db().sq_get("P7_IMPORTOBOLLO"));
|
||||
row.add(doc.bolli_esenti_dovuti());
|
||||
row.add(rec.get(DOC_ADDBOLLI).as_string());
|
||||
}
|
||||
|
||||
if(docs.items() == 0)
|
||||
|
@ -174,12 +174,12 @@ void TMancati_mask::fill()
|
||||
bool first, show, ask = !((show = (first = true)));
|
||||
int fat_no_cod = 0;
|
||||
|
||||
for (bool okc = rec.move_first(); pi.add_status() && okc; okc = rec.move_next())
|
||||
for (bool okc = rec.move_first(); okc; okc = rec.move_next())
|
||||
{
|
||||
if (!pi.add_status())
|
||||
break;
|
||||
const TDocumentoEsteso & doc = TDocumentoEsteso(rec.cursor()->curr());
|
||||
const TTipo_documento& td = doc.tipo();
|
||||
const TRectype& doc = rec.cursor()->curr();
|
||||
const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC));
|
||||
|
||||
// Controllo che la numerazione sia tra quelle giuste
|
||||
|
||||
|
@ -24,7 +24,6 @@ class TDoc_fp;
|
||||
enum { no_pdf = -1, pdf_ok = 0, no_alleg = -2};
|
||||
|
||||
bool set_connection(SSimple_query& s);
|
||||
inline bool test_connection() { SSimple_query q; return set_connection(q); }
|
||||
// Ritorna la connessione al DB paf secondo i parametri impostati nel programma di configurazione
|
||||
SSimple_query& fp_db();
|
||||
// Lancia una maschera di password FP
|
||||
@ -36,14 +35,13 @@ TString& complete_num_fp(const TCodice_numerazione& codnum, const int numdoc);
|
||||
|
||||
|
||||
// Genera la chiave per i paf
|
||||
bool chiave_paf(const TDocumentoEsteso& doc, TString& hfatt, TString& bfatt);
|
||||
bool chiave_paf(const TDocumento& doc, TString& hfatt, TString& bfatt);
|
||||
bool chiave_paf(const TRectype& doc, TString& hfatt, TString& bfatt);
|
||||
/* perchè così ????
|
||||
// Ritorna cod sdi, pec o vuoto. Chiama get_coddest()
|
||||
TString get_dest_sdi(char tipocf, long codcf, const TString& cod_ind_sped);
|
||||
// Valorizza codice sdi e pec in base alle configurazioni del monitor
|
||||
bool get_coddest(char tipocf, long codcf, TString& coddest, TString& pec, const TString& cod_ind_sped);
|
||||
const TString& tipo_doc_sdi(const TDocumento& doc);
|
||||
*/
|
||||
|
||||
// Controlli comuni
|
||||
bool is_fattura(const TRectype& doc);
|
||||
|
@ -1,10 +1,8 @@
|
||||
#include "fplib.h"
|
||||
#include <prefix.h>
|
||||
#include <config.h>
|
||||
#include <config.h>
|
||||
#include <utility.h>
|
||||
//#include <xvt.h>
|
||||
#include <modaut.h>
|
||||
#include <xvt.h>
|
||||
#include <diction.h>
|
||||
#include <isam.h>
|
||||
#include <tabutil.h>
|
||||
@ -26,13 +24,16 @@
|
||||
|
||||
bool set_connection(SSimple_query& s)
|
||||
{
|
||||
TString ip = get_db_indirizzo();
|
||||
TString url("http://"); url << ip;
|
||||
TURL u(url);
|
||||
const bool ok = u.ok();
|
||||
|
||||
if (!ok || s.sq_connect(get_db_str_con(), get_db_user(), get_db_password(), TSDB_MSSQL) != NOERR)
|
||||
return warning_box("Impossibile connettersi al DB esterno");
|
||||
bool ok = true;
|
||||
if (s.sq_connect(
|
||||
get_db_str_con(),
|
||||
get_db_user(),
|
||||
get_db_password(),
|
||||
TSDB_MSSQL) != NOERR)
|
||||
{
|
||||
warning_box("Impossibile connettersi al DB esterno");
|
||||
ok = false;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -80,9 +81,13 @@ bool check_tables()
|
||||
* Verranno utilizzati dei file.sql aggiornati con il numero di patch, leggermente scomodo durante la creazione ma facile per i controlli successivamente
|
||||
*/
|
||||
SLIST files = xvt_fsys_list_files(".sql", "sql/fp0/", false);
|
||||
TRectype & tabmod = (TRectype &) cache().get("&FPSQL", "VERSION");
|
||||
const TString & version = tabmod.get("S0");
|
||||
|
||||
TLocalisamfile tabmod(LF_TABMOD);
|
||||
tabmod.put("MOD", "FP");
|
||||
tabmod.put("COD", "SQL");
|
||||
tabmod.put("CODTAB", "VERSION");
|
||||
TString version;
|
||||
if (tabmod.read() == NOERR)
|
||||
version = tabmod.get("S0");
|
||||
for(SLIST_ELT file = xvt_slist_get_first(files); file; file = xvt_slist_get_next(files, file))
|
||||
{
|
||||
TString file_version = TFilename(file->str).name_only();
|
||||
@ -90,39 +95,45 @@ bool check_tables()
|
||||
|
||||
if (file_version <= version)
|
||||
continue;
|
||||
|
||||
TScanner s(file->str);
|
||||
TString query;
|
||||
|
||||
while(s.ok() && !s.eof())
|
||||
{
|
||||
TString line = s.line();
|
||||
|
||||
if (!line.starts_with("--"))
|
||||
{
|
||||
query << line << '\n';
|
||||
// Cerco un ;
|
||||
const int limiter = query.find(';');
|
||||
|
||||
if (limiter >= 0)
|
||||
ifstream f(file->str);
|
||||
if(f.is_open())
|
||||
{
|
||||
string s;
|
||||
while(!f.eof())
|
||||
{
|
||||
static string r;
|
||||
r = getline(f);
|
||||
if (r[0] == '-' && r[1] == '-')
|
||||
continue;
|
||||
s += r + '\n';
|
||||
// Cerco un ;
|
||||
const int limiter = s.find(';') + 1;
|
||||
if(limiter > 0)
|
||||
{
|
||||
query = query.left(limiter + 1);
|
||||
|
||||
if(!fp_db().sq_set_exec(query, false) || !fp_db().sq_commit())
|
||||
fatal_box("Impossibile eseguire/salvare la query:\n%s\n%s", (const char *)query, fp_db().sq_get_text_error(false));
|
||||
query.cut(0);
|
||||
}
|
||||
}
|
||||
string query = s.substr(0, limiter);
|
||||
s.erase(0, limiter);
|
||||
if(!fp_db().sq_set_exec(query, false) || !fp_db().sq_commit())
|
||||
{
|
||||
fatal_box("Impossibile eseguire/salvare la query:\n%s\n%s", query.c_str(), fp_db().sq_get_text_error(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Salvo su tabmod
|
||||
else
|
||||
{
|
||||
cantread_box(file->str);
|
||||
return false;
|
||||
}
|
||||
// Salvo su tabmod
|
||||
tabmod.zero();
|
||||
tabmod.put("MOD", "FP");
|
||||
tabmod.put("COD", "SQL");
|
||||
tabmod.put("CODTAB", "VERSION");
|
||||
tabmod.put("S0", file_version);
|
||||
if (tabmod.rewrite_write() != NOERR)
|
||||
return !yesno_box("Attenzione! Errore di aggiornamento versione di Database in Campo, continuare? %s", file_version);
|
||||
if(tabmod.rewrite_write() != NOERR && !yesno_box("Attenzione! Errore di aggiornamento versione di Database in Campo, continuare? %s", file_version))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -132,8 +143,7 @@ TString& complete_num_fp(const TCodice_numerazione& codnum, const int numdoc)
|
||||
TString& ret = get_tmp_string();
|
||||
const TString& prefisso = codnum.prefisso();
|
||||
const TString& postfisso = codnum.postfisso();
|
||||
static TString ndoc; ndoc.cut(0) << numdoc;
|
||||
|
||||
static TString ndoc; ndoc.cut(0) << numdoc;
|
||||
if(prefisso.full() || postfisso.full())
|
||||
{
|
||||
for (; ndoc.len() < len_num_doc;)
|
||||
@ -149,7 +159,7 @@ TString& complete_num_fp(const TCodice_numerazione& codnum, const int numdoc)
|
||||
*/
|
||||
|
||||
// Crea la coppia di chiavi per il db PAF a partire da un documento vero e proprio
|
||||
bool chiave_paf(const TDocumentoEsteso& doc, TString& hfatt, TString& bfatt)
|
||||
bool chiave_paf(const TDocumento& doc, TString& hfatt, TString& bfatt)
|
||||
{
|
||||
hfatt.cut(0);
|
||||
if (doc.clifor().is_occasionale())
|
||||
@ -159,20 +169,19 @@ bool chiave_paf(const TDocumentoEsteso& doc, TString& hfatt, TString& bfatt)
|
||||
CHECK(hfatt.full(), "Destinatario fattura P.A. non valido");
|
||||
const TCodice_numerazione& codnum = doc.codice_numerazione();
|
||||
//20180101_TD01_123456712345671234567
|
||||
bfatt.cut(0) << doc.get_date(DOC_DATADOC).date2ansi() << '_' << doc.tipo_doc_sdi() << '_' << complete_num_fp(codnum, doc.numero());
|
||||
bfatt.cut(0) << doc.get_date(DOC_DATADOC).date2ansi() << '_' << tipo_doc_sdi(doc) << '_' << complete_num_fp(codnum, doc.numero());
|
||||
return hfatt.full() && bfatt.full();
|
||||
}
|
||||
|
||||
// Crea la coppia di chiavi per il db PAF a partire da un semplice record di testata documento
|
||||
bool chiave_paf(const TRectype& doc, TString& hfatt, TString& bfatt)
|
||||
{
|
||||
const TDocumentoEsteso d(doc);
|
||||
|
||||
const TDocumento d(doc);
|
||||
chiave_paf(d, hfatt, bfatt);
|
||||
return hfatt.full();
|
||||
}
|
||||
|
||||
/*TString get_dest_sdi(const char tipocf, const long codcf, const TString& cod_ind_sped)
|
||||
TString get_dest_sdi(const char tipocf, const long codcf, const TString& cod_ind_sped)
|
||||
{
|
||||
TString codsdi, pec;
|
||||
get_coddest(tipocf, codcf, codsdi, pec, cod_ind_sped);
|
||||
@ -217,7 +226,7 @@ bool get_coddest(const char tipocf, const long codcf, TString& coddest, TString&
|
||||
|
||||
inline const TString& no_special(char a)
|
||||
{
|
||||
TString& r = get_tmp_string();
|
||||
TString& r = get_tmp_string().cut(0);
|
||||
|
||||
if(a != '\'')
|
||||
{
|
||||
@ -225,7 +234,6 @@ inline const TString& no_special(char a)
|
||||
}
|
||||
return r;
|
||||
}
|
||||
*/
|
||||
|
||||
const TString& tipo_doc_sdi(const TDocumento& doc)
|
||||
{
|
||||
@ -375,15 +383,14 @@ const TString& TPaf_record::var2str(const TString& fldname, const TVariant& var)
|
||||
if (apici && str[0] != '0' && real::is_natural(str))
|
||||
apici = false;
|
||||
// Parso i caratteri speciali
|
||||
for (int i = 0; i < str.len(); i++)
|
||||
for(int i = 0; i < str.len(); i++)
|
||||
{
|
||||
if (str[i] != '\'')
|
||||
tmp << str[i];
|
||||
tmp << no_special(str[i]);
|
||||
}
|
||||
if (apici)
|
||||
{
|
||||
// Aggiungo apici a inizio e fine riga
|
||||
tmp.insert("'");
|
||||
tmp.insert("'", 0);
|
||||
tmp << '\'';
|
||||
}
|
||||
return tmp;
|
||||
@ -1500,10 +1507,9 @@ void TDoc_fp::fill_buoni(map<TString20, TFPBuono_di_consegna>& buoni, const TStr
|
||||
|
||||
bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
{
|
||||
bool ok = true;
|
||||
if (!initialize(doc))
|
||||
return false;
|
||||
|
||||
bool ok = true;
|
||||
|
||||
ok &= export_paf0100f();
|
||||
|
||||
@ -2404,38 +2410,40 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
if (_allegafattura)
|
||||
{
|
||||
if (!dongle().active(RSAUT))
|
||||
{
|
||||
log(1, "Impossibile generare la fattura, il modulo RS non è abilitato!");
|
||||
}
|
||||
else if (!doc.tipo().main_print_profile(rep, 2))
|
||||
{
|
||||
log(1, "Impossibile generare la fattura, non è disponibile un profilo di stampa per questo tipo documento!");
|
||||
}
|
||||
else
|
||||
if (!doc.tipo().main_print_profile(rep, 2))
|
||||
log(1, "Impossibile generare la fattura, non è disponibile un profilo di stampa per questo tipo documento!");
|
||||
else
|
||||
{
|
||||
//ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} {NUM_COPIE} {ARCHIVIAZIONE}
|
||||
// Costruisco la chiamata
|
||||
static TString commandline;
|
||||
|
||||
commandline.cut(0) << "ve1 -2 " << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
||||
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC) << " X P 1 D"; // X: stampa su disco, P: provvisorio, 1: 1 copia, D: disabilita archiviazione
|
||||
|
||||
TExternal_app interattivo(commandline);
|
||||
|
||||
if (interattivo.run() != NOERR)
|
||||
{
|
||||
TString msgerr = "Fallita generazione PDF documento ";
|
||||
msgerr << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
||||
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC);
|
||||
error_box(msgerr);
|
||||
}
|
||||
else
|
||||
{
|
||||
TFilename pdf; pdf.tempdir();
|
||||
pdf << SLASH << doc.get(DOC_ANNO) << '_' << doc.get(DOC_CODNUM) << '_' << doc.get(DOC_NDOC) << ".pdf";
|
||||
if (!pdf.exist() && !yesno_box("Attenzione! Non è stato possibile creare il pdf, continuare?"))
|
||||
return false;
|
||||
if (!add_row_alleg(pdf, nprogr, paf2600f))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
{
|
||||
//ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} {NUM_COPIE} {ARCHIVIAZIONE}
|
||||
// Costruisco la chiamata
|
||||
static TString commandline;
|
||||
commandline.cut(0) << "ve1 -2 " << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
||||
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC) << " X P 1 D"; // X: stampa su disco, P: provvisorio, 1: 1 copia, D: disabilita archiviazione
|
||||
TExternal_app interattivo(commandline);
|
||||
if (interattivo.run() != NOERR)
|
||||
{
|
||||
TString msgerr = "Fallita generazione PDF documento ";
|
||||
msgerr << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
||||
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC);
|
||||
error_box(msgerr);
|
||||
}
|
||||
else
|
||||
{
|
||||
TFilename pdf; pdf.tempdir();
|
||||
pdf << SLASH << doc.get(DOC_ANNO) << '_' << doc.get(DOC_CODNUM) << '_' << doc.get(DOC_NDOC) << ".pdf";
|
||||
if (!pdf.exist() && !yesno_box("Attenzione! Non è stato possibile creare il pdf, continuare?"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!add_row_alleg(pdf, nprogr, paf2600f))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
TToken_string allegati(doc.get("COLL_GOLEM"), '\n');
|
||||
bool load_allegati = true;
|
||||
if (allegati.full())
|
||||
@ -2495,12 +2503,14 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
}
|
||||
bool TDoc_fp::doc_to_paf(const TRectype& rec)
|
||||
{
|
||||
TDocumentoEsteso doc(rec);
|
||||
|
||||
if (doc_to_paf(doc))
|
||||
return fp_db().sq_commit();
|
||||
TDocumentoEsteso doc;
|
||||
if (doc.read(rec) == NOERR)
|
||||
{
|
||||
if (doc_to_paf(doc))
|
||||
return fp_db().sq_commit();
|
||||
|
||||
fp_db().sq_rollback();
|
||||
fp_db().sq_rollback();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "fplib.h"
|
||||
|
||||
#include <dongle.h>
|
||||
#include <modaut.h>
|
||||
|
||||
#define FILE_CONFIG CONFIG_DITTA
|
||||
#define FILE_SECTION mod2name(FPAUT)
|
||||
#define FP_TAB_MOD mod2tabname(FPAUT)
|
||||
#define FILE_SECTION "fp"
|
||||
#define FP_TAB_MOD "FP"
|
||||
|
||||
#define FP_IP "ip"
|
||||
#define FP_DB "db"
|
||||
@ -63,11 +60,7 @@ const TString& get_db_database()
|
||||
|
||||
const TString& get_db_str_con()
|
||||
{
|
||||
TString & strconn = get_tmp_string(128);
|
||||
|
||||
strconn = get_db_indirizzo();
|
||||
strconn << "@" << get_db_database();
|
||||
return strconn;
|
||||
return get_tmp_string().cut(0) << get_db_indirizzo() << "@" << get_db_database();
|
||||
}
|
||||
|
||||
const TString& get_db_user()
|
||||
@ -77,10 +70,7 @@ const TString& get_db_user()
|
||||
|
||||
const TString& get_db_password()
|
||||
{
|
||||
TString & pwd = get_tmp_string();
|
||||
|
||||
pwd = decode(ini_get_string(FILE_CONFIG, FILE_SECTION, FP_PSW));
|
||||
return pwd;
|
||||
return get_tmp_string().cut(0) << decode(ini_get_string(FILE_CONFIG, FILE_SECTION, FP_PSW));
|
||||
}
|
||||
|
||||
const TString& get_fld_dest()
|
||||
|
@ -86,7 +86,7 @@ bool TFp_mail_sender::send(const TString& msg)
|
||||
|
||||
if(ok)
|
||||
{
|
||||
TDocumentoEsteso fdoc('D', _anno, _codnum, _ndoc);
|
||||
TDocumento fdoc('D', _anno, _codnum, _ndoc);
|
||||
TString hfatt, bfatt;
|
||||
TPaf_record paf0100f("PAF0100F");
|
||||
TString query;
|
||||
|
@ -73,7 +73,7 @@ int n;
|
||||
tmpa[i] = pSrc[i];
|
||||
|
||||
/* sort pointers */
|
||||
qsort((void *)tmpa,n,sizeof(DEC *), (int (__cdecl *)(void)) _SortInc);
|
||||
qsort((void *)tmpa,n,sizeof(DEC *), _SortInc);
|
||||
|
||||
if (n%2)
|
||||
_MacDCopy(pDst, tmpa[(n-1)/2]);
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "../cg/cglib.h"
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRigheF24_set
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <utility.h>
|
||||
|
||||
#include "../cg/cg2101.h"
|
||||
#include "../cg/cglib.h"
|
||||
#include "../cg/cg2103.h"
|
||||
#include "../cg/cgsaldac.h"
|
||||
#include "../mg/movmag.h"
|
||||
#include "../mg/rmovmag.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <utility.h>
|
||||
|
||||
#include "../cg/cglib01.h"
|
||||
#include "../cg/cglib.h"
|
||||
#include "../cg/cg2103.h"
|
||||
#include "../cg/cgsaldac.h"
|
||||
#include "../cg/cgpagame.h"
|
||||
|
||||
|
@ -395,9 +395,7 @@ THEN
|
||||
#F1.203 +!</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<sql>USE IVADIFF KEY 4 SELECT (BETWEEN(DATAREGP;#DAL;#AL))(TIPOIVA==#TIPOIVA)(TIPODIFF==#TIPODIFF)((CHIUSA=#CHIUSA)||(#CHIUSA="T"))
|
||||
FROM DATAREG=#DAL
|
||||
TO DATAREG=#AL
|
||||
<sql>USE IVADIFF SELECT (BETWEEN(DATAREG,#DAL,#AL))(TIPOIVA==#TIPOIVA)(TIPODIFF==#TIPODIFF)((CHIUSA=#CHIUSA)||(#CHIUSA="T"))
|
||||
JOIN MOV INTO NUMREG==NUMREG
|
||||
JOIN CLIFO TO MOV INTO TIPOCF==TIPO CODCF==CODCF</sql>
|
||||
</report>
|
@ -1,6 +1,6 @@
|
||||
135
|
||||
30
|
||||
SEZIONE|2|1|0|<1> Beni, <2> Rettifiche beni, <3> Servizi, <4> Rettifiche servizi
|
||||
TIPOINTRA|1|1|0|<B>eni o <S>ervizi
|
||||
TIPO|1|1|0|<A>cquisti o <C>essioni , rettifiche <B> acquisti o <D> cessioni
|
||||
ANNO|2|4|0|Anno
|
||||
PERIODO|9|2|0|Periodo (Mese[1,12] / Trimestre[1,4] / Anno [1.,1])
|
||||
@ -30,6 +30,5 @@ CODSERV|1|5|0|Codice prestazione di servizio
|
||||
MODEROG|1|1|0|Modalità di erogazione <I>mmediata o <R> a più riprese
|
||||
MODINC|1|1|0|Modalità di incasso <B>onifico, <A>ccredito o <X> Altro
|
||||
ISOPAG|1|2|0|Codice Iso Paese di pagamento
|
||||
2
|
||||
ANNO+PERIODO+NUMRIG|
|
||||
ANNO+PERIODO+TIPO+SEZIONE+NUMRIG|X
|
||||
1
|
||||
TIPO+ANNO+PERIODO+NUMRIG|
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
void put(real num, int pos, int dim, int dec = 0);
|
||||
void put(long num, int pos, int dim);
|
||||
void put(char chr, int pos);
|
||||
void genera_testata(const TIntra_context& ic, long progr[], long tot[]);
|
||||
void genera_testata(const TIntra_context& ic);
|
||||
void put(const TRectype& rec, TIntra_context& ic);
|
||||
TRecord_intra();
|
||||
};
|
||||
@ -102,14 +102,10 @@ void TRecord_intra::reset(const TIntra_context& ic)
|
||||
{
|
||||
spaces();
|
||||
put("EUROX", 1, 5);
|
||||
|
||||
const TRectype& ditta = cache().get(LF_NDITTE, main_app().get_firm());
|
||||
TString16 cod;
|
||||
|
||||
cod.format("%c|%ld", ditta.get_char(NDT_TIPOA), ditta.get_long(NDT_CODANAGR));
|
||||
|
||||
const TRectype& anagr = cache().get(LF_ANAG, cod);
|
||||
|
||||
put(anagr.get(ANA_PAIV), 6, 11);
|
||||
put(ic._progr, 17, 6);
|
||||
}
|
||||
@ -122,7 +118,7 @@ void TRecord_intra::reset_data()
|
||||
}
|
||||
|
||||
// Scrive la testata con le informazioni della ditta
|
||||
void TRecord_intra::genera_testata(const TIntra_context& ic, long progr[], long tot[])
|
||||
void TRecord_intra::genera_testata(const TIntra_context& ic)
|
||||
{
|
||||
reset(ic);
|
||||
|
||||
@ -154,11 +150,10 @@ void TRecord_intra::genera_testata(const TIntra_context& ic, long progr[], long
|
||||
else
|
||||
put("", 48, 11, "Z");
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
put(progr[i], 59 + i * 18, 5);
|
||||
put(tot[i], 64 + i * 18, 13, _ndec);
|
||||
}
|
||||
put(ic._righe_riep, 59, 5);
|
||||
put(ic._totale_riep, 64, 13, _ndec);
|
||||
put(ic._righe_rett, 77, 5);
|
||||
put(ic._totale_rett, 82, 13, _ndec);
|
||||
}
|
||||
|
||||
// Scrive un intero record del file riepiloghi/rettifiche
|
||||
@ -166,186 +161,184 @@ void TRecord_intra::put(const TRectype& rec, TIntra_context& ic)
|
||||
{
|
||||
reset_data();
|
||||
|
||||
const int sezione = rec.get_int(RIEPINTRA_SEZIONE);
|
||||
const TString & tipo = rec.get(RIEPINTRA_TIPO);
|
||||
put(rec.get_long("NUMRIG"), 24, 5);
|
||||
const char tipointra = rec.get_char("TIPOINTRA");
|
||||
const char tipo = rec.get_char("TIPO");
|
||||
|
||||
put((long) sezione, 23, 1);
|
||||
put(rec.get_long(RIEPINTRA_NUMRIG), 24, 5); //?
|
||||
if (tipo == "A")
|
||||
CHECK(tipointra == ic._tipointra, "Tipo Intra non previsto");
|
||||
|
||||
if (tipointra == 'B')
|
||||
{
|
||||
switch (sezione)
|
||||
switch (tipo)
|
||||
{
|
||||
case 1:
|
||||
put(rec.get(RIEPINTRA_STATO), 29, 2);
|
||||
put(rec.get(RIEPINTRA_PIVA), 31, 12);
|
||||
put(rec.get_real(RIEPINTRA_AMMLIRE), 43, 13, _ndec);
|
||||
put(rec.get_real(RIEPINTRA_AMMVALUTA), 56, 13);
|
||||
put(rec.get_char(RIEPINTRA_NATURA), 69);
|
||||
put(rec.get(RIEPINTRA_NOMENCL).mid(0, 4), 70, 4, "Z"); //il campo viene spezzato in 3 pezzi
|
||||
put(rec.get(RIEPINTRA_NOMENCL).mid(4, 2), 74, 2, "Z");
|
||||
put(rec.get(RIEPINTRA_NOMENCL).mid(6, 2), 76, 2, "Z");
|
||||
if (ic._freq == 'M')
|
||||
{
|
||||
put(rec.get_real(RIEPINTRA_MASSAKG), 78, 10, 0);
|
||||
put(rec.get_real(RIEPINTRA_MASSAUMS), 88, 10, 0);
|
||||
put(rec.get_real(RIEPINTRA_VALSTAT), 98, 13, _ndec);
|
||||
put(rec.get_char(RIEPINTRA_CONSEGNA), 111);
|
||||
put(rec.get_char(RIEPINTRA_TRASPORTO), 112);
|
||||
put(rec.get(RIEPINTRA_PAESE), 113, 2);
|
||||
put(rec.get(RIEPINTRA_PAESEORIG), 115, 2);
|
||||
put(rec.get(RIEPINTRA_PROV), 117, 2);
|
||||
}
|
||||
else
|
||||
put("", 78, 100);
|
||||
break;
|
||||
case 2:
|
||||
case 'A':
|
||||
put('1', 23);
|
||||
put(rec.get("STATO"), 29, 2);
|
||||
put(rec.get("PIVA"), 31, 12);
|
||||
put(rec.get_real("AMMLIRE"), 43, 13, _ndec);
|
||||
put(rec.get_real("AMMVALUTA"), 56, 13);
|
||||
put(rec.get_char("NATURA"), 69);
|
||||
put(rec.get("NOMENCL").mid(0, 4), 70, 4, "Z"); //il campo viene spezzato in 3 pezzi
|
||||
put(rec.get("NOMENCL").mid(4, 2), 74, 2, "Z");
|
||||
put(rec.get("NOMENCL").mid(6, 2), 76, 2, "Z");
|
||||
if (ic._freq == 'M')
|
||||
{
|
||||
if (ic._freq == 'M')
|
||||
put(rec.get(RIEPINTRA_PERETT), 29, 2, "RZ");
|
||||
else
|
||||
put("", 29, 2, "RZ");
|
||||
if (ic._freq == 'T')
|
||||
put(rec.get(RIEPINTRA_PERETT)[1], 31);
|
||||
else
|
||||
put('0', 31);
|
||||
put(rec.get(RIEPINTRA_ANNORETT).right(2), 32, 2, "RZ");
|
||||
put(rec.get(RIEPINTRA_STATO), 34, 2);
|
||||
put(rec.get(RIEPINTRA_PIVA), 36, 12);
|
||||
put(rec.get(RIEPINTRA_SEGNORETT), 48, 1);
|
||||
put(rec.get_real(RIEPINTRA_AMMLIRE), 49, 13, _ndec);
|
||||
put(rec.get_real(RIEPINTRA_AMMVALUTA), 62, 13);
|
||||
put(rec.get_char(RIEPINTRA_NATURA), 75);
|
||||
put(rec.get(RIEPINTRA_NOMENCL).mid(0, 4), 76, 4, "Z"); //il campo viene spezzato in 3 pezzi
|
||||
put(rec.get(RIEPINTRA_NOMENCL).mid(4, 2), 80, 2, "Z");
|
||||
put(rec.get(RIEPINTRA_NOMENCL).mid(6, 2), 82, 2, "Z");
|
||||
if (ic._freq == 'M')
|
||||
put(rec.get_real(RIEPINTRA_VALSTAT), 84, 13, _ndec);
|
||||
else
|
||||
put("", 84, 13);
|
||||
put(rec.get_real("MASSAKG"), 78, 10, 0);
|
||||
put(rec.get_real("MASSAUMS"), 88, 10, 0);
|
||||
put(rec.get_real("VALSTAT"), 98, 13, _ndec);
|
||||
put(rec.get_char("CONSEGNA"), 111);
|
||||
put(rec.get_char("TRASPORTO"), 112);
|
||||
put(rec.get("PAESE"), 113, 2);
|
||||
put(rec.get("PAESEORIG"), 115, 2);
|
||||
put(rec.get("PROV"), 117, 2);
|
||||
}
|
||||
else
|
||||
put("", 78, 100);
|
||||
break;
|
||||
case 3:
|
||||
put(rec.get(RIEPINTRA_STATO), 29, 2);
|
||||
put(rec.get(RIEPINTRA_PIVA), 31, 12);
|
||||
put(rec.get_real(RIEPINTRA_AMMLIRE), 43, 13, _ndec);
|
||||
put(rec.get_real(RIEPINTRA_AMMVALUTA), 56, 13);
|
||||
// put(numero fattura, 69, 15); facoltativo
|
||||
// put(data fattura, 84, 6); facoltativo
|
||||
put(rec.get(RIEPINTRA_CODSERV), 90, 6);
|
||||
put(rec.get_char(RIEPINTRA_MODEROG), 96);
|
||||
put(rec.get_char(RIEPINTRA_MODINCPAG), 97);
|
||||
put(rec.get(RIEPINTRA_ISOINCPAG), 98, 2);
|
||||
break;
|
||||
case 4:
|
||||
case 'B':
|
||||
{
|
||||
put('2', 23);
|
||||
if (ic._freq == 'M')
|
||||
put(rec.get("PERETT"), 29, 2, "RZ");
|
||||
else
|
||||
put("", 29, 2, "RZ");
|
||||
if (ic._freq == 'T')
|
||||
put(rec.get("PERETT")[1], 31);
|
||||
else
|
||||
put('0', 31);
|
||||
put(rec.get("ANNORETT").right(2), 32, 2, "RZ");
|
||||
put(rec.get("STATO"), 34, 2);
|
||||
put(rec.get("PIVA"), 36, 12);
|
||||
put(rec.get("SEGNORETT"), 48, 1);
|
||||
put(rec.get_real("AMMLIRE"), 49, 13, _ndec);
|
||||
put(rec.get_real("AMMVALUTA"), 62, 13);
|
||||
put(rec.get_char("NATURA"), 75);
|
||||
put(rec.get("NOMENCL").mid(0, 4), 76, 4, "Z"); //il campo viene spezzato in 3 pezzi
|
||||
put(rec.get("NOMENCL").mid(4, 2), 80, 2, "Z");
|
||||
put(rec.get("NOMENCL").mid(6, 2), 82, 2, "Z");
|
||||
if (ic._freq == 'M')
|
||||
put(rec.get_real("VALSTAT"), 84, 13, _ndec);
|
||||
else
|
||||
put("", 84, 13);
|
||||
}
|
||||
break;
|
||||
case 'C':
|
||||
put('1', 23);
|
||||
put(rec.get("STATO"), 29, 2);
|
||||
put(rec.get("PIVA"), 31, 12);
|
||||
put(rec.get_real("AMMLIRE"), 43, 13, _ndec);
|
||||
put(rec.get_char("NATURA"), 56);
|
||||
put(rec.get("NOMENCL"), 57, 8, "Z"); //il campo NON viene spezzato in 3 pezzi
|
||||
if (ic._freq == 'M')
|
||||
{
|
||||
// put(sezione doganale, 29, 6);
|
||||
put(rec.get("ANNORETT").right(2), 35, 2, "RZ");
|
||||
// put(protocollo rettifica, 37, 6, "RZ");
|
||||
// put(progressivo rettifica, 43, 5, "RZ");
|
||||
put(rec.get("STATO"), 48, 2);
|
||||
put(rec.get("PIVA"), 50, 12);
|
||||
|
||||
real ammlire = rec.get_real(RIEPINTRA_AMMLIRE);
|
||||
put(rec.get_real("MASSAKG"), 65, 10);
|
||||
put(rec.get_real("MASSAUMS"), 75, 10);
|
||||
put(rec.get_real("VALSTAT"), 85, 13, _ndec);
|
||||
put(rec.get_char("CONSEGNA"), 98);
|
||||
put(rec.get_char("TRASPORTO"), 99);
|
||||
put(rec.get("PAESE"), 100, 2);
|
||||
put(rec.get("PROV"), 102, 2);
|
||||
}
|
||||
else
|
||||
put("", 65, 100);
|
||||
break;
|
||||
case 'D':
|
||||
{
|
||||
put('2', 23);
|
||||
if (ic._freq == 'M')
|
||||
put(rec.get("PERETT"), 29, 2, "RZ");
|
||||
else
|
||||
put("", 29, 2, "RZ");
|
||||
if (ic._freq == 'T')
|
||||
put(rec.get("PERETT")[1], 31);
|
||||
else
|
||||
put('0', 31);
|
||||
put(rec.get("ANNORETT").right(2), 32, 2, "RZ");
|
||||
put(rec.get("STATO"), 34, 2);
|
||||
put(rec.get("PIVA"), 36, 12);
|
||||
put(rec.get("SEGNORETT"), 48, 1);
|
||||
put(abs(rec.get_real("AMMLIRE")), 49, 13, _ndec);
|
||||
put(rec.get("NATURA"), 62, 1);
|
||||
put(rec.get("NOMENCL"), 63, 8, "Z"); // il campo NON viene spezzato in 3 pezzi
|
||||
|
||||
if (rec.get_real(RIEPINTRA_SEGNORETT) == "+")
|
||||
ammlire = -ammlire;
|
||||
put(rec.get_real("AMMLIRE"), 62, 13, _ndec);
|
||||
put(rec.get_real("AMMVALUTA"), 75, 13);
|
||||
// put(numero fattura, 88, 15); facoltativo
|
||||
// put(data fattura, 103, 6); facoltativo
|
||||
put(rec.get(RIEPINTRA_CODSERV), 109, 6);
|
||||
put(rec.get_char(RIEPINTRA_MODEROG), 115);
|
||||
put(rec.get_char(RIEPINTRA_MODINCPAG), 116);
|
||||
put(rec.get(RIEPINTRA_ISOINCPAG), 117, 2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
NFCHECK("sezione sconosciuta: %d", sezione);
|
||||
if (ic._freq == 'M')
|
||||
put(abs(rec.get_real("VALSTAT")), 71, 13, _ndec);
|
||||
else
|
||||
put("", 71, 13);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
NFCHECK("Record di tipo sconosciuto: %c", tipo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (sezione)
|
||||
switch (tipo)
|
||||
{
|
||||
case 1:
|
||||
put(rec.get(RIEPINTRA_STATO), 29, 2);
|
||||
put(rec.get(RIEPINTRA_PIVA), 31, 12);
|
||||
put(rec.get_real(RIEPINTRA_AMMLIRE), 43, 13, _ndec);
|
||||
put(rec.get_char(RIEPINTRA_NATURA), 56);
|
||||
put(rec.get(RIEPINTRA_NOMENCL), 57, 8, "Z"); //il campo NON viene spezzato in 3 pezzi
|
||||
if (ic._freq == 'M')
|
||||
{
|
||||
put(rec.get_real(RIEPINTRA_MASSAKG), 65, 10);
|
||||
put(rec.get_real(RIEPINTRA_MASSAUMS), 75, 10);
|
||||
put(rec.get_real(RIEPINTRA_VALSTAT), 85, 13, _ndec);
|
||||
put(rec.get_char(RIEPINTRA_CONSEGNA), 98);
|
||||
put(rec.get_char(RIEPINTRA_TRASPORTO), 99);
|
||||
put(rec.get(RIEPINTRA_PAESE), 100, 2);
|
||||
put(rec.get(RIEPINTRA_PROV), 102, 2);
|
||||
}
|
||||
else
|
||||
put("", 65, 100);
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
if (ic._freq == 'M')
|
||||
put(rec.get(RIEPINTRA_PERETT), 29, 2, "RZ");
|
||||
else
|
||||
put("", 29, 2, "RZ");
|
||||
if (ic._freq == 'T')
|
||||
put(rec.get(RIEPINTRA_PERETT)[1], 31);
|
||||
else
|
||||
put('0', 31);
|
||||
put(rec.get(RIEPINTRA_ANNORETT).right(2), 32, 2, "RZ");
|
||||
put(rec.get(RIEPINTRA_STATO), 34, 2);
|
||||
put(rec.get(RIEPINTRA_PIVA), 36, 12);
|
||||
put(rec.get(RIEPINTRA_SEGNORETT), 48, 1);
|
||||
put(abs(rec.get_real(RIEPINTRA_AMMLIRE)), 49, 13, _ndec);
|
||||
put(rec.get(RIEPINTRA_NATURA), 62, 1);
|
||||
put(rec.get(RIEPINTRA_NOMENCL), 63, 8, "Z"); // il campo NON viene spezzato in 3 pezzi
|
||||
|
||||
if (ic._freq == 'M')
|
||||
put(abs(rec.get_real(RIEPINTRA_VALSTAT)), 71, 13, _ndec);
|
||||
else
|
||||
put("", 71, 13);
|
||||
}
|
||||
case 'A':
|
||||
put('3', 23);
|
||||
put(rec.get("STATO"), 29, 2);
|
||||
put(rec.get("PIVA"), 31, 12);
|
||||
put(rec.get_real("AMMLIRE"), 43, 13, _ndec);
|
||||
put(rec.get_real("AMMVALUTA"), 56, 13);
|
||||
// put(numero fattura, 69, 15);
|
||||
// put(data fattura, 84, 6);
|
||||
// put(codice servizio, 90, 6);
|
||||
// put(modalità di erogazione, 96);
|
||||
// put(modalità di incasso, 97);
|
||||
// put(codice paese di pagamento, 98, 2);
|
||||
break;
|
||||
case 3:
|
||||
put(rec.get(RIEPINTRA_STATO), 29, 2);
|
||||
put(rec.get(RIEPINTRA_PIVA), 31, 12);
|
||||
put(rec.get_real(RIEPINTRA_AMMLIRE), 43, 13, _ndec);
|
||||
// put(numero fattura, 56, 15); facoltativo
|
||||
// put(data fattura, 71, 6); facoltativo
|
||||
put(rec.get(RIEPINTRA_CODSERV), 77, 6);
|
||||
put(rec.get_char(RIEPINTRA_MODEROG), 83);
|
||||
put(rec.get_char(RIEPINTRA_MODINCPAG), 84);
|
||||
put(rec.get(RIEPINTRA_ISOINCPAG), 85, 2);
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
// put(sezione doganale, 29, 6);
|
||||
put(rec.get(RIEPINTRA_ANNORETT).right(2), 35, 2, "RZ");
|
||||
// put(protocollo rettifica, 37, 6, "RZ");
|
||||
// put(progressivo rettifica, 43, 5, "RZ");
|
||||
put(rec.get(RIEPINTRA_STATO), 48, 2);
|
||||
put(rec.get(RIEPINTRA_PIVA), 50, 12);
|
||||
|
||||
real ammlire = rec.get_real(RIEPINTRA_AMMLIRE);
|
||||
|
||||
if (rec.get_real(RIEPINTRA_SEGNORETT) == "+")
|
||||
ammlire = -ammlire;
|
||||
put(ammlire, 2, 13, _ndec);
|
||||
// put(numero fattura, 75, 15); facoltativo
|
||||
// put(data fattura, 90, 6); facoltativo
|
||||
put(rec.get(RIEPINTRA_CODSERV), 96, 6);
|
||||
put(rec.get_char(RIEPINTRA_MODEROG), 102);
|
||||
put(rec.get_char(RIEPINTRA_MODINCPAG), 103);
|
||||
put(rec.get(RIEPINTRA_ISOINCPAG), 104, 2);
|
||||
}
|
||||
case 'B':
|
||||
{
|
||||
put('4', 23);
|
||||
// put(sezione doganale, 29, 6);
|
||||
put(rec.get("ANNORETT").right(2), 35, 2, "RZ");
|
||||
// put(protocollo rettifica, 37, 6, "RZ");
|
||||
// put(progressivo rettifica, 43, 5, "RZ");
|
||||
put(rec.get("STATO"), 48, 2);
|
||||
put(rec.get("PIVA"), 50, 12);
|
||||
put(rec.get_real("AMMLIRE"), 62, 13, _ndec);
|
||||
put(rec.get_real("AMMVALUTA"), 75, 13);
|
||||
// put(numero fattura, 88, 15);
|
||||
// put(data fattura, 103, 6);
|
||||
// put(codice servizio, 109, 6);
|
||||
// put(modalità di erogazione, 115);
|
||||
// put(modalità di incasso, 116);
|
||||
// put(codice paese di pagamento, 117, 2);
|
||||
}
|
||||
break;
|
||||
case 'C':
|
||||
put('3', 23);
|
||||
put(rec.get("STATO"), 29, 2);
|
||||
put(rec.get("PIVA"), 31, 12);
|
||||
put(rec.get_real("AMMLIRE"), 43, 13, _ndec);
|
||||
// put(numero fattura, 56, 15);
|
||||
// put(data fattura, 71, 6);
|
||||
// put(codice servizio, 77, 6);
|
||||
// put(modalità di erogazione, 83);
|
||||
// put(modalità di incasso,84);
|
||||
// put(codice paese di pagamento, 85, 2);
|
||||
break;
|
||||
default:
|
||||
NFCHECK("sezione sconosciuta: %d", sezione);
|
||||
case 'D':
|
||||
{
|
||||
put('4', 23);
|
||||
// put(sezione doganale, 29, 6);
|
||||
put(rec.get("ANNORETT").right(2), 35, 2, "RZ");
|
||||
// put(protocollo rettifica, 37, 6, "RZ");
|
||||
// put(progressivo rettifica, 43, 5, "RZ");
|
||||
put(rec.get("STATO"), 48, 2);
|
||||
put(rec.get("PIVA"), 50, 12);
|
||||
put(rec.get_real("AMMLIRE"), 2, 13, _ndec);
|
||||
// put(numero fattura, 75, 15);
|
||||
// put(data fattura, 90, 6);
|
||||
// put(codice servizio, 96, 6);
|
||||
// put(modalità di erogazione, 102);
|
||||
// put(modalità di incasso, 103);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
NFCHECK("Record di tipo sconosciuto: %c", tipo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -369,15 +362,13 @@ TRecord_intra::TRecord_intra() : TString(132), _ndec(0)
|
||||
|
||||
class TInvioIntra1_2_mask : public TIntra_mask
|
||||
{
|
||||
long _progr[4];
|
||||
long _totale[4];
|
||||
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
virtual short type_field() const { return F_TIPO; }
|
||||
virtual short period_field() const { return F_PERIODO_M; }
|
||||
virtual int anno() const { return get_int(F_ANNO); }
|
||||
void calcola_repiloghi(const TRectype & rec);
|
||||
|
||||
TRecnotype calcola_totale(TCursor& cur, real& tot) const;
|
||||
void proponi_numero();
|
||||
|
||||
public:
|
||||
@ -461,21 +452,33 @@ bool TInvioIntra1_2_mask::on_field_event(TOperable_field& o, TField_event e, lon
|
||||
return TIntra_mask::on_field_event(o, e, jolly);
|
||||
}
|
||||
|
||||
void TInvioIntra1_2_mask::calcola_repiloghi(const TRectype & rec)
|
||||
TRecnotype TInvioIntra1_2_mask::calcola_totale(TCursor& cur, real& tot) const
|
||||
{
|
||||
int sezione = rec.get_int(RIEPINTRA_SEZIONE);
|
||||
real r = rec.get_real(RIEPINTRA_AMMLIRE).round(0); // Arrotonda all'Euro i valori intermedi
|
||||
long val = atol(r.string());
|
||||
TWait_cursor arrow;
|
||||
const TRecnotype items = cur.items();
|
||||
cur.freeze();
|
||||
|
||||
if ((sezione == 2 || sezione == 4) && rec.get_char("SEGNORETT") == '-')
|
||||
val = -val; // Rettifiche negative
|
||||
_totale[--sezione] += val;
|
||||
tot = ZERO;
|
||||
|
||||
const TRectype& rec = cur.curr();
|
||||
for (cur = 0L; cur.pos() < items; ++cur)
|
||||
{
|
||||
const char tipo = rec.get_char("TIPO");
|
||||
const real val = rec.get_real("AMMLIRE").round(0); // Arrotonda all'Euro i valori intermedi
|
||||
// Da chiarire: come sommare le rettifiche negative!
|
||||
if ((tipo == 'B' || tipo == 'D') && rec.get_char("SEGNORETT") == '-')
|
||||
tot -= val; // Rettifiche negative
|
||||
else
|
||||
tot += val;
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
void TInvioIntra1_2_mask::genera(char tipointra, char tipo)
|
||||
{
|
||||
TIntra_context ic;
|
||||
|
||||
ic._tipointra = tipointra;
|
||||
ic._tipo = tipo;
|
||||
ic._anno = anno();
|
||||
ic._freq = frequenza(ic._anno);
|
||||
@ -499,12 +502,19 @@ void TInvioIntra1_2_mask::genera(char tipointra, char tipo)
|
||||
TRelation rel(LF_RIEPRETT);
|
||||
TRectype filter(LF_RIEPRETT);
|
||||
|
||||
filter.put("TIPOINTRA", ic._tipointra);
|
||||
filter.put("TIPO", ic._tipo);
|
||||
filter.put("ANNO", ic._anno);
|
||||
filter.put("PERIODO", periodo_str());
|
||||
TCursor riep(&rel, "", 1, &filter, &filter);
|
||||
|
||||
TCursor riep(&rel, "", 2, &filter, &filter);
|
||||
const TRectype & rieprec = riep.curr();
|
||||
const long items = riep.items();
|
||||
ic._righe_riep = calcola_totale(riep, ic._totale_riep);
|
||||
|
||||
filter.put("TIPO", char(ic._tipo+1));
|
||||
TCursor rett(&rel, "", 1, &filter, &filter);
|
||||
|
||||
ic._righe_rett = calcola_totale(rett, ic._totale_rett);
|
||||
|
||||
TFilename name = get(F_PATH);
|
||||
TString filename(get(F_CODUA));
|
||||
|
||||
@ -520,44 +530,36 @@ void TInvioIntra1_2_mask::genera(char tipointra, char tipo)
|
||||
cantwrite_box(name);
|
||||
return;
|
||||
}
|
||||
_progr[0] = 0L;
|
||||
_progr[1] = 0L;
|
||||
_progr[2] = 0L;
|
||||
_progr[3] = 0L;
|
||||
_totale[0] = 0L;
|
||||
_totale[1] = 0L;
|
||||
_totale[2] = 0L;
|
||||
_totale[3] = 0L;
|
||||
|
||||
TProgress_monitor pi(2 * items, TR("Generazione Intra 1/2"), false);
|
||||
const long total = ic._righe_riep + ic._righe_rett;
|
||||
|
||||
TProgress_monitor pi(total, TR("Generazione Intra 1/2"), false);
|
||||
TRecord_intra rec;
|
||||
|
||||
for (riep = 0L; pi.add_status() && riep.pos() < items; ++riep)
|
||||
calcola_repiloghi(rieprec);
|
||||
rec.genera_testata(ic, _progr, _totale);
|
||||
rec.genera_testata(ic);
|
||||
out << rec;
|
||||
_progr[0] = 0;
|
||||
_progr[1] = 0;
|
||||
_progr[2] = 0;
|
||||
_progr[3] = 0;
|
||||
for (riep = 0L; pi.add_status() && riep.pos() < items; ++riep)
|
||||
|
||||
rec.reset_data();
|
||||
for (riep = 0L; riep.pos() < ic._righe_riep; ++riep)
|
||||
{
|
||||
rec.put(rieprec, ic);
|
||||
pi.add_status();
|
||||
rec.put(riep.curr(), ic);
|
||||
out << rec;
|
||||
}
|
||||
set(F_NUMERO, ic._progr + 1);
|
||||
rec.reset_data();
|
||||
for (rett = 0L; rett.pos() < ic._righe_rett; ++rett)
|
||||
{
|
||||
pi.add_status();
|
||||
rec.put(riep.curr(), ic);
|
||||
out << rec;
|
||||
}
|
||||
|
||||
codtab.format("%c%04d%02d", ic._tipo, ic._anno, ic._periodo);
|
||||
|
||||
|
||||
ird.put("CODTAB", codtab);
|
||||
ird.put("I0", ic._progr + 1);
|
||||
ird.put("I2", _progr[0]);
|
||||
ird.put("I3", _progr[1]);
|
||||
ird.put("I4", _progr[2]);
|
||||
ird.put("I5", _progr[3]);
|
||||
ird.put("R2", _totale[0]);
|
||||
ird.put("R3", _totale[1]);
|
||||
ird.put("R4", _totale[2]);
|
||||
ird.put("R5", _totale[3]);
|
||||
ird.put("I2", ic._righe_riep);
|
||||
ird.put("I3", ic._righe_rett);
|
||||
ird.put("R0", ic._totale_riep);
|
||||
ird.put("R1", ic._totale_rett);
|
||||
ird.rewrite_write();
|
||||
set(F_NUMERO, ic._progr + 1);
|
||||
|
||||
|
@ -650,12 +650,12 @@ void TInvioIntra12_13_mask::genera()
|
||||
rec_z.fill();
|
||||
out << rec_z;
|
||||
|
||||
TString8 codtab; codtab.format("A%04d%01", get_int(F_ANNO));
|
||||
TRectype & rird = (TRectype &)cache().get("IRD", codtab);
|
||||
/* TString8 codtab; codtab.format("A%04d%01", get_int(F_ANNO));
|
||||
TRectype & rird = (TRectype &)cache().get("IRD", codtab);
|
||||
|
||||
ic._progr = get_long(F_NUMERO);
|
||||
rird.put("I6", ic._progr);
|
||||
rird.rewrite_write();
|
||||
rird.put("I4", ic._progr);
|
||||
rird.rewrite_write(); */
|
||||
|
||||
TString msg("Generato il file ");
|
||||
|
||||
|
@ -161,7 +161,7 @@ protected:
|
||||
virtual void init_insert_mode(TMask& m);
|
||||
virtual void init_modify_mode(TMask& m);
|
||||
virtual bool save_and_new() const { return TRUE; };
|
||||
// virtual void check_existent_disk(const TMask& m);
|
||||
virtual void check_existent_disk(const TMask& m);
|
||||
public:
|
||||
};
|
||||
|
||||
@ -183,12 +183,12 @@ bool TRiepiloghi_intra::user_destroy()
|
||||
|
||||
bool TRiepiloghi_intra::get_next_key(TToken_string& k)
|
||||
{
|
||||
if (_msk->get(F_ANNO).empty()) // || _msk->get(F_PARTITA_IVA).empty())
|
||||
if (_msk->get(F_ANNO).empty() || _msk->get(F_PARTITA_IVA).empty())
|
||||
return false;
|
||||
|
||||
_msk->autosave(*_rel);
|
||||
TRectype filter(_rel->curr());
|
||||
filter.zero(RIEPINTRA_NUMRIG);
|
||||
filter.zero("NUMRIG");
|
||||
|
||||
TCursor cur(_rel, "", 1, &filter, &filter);
|
||||
const long r = cur.items();
|
||||
@ -205,19 +205,19 @@ bool TRiepiloghi_intra::get_next_key(TToken_string& k)
|
||||
|
||||
void TRiepiloghi_intra::init_insert_mode(TMask& m)
|
||||
{
|
||||
// check_existent_disk(m);
|
||||
check_existent_disk(m);
|
||||
m.enable(F_VALUTA);
|
||||
}
|
||||
|
||||
void TRiepiloghi_intra::init_modify_mode(TMask& m)
|
||||
{
|
||||
// check_existent_disk(m);
|
||||
check_existent_disk(m);
|
||||
m.enable(F_VALUTA);
|
||||
}
|
||||
|
||||
int TRiepiloghi_intra::write(const TMask& m)
|
||||
{
|
||||
_rel->curr().put(RIEPINTRA_FREQUENZA, ((TRiepiloghi_mask &) m).frequenza(m.get_int(F_ANNO)));
|
||||
_rel->curr().put("FREQUENZA", ((TRiepiloghi_mask &) m).frequenza(m.get_int(F_ANNO)));
|
||||
return TRelation_application::write(m);
|
||||
}
|
||||
void TRiepiloghi_intra::init_query_mode(TMask& m)
|
||||
@ -240,7 +240,6 @@ void TRiepiloghi_intra::init_query_mode(TMask& m)
|
||||
m.disable(F_VALUTA);
|
||||
}
|
||||
|
||||
/*
|
||||
void TRiepiloghi_intra::check_existent_disk(const TMask& m)
|
||||
{
|
||||
int anno = m.get_int(F_ANNO);
|
||||
@ -263,7 +262,6 @@ void TRiepiloghi_intra::check_existent_disk(const TMask& m)
|
||||
warning_box(FR("E' già stato generato scambi.cee per il periodo %d dell'anno %d"), periodo,anno);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
int in0600(int argc, char* argv[])
|
||||
{
|
||||
|
@ -1,18 +1,17 @@
|
||||
#define F_DITTA 301
|
||||
#define F_DITTA_DESCR 302
|
||||
|
||||
#define F_SEZIONE 303
|
||||
#define F_TIPO 304
|
||||
#define F_ANNO 305
|
||||
#define F_PERIODO_M 306
|
||||
#define F_PERIODO_T 307
|
||||
#define F_PERIODO_A 308
|
||||
#define F_STATO 309
|
||||
#define F_TIPO_CF 310
|
||||
#define F_PARTITA_IVA 311
|
||||
#define F_PARTITA_DESC 312
|
||||
#define F_NUM_RIG 313
|
||||
#define F_RIEPILOGHI 314
|
||||
#define F_TIPO 303
|
||||
#define F_ANNO 304
|
||||
#define F_PERIODO_M 305
|
||||
#define F_PERIODO_T 306
|
||||
#define F_PERIODO_A 307
|
||||
#define F_STATO 308
|
||||
#define F_TIPO_CF 309
|
||||
#define F_PARTITA_IVA 310
|
||||
#define F_PARTITA_DESC 311
|
||||
#define F_NUM_RIG 312
|
||||
#define F_RIEPILOGHI 313
|
||||
|
||||
#define F_NATURA_TRANS 321
|
||||
#define F_NATURA_DESCR 322
|
||||
@ -35,12 +34,6 @@
|
||||
#define F_TRASPORTO_DESC 358
|
||||
#define F_PERIODO_H 359
|
||||
#define F_UMS 360
|
||||
#define F_CODSERV 361
|
||||
#define F_MODEROG 362
|
||||
#define F_MODINCPAG 363
|
||||
#define F_STATOINCPAG 364
|
||||
|
||||
#define GR_CESSIONI 1
|
||||
#define GR_ACQUISTI 2
|
||||
#define GR_BENI 3
|
||||
#define GR_SERVIZI 4
|
||||
|
@ -101,26 +101,32 @@ BEGIN
|
||||
WARNING "Anno non valido"
|
||||
END
|
||||
|
||||
LIST F_SEZIONE 1 7
|
||||
LIST F_TIPOINTRA 1 7
|
||||
BEGIN
|
||||
PROMPT 46 3 "Sezione "
|
||||
ITEM "1|Beni" MESSAGE ENABLE,GR_BENI@|DISABLE,GR_SERVIZI@
|
||||
ITEM "3|Servizi" MESSAGE DISABLE,GR_BENI@|ENABLE,GR_SERVIZI@
|
||||
FIELD SEZIONE
|
||||
PROMPT 46 3 "Tipo Intra "
|
||||
ITEM "B|Beni" MESSAGE ENABLE,-GR_BENI|DISABLE,GR_SERVIZI
|
||||
ITEM "S|Servizi" MESSAGE DISABLE,-GR_BENI|ENABLE,GR_SERVIZI
|
||||
KEY 1
|
||||
FIELD TIPOINTRA
|
||||
END
|
||||
|
||||
LIST F_TIPO 1 10
|
||||
BEGIN
|
||||
PROMPT 67 3 "Tipo riepilogo "
|
||||
ITEM "C|Cessioni" MESSAGE "C",F_TIPO_CF|SHOW,GR_CESSIONI@|HIDE,GR_ACQUISTI@
|
||||
ITEM "A|Acquisti" MESSAGE "F",F_TIPO_CF|SHOW,GR_ACQUISTI@|HIDE,GR_CESSIONI@
|
||||
ITEM "C|Cessioni"
|
||||
MESSAGE "C",F_TIPO_CF|SHOW,GR_CESSIONI@|HIDE,GR_ACQUISTI@
|
||||
ITEM "A|Acquisti"
|
||||
MESSAGE "F",F_TIPO_CF|SHOW,GR_ACQUISTI@|HIDE,GR_CESSIONI@
|
||||
KEY 1
|
||||
FIELD TIPO
|
||||
END
|
||||
|
||||
NUBER F_NUM_RIG 7
|
||||
BEGIN
|
||||
PROMPT 1 4 "Riga di riepilogo "
|
||||
USE LF_RIEPRETT SELECT (SEZIONE=="1")||(SEZIONE=="3")
|
||||
USE LF_RIEPRETT
|
||||
INPUT TIPOINTRA F_TIPO SELECT
|
||||
INPUT TIPO F_TIPO SELECT
|
||||
INPUT ANNO F_ANNO SELECT
|
||||
INPUT PERIODO F_PERIODO_H SELECT
|
||||
INPUT NUMRIG F_NUM_RIG
|
||||
@ -186,6 +192,7 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
|
||||
STRING F_NATURA_TRANS 1
|
||||
BEGIN
|
||||
PROMPT 1 8 "Natura transazione "
|
||||
@ -198,7 +205,6 @@ BEGIN
|
||||
OUTPUT F_NATURA_DESCR S0
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD NATURA
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
MEMO F_NATURA_DESCR 50 3
|
||||
@ -232,7 +238,6 @@ BEGIN
|
||||
MESSAGE DIRTY,F_NOMENCLATURA3
|
||||
FIELD NOMENCL[1,4]
|
||||
WARNING "Nomenclatura combinata assente"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
STRING F_NOMENCLATURA2 2
|
||||
@ -243,7 +248,6 @@ BEGIN
|
||||
VALIDATE REQIF_FUNC 1 F_NOMENCLATURA3
|
||||
MESSAGE DIRTY,F_NOMENCLATURA3
|
||||
WARNING "Nomenclatura combinata assente"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
NUMBER F_NOMENCLATURA3 2
|
||||
@ -254,7 +258,6 @@ BEGIN
|
||||
CHECKTYPE NORMAL
|
||||
FIELD NOMENCL[7,8]
|
||||
WARNING "Nomenclatura combinata assente"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
STRING F_NOMENCL_DESC 40
|
||||
@ -276,7 +279,6 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD CONSEGNA
|
||||
WARNING "Condizione di consegna assente"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
STRING F_CONSEGNA_DESC 50
|
||||
@ -297,7 +299,6 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD TRASPORTO
|
||||
WARNING "Modo di trasporto assente"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
STRING F_TRASPORTO_DESC 50
|
||||
@ -310,13 +311,13 @@ END
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 13 "Paese di destinazione"
|
||||
GROUP GR_CESSIONI GR_BENI
|
||||
GROUP GR_CESSIONI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 13 "Paese di provenienza"
|
||||
GROUP GR_ACQUISTI GR_BENI
|
||||
GROUP GR_ACQUISTI
|
||||
END
|
||||
|
||||
STRING F_PAESE 2
|
||||
@ -330,7 +331,6 @@ BEGIN
|
||||
OUTPUT F_PAESE CODTAB
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD PAESE
|
||||
GROUP GR_BENI
|
||||
WARNING "Paese assente"
|
||||
END
|
||||
|
||||
@ -341,20 +341,19 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
FLAGS "U"
|
||||
FIELD PAESEORIG
|
||||
GROUP GR_BENI
|
||||
WARNING "Paese di origine assente"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 46 13 "Provincia d'origine "
|
||||
GROUP GR_CESSIONI GR_BENI
|
||||
GROUP GR_CESSIONI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 46 13 "Prov. destinazione "
|
||||
GROUP GR_ACQUISTI GR_BENI
|
||||
GROUP GR_ACQUISTI
|
||||
END
|
||||
|
||||
STRING F_PROV 2
|
||||
@ -364,7 +363,6 @@ BEGIN
|
||||
FIELD PROV
|
||||
CHECTYPE REQUIRED
|
||||
WARNING "Provincia assente"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
CURRENCY F_AMM_LIRE 18
|
||||
@ -386,7 +384,6 @@ BEGIN
|
||||
OUTPUT F_VALUTA CODTAB
|
||||
FIELD CODVAL
|
||||
FLAGS "GUZ"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
CURRENCY F_AMM_VALUTA 18
|
||||
@ -395,14 +392,12 @@ BEGIN
|
||||
DRIVENBY F_VALUTA
|
||||
FIELD AMMVALUTA
|
||||
WARNING "Inserire l'ammontare in valuta"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
CURRENCY F_VALORE_STAT 18
|
||||
BEGIN
|
||||
PROMPT 1 16 "Valore statistico "
|
||||
FIELD VALSTAT
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
NUMBER F_MASSA_KG 18 5
|
||||
@ -410,7 +405,6 @@ BEGIN
|
||||
PROMPT 1 17 "Massa netta in Kg "
|
||||
PICTURE ".5"
|
||||
FIELD MASSAKG
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
STRING F_UMS 2
|
||||
@ -425,76 +419,6 @@ BEGIN
|
||||
PICTURE ".5"
|
||||
FIELD MASSAUMS
|
||||
WARNING "Inserire la massa in unità supplementare"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
STRING F_CODSERV 5
|
||||
BEGIN
|
||||
PROMPT 1 18
|
||||
FIELD CODSERV
|
||||
USE %CPA
|
||||
INPUT CODTAB F_CODSERV
|
||||
DISPLAY "Classificazione" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODSERV CODTAB
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
LIST F_MODEROG 1 15
|
||||
BEGIN
|
||||
PROMPT 1 19 "Modalità Erogazione"
|
||||
ITEM "I|Unica soluzione"
|
||||
ITEM "R|Più soluzioni"
|
||||
FIELD MODEROG
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 20 "Modalità di incasso "
|
||||
GROUP GR_CESSIONI GR_SERVIZI
|
||||
FLAGS "G"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 20 "Modalità di pagamento"
|
||||
GROUP GR_ACQUISTI GR_BENI
|
||||
FLAGS "G"
|
||||
END
|
||||
|
||||
LIST F_MODINCPAG 1 9
|
||||
BEGIN
|
||||
PROMPT 20 20 ""
|
||||
ITEM "B|Bonifico"
|
||||
ITEM "A|Accredito"
|
||||
ITEM "X|Altro"
|
||||
FIELD MODINCPAG
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 21 "Stato di incasso "
|
||||
GROUP GR_CESSIONI GR_SERVIZI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 21 "Stato di pagamento "
|
||||
GROUP GR_ACQUISTI GR_BENI
|
||||
END
|
||||
|
||||
STRING F_STATOINCPAG 2
|
||||
BEGIN
|
||||
PROMPT 20 21 ""
|
||||
USE %SCE
|
||||
INPUT CODTAB F_STATOINCPAG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_STATOINCPAG CODTAB
|
||||
FIELD ISOINCPAG
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
BUTTON F_RIEPILOGHI 20 2
|
||||
|
@ -87,7 +87,6 @@ bool TRettifiche_mask::on_field_event(TOperable_field& o, TField_event e, long j
|
||||
break;
|
||||
default:
|
||||
const int pos = id2pos(dlg);
|
||||
|
||||
if (pos >= 0)
|
||||
set(dlg + F_STATO - O_STATO, fld(pos).get());
|
||||
break;
|
||||
@ -202,7 +201,8 @@ void TRettifiche_intra::init_modify_mode(TMask& m)
|
||||
const char* TRettifiche_intra::get_next_key()
|
||||
{
|
||||
TRectype& curr = _rel->curr();
|
||||
curr.put("ANNO", _msk->anno());
|
||||
curr.put("TIPO", _msk->tipo());
|
||||
curr.put("ANNO", _msk->anno());
|
||||
curr.put("PERIODO", _msk->periodo_str());
|
||||
TCursor cur(_rel, "", 1, &curr, &curr);
|
||||
const long items = cur.items();
|
||||
@ -213,6 +213,8 @@ const char* TRettifiche_intra::get_next_key()
|
||||
last_row = curr.get_int("NUMRIG");
|
||||
}
|
||||
_str.cut(0);
|
||||
_str.add(F_TIPO);
|
||||
_str.add(curr.get("TIPO"));
|
||||
_str.add(F_ANNO);
|
||||
_str.add(curr.get("ANNO"));
|
||||
_str.add(F_PERIODO_M);
|
||||
|
@ -11,7 +11,6 @@
|
||||
#define O_PARTITA_IVA 110
|
||||
#define O_PARTITA_DESC 111
|
||||
#define O_NUM_RIG 112
|
||||
#define O_SEZIONE 113
|
||||
|
||||
#define O_NATURA_TRANS 121
|
||||
#define O_NOMENCLATURA 122
|
||||
@ -38,13 +37,3 @@
|
||||
#define F_VALUTA 225
|
||||
#define F_VALORE_STAT 226
|
||||
#define F_NUMREG 229
|
||||
#define F_SEZIONE 230
|
||||
#define F_CODSERV 231
|
||||
#define F_MODEROG 232
|
||||
#define F_MODINCPAG 233
|
||||
#define F_STATOINCPAG 234
|
||||
|
||||
#define GR_CESSIONI 1
|
||||
#define GR_ACQUISTI 2
|
||||
#define GR_BENI 3
|
||||
#define GR_SERVIZI 4
|
||||
|
@ -79,24 +79,15 @@ BEGIN
|
||||
ITEM "01|Annuale"
|
||||
END
|
||||
|
||||
LIST O_SEZIONE 1 7
|
||||
BEGIN
|
||||
PROMPT 46 4 "Sezione "
|
||||
ITEM "1|Beni" MESSAGE ENABLE,GR_BENI@|DISABLE,GR_SERVIZI@
|
||||
ITEM "3|Servizi" MESSAGE DISABLE,GR_BENI@|ENABLE,GR_SERVIZI@
|
||||
KEY 1
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER O_NUM_RIG 7
|
||||
NUBER O_NUM_RIG 7
|
||||
BEGIN
|
||||
PROMPT 63 4 "Riga "
|
||||
USE LF_RIEPRETT SELECT (SEZIONE==#OSEZIONE)&&(TIPO==#O_TIPO)
|
||||
USE LF_RIEPRETT
|
||||
INPUT TIPO O_TIPO SELECT
|
||||
INPUT ANNO O_ANNO SELECT
|
||||
INPUT PERIODO O_PERIODO_M
|
||||
INPUT NUMRIG O_NUM_RIG
|
||||
DISPLAY "Tipo" TIPO
|
||||
DISPLAY "Sezione" SEZIONE
|
||||
DISPLAY "Anno" ANNO
|
||||
DISPLAY "Periodo" PERIODO
|
||||
DISPLAY "Numero" NUMRIG
|
||||
@ -111,8 +102,6 @@ BEGIN
|
||||
OUTPUT O_PERIODO_T PERIODO
|
||||
OUTPUT O_NUM_RIG NUMRIG
|
||||
OUTPUT O_STATO STATO
|
||||
// OUTPUT O_TIPO TIPO
|
||||
OUTPUT O_SEZIONE SEZIONE
|
||||
OUTPUT O_PARTITA_IVA PIVA
|
||||
OUTPUT O_NATURA_TRANS NATURA
|
||||
OUTPUT O_NOMENCLATURA NOMENCL
|
||||
@ -210,8 +199,11 @@ END
|
||||
LIST F_TIPO 1 10
|
||||
BEGIN
|
||||
PROMPT 2 12 "Tipo "
|
||||
ITEM "A|Cessioni" MESSAGE "C",F_TIPO_CF|"C",O_TIPO|SHOW,GR_CESSIONI@|HIDE,GR_ACQUISTI@
|
||||
ITEM "C|Acquisti" MESSAGE "F",F_TIPO_CF|"A",O_TIPO|HIDE,GR_CESSIONI@|SHOW,GR_ACQUISTI@
|
||||
ITEM "D|Cessioni"
|
||||
MESSAGE "C",F_TIPO_CF|"C",O_TIPO
|
||||
ITEM "B|Acquisti"
|
||||
MESSAGE "F",F_TIPO_CF|"A",O_TIPO
|
||||
KEY 1
|
||||
FIELD TIPO
|
||||
END
|
||||
|
||||
@ -250,19 +242,10 @@ BEGIN
|
||||
KEY 1
|
||||
END
|
||||
|
||||
LIST F_SEZIONE 1 7
|
||||
BEGIN
|
||||
PROMPT 46 12 "Sezione"
|
||||
ITEM "2|Beni" MESSAGE ENABLE,GR_BENI@|DISABLE,GR_SERVIZI@|"2",O_SEZIONE
|
||||
ITEM "4|Servizi" MESSAGE DISABLE,GR_BENI@|ENABLE,GR_SERVIZI@|"4",O_SEZIONE
|
||||
KEY 1
|
||||
FIELD SEZIONE
|
||||
END
|
||||
|
||||
NUBER F_NUM_RIG 7
|
||||
BEGIN
|
||||
PROMPT 63 12 "Riga "
|
||||
USE LF_RIEPRETT (SEZIONE=="2")||(SEZIONE=="4")
|
||||
USE LF_RIEPRETT
|
||||
INPUT TIPO F_TIPO SELECT
|
||||
INPUT ANNO F_ANNO SELECT
|
||||
INPUT PERIODO F_PERIODO_M
|
||||
@ -339,7 +322,6 @@ BEGIN
|
||||
DISPLAY "Descrizione@70" S0
|
||||
OUTPUT F_NATURA_TRANS CODTAB
|
||||
FIELD NATURA
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
NUMBER F_NOMENCLATURA 8
|
||||
@ -352,7 +334,6 @@ BEGIN
|
||||
OUTPUT F_NOMENCLATURA CODTAB
|
||||
FIELD NOMENCL
|
||||
WARNING "Nomenclatura combinata assente"
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
LIST F_SEGNO 1
|
||||
@ -380,7 +361,6 @@ BEGIN
|
||||
OUTPUT F_VALUTA CODTAB
|
||||
CHECKTYPE NORMAL
|
||||
FIELD CODVAL
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
CURRENCY F_AMM_VALUTA 18
|
||||
@ -388,88 +368,17 @@ BEGIN
|
||||
PROMPT 59 16 ""
|
||||
DRIVENBY F_VALUTA
|
||||
FIELD AMMVALUTA
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
CURRENCY F_VALORE_STAT 18
|
||||
BEGIN
|
||||
PROMPT 2 17 "Valore statistico "
|
||||
FIELD VALSTAT
|
||||
GROUP GR_BENI
|
||||
END
|
||||
|
||||
STRING F_CODSERV 5
|
||||
BEGIN
|
||||
PROMPT 1 18
|
||||
FIELD CODSERV
|
||||
USE %CPA
|
||||
INPUT CODTAB F_CODSERV
|
||||
DISPLAY "Classificazione" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODSERV CODTAB
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
LIST F_MODEROG 1 15
|
||||
BEGIN
|
||||
PROMPT 1 19 "Modalità Erogazione"
|
||||
ITEM "I|Unica soluzione"
|
||||
ITEM "R|Più soluzioni"
|
||||
FIELD MODEROG
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 20 "Modalità di incasso "
|
||||
GROUP GR_CESSIONI GR_SERVIZI
|
||||
FLAGS "G"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 20 "Modalità di pagamento"
|
||||
GROUP GR_ACQUISTI GR_BENI
|
||||
FLAGS "G"
|
||||
END
|
||||
|
||||
LIST F_MODINCPAG 1 9
|
||||
BEGIN
|
||||
PROMPT 20 20 ""
|
||||
ITEM "B|Bonifico"
|
||||
ITEM "A|Accredito"
|
||||
ITEM "X|Altro"
|
||||
FIELD MODINCPAG
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 21 "Stato di incasso "
|
||||
GROUP GR_CESSIONI GR_SERVIZI
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 21 "Stato di pagamento "
|
||||
GROUP GR_ACQUISTI GR_BENI
|
||||
END
|
||||
|
||||
STRING F_STATOINCPAG 2
|
||||
BEGIN
|
||||
PROMPT 20 21 ""
|
||||
USE %SCE
|
||||
INPUT CODTAB F_STATOINCPAG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_STATOINCPAG CODTAB
|
||||
FIELD ISOINCPAG
|
||||
GROUP GR_SERVIZI
|
||||
END
|
||||
|
||||
NUMBER F_NUMREG 7
|
||||
BEGIN
|
||||
PROMPT 2 22 "Numero movimento "
|
||||
PROMPT 53 17 "Numero movimento "
|
||||
FIELD NUMREG
|
||||
FLAGS "D"
|
||||
END
|
||||
|
@ -18,8 +18,9 @@
|
||||
|
||||
TIntra_context::TIntra_context()
|
||||
{
|
||||
_tipointra = 'B';
|
||||
_tipo = 'C'; _freq = 'T'; _anno = 1999; _periodo = 1;
|
||||
_progr = 0L;
|
||||
_progr = _righe_riep = _righe_rett = 0L;
|
||||
|
||||
// Intra 12/13
|
||||
_tInvioIntra = _Intra12;
|
||||
@ -32,25 +33,36 @@ TIntra_context::TIntra_context()
|
||||
// TIntra_frequency
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
char TIntra_frequency::frequenza(int a, const char t) const
|
||||
char TIntra_frequency::frequenza(int a, char t) const
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
case 'A': break;
|
||||
case 'C': break;
|
||||
case 'B': t = 'A'; break; // Rettifiche su Acquisti
|
||||
case 'D': t = 'C'; break; // Rettifiche su Cessioni
|
||||
default : break;
|
||||
}
|
||||
|
||||
const TDate d(TODAY);
|
||||
if (a <= 0)
|
||||
a = today.year();
|
||||
if (a < today.year())
|
||||
a = d.year();
|
||||
if (a < d.year())
|
||||
{
|
||||
TLocalisamfile riep(LF_RIEPRETT);
|
||||
riep.put("TIPO", t);
|
||||
riep.put("ANNO", a);
|
||||
if (riep.read(_isgteq) == NOERR)
|
||||
{
|
||||
if (riep.get(RIEPINTRA_TIPO) == t && riep.get_int(RIEPINTRA_ANNO) == a)
|
||||
if (riep.get_char("TIPO") == t && riep.get_int("ANNO") == a)
|
||||
{
|
||||
const char freq = riep.get_char(RIEPINTRA_FREQUENZA);
|
||||
const char freq = riep.get_char("FREQUENZA");
|
||||
if (freq > ' ')
|
||||
return freq;
|
||||
return freq;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (t == 'A') ? _freq_acq : _freq_ces;
|
||||
}
|
||||
|
||||
@ -108,12 +120,18 @@ void TIntra_mask::on_firm_change()
|
||||
_freq.update();
|
||||
}
|
||||
|
||||
char TIntra_mask::tipo() const
|
||||
{
|
||||
short id = type_field();
|
||||
char t = get(id)[0];
|
||||
return t;
|
||||
}
|
||||
|
||||
char TIntra_mask::frequenza(int a, char t) const
|
||||
{
|
||||
if (a <= 0)
|
||||
a = anno();
|
||||
if (t < 'A')
|
||||
if (t < 'A' || t > 'D')
|
||||
t = tipo();
|
||||
return _freq.frequenza(a, t);
|
||||
}
|
||||
@ -170,62 +188,138 @@ TIntra_mask::TIntra_mask(const char* name)
|
||||
on_firm_change();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRiepiloghi_Intra
|
||||
// TDati_riepilogo
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TRiepiloghi_Intra : public TObject
|
||||
class TDati_riepilogo : public TSortable
|
||||
{
|
||||
TToken_string _key;
|
||||
TCurrency _ammlire, _ammvaluta;
|
||||
real _valstat, _massakg, _massaums;
|
||||
long _numreg;
|
||||
|
||||
protected:
|
||||
virtual TObject* dup() const { return new TDati_riepilogo(*this); }
|
||||
virtual int compare(const TSortable& s) const;
|
||||
|
||||
public:
|
||||
TDati_riepilogo& operator +=(const TDati_riepilogo& r);
|
||||
void write(TRectype& rec) const;
|
||||
|
||||
const TString& tipo_intra(TString& c) const { _key.get(0, c); return c; }
|
||||
const TString& stato(TString& c) const { _key.get(1, c); return c; }
|
||||
const TString& partita_iva(TString& c) const { _key.get(2, c); return c; }
|
||||
const TString& natura(TString& c) const { _key.get(4, c); return c; }
|
||||
const TString& nomenclatura(TString& c) const { _key.get(5, c); return c; }
|
||||
const TString& consegna(TString& c) const { _key.get(6, c); return c; }
|
||||
const TString& trasporto(TString& c) const { _key.get(7, c); return c; }
|
||||
const TString& paese(TString& c) const { _key.get(8, c); return c; }
|
||||
const TString& paese_orig(TString& c) const { _key.get(9, c); return c; }
|
||||
const TString& provincia(TString& c) const { _key.get(10, c); return c; }
|
||||
|
||||
TDati_riepilogo(const TDati_riepilogo& r);
|
||||
TDati_riepilogo(const TToken_string& key, const TRectype& rec, const TString& codval);
|
||||
virtual ~TDati_riepilogo() { }
|
||||
};
|
||||
|
||||
int TDati_riepilogo::compare(const TSortable& s) const
|
||||
{
|
||||
const TDati_riepilogo& r = (const TDati_riepilogo&)s;
|
||||
return _key.compare(r._key);
|
||||
}
|
||||
|
||||
TDati_riepilogo& TDati_riepilogo::operator +=(const TDati_riepilogo& r)
|
||||
{
|
||||
_ammlire += r._ammlire;
|
||||
_ammvaluta += r._ammvaluta;
|
||||
_valstat += r._valstat;
|
||||
_massakg += r._massakg;
|
||||
_massaums += r._massaums;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void TDati_riepilogo::write(TRectype& rec) const
|
||||
{
|
||||
TString str;
|
||||
|
||||
rec.put("TIPOINTRA", tipo_intra(str));
|
||||
rec.put("STATO", stato(str));
|
||||
rec.put("PIVA", partita_iva(str));
|
||||
rec.put("NATURA", natura(str));
|
||||
rec.put("NOMENCL", nomenclatura(str));
|
||||
rec.put("CONSEGNA", consegna(str));
|
||||
rec.put("TRASPORTO", trasporto(str));
|
||||
rec.put("PAESE", paese(str));
|
||||
rec.put("PAESEORIG", paese_orig(str));
|
||||
rec.put("PROV", provincia(str));
|
||||
|
||||
rec.put("AMMLIRE", _ammlire.get_num());
|
||||
if (_ammvaluta.is_zero() || _ammvaluta.is_firm_value())
|
||||
{
|
||||
rec.zero("CODVAL"); // Altrimenti genera falsi codici valuta EUR ...
|
||||
rec.zero("AMMVALUTA"); // ... con importi nulli
|
||||
}
|
||||
else
|
||||
{
|
||||
rec.put("CODVAL", _ammvaluta.get_value());
|
||||
rec.put("AMMVALUTA", _ammvaluta.get_num());
|
||||
}
|
||||
rec.put("VALSTAT", _valstat);
|
||||
rec.put("MASSAKG", _massakg);
|
||||
rec.put("MASSAUMS", _massaums);
|
||||
rec.put("NUMREG", _numreg);
|
||||
}
|
||||
|
||||
TDati_riepilogo::TDati_riepilogo(const TDati_riepilogo& r)
|
||||
: _key(r._key), _valstat(r._valstat),
|
||||
_ammlire(r._ammlire), _ammvaluta(r._ammvaluta),
|
||||
_massakg(r._massakg), _massaums(r._massaums)
|
||||
{ }
|
||||
|
||||
TDati_riepilogo::TDati_riepilogo(const TToken_string& key,
|
||||
const TRectype& rec,
|
||||
const TString& codval)
|
||||
: _key(key), _ammlire(rec.get_real("AMMLIRE")),
|
||||
_ammvaluta(rec.get_real("AMMVALUTA"), codval),
|
||||
_valstat(rec.get_real("VALSTAT")),
|
||||
_massakg(rec.get_real("MASSAKG")),
|
||||
_massaums(rec.get_real("MASSAUMS")),
|
||||
_numreg(rec.get_long("NUMREG"))
|
||||
{ }
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRiepiloghi
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TRiepiloghi : public TObject
|
||||
{
|
||||
TPointer_array _arr;
|
||||
TAssoc_array _ass;
|
||||
|
||||
public:
|
||||
void destroy() { _ass.destroy(); }
|
||||
void add(const TRectype& row, const TRectype& head, int peri, char freq);
|
||||
void destroy() { _arr.destroy(); _ass.destroy(); }
|
||||
void add(const TRectype& row, const TRectype& head, const TRectype& mov);
|
||||
|
||||
int items() const { return _ass.items(); }
|
||||
int write(int from = 1);
|
||||
};
|
||||
int items() const { return _arr.items(); }
|
||||
int sort() { _arr.sort(); return items(); }
|
||||
|
||||
const TDati_riepilogo& operator[](int r) const
|
||||
{ return (const TDati_riepilogo&)_arr[r]; }
|
||||
};
|
||||
|
||||
int TRiepiloghi_Intra::write(int from)
|
||||
{
|
||||
TString_array keys;
|
||||
TLocalisamfile riep(LF_RIEPRETT);
|
||||
TProgress_monitor pi(items(), TR("Scrittura riepiloghi intra..."), false);
|
||||
|
||||
_ass.get_keys(keys);
|
||||
keys.sort();
|
||||
FOR_EACH_ARRAY_ITEM(keys, r, k)
|
||||
{
|
||||
TString * key = (TString *) k;
|
||||
TRectype * rec = (TRectype *) _ass.objptr(*key);
|
||||
|
||||
pi.addstatus(1L);
|
||||
rec->put(RIEPINTRA_NUMRIG, r + from);
|
||||
|
||||
const int err = rec->write_rewrite(riep);
|
||||
|
||||
if (err != NOERR)
|
||||
error_box(FR("Errore %d durante la scrittura dei riepiloghi riga %d"), err, r + from);
|
||||
}
|
||||
return from + items();
|
||||
}
|
||||
|
||||
void TRiepiloghi_Intra::add(const TRectype& row, const TRectype& head, int peri, char freq)
|
||||
void TRiepiloghi::add(const TRectype& row, const TRectype& head, const TRectype& mov)
|
||||
{
|
||||
TString8 cod; cod << head.get_char(INTRA_TIPOCF) << '|' << head.get(INTRA_CODCF);
|
||||
const TRectype& clifo = cache().get(LF_CLIFO, cod);
|
||||
TString4 codval = head.get(INTRA_CODVAL);
|
||||
|
||||
TString4 codval = head.get(MOV_CODVAL);
|
||||
const TString4 tipointra = row.get(RINTRA_TIPOINTRA);
|
||||
|
||||
if (::is_euro_value(codval))
|
||||
codval.cut(0);
|
||||
|
||||
TRectype rec(LF_RIEPRETT);
|
||||
const TString4 tipointra = row.get(RINTRA_TIPOINTRA);
|
||||
const TString4 tipo = head.get(INTRA_TIPOMOV);
|
||||
|
||||
TToken_string key;
|
||||
|
||||
key.add(head.get(INTRA_TIPOMOV));
|
||||
key.add(tipointra);
|
||||
key.add(clifo.get(CLI_STATOPAIV));
|
||||
key.add(clifo.get(CLI_PAIV));
|
||||
@ -238,47 +332,22 @@ void TRiepiloghi_Intra::add(const TRectype& row, const TRectype& head, int peri,
|
||||
key.add(row.get(RINTRA_PAESEORIG)); // Campo solo per Acquisti
|
||||
key.add(row.get(RINTRA_PROV));
|
||||
|
||||
rec.put(RIEPINTRA_SEZIONE, tipointra == "B" ? 1 : 3);
|
||||
rec.put(RIEPINTRA_TIPO, tipo);
|
||||
rec.put(RIEPINTRA_ANNO, head.get_date(INTRA_DATAREG).year());
|
||||
rec.put(RIEPINTRA_PERIODO, peri);
|
||||
rec.zero(RIEPINTRA_NUMRIG);
|
||||
rec.put(RIEPINTRA_STATO, clifo.get(CLI_STATOPAIV));
|
||||
rec.put(RIEPINTRA_PIVA, clifo.get(CLI_PAIV));
|
||||
rec.put(RIEPINTRA_NATURA, row.get(RINTRA_NATURA));
|
||||
rec.put(RIEPINTRA_NOMENCL, row.get(RINTRA_NOMENCL));
|
||||
rec.put(RIEPINTRA_CONSEGNA, row.get(RINTRA_CONSEGNA));
|
||||
rec.put(RIEPINTRA_TRASPORTO, row.get(RINTRA_TRASPORTO));
|
||||
rec.put(RIEPINTRA_PAESE, row.get(RINTRA_PAESE));
|
||||
rec.put(RIEPINTRA_PAESEORIG, row.get(RINTRA_PAESEORIG));
|
||||
rec.put(RIEPINTRA_PROV, row.get(RINTRA_PROV));
|
||||
rec.put(RIEPINTRA_AMMLIRE, row.get(RINTRA_AMMLIRE));
|
||||
rec.put(RIEPINTRA_AMMVALUTA, row.get(RINTRA_AMMVALUTA));
|
||||
rec.put(RIEPINTRA_CODVAL, codval);
|
||||
rec.put(RIEPINTRA_VALSTAT, row.get(RINTRA_VALSTAT));
|
||||
rec.put(RIEPINTRA_MASSAKG, row.get(RINTRA_MASSAKG));
|
||||
rec.put(RIEPINTRA_MASSAUMS, row.get(RINTRA_MASSAUMS));
|
||||
rec.put(RIEPINTRA_FREQUENZA, freq);
|
||||
rec.put(RIEPINTRA_CODSERV, row.get(RINTRA_CODSERV));
|
||||
rec.put(RIEPINTRA_MODEROG, row.get(RINTRA_MODEROG));
|
||||
rec.put(RIEPINTRA_MODINCPAG, row.get(RINTRA_MODINCPAG));
|
||||
rec.put(RIEPINTRA_ISOINCPAG, row.get(RINTRA_ISOINCPAG));
|
||||
|
||||
TRectype * data = (TRectype *)_ass.objptr(key);
|
||||
TDati_riepilogo* data = (TDati_riepilogo*)_ass.objptr(key);
|
||||
|
||||
if (data == nullptr)
|
||||
_ass.add(key, rec);
|
||||
{
|
||||
data = new TDati_riepilogo(key, row, codval);
|
||||
_ass.add(key, data);
|
||||
_arr.add(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
data->add(RIEPINTRA_AMMLIRE, row.get_real(RINTRA_AMMLIRE));
|
||||
data->add(RIEPINTRA_AMMVALUTA, row.get_real(RINTRA_AMMVALUTA));
|
||||
data->add(RIEPINTRA_VALSTAT, row.get_real(RINTRA_VALSTAT));
|
||||
data->add(RIEPINTRA_MASSAKG, row.get_real(RINTRA_MASSAKG));
|
||||
data->add(RIEPINTRA_MASSAUMS, row.get_real(RINTRA_MASSAUMS));
|
||||
const TDati_riepilogo dr(key, row, codval);
|
||||
*data += dr;
|
||||
}
|
||||
}
|
||||
|
||||
class TRettifiche_Intra : public TObject
|
||||
class TRettifiche : public TObject
|
||||
{
|
||||
TArray _rett;
|
||||
TIntra_frequency _freq;
|
||||
@ -291,10 +360,11 @@ public:
|
||||
long nc2ft(long numreg_nc) const;
|
||||
int add(const TRectype& rintra, const TRectype& mov, long nr_fattura);
|
||||
int load_manual_rett(char tipo, int anno, int periodo);
|
||||
int write(int from = 1);
|
||||
int sort();
|
||||
const TRectype& operator[](int r) const { return (const TRectype&)_rett[r]; }
|
||||
};
|
||||
|
||||
long TRettifiche_Intra::nc2ft(long numreg_nc) const
|
||||
long TRettifiche::nc2ft(long numreg_nc) const
|
||||
{
|
||||
long numreg_ft = 0L;
|
||||
|
||||
@ -303,6 +373,10 @@ long TRettifiche_Intra::nc2ft(long numreg_nc) const
|
||||
games.add_numreg(numreg_nc); // Carica le partite in cui è coinvolta questa nota di credito (sempre e solo una!)
|
||||
for (TPartita* p = games.first(); p != nullptr && numreg_ft<=0; p = games.next())
|
||||
{
|
||||
#ifdef DBG
|
||||
if (p->conto().codclifo() == 13201)
|
||||
int farmoki = 1;
|
||||
#endif
|
||||
for (int r = p->prima_fattura(); r >= 0 && r <= p->last(); r = p->succ(r))
|
||||
{
|
||||
const TRiga_partite& partita = p->riga(r);
|
||||
@ -322,7 +396,7 @@ long TRettifiche_Intra::nc2ft(long numreg_nc) const
|
||||
return numreg_ft;
|
||||
}
|
||||
|
||||
int TRettifiche_Intra::load_manual_rett(char tipo, int anno, int periodo)
|
||||
int TRettifiche::load_manual_rett(char tipo, int anno, int periodo)
|
||||
{
|
||||
_rett.destroy();
|
||||
tipo = tipo < 'C' ? 'B' : 'D'; // forzatura tipo = B o D
|
||||
@ -339,7 +413,7 @@ int TRettifiche_Intra::load_manual_rett(char tipo, int anno, int periodo)
|
||||
return _rett.items();
|
||||
}
|
||||
|
||||
long TRettifiche_Intra::rett2riep(const TRectype& rett) const
|
||||
long TRettifiche::rett2riep(const TRectype& rett) const
|
||||
{
|
||||
TString query, filter;
|
||||
|
||||
@ -355,23 +429,22 @@ long TRettifiche_Intra::rett2riep(const TRectype& rett) const
|
||||
return nriga;
|
||||
}
|
||||
|
||||
int TRettifiche_Intra::add(const TRectype& rintra, const TRectype& mov, long nr_fattura)
|
||||
int TRettifiche::add(const TRectype& rintra, const TRectype& mov, long nr_fattura)
|
||||
{
|
||||
CHECKD(rintra.num() == LF_RINTRA, "Record non INTRA ", rintra.num());
|
||||
const TDate datareg = mov.get(MOV_DATAREG);
|
||||
|
||||
TRectype rett(LF_RIEPRETT);
|
||||
const char tipo = mov.get_char(INTRA_TIPOMOV);
|
||||
const char tipo = mov.get_char(MOV_TIPO)=='F' ? 'B' : 'D';
|
||||
const TString4 tipointra = rintra.get(RINTRA_TIPOINTRA);
|
||||
|
||||
rett.put(RIEPINTRA_TIPOINTRA, tipointra);
|
||||
rett.put(RIEPINTRA_TIPO, tipo);
|
||||
rett.put(RIEPINTRA_ANNO, datareg.year());
|
||||
rett.put(RIEPINTRA_PERIODO, _freq.date2periodo(datareg, tipo));
|
||||
rett.zero(RIEPINTRA_NUMRIG); // Auto
|
||||
rett.put(RIEPINTRA_NUMRIG, 0); // Auto
|
||||
|
||||
rett.put(RIEPINTRA_SEZIONE, tipointra ? 2 : 4);
|
||||
rett.put(RIEPINTRA_TIPO, tipo);
|
||||
|
||||
TString8 cod; cod << mov.get_char(INTRA_TIPOCF) << '|' << mov.get(INTRA_CODCF);
|
||||
TString8 cod; cod << mov.get_char(MOV_TIPO) << '|' << mov.get(MOV_CODCF);
|
||||
const TRectype& clifo = cache().get(LF_CLIFO, cod);
|
||||
|
||||
TString4 codval = mov.get(MOV_CODVALI);
|
||||
@ -381,7 +454,10 @@ int TRettifiche_Intra::add(const TRectype& rintra, const TRectype& mov, long nr_
|
||||
rett.put(RIEPINTRA_STATO, clifo.get(CLI_STATOPAIV));
|
||||
rett.put(RIEPINTRA_PIVA, clifo.get(CLI_PAIV));
|
||||
rett.put(RIEPINTRA_NATURA, rintra.get(RINTRA_NATURA));
|
||||
rett.put(RIEPINTRA_NOMENCL, rintra.get(RINTRA_NOMENCL));
|
||||
if (tipointra == "B")
|
||||
rett.put(RIEPINTRA_NOMENCL, rintra.get(RINTRA_NOMENCL));
|
||||
else
|
||||
rett.put(RIEPINTRA_CODSERV, rintra.get(RINTRA_CODSERV));
|
||||
rett.put(RIEPINTRA_CONSEGNA, rintra.get(RINTRA_CONSEGNA));
|
||||
rett.put(RIEPINTRA_TRASPORTO, rintra.get(RINTRA_TRASPORTO));
|
||||
rett.put(RIEPINTRA_PAESE, rintra.get(RINTRA_PAESE));
|
||||
@ -391,16 +467,20 @@ int TRettifiche_Intra::add(const TRectype& rintra, const TRectype& mov, long nr_
|
||||
rett.put(RIEPINTRA_PROV, rintra.get(RINTRA_PROV));
|
||||
}
|
||||
|
||||
const real euri = rintra.get_real(RINTRA_AMMLIRE);
|
||||
real euri = rintra.get_real(RINTRA_AMMLIRE);
|
||||
|
||||
rett.put(RIEPINTRA_SEGNORETT, euri > ZERO ? '+' : '-');
|
||||
rett.put(RIEPINTRA_AMMLIRE, abs(euri));
|
||||
rett.put(RIEPINTRA_SEGNORETT, ((tipointra == "S") || (euri > ZERO)) ? '+' : '-');
|
||||
if (tipointra == "B")
|
||||
euri = abs(euri);
|
||||
rett.put(RIEPINTRA_AMMLIRE, euri);
|
||||
if (codval.full())
|
||||
{
|
||||
rett.put(RIEPINTRA_CODVAL, codval);
|
||||
const real impval = rintra.get_real(RINTRA_AMMVALUTA);
|
||||
real impval = rintra.get_real(RINTRA_AMMVALUTA);
|
||||
|
||||
rett.put(RIEPINTRA_AMMVALUTA, abs(impval));
|
||||
if (tipointra == "B")
|
||||
impval = abs(impval);
|
||||
rett.put(RIEPINTRA_AMMVALUTA, impval);
|
||||
}
|
||||
|
||||
rett.put(RIEPINTRA_VALSTAT, abs(rintra.get_real(RINTRA_VALSTAT)));
|
||||
@ -408,7 +488,6 @@ int TRettifiche_Intra::add(const TRectype& rintra, const TRectype& mov, long nr_
|
||||
rett.put(RIEPINTRA_MASSAUMS, rintra.get(RINTRA_MASSAUMS));
|
||||
rett.put(RIEPINTRA_NUMREG, mov.get(MOV_NUMREG));
|
||||
|
||||
rett.put(RIEPINTRA_CODSERV, rintra.get(RINTRA_CODSERV));
|
||||
rett.put(RIEPINTRA_MODEROG, rintra.get(RINTRA_MODEROG));
|
||||
rett.put(RIEPINTRA_MODINCPAG, rintra.get(RINTRA_MODINCPAG));
|
||||
rett.put(RIEPINTRA_MODEROG, rintra.get(RINTRA_MODEROG));
|
||||
@ -422,24 +501,15 @@ int TRettifiche_Intra::add(const TRectype& rintra, const TRectype& mov, long nr_
|
||||
return _rett.add(rett);
|
||||
}
|
||||
|
||||
int TRettifiche_Intra::write(int from)
|
||||
int TRettifiche::sort()
|
||||
{
|
||||
_rett.pack();
|
||||
|
||||
const int items = _rett.items();
|
||||
TLocalisamfile riep(LF_RIEPRETT);
|
||||
|
||||
FOR_EACH_ARRAY_ITEM(_rett, r, data)
|
||||
for (int i = 0; i < _rett.items(); i++)
|
||||
{
|
||||
TRectype* rec = (TRectype*) data;
|
||||
|
||||
rec->put(RIEPINTRA_NUMRIG, r + from);
|
||||
const int err = rec->write_rewrite(riep);
|
||||
|
||||
if (err != NOERR)
|
||||
error_box(FR("Errore %d durante la scrittura dei riepiloghi riga %d"), err, r + from);
|
||||
TRectype* r = (TRectype*)_rett.objptr(i);
|
||||
r->put(RIEPINTRA_NUMRIG, i+1);
|
||||
}
|
||||
return from + items;
|
||||
return _rett.items();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -448,8 +518,8 @@ int TRettifiche_Intra::write(int from)
|
||||
|
||||
class TGenerazione_mask : public TIntra_mask
|
||||
{
|
||||
TRiepiloghi_Intra _riep;
|
||||
TRettifiche_Intra _rett;
|
||||
TRiepiloghi _riep;
|
||||
TRettifiche _rett;
|
||||
|
||||
protected:
|
||||
virtual short type_field() const { return R_TIPO; }
|
||||
@ -556,7 +626,7 @@ bool TGenerazione_mask::genera_riepiloghi()
|
||||
if (is_rettifica)
|
||||
_rett.add(row, mov, numreg_ft);
|
||||
else
|
||||
_riep.add(row, head, peri, freq);
|
||||
_riep.add(row, head, mov);
|
||||
rowok = rel.next_match(LF_RINTRA);
|
||||
}
|
||||
}
|
||||
@ -567,29 +637,64 @@ bool TGenerazione_mask::genera_riepiloghi()
|
||||
|
||||
TLocalisamfile riep(LF_RIEPRETT);
|
||||
|
||||
const int riepiloghi = _riep.items();
|
||||
int last_row = 0;
|
||||
|
||||
const int riepiloghi = _riep.sort();
|
||||
if (riepiloghi > 0)
|
||||
last_row = _riep.write();
|
||||
{
|
||||
TProgress_monitor pi(riepiloghi, TR("Scrittura riepiloghi intra..."), false);
|
||||
|
||||
riep.put(RIEPINTRA_TIPO, tipo);
|
||||
riep.put(RIEPINTRA_ANNO, anno_r);
|
||||
riep.put(RIEPINTRA_PERIODO, peri);
|
||||
riep.put(RIEPINTRA_NUMRIG, 1);
|
||||
|
||||
int err = riep.read();
|
||||
|
||||
for (int r = 0; pi.add_status() && r < riepiloghi; r++)
|
||||
{
|
||||
riep.put(RIEPINTRA_TIPO, tipo);
|
||||
riep.put(RIEPINTRA_ANNO, anno_r);
|
||||
riep.put(RIEPINTRA_PERIODO, peri);
|
||||
riep.put(RIEPINTRA_NUMRIG, r+1);
|
||||
_riep[r].write(riep.curr());
|
||||
riep.put(RIEPINTRA_FREQUENZA, freq);
|
||||
|
||||
const int werr = err == NOERR ? riep.rewrite() : riep.write();
|
||||
if (werr != NOERR)
|
||||
return error_box(FR("Errore %d durante la scrittura dei riepiloghi"), werr);
|
||||
|
||||
if (err == NOERR)
|
||||
{
|
||||
err = riep.next();
|
||||
if (err == NOERR && riep.get_long("NUMRIG") == 1)
|
||||
err = _iseof;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const int rettifiche = _rett.items();
|
||||
|
||||
if (rettifiche > 0)
|
||||
last_row = _rett.write(last_row);
|
||||
|
||||
|
||||
// cancella gli altri event
|
||||
// Cancella eventuali altri riepiloghi del periodo
|
||||
TString query;
|
||||
|
||||
query << "USE " << LF_RIEPRETT
|
||||
<< "\nFROM TIPO=" << tipo << " ANNO=" << anno_r << " PERIODO=" << peri << " NUMRIG=" << long(last_row + 1)
|
||||
<< "\nFROM TIPO=" << tipo << " ANNO=" << anno_r << " PERIODO=" << peri << " NUMRIG=" << long(riepiloghi+1)
|
||||
<< "\nTO TIPO=" << tipo << " ANNO=" << anno_r << " PERIODO=" << peri;
|
||||
TISAM_recordset riepset(query);
|
||||
|
||||
for (bool ok = riepset.move_first(); ok; ok = riepset.move_next())
|
||||
riepset.cursor()->file().remove();
|
||||
|
||||
const int rettifiche = _rett.sort();
|
||||
if (rettifiche > 0)
|
||||
{
|
||||
for (int r = 0; r < rettifiche; r++)
|
||||
_rett[r].write_rewrite(riep);
|
||||
}
|
||||
|
||||
// Cancella eventuali altre rettifiche del periodo
|
||||
query.cut(0) << "USE " << LF_RIEPRETT
|
||||
<< "\nFROM TIPO=" << char(tipo+1) << " ANNO=" << anno_r << " PERIODO=" << peri << " NUMRIG=" << long(rettifiche+1)
|
||||
<< "\nTO TIPO=" << char(tipo+1) << " ANNO=" << anno_r << " PERIODO=" << peri;
|
||||
TISAM_recordset rettset(query);
|
||||
for (bool ok = rettset.move_first(); ok; ok = rettset.move_next())
|
||||
rettset.cursor()->file().remove();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,17 @@ typedef enum { _Intra12, _Intra13 } Intratype;
|
||||
|
||||
struct TIntra_context
|
||||
{
|
||||
char _tipointra;
|
||||
char _tipo;
|
||||
long _progr;
|
||||
char _freq;
|
||||
int _anno;
|
||||
int _periodo;
|
||||
long _righe_riep;
|
||||
real _totale_riep;
|
||||
long _righe_rett;
|
||||
real _totale_rett;
|
||||
|
||||
// Intra 12/13
|
||||
Intratype _tInvioIntra;
|
||||
int _nb;
|
||||
@ -49,7 +55,7 @@ protected:
|
||||
virtual int anno() const pure;
|
||||
|
||||
public:
|
||||
const char tipo() const { return get(type_field())[0]; }
|
||||
char tipo() const;
|
||||
int periodo() const;
|
||||
virtual char frequenza(int anno = 0, char tipo = '\0') const;
|
||||
int date2periodo(const TDate& d) const;
|
||||
|
@ -19,34 +19,22 @@
|
||||
<field x="12" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="2" hide_zero="" text="Mese">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="19" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="9" codval="" id="" pattern="2" hide_zero="" text="Intra 1F;2">
|
||||
<field x="20" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="2" hide_zero="" text="Disco">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="30" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Righe sez.1">
|
||||
<field x="30" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Righe riep.">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="46" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="2" hide_zero="" text="Amm. sez.1">
|
||||
<field x="46" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="2" hide_zero="" text="Amm. riepil.">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="61" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Righe sez.2">
|
||||
<field x="61" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Righe rett.">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="78" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="2" hide_zero="" text="Amm. sez.2">
|
||||
<field x="78" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="2" hide_zero="" text="Amm. rettif.">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="18.5" y="5" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Intra 12F;13">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="30" y="5" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Righe sez.3">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="46" y="5" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="2" hide_zero="" text="Amm. sez.3">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="61" y="5" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Righe sez.4">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="78" y="5" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="2" hide_zero="" text="Amm. sez.4">
|
||||
<field x="20" y="5.5" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="2" hide_zero="" text="Intra 12F;13">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field border="2" x="1" y="6.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="93" codval="" height="0" id="" pattern="2" hide_zero="" text="" />
|
||||
@ -70,29 +58,17 @@
|
||||
<source>I2</source>
|
||||
</field>
|
||||
<field x="43" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="2" hide_zero="" text="##@,@@">
|
||||
<source>R2</source>
|
||||
<source>R0</source>
|
||||
</field>
|
||||
<field x="64" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="2" hide_zero="" text="">
|
||||
<field x="67" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="2" hide_zero="" text="">
|
||||
<source>I3</source>
|
||||
</field>
|
||||
<field x="75" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="2" hide_zero="" text="##@,@@">
|
||||
<source>R3</source>
|
||||
<source>R1</source>
|
||||
</field>
|
||||
<field x="20" y="1" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="2" hide_zero="" text="">
|
||||
<source>I6</source>
|
||||
</field>
|
||||
<field x="35" y="1" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="2" hide_zero="" text="">
|
||||
<source>I4</source>
|
||||
</field>
|
||||
<field x="43" y="1" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="2" hide_zero="" text="##@,@@">
|
||||
<source>R4</source>
|
||||
</field>
|
||||
<field x="64" y="1" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="2" hide_zero="" text="">
|
||||
<source>I5</source>
|
||||
</field>
|
||||
<field x="75" y="1" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="2" hide_zero="" text="##@,@@">
|
||||
<source>R5</source>
|
||||
</field>
|
||||
</section>
|
||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" height="3" page_break="" can_break="" pattern="1">
|
||||
<field border="2" x="1" y="0.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="93" codval="" height="0" id="" pattern="2" hide_zero="" text="" />
|
||||
|
@ -296,11 +296,12 @@ void TApplication::stop_run()
|
||||
{
|
||||
if (_savefirm)
|
||||
prefix().set_codditta(_savefirm);
|
||||
terminate();
|
||||
terminate();
|
||||
|
||||
xvt_app_destroy();
|
||||
}
|
||||
|
||||
|
||||
bool TApplication::add_menu(TString_array& menu, MENU_TAG id)
|
||||
{
|
||||
TTemp_window tw(TASK_WIN);
|
||||
@ -315,77 +316,19 @@ bool TApplication::remove_menu(MENU_TAG id)
|
||||
|
||||
|
||||
TApplication::TApplication()
|
||||
: _god_vars(nullptr),_savefirm(0), _running(false), _create_ok(false), _force(false)
|
||||
: _god_vars(NULL),_savefirm(0), _running(FALSE), _create_ok(FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
TApplication::~TApplication()
|
||||
{
|
||||
SAFE_DELETE(_god_vars);
|
||||
}
|
||||
|
||||
const TString & logdir()
|
||||
{
|
||||
TString & name = get_tmp_string(1024);
|
||||
|
||||
name << firm2dir(prefix().get_codditta()) << "/log";
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
const TString & logname()
|
||||
{
|
||||
TString & name = (TString &) logdir();
|
||||
|
||||
name << "/dblog.xml";
|
||||
return name;
|
||||
}
|
||||
const TString & rollname(const TDate & day)
|
||||
{
|
||||
TString & name = (TString &)logdir();
|
||||
|
||||
name << "/dblog" << day.date2ansi() << ".txt";
|
||||
return name;
|
||||
if (_god_vars != NULL)
|
||||
delete _god_vars;
|
||||
}
|
||||
|
||||
bool TApplication::create()
|
||||
{
|
||||
if (use_files())
|
||||
{
|
||||
TConfig c(CONFIG_STUDIO, "Main");
|
||||
|
||||
db_log(c.get("DBLog", "Main", -1, "off") == "on");
|
||||
|
||||
if (db_log())
|
||||
{
|
||||
TFilename logd = logdir();
|
||||
int roll_days = c.get_int("RollingDays", "Main", -1, 10);
|
||||
TDate oggi(TODAY);
|
||||
TDate lastroll(c.get("LastDate", "Main", -1, oggi.stringa()));
|
||||
TDate limit(lastroll);
|
||||
|
||||
if (!logd.exist())
|
||||
make_dir(logd);
|
||||
limit += roll_days;
|
||||
if (!lastroll.ok() || (limit <= oggi))
|
||||
{
|
||||
TSystemisamfile dblog(LF_DBLOG);
|
||||
TFilename roll = rollname(lastroll);
|
||||
TFilename logn = logname();
|
||||
|
||||
dblog.dump(roll);
|
||||
dblog.zap();
|
||||
if (logn.exist())
|
||||
{
|
||||
roll.ext("xml");
|
||||
rename(logn, roll);
|
||||
}
|
||||
c.set("LastDate", oggi.date2ansi());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
{ return true; }
|
||||
|
||||
|
||||
bool TApplication::destroy()
|
||||
@ -398,8 +341,7 @@ void TApplication::terminate()
|
||||
if (_create_ok)
|
||||
destroy(); // Distruzione files e maschere
|
||||
|
||||
if(!_force)
|
||||
do_events();
|
||||
do_events();
|
||||
|
||||
if (use_files())
|
||||
{
|
||||
@ -429,8 +371,7 @@ const char* TApplication::get_module_name() const
|
||||
const TDongle& d = dongle();
|
||||
const TString4 modname = _name.left(2);
|
||||
word aut = d.module_name2code(modname);
|
||||
|
||||
if (aut == 0xFFFF && modname == "ps")
|
||||
if (aut == 0xFFFF && modname == "ps")
|
||||
{
|
||||
aut = 0;
|
||||
module = TR("Personalizzazioni");
|
||||
@ -463,12 +404,19 @@ const char* TApplication::get_module_name() const
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ok && !is_power_station())
|
||||
{
|
||||
cantaccess_box(module);
|
||||
module.cut(0);
|
||||
}
|
||||
}
|
||||
if (!ok)
|
||||
{
|
||||
if(is_power_station())
|
||||
{
|
||||
warning_box("Attenzione! Non sei abilitato per l'utilizzo del modulo %s", static_cast<const char*>(module));
|
||||
}
|
||||
else
|
||||
{
|
||||
cantaccess_box(module);
|
||||
module.cut(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return module;
|
||||
}
|
||||
@ -821,7 +769,7 @@ void TApplication::open_files(int logicnum, ...)
|
||||
va_start(marker, logicnum);
|
||||
while (logicnum >= LF_USER && logicnum < LF_EXTERNAL)
|
||||
{
|
||||
if (_used_files.objptr(logicnum) == nullptr)
|
||||
if (_used_files.objptr(logicnum) == NULL)
|
||||
_used_files.add(new TLocalisamfile(logicnum), logicnum);
|
||||
logicnum = va_arg(marker, int);
|
||||
}
|
||||
@ -932,8 +880,9 @@ bool TApplication::get_next_mail(TToken_string& to, TToken_string& cc, TToken_st
|
||||
|
||||
bool TSkeleton_application::create()
|
||||
{
|
||||
// dispatch_e_menu(BAR_ITEM_ID(1));
|
||||
// return TApplication::create();
|
||||
const bool ok = TApplication::create();
|
||||
|
||||
if (ok) dispatch_e_menu(BAR_ITEM_ID(1));
|
||||
return ok;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __APPLICATION_H
|
||||
#define __APPLICATION_H
|
||||
|
||||
@ -50,9 +51,6 @@ class TApplication
|
||||
|
||||
// @cmember:(INTERNAL) Codice della ditta
|
||||
long _savefirm;
|
||||
// @cmember:(INTERNAL) Chiusura forzata per programmi senza interfaccia
|
||||
bool _force;
|
||||
|
||||
|
||||
// @cmember:(INTERNAL) Indica se l'applicazione e' partita
|
||||
bool _running;
|
||||
@ -61,7 +59,7 @@ class TApplication
|
||||
|
||||
// @cmember:(INTERNAL) Termine dell'applicazione
|
||||
void terminate();
|
||||
|
||||
|
||||
// @access Protected Member
|
||||
protected:
|
||||
// @cmember Ritorna il nome del modulo dell'applicazione
|
||||
@ -103,12 +101,10 @@ protected:
|
||||
void open_files(int logicnum, ...);
|
||||
|
||||
// @cmember Percorso documenti archiviati
|
||||
bool get_spotlite_path(TFilename& path) const;
|
||||
bool get_spotlite_path(TFilename& path) const;
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
// @cmember Visualizza il log
|
||||
virtual void show_log() {}
|
||||
// @cmember Fa partire l'applicazione
|
||||
void run(int argc, char* argv[], const char* name);
|
||||
|
||||
@ -139,8 +135,6 @@ public:
|
||||
|
||||
// @cmember Forza la chiusura dell'applicazione
|
||||
void stop_run();
|
||||
void TApplication::force_stop() {_force = true;}
|
||||
|
||||
|
||||
// @cmember Mette il segno Check a fianco di una voce di menu
|
||||
void check_menu_item(MENU_TAG item, bool on = true);
|
||||
@ -201,10 +195,6 @@ public:
|
||||
virtual ~TApplication();
|
||||
};
|
||||
|
||||
const TString & logdir();
|
||||
const TString & logname();
|
||||
const TString & rollname(const TDate & day);
|
||||
|
||||
class TSkeleton_application : public TApplication
|
||||
{
|
||||
protected:
|
||||
|
@ -1,25 +1,19 @@
|
||||
#include <stdlib.h>
|
||||
#include <assoc.h>
|
||||
#include <utility.h>
|
||||
|
||||
// @ccost:(INTERNAL) HASH_SIZE | 883 | Dimensione della tabella hash
|
||||
const int HASH_SIZE = 883;
|
||||
|
||||
THash_object::~THash_object()
|
||||
{
|
||||
safe_delete(_obj);
|
||||
if (_obj != NULL)
|
||||
delete _obj;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @class TAssoc_array | Tabella hash di oggetti generici
|
||||
//
|
||||
// @base public |TObject
|
||||
|
||||
TArray& TAssoc_array::bucket(int index)
|
||||
{
|
||||
TArray* arr = (TArray*)_bucket.objptr(index);
|
||||
if (arr == nullptr)
|
||||
if (arr == NULL)
|
||||
{
|
||||
arr = new TArray;
|
||||
_bucket.add(arr, index);
|
||||
@ -47,7 +41,7 @@ THash_object* TAssoc_array::_lookup(
|
||||
const TFixed_string key(k);
|
||||
const word hv = key.hash() % HASH_SIZE;
|
||||
TArray& arr = bucket(hv);
|
||||
THash_object* o = nullptr;
|
||||
THash_object* o = NULL;
|
||||
isnew = false;
|
||||
int i;
|
||||
|
||||
@ -60,7 +54,7 @@ THash_object* TAssoc_array::_lookup(
|
||||
break;
|
||||
}
|
||||
|
||||
if (o == nullptr)
|
||||
if (o == NULL)
|
||||
{
|
||||
if (insert)
|
||||
{
|
||||
@ -91,7 +85,7 @@ TObject* TAssoc_array::last_item()
|
||||
{
|
||||
_rowitem = _bucket.last();
|
||||
if( _rowitem < 0 )
|
||||
return nullptr;
|
||||
return NULL;
|
||||
_colitem = bucket(_rowitem).items() - 1;
|
||||
return pred_item( );
|
||||
}
|
||||
@ -111,9 +105,9 @@ TObject* TAssoc_array::succ_item()
|
||||
}
|
||||
}
|
||||
if (_rowitem >= HASH_SIZE)
|
||||
return nullptr;
|
||||
return NULL;
|
||||
THash_object* o = (THash_object*)arr->objptr(_colitem++);
|
||||
return (o == nullptr || o->_obj == nullptr) ? nullptr : o->_obj;
|
||||
return (o == NULL || o->_obj == NULL) ? NULL : o->_obj;
|
||||
}
|
||||
|
||||
TObject* TAssoc_array::pred_item()
|
||||
@ -131,28 +125,28 @@ TObject* TAssoc_array::pred_item()
|
||||
}
|
||||
}
|
||||
if (_rowitem < 0 )
|
||||
return nullptr;
|
||||
return NULL;
|
||||
|
||||
THash_object* o = (THash_object*)arr->objptr(_colitem--);
|
||||
return (o == nullptr || o->_obj == nullptr) ? nullptr : o->_obj;
|
||||
return (o == NULL || o->_obj == NULL) ? NULL : o->_obj;
|
||||
}
|
||||
|
||||
THash_object* TAssoc_array::random_hash_object()
|
||||
{
|
||||
THash_object* o = nullptr;
|
||||
THash_object* o = NULL;
|
||||
if (items() > 0)
|
||||
{
|
||||
int bucket = rand() % _bucket.size();
|
||||
if (_bucket.objptr(bucket) == nullptr)
|
||||
if (_bucket.objptr(bucket) == NULL)
|
||||
bucket = _bucket.succ(bucket);
|
||||
if (_bucket.objptr(bucket) == nullptr)
|
||||
if (_bucket.objptr(bucket) == NULL)
|
||||
bucket = _bucket.pred(bucket);
|
||||
const TArray* arr = (const TArray*)_bucket.objptr(bucket);
|
||||
if (arr != nullptr)
|
||||
if (arr != NULL)
|
||||
{
|
||||
const int item = rand() % arr->size();
|
||||
o = (THash_object*)arr->objptr(item);
|
||||
if (o != nullptr)
|
||||
if (o != NULL)
|
||||
{
|
||||
_rowitem = bucket;
|
||||
_colitem = item;
|
||||
@ -168,7 +162,7 @@ THash_object* TAssoc_array::random_hash_object()
|
||||
// @rdesc Ritorna TRUE se esisteva gia' un elemento con la stessa chiave
|
||||
bool TAssoc_array::add(
|
||||
const char* key, // @parm Chiave d'ordinamento
|
||||
TObject* obj, // @parm Oggetto da inserire (default=nullptr)
|
||||
TObject* obj, // @parm Oggetto da inserire (default=NULL)
|
||||
bool force) // @parm Permette di forzare l'inserimento se esiste gia'
|
||||
// un oggetto con la stessa chiave
|
||||
|
||||
@ -191,7 +185,7 @@ bool TAssoc_array::add(
|
||||
{
|
||||
if (force)
|
||||
{
|
||||
if (o->_obj != nullptr)
|
||||
if (o->_obj != NULL)
|
||||
delete o->_obj;
|
||||
o->_obj = obj;
|
||||
}
|
||||
@ -222,7 +216,7 @@ bool TAssoc_array::add(const char* key, const TObject& obj, bool force)
|
||||
}
|
||||
if (force && o->_obj != &obj) // Tolla 2017: Aggiunto controllo sugli indirizzi, perchè c'è questo problema?
|
||||
{
|
||||
if (o->_obj != nullptr)
|
||||
if (o->_obj != NULL)
|
||||
delete o->_obj;
|
||||
o->_obj = obj.dup();
|
||||
}
|
||||
@ -245,7 +239,7 @@ bool TAssoc_array::remove(
|
||||
const TFixed_string key(k);
|
||||
const word hv = key.hash() % HASH_SIZE;
|
||||
TArray& arr = bucket(hv);
|
||||
THash_object* o = nullptr;
|
||||
THash_object* o = NULL;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < arr.items(); i++)
|
||||
@ -256,7 +250,7 @@ bool TAssoc_array::remove(
|
||||
if (ob->_key > key)
|
||||
break;
|
||||
}
|
||||
if (o != nullptr)
|
||||
if (o != NULL)
|
||||
{
|
||||
arr.destroy(i,TRUE);
|
||||
_cnt--;
|
||||
@ -286,13 +280,13 @@ TObject& TAssoc_array::find(
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Ritorna l'oggetto con chiave <p key>
|
||||
// @rdesc Se l'oggetto esiste ne ritorna il puntatore, altrimenti ritorna nullptr
|
||||
// @rdesc Se l'oggetto esiste ne ritorna il puntatore, altrimenti ritorna NULL
|
||||
TObject* TAssoc_array::objptr(
|
||||
const char* key) const // @parm Chiave dell'oggetto da ritornare
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_object* o = ((TAssoc_array*)this)->_lookup(key,isnew);
|
||||
return o ? o->_obj : nullptr;
|
||||
return o ? o->_obj : NULL;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
@ -308,14 +302,14 @@ bool TAssoc_array::is_key(
|
||||
{
|
||||
bool isnew = FALSE;
|
||||
THash_object* o = ((TAssoc_array *)this)->_lookup(key,isnew);
|
||||
return o != nullptr;
|
||||
return o != NULL;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Ritorna solo l'oggetto
|
||||
//
|
||||
// @rdesc Ritorna il puntatore all'oggetto (se diverso da nullptr), altrimenti
|
||||
// @rdesc Ritorna il puntatore all'oggetto (se diverso da NULL), altrimenti
|
||||
// ritorna error object
|
||||
TObject* TAssoc_array::get()
|
||||
// @xref <mf TAssoc_array::get_hashobj>
|
||||
@ -332,17 +326,17 @@ TObject* TAssoc_array::get()
|
||||
if (_row >= HASH_SIZE)
|
||||
{
|
||||
_row = 0;
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
THash_object* o = (THash_object*)arr->objptr(_col++);
|
||||
return (o == nullptr || o->_obj == nullptr) ? &error_object : o->_obj;
|
||||
return (o == NULL || o->_obj == NULL) ? &error_object : o->_obj;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Ritorna l'oggetto e la relativa chiave
|
||||
//
|
||||
// @rdesc Se l'oggetto esiste ne ritorna il puntatore, altrimenti ritorna nullptr
|
||||
// @rdesc Se l'oggetto esiste ne ritorna il puntatore, altrimenti ritorna NULL
|
||||
THash_object* TAssoc_array::get_hashobj()
|
||||
|
||||
// @comm Se l'oggetto viene trovato viene richiamata la funzione
|
||||
@ -362,7 +356,7 @@ THash_object* TAssoc_array::get_hashobj()
|
||||
if (_row >= HASH_SIZE)
|
||||
{
|
||||
_row = 0;
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
return (THash_object*)arr->objptr(_col++);
|
||||
}
|
||||
@ -374,13 +368,11 @@ int TAssoc_array::get_keys(TString_array& kl, bool add_values)
|
||||
{
|
||||
kl.destroy();
|
||||
restart();
|
||||
THash_object* o = nullptr;
|
||||
THash_object* o = NULL;
|
||||
TString tmp(80);
|
||||
|
||||
while ((o = get_hashobj()))
|
||||
{
|
||||
TToken_string* tt = new TToken_string(o->key());
|
||||
|
||||
if (add_values)
|
||||
{
|
||||
tmp = "";
|
||||
@ -397,7 +389,7 @@ const TString& TAssoc_array::get_str(const char* key) const
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_object* o = ((TAssoc_array *)this)->_lookup(key,isnew);
|
||||
if (o != nullptr && o->obj().is_kind_of(CLASS_STRING))
|
||||
if (o != NULL && o->obj().is_kind_of(CLASS_STRING))
|
||||
return (const TString&)o->obj();
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
@ -405,7 +397,7 @@ const TString& TAssoc_array::get_str(const char* key) const
|
||||
bool TAssoc_array::get_bool(const char* key) const
|
||||
{
|
||||
const TString& str = get_str(key);
|
||||
return str.full() && strchr("1XY", str[0]) != nullptr;
|
||||
return str.full() && strchr("1XY", str[0]) != NULL;
|
||||
}
|
||||
|
||||
int TAssoc_array::get_int(const char* key) const
|
||||
@ -427,363 +419,7 @@ TAssoc_array & TAssoc_array::copy(const TAssoc_array & a) // @parm Array associa
|
||||
add(obj->key(), obj->obj(), TRUE);
|
||||
return * this;
|
||||
}
|
||||
////
|
||||
///
|
||||
///0
|
||||
|
||||
TArray& TIndexed_array::bucket(int index)
|
||||
{
|
||||
TArray* arr = (TArray*)_bucket.objptr(index);
|
||||
|
||||
if (arr == nullptr)
|
||||
{
|
||||
arr = new TArray;
|
||||
_bucket.add(arr, index);
|
||||
}
|
||||
return *arr;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Cerca l'oggetto con chiave <p k>
|
||||
//
|
||||
// @rdesc Ritorna l'oggetto corrispondente alla chiave passate come parametro.
|
||||
// <nl>Il parametro <p isnew> assume il valore TRUE se si tratta di un
|
||||
// nuovo oggetto.
|
||||
THash_key* TIndexed_array::_lookup(
|
||||
const char* k, // @parm Chiave da cercare
|
||||
bool& isnew, // @parm Viene assegnato TRUE se si tratta di una nuova chiave
|
||||
bool insert) // @parm Permette di inserire la chiave
|
||||
|
||||
// @comm Ricerca all'interno della tabella hash l'oggetto con la chiave <p k>,
|
||||
// nel caso non venga trovato <p isnew> ritorna TRUE (si tratta di un
|
||||
// oggetto nuovo) e viene inserito nella tabella se il parametro <p insert>
|
||||
// e' settato a TRUE.
|
||||
{
|
||||
const TFixed_string key(k);
|
||||
const word hv = key.hash() % HASH_SIZE;
|
||||
TArray& arr = bucket(hv);
|
||||
THash_key* o = nullptr;
|
||||
isnew = false;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < arr.items(); i++)
|
||||
{
|
||||
THash_key* ob = (THash_key*)arr.objptr(i);
|
||||
if (ob->_key == key)
|
||||
{
|
||||
o = ob; break;
|
||||
}
|
||||
if (ob->_key > key)
|
||||
break;
|
||||
}
|
||||
|
||||
if (o == nullptr)
|
||||
{
|
||||
if (insert)
|
||||
{
|
||||
o = new THash_key(key);
|
||||
arr.insert(o, i);
|
||||
}
|
||||
isnew = true;
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
bool TIndexed_array::add2index(const char* key, int index, bool force)
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_key * key_object = _lookup(key, isnew, true);
|
||||
|
||||
isnew &= key_object != nullptr;
|
||||
if (isnew)
|
||||
key_object->_index = index;
|
||||
return key != nullptr && isnew;
|
||||
}
|
||||
|
||||
// @mfunc Copia tutto l'array e ne duplica gli elementi
|
||||
//
|
||||
TIndexed_array & TIndexed_array::copy(const TIndexed_array & a) // @parm Array associativo sorgente
|
||||
{
|
||||
TIndexed_array& from = (TIndexed_array&)a;
|
||||
|
||||
TArray::destroy();
|
||||
TArray::copy(from);
|
||||
FOR_EACH_ARRAY_ITEM(from, r, o)
|
||||
{
|
||||
THash_object & obj = *((THash_object *)o);
|
||||
|
||||
add2index(obj.key(), r, true);
|
||||
}
|
||||
restart();
|
||||
return *this;
|
||||
}
|
||||
|
||||
const char* TIndexed_array::class_name() const
|
||||
{
|
||||
return "Indexed array";
|
||||
}
|
||||
|
||||
|
||||
word TIndexed_array::class_id() const
|
||||
{
|
||||
return CLASS_INDEXED_ARRAY;
|
||||
}
|
||||
|
||||
bool TIndexed_array::is_kind_of(word id) const
|
||||
{
|
||||
return class_id() == CLASS_INDEXED_ARRAY || TArray::is_kind_of(id);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
TObject& TIndexed_array::operator[] (int index) const
|
||||
{
|
||||
THash_object * o = (THash_object *)TArray::objptr(index);
|
||||
|
||||
if (o == nullptr)
|
||||
fatal_box("Can't access NULL array item %d of %d", index, size());
|
||||
return o->obj();
|
||||
}
|
||||
#endif
|
||||
|
||||
void TIndexed_array::destroy()
|
||||
{
|
||||
TArray::destroy();
|
||||
_bucket.destroy();
|
||||
_row = _col = 0;
|
||||
_rowitem = _colitem = 0;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Aggiunge un oggetto all'array.
|
||||
// @rdesc Ritorna TRUE se esisteva gia' un elemento con la stessa chiave
|
||||
bool TIndexed_array::add(
|
||||
const char* key, // @parm Chiave d'ordinamento
|
||||
TObject* obj, // @parm Oggetto da inserire (default=nullptr)
|
||||
bool force) // @parm Permette di forzare l'inserimento se esiste gia'
|
||||
// un oggetto con la stessa chiave
|
||||
|
||||
// @parm const TObject | &obj | Indirizzo dell'oggetto da aggiungere
|
||||
//
|
||||
// @syntax add(const char* key, TObject* obj, bool force)
|
||||
// @syntax add(const char* key, const TObject& obj, bool force)
|
||||
//
|
||||
// @comm Se l'oggetto da aggiungere esite gia' la chiave guarda il parametro <p force>:
|
||||
// <nl>se <p force> = TRUE lo sostituisce e ritorna TRUE,
|
||||
// <nl>se <p force> = FALSE non sostituisce e ritorna TRUE,
|
||||
// <nl>altrimenti ritorna FALSE.
|
||||
// <nl><nl>Nel caso l'oggetto da aggiungere venga passato per indirizzo
|
||||
// la funzione aggiunge una copia dell'oggetto e quindi deve essere
|
||||
// definita <mf TObject::dup>
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_key* o = _lookup(key, isnew, true);
|
||||
|
||||
isnew |= force;
|
||||
if (isnew)
|
||||
{
|
||||
const int index = TArray::add(o); // ??
|
||||
|
||||
o->_index = index;
|
||||
}
|
||||
return isnew;
|
||||
}
|
||||
|
||||
bool TIndexed_array::add(const char* key, const TObject& obj, bool force)
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_key * o = _lookup(key, isnew, true);
|
||||
|
||||
isnew |= force;
|
||||
if (isnew)
|
||||
{
|
||||
const int index = TArray::add(obj.dup());
|
||||
|
||||
o->_index = index;
|
||||
}
|
||||
return isnew;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Elimina un oggetto.
|
||||
// @rdesc Ritorna il risultato dell'operazione
|
||||
//
|
||||
// @flag TRUE | Eliminazione avvenuta
|
||||
// @flag FALSE | L'oggetto non e' stato trovato
|
||||
bool TIndexed_array::remove(
|
||||
const char* k) // @parm Chiave dell'oggetto da eliminare
|
||||
|
||||
// @comm Cerca nella tabella hash l'oggetto con chiave <p k> e lo elimina.
|
||||
|
||||
{
|
||||
const TFixed_string key(k);
|
||||
const word hv = key.hash() % HASH_SIZE;
|
||||
TArray& arr = bucket(hv);
|
||||
THash_object* o = nullptr;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < arr.items(); i++)
|
||||
{
|
||||
THash_object* ob = (THash_object*)&arr[i];
|
||||
if (ob->key() == key)
|
||||
{
|
||||
o = ob; break;
|
||||
}
|
||||
if (ob->key() > key)
|
||||
break;
|
||||
}
|
||||
if (o != nullptr)
|
||||
{
|
||||
arr.destroy(i, true);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Trova l'oggetto indicizzato
|
||||
//
|
||||
// @rdesc Ritorna l'oggetto cercato. Se l'oggetto non viene trovato
|
||||
// ritorna un errore
|
||||
TObject& TIndexed_array::find(
|
||||
const char* key) const // @parm Chiave dell'oggetto da trovare
|
||||
|
||||
|
||||
// @comm Cerca l'oggetto indicizzato con chiave <p key>. Viene controllato se
|
||||
// non c'e' (normalmente si usa operator[key])
|
||||
{
|
||||
TObject* o = objptr(key);
|
||||
|
||||
CHECKS(o, "Can't find hash object with key ", key);
|
||||
return *o;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Ritorna l'oggetto con chiave <p key>
|
||||
// @rdesc Se l'oggetto esiste ne ritorna il puntatore, altrimenti ritorna nullptr
|
||||
TObject* TIndexed_array::objptr(
|
||||
const char* key) const // @parm Chiave dell'oggetto da ritornare
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_key * k = ((TIndexed_array*)this)->_lookup(key, isnew);
|
||||
|
||||
if (k != nullptr)
|
||||
{
|
||||
THash_object * o = (THash_object *)TArray::objptr(k->index());
|
||||
|
||||
return o ? o->_obj : nullptr;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Controlla l'esistenza di una chiave
|
||||
//
|
||||
// @rdesc Ritorna il risultato della ricerca
|
||||
//
|
||||
// @flag TRUE | Se la chiave esiste
|
||||
// @flag FALSE | Se la chiave non esiste
|
||||
bool TIndexed_array::is_key(
|
||||
const char* key) const // @parm Chiave di cui cercare l'esistenza
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_key* o = ((TIndexed_array *)this)->_lookup(key, isnew);
|
||||
|
||||
return o != nullptr;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Ritorna solo l'oggetto
|
||||
//
|
||||
// @rdesc Ritorna il puntatore all'oggetto (se diverso da nullptr), altrimenti
|
||||
// ritorna error object
|
||||
TObject* TIndexed_array::get()
|
||||
// @xref <mf TAssoc_array::get_hashobj>
|
||||
{
|
||||
const TArray* arr = (const TArray*)_bucket.objptr(_row);
|
||||
while (_row < HASH_SIZE)
|
||||
{
|
||||
if (arr && (int)_col < arr->items())
|
||||
break;
|
||||
_row = _bucket.succ(_row);
|
||||
arr = (const TArray*)_bucket.objptr(_row);
|
||||
_col = 0;
|
||||
}
|
||||
if (_row >= HASH_SIZE)
|
||||
{
|
||||
_row = 0;
|
||||
return nullptr;
|
||||
}
|
||||
THash_object* o = (THash_object*)arr->objptr(_col++);
|
||||
return (o == nullptr || o->_obj == nullptr) ? &error_object : o->_obj;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Ritorna l'oggetto e la relativa chiave
|
||||
//
|
||||
// @rdesc Se l'oggetto esiste ne ritorna il puntatore, altrimenti ritorna nullptr
|
||||
THash_key* TIndexed_array::get_hashkey()
|
||||
|
||||
// @comm Se l'oggetto viene trovato viene richiamata la funzione
|
||||
// <mf TAssoc_array::objptr>
|
||||
//
|
||||
// @xref <mf TAssoc_array::get>
|
||||
{
|
||||
const TArray* arr = (const TArray*)_bucket.objptr(_row);
|
||||
|
||||
while (_row < HASH_SIZE)
|
||||
{
|
||||
if (arr && (int)_col < arr->items())
|
||||
break;
|
||||
_row = _bucket.succ(_row);
|
||||
arr = (const TArray*)_bucket.objptr(_row);
|
||||
_col = 0;
|
||||
}
|
||||
if (_row >= HASH_SIZE)
|
||||
{
|
||||
_row = 0;
|
||||
return nullptr;
|
||||
}
|
||||
return (THash_key*)arr->objptr(_col++);
|
||||
}
|
||||
|
||||
const TString& TIndexed_array::get_str(const char* key) const
|
||||
{
|
||||
bool isnew = false;
|
||||
THash_key* k = ((TIndexed_array *)this)->_lookup(key, isnew);
|
||||
|
||||
if (k != nullptr)
|
||||
{
|
||||
THash_object * o = (THash_object *) TArray::objptr(k->index());
|
||||
|
||||
if (o != nullptr && o->obj().is_kind_of(CLASS_STRING))
|
||||
return (const TString&)o->obj();
|
||||
}
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
||||
bool TIndexed_array::get_bool(const char* key) const
|
||||
{
|
||||
const TString& str = get_str(key);
|
||||
return str.full() && strchr("1XY", str[0]) != nullptr;
|
||||
}
|
||||
|
||||
int TIndexed_array::get_int(const char* key) const
|
||||
{
|
||||
const TString& str = get_str(key);
|
||||
return str.full() ? atoi(str) : 0;
|
||||
}
|
||||
|
||||
// @doc INTERNAL
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TCache
|
||||
@ -806,18 +442,17 @@ TObject* TCache::objptr(const TString& key)
|
||||
{
|
||||
const int hv = key.hash() % _data.size();
|
||||
THash_object* ho = (THash_object*)_data.objptr(hv);
|
||||
TObject* obj = nullptr;
|
||||
|
||||
if (ho != nullptr && ho->key() == key)
|
||||
TObject* obj = NULL;
|
||||
if (ho != NULL && ho->key() == key)
|
||||
{
|
||||
obj = &ho->obj();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = key2obj(key);
|
||||
if (obj != nullptr)
|
||||
if (obj != NULL)
|
||||
{
|
||||
if (ho != nullptr)
|
||||
if (ho != NULL)
|
||||
{
|
||||
discarding(ho);
|
||||
_data.destroy(hv);
|
||||
|
@ -14,15 +14,12 @@
|
||||
// @class THash_object | Classe per la definizione degli elementi di una tabella hash.
|
||||
//
|
||||
// @base public | TObject
|
||||
|
||||
class THash_object : public TObject
|
||||
// @author:(INTERNAL) Villa
|
||||
{
|
||||
// @cfriend TAssoc_array
|
||||
friend class TAssoc_array;
|
||||
// @cfriend TIndexed_array
|
||||
friend class TIndexed_array;
|
||||
|
||||
|
||||
// @access:(INTERNAL) Private Member
|
||||
|
||||
// @cmember:(INTERNAL) Chiave d'ordinamento
|
||||
@ -40,10 +37,10 @@ public:
|
||||
TObject& obj() const
|
||||
{ return *_obj; }
|
||||
|
||||
TObject* remove_obj() { TObject* o = _obj; _obj = nullptr; return o; }
|
||||
TObject* remove_obj() { TObject* o = _obj; _obj = NULL; return o; }
|
||||
|
||||
// @cmember Costruttore (inizializza la chiave ed opzionalmente l'oggetto)
|
||||
THash_object(const char* k, TObject* o = nullptr) : _key(k), _obj(o)
|
||||
THash_object(const char* k, TObject* o = NULL) : _key(k), _obj(o)
|
||||
{}
|
||||
// @cmember Distruttore
|
||||
virtual ~THash_object();
|
||||
@ -161,162 +158,6 @@ public:
|
||||
{ destroy(); }
|
||||
};
|
||||
|
||||
class THash_key : public TObject
|
||||
// @author:(INTERNAL) Villa
|
||||
{
|
||||
// @cfriend TAssoc_array
|
||||
friend class TIndexed_array;
|
||||
|
||||
// @access:(INTERNAL) Private Member
|
||||
|
||||
// @cmember:(INTERNAL) Chiave d'ordinamento
|
||||
TString _key;
|
||||
// @cmember:(INTERNAL) indice
|
||||
int _index;
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
// @cmember Ritorna la chiave di ordinamento
|
||||
const TString& key() const { return _key; }
|
||||
// @cmember Ritorna l'oggetto
|
||||
int index() const { return _index; }
|
||||
|
||||
// @cmember Costruttore (inizializza la chiave ed opzionalmente l'oggetto)
|
||||
THash_key(const char* k, int index = -1) : _key(k), _index(index) {}
|
||||
// @cmember Distruttore
|
||||
virtual ~THash_key() {}
|
||||
};
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @class TIndexed_array | Array con indice hash
|
||||
//
|
||||
// @base public |TObject
|
||||
|
||||
class TIndexed_array : public TArray
|
||||
|
||||
// @author:(INTERNAL) Villa
|
||||
|
||||
//@access:(INTERNAL) Private Member
|
||||
{
|
||||
// @cmember:(INTERNAL) Numero di righe della tabella hash
|
||||
word _row;
|
||||
// @cmember:(INTERNAL) Numero di colonne della tabella hash
|
||||
word _col;
|
||||
// @cmember:(INTERNAL) Numero di righe della tabella hash per i metodi _item
|
||||
int _rowitem;
|
||||
// @cmember:(INTERNAL) Numero di colonne della tabella hash per i metodi _item
|
||||
int _colitem;
|
||||
// @cmember:(INTERNAL) Array contenente i dati veri e propri
|
||||
TArray _bucket;
|
||||
|
||||
// @access Protected member
|
||||
protected:
|
||||
TArray& bucket(int index); // ok
|
||||
// @cmember Azzera il numero di riga e colonna corrente della tabella hash
|
||||
void restart() { _row = 0; _col = 0; } //ok
|
||||
|
||||
// @cmember Cerca l'oggetto con chiave k
|
||||
THash_key * _lookup(const char* k, bool& isnew, bool insert = false); //ok
|
||||
// @cmember aggiunge la chiave all'indice
|
||||
bool add2index(const char* key, int index = -1, bool force = false); //ok
|
||||
// @cmember Copia tutto l'array associativo e ne duplica gli elementi
|
||||
TIndexed_array & copy(const TIndexed_array & a); //ok
|
||||
|
||||
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
// @cmember Duplica l'array associativo copiandone gli elementi.
|
||||
virtual TObject* dup() const { return new TIndexed_array(*this); } // ok
|
||||
|
||||
// @cmember Ritorna il nome della classe
|
||||
virtual const char* class_name() const; // ok
|
||||
// @cmember Ritorna l'id della class
|
||||
virtual word class_id() const; // ok
|
||||
// @cmember Controlla se si tratta di un oggetto derivato da TArray
|
||||
virtual bool is_kind_of(word cid) const; //ok
|
||||
|
||||
// @cmember Ritorna l'oggetto nella posizione index
|
||||
TObject& operator[] (int index) const; // ok
|
||||
// @cmember Ritorna l'oggetto nella posizione index
|
||||
virtual TObject* objptr(int index) const; // ok
|
||||
|
||||
//qui
|
||||
// @cmember Rimuove uno o tutti (default) gli elementi
|
||||
virtual bool destroy(int index = -1, bool pack = false);
|
||||
// @cmember Aggiunge un oggetto ad un array.
|
||||
virtual int add(TObject* obj, int index = -1) { CHECK(false, "Must specifiy a key"); }
|
||||
// @cmember Inserisce un elemento dell'array nella posizione index
|
||||
virtual int insert(TObject* obj, int index = 0, bool force = false) { CHECK(false, "Must specifiy a key"); }
|
||||
|
||||
// @cmember Aggiunge un oggetto all'array. L'oggetto viene duplicato
|
||||
virtual int add(const TObject& object, int index = -1) { CHECK(false, "Must specifiy a key"); }
|
||||
// @cmember Inserisce un oggetto alla posizione index
|
||||
virtual int insert(const TObject& object, int index = 0, bool force = false) { CHECK(false, "Must specifiy a key"); }
|
||||
// @cmember Elimina l'elemento nella posizione index dell'array
|
||||
TObject* remove(int index, bool pack = false);
|
||||
// @cmember Elimina l'elemento nella posizione index dell'array
|
||||
TObject* remove_item(bool pack = false);
|
||||
// @cmember Scambia di posto due elementi dell'array
|
||||
void swap(int i1, int i2);
|
||||
// @cmember Rende contigui tutti gli elementi non nulli
|
||||
virtual void pack();
|
||||
// @cmember Cancella tutti gli elementi
|
||||
virtual void destroy();
|
||||
|
||||
// @cmember Aggiunge un oggetto. Se era gia' presente guarda il parametro force
|
||||
bool add(const char* key, TObject* obj = nullptr, bool force = false); //ok
|
||||
|
||||
// @cmember Aggiunge una copia dell'oggetto
|
||||
bool add(const char* key, const TObject& obj, bool force = false); //ok
|
||||
|
||||
// @cmember Elimina un oggetto
|
||||
bool remove(const char* key);
|
||||
|
||||
// @cmember Controlla l'esistenza di una chiave
|
||||
bool is_key(const char* key) const;
|
||||
|
||||
// @cmember Ritorna l'oggetto con chiave key
|
||||
TObject* objptr(const char* key) const;
|
||||
|
||||
// @cmember Trova l'oggetto indicizzato
|
||||
TObject& find(const char* key) const;
|
||||
|
||||
// @cmember Ritorna l'indice del oggetto con chiave key (piu' intuitivo di <mf TAssoc_array::find>)
|
||||
TObject& operator[] (const char* key) const { return find(key); }
|
||||
|
||||
// @cmember Ritorna solo l'oggetto
|
||||
TObject* get();
|
||||
// @cmember Ritorna l'oggetto e la relativa chiave
|
||||
THash_key* get_hashkey(); // ok
|
||||
|
||||
bool get_bool(const char* key) const;
|
||||
int get_int(const char* key) const;
|
||||
const TString& get_str(const char* key) const;
|
||||
|
||||
// @cmember Operatore di assegnamento tra array indicizzati
|
||||
TIndexed_array& operator= (const TIndexed_array & a) { return copy(a); }
|
||||
|
||||
// @cmember Costruttori
|
||||
TIndexed_array(int arraysize) : TArray(arraysize), _row(0), _col(0) {}
|
||||
TIndexed_array() : _row(0), _col(0) {}
|
||||
// @cmember Costruttore. Copia tutto l'array indicizzato e ne duplica gli elementi
|
||||
TIndexed_array(const TIndexed_array& a) : _row(0), _col(0) { copy(a);}
|
||||
// @cmember Distruttore
|
||||
virtual ~TIndexed_array() {}
|
||||
};
|
||||
|
||||
inline TObject* TIndexed_array::objptr(int index) const
|
||||
{
|
||||
THash_object * o = (THash_object *) TArray::objptr(index);
|
||||
|
||||
return (o) ? &(o->obj()) : nullptr;
|
||||
}
|
||||
|
||||
#ifndef DBG
|
||||
inline TObject& TArray::operator[] (int index) const { return ((THash_obj*)objptr(index))->obj();}
|
||||
#endif
|
||||
class TCache : public TObject
|
||||
{
|
||||
TArray _data;
|
||||
|
@ -41,7 +41,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD2 30
|
||||
BEGIN
|
||||
PROMPT 44 2 "Campo 2 "
|
||||
PROMPT 42 2 "Campo 2 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -53,7 +53,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD4 30
|
||||
BEGIN
|
||||
PROMPT 44 3 "Campo 4 "
|
||||
PROMPT 42 3 "Campo 4 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -65,7 +65,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD6 30
|
||||
BEGIN
|
||||
PROMPT 44 4 "Campo 6 "
|
||||
PROMPT 42 4 "Campo 6 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -77,7 +77,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD8 30
|
||||
BEGIN
|
||||
PROMPT 44 5 "Campo 8 "
|
||||
PROMPT 42 5 "Campo 8 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -89,7 +89,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD10 30
|
||||
BEGIN
|
||||
PROMPT 44 6 "Campo 10 "
|
||||
PROMPT 42 6 "Campo 10 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -101,7 +101,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD12 30
|
||||
BEGIN
|
||||
PROMPT 44 7 "Campo 12 "
|
||||
PROMPT 42 7 "Campo 12 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -113,7 +113,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD14 30
|
||||
BEGIN
|
||||
PROMPT 44 8 "Campo 14 "
|
||||
PROMPT 42 8 "Campo 14 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -125,7 +125,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD16 30
|
||||
BEGIN
|
||||
PROMPT 44 9 "Campo 16 "
|
||||
PROMPT 42 9 "Campo 16 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -137,7 +137,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD18 30
|
||||
BEGIN
|
||||
PROMPT 44 10 "Campo 18 "
|
||||
PROMPT 42 10 "Campo 18 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -149,7 +149,7 @@ END
|
||||
|
||||
STRING F_KEYFIELD20 30
|
||||
BEGIN
|
||||
PROMPT 44 11 "Campo 20 "
|
||||
PROMPT 42 11 "Campo 20 "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
#define CLASS_CONTAINER 100
|
||||
#define CLASS_ARRAY 101
|
||||
#define CLASS_STACK 102
|
||||
#define CLASS_INDEXED_ARRAY 103
|
||||
|
||||
#define CLASS_WINDOW 200
|
||||
#define CLASS_SHEET 201
|
||||
|
@ -86,6 +86,7 @@ TObject* TDowJones::rec2obj(const TRectype& rec) const
|
||||
data->_chg = UNO;
|
||||
}
|
||||
}
|
||||
|
||||
if (codval.full())
|
||||
{
|
||||
data->_dec = rec.get_int("I0");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user