Merge remote-tracking branch 'origin/R_10_00' into R_10_00

This commit is contained in:
Mattia Tollari 2019-05-20 11:05:14 +02:00
commit 835da3a45c
31 changed files with 1332 additions and 126 deletions

View File

@ -118,7 +118,6 @@
<PreprocessorDefinitions>_DEBUG;WIN32;__LONGDOUBLE__;_WINDOWS;__LONGDOUBLE__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
@ -311,6 +310,9 @@
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="f1lib.vcxproj">
<Project>{41f4c25f-6bd2-4fc9-a0d3-a68cd1c9e4fc}</Project>
</ProjectReference>
<ProjectReference Include="fplib.vcxproj">
<Project>{c575788b-0be4-4f68-b9c9-3c204ec04e07}</Project>
</ProjectReference>

View File

@ -9,6 +9,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cg1", "Cg1.vcxproj", "{9B42
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cg2", "Cg2.vcxproj", "{9304E774-E631-495D-A29D-774222BBF8C9}"
ProjectSection(ProjectDependencies) = postProject
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC} = {41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}
{C575788B-0BE4-4F68-B9C9-3C204EC04E07} = {C575788B-0BE4-4F68-B9C9-3C204EC04E07}
EndProjectSection
EndProject
@ -28,6 +29,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fplib", "fplib.vcxproj", "{C575788B-0BE4-4F68-B9C9-3C204EC04E07}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "f1lib", "f1lib.vcxproj", "{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -78,6 +81,10 @@ Global
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Debug|Win32.Build.0 = Debug|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.ActiveCfg = Release|Win32
{C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.Build.0 = Release|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Debug|Win32.ActiveCfg = Debug|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Debug|Win32.Build.0 = Debug|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Release|Win32.ActiveCfg = Release|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

173
build/f1lib.vcxproj Normal file
View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}</ProjectGuid>
<RootNamespace>fp</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="CampoRules.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\lib\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\lib\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EmbedManifest>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\debug/fplib.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\src\f1\;..\src\xvtdb\;..\src\cg;..\src\include;..\src\xvaga;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;__LONGDOUBLE__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<StringPooling>true</StringPooling>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0410</Culture>
<AdditionalIncludeDirectories>..\wx28X\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ShowProgress>NotSet</ShowProgress>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\debug/fplib.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\release/fplib.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\src\xvtdb\;..\src\cg;..\src\include;..\src\xvaga;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<BrowseInformation>false</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0410</Culture>
<AdditionalIncludeDirectories>..\wx28X\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<SubSystem>Windows</SubSystem>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<Version>12.0</Version>
<GenerateDebugInformation>false</GenerateDebugInformation>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\release/fplib.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuildStep Include="..\lib\AgaLib.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
<CustomBuildStep Include="..\lib\AgaLibD.lib">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuildStep>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\f1\f1lib.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\f1\f1lib.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="CampoRules.targets" />
</ImportGroup>
</Project>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Headers">
<UniqueIdentifier>{afbf9839-55d1-46a9-9d8a-45e41e3d3d11}</UniqueIdentifier>
</Filter>
<Filter Include="Sources">
<UniqueIdentifier>{1ca586f9-1511-48e9-89db-65f13a861684}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\f1\f1lib.cpp">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\f1\f1lib.h">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup>
</Project>

4
build/f1lib.vcxproj.user Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -21,6 +21,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fp1", "fp1.vcxproj", "{A539
{7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5} = {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "f1lib", "f1lib.vcxproj", "{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -47,6 +49,10 @@ Global
{A539BCC1-D08F-4D78-A8EA-65560F4A60CD}.Debug|Win32.Build.0 = Debug|Win32
{A539BCC1-D08F-4D78-A8EA-65560F4A60CD}.Release|Win32.ActiveCfg = Release|Win32
{A539BCC1-D08F-4D78-A8EA-65560F4A60CD}.Release|Win32.Build.0 = Release|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Debug|Win32.ActiveCfg = Debug|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Debug|Win32.Build.0 = Debug|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Release|Win32.ActiveCfg = Release|Win32
{41F4C25F-6BD2-4FC9-A0D3-A68CD1C9E4FC}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -176,6 +176,9 @@
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="f1lib.vcxproj">
<Project>{41f4c25f-6bd2-4fc9-a0d3-a68cd1c9e4fc}</Project>
</ProjectReference>
<ProjectReference Include="vedoc.vcxproj">
<Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
</ProjectReference>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>-2 /uADMIN</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>-3 /uADMIN</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>

11
cd/test/cg0790.txt Normal file
View File

@ -0,0 +1,11 @@
cg2100c.msk
cg2.exe
cg2fppro.msk
Tolta esportazione protocollo ingresso su movimento (verra' fatto con l'F9)
Aggiunto flag se registrazione collegata a FPPRO
Corretta eliminazione massiva movimenti
Cambiata modalita' modifica: non permetteva di salvare a prescindere dalle modifiche (mantenuto comunque il controllo preventivo)
Aggiunto controllo per apertura automatica maschera FPPRO:
Si apriva da sola quando eseguivo dal monitor delle fat. passive
Dati documento salvati internamente e non su maschera per passaggio da maschera FPPRO a maschera cg

96
cd/test/cg0790a.ini Normal file
View File

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

BIN
cd/test/cg0790a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
fp0.exe
Sistemato calcolo importo riga per chi non espone gli sconti in fattura

19
cd/test/fp0788a.ini Normal file
View File

@ -0,0 +1,19 @@
[Main]
Demo=0
[fp1]
File(0) = fp0.exe|X
Patch = 0788
Versione = 21511200
[fp]
Data = 13-05-2019
Descrizione = Fattura Elettronica
Dischi = 1
Moduli = cg,ve
OEM =
Patch = 788
PostProcess =
PreProcess =
Versione = 21511200

BIN
cd/test/fp0788a1.zip Normal file

Binary file not shown.

15
cd/test/fp0790.txt Normal file
View File

@ -0,0 +1,15 @@
fp0.exe
fp0400a.msk
Aggiunta contabilizzazione automatica da fp fatt. passive con protocollo ini
Corretta comportamento bottoni toolbar (abilita/disabilita)
Aggiunto range data per fatture contabilizzate
Aggiunto controllo se fornitore e' sospeso non lo propongo
Aggiunte causali di default per contabilizzazione
Salvate date e causali default su config. ditta
Rifatta maschera per separare meglio parte fp da f1
Aggiunti controlli sui bottoni
Aggiustati filtri elenco fatture
Aggiunta possibilita' di aprire registrazione da elenco fatture contabilizzate
Aggiunto log per stato contabilizzazione (salvate/annullate)
Corretta esportazione importi negativi

20
cd/test/fp0790a.ini Normal file
View File

@ -0,0 +1,20 @@
[Main]
Demo=0
[fp1]
File(0) = fp0.exe|X
File(4) = fp0400a.msk|X
Patch = 0790
Versione = 21511200
[fp]
Data = 17-05-2019
Descrizione = Fattura Elettronica
Dischi = 1
Moduli = cg,ve
OEM =
Patch = 790
PostProcess =
PreProcess =
Versione = 21511200

BIN
cd/test/fp0790a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
ba0.exe
campo.aut
Aggiunti nuovi moduli f1, f9

22
cd/test/sy0790a.ini Normal file
View File

@ -0,0 +1,22 @@
[Main]
Demo=0
[sy1]
File(0) = ba0.exe|X
File(36) = campo.aut|X
Patch = 0790
Versione = 21511200
[sy]
Data = 17-05-2019
Descrizione = Sistema
Dischi = 1
Moduli =
OEM =
Patch = 790
PostProcess =
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/sy0790a1.zip Normal file

Binary file not shown.

View File

@ -123,9 +123,11 @@ TMask* TPrimanota_application::load_mask(int n)
ism.set_handler(309, sheet_clifo_handler);
ism.set_handler(CG_RATEO, sheet_rateo_handler);
ism.set_handler(CG_RISCONTO, sheet_risconto_handler);
if (!is_fp(m))
if (!has_f1_db(m))
{
m->hide(F_PROTFPPRO);
if (m->find_by_id(F_COLFPPRO) != NULL)
m->hide(F_COLFPPRO);
if(m->find_by_id(DLG_LINK) != NULL)
m->disable(DLG_LINK);
}
@ -1051,7 +1053,12 @@ void TPrimanota_application::init_modify_mode(TMask& m)
m.enable(F_BOLLARAGCLI, causale().tipo_doc() == "BD");
}
if(m.find_by_id(F_PROTFPPRO) != NULL && !m.field(F_PROTFPPRO).hidden())
{
m.set(F_PROTFPPRO, mov.get(MOV_PROGFPPRO));
m.set(F_COLFPPRO, mov.get(MOV_KEYFPPRO).empty() ? " " : "X");
}
}
// Controlla sulla causale se il segno del totale documento (ritsoc=false)
@ -1572,8 +1579,8 @@ void TPrimanota_application::clean_fppro()
// Controlli: solo in mod modifica; che abbia fp (no F8); che non sono in salvataggio
if (_mode != MODE_MOD
|| !is_fp(&msk)
|| last_key != K_DEL && last_key != K_SAVE)
|| !has_f1_db(&msk)
|| last_key != K_DEL && last_key != K_SAVE && last_key != K_ELIMMAS)
return;
const TString& numreg = msk.get(F_NUMREG);
@ -1587,12 +1594,12 @@ void TPrimanota_application::clean_fppro()
fp_db().sq_commit();
}
bool TPrimanota_application::is_fp(TMask* m)
bool TPrimanota_application::has_f1_db(TMask* m)
{
static bool is_set_fpcheck = false;
if (!is_set_fpcheck)
{
_isfp = has_module(FPAUT) && !fp_settings().get_db_indirizzo().empty() && !fp_settings().is_f8();
_isfp = has_module(F1AUT) && !fp_settings().get_db_indirizzo().empty() && !fp_settings().is_f8();
is_set_fpcheck = true;
}
return _isfp;
@ -2348,7 +2355,7 @@ int TPrimanota_application::save_fppro()
const KEY last = msk.last_key();
// Provo a vedere se hanno l'FP: se c'è l'indirizzo controllo che non sia F8 se non c'è non hanno l'FP
if (!is_fp(&msk))
if (!has_f1_db(&msk))
return pro_nofp;
if (!fp_db().sq_is_connect())
{
@ -2372,8 +2379,6 @@ int TPrimanota_application::save_fppro()
{
message_box(TString("Attenzione!") << " E' stato modificato un movimento già collegato a un documento in ingresso.");
clean_fppro(); // Pulisco db
msk.set(F_PROKEY, "");
msk.set(F_PROTFPPRO, "");
save_dbmov(); // Svuoto riferimento doc ingresso sul mov
}
}
@ -2382,7 +2387,7 @@ int TPrimanota_application::save_fppro()
}
// Controllo che sto registrando un documento FA Fattura di Acquisto o NC Acquisto
if (!TPro_msk::check_causale(msk.get(F_CODCAUS)))
if (!check_causale(msk.get(F_CODCAUS)))
return pro_notsaved;
if (last != K_SAVE) { // Se sto uscendo avvertimento di non salvataggio e salto
message_box("La registrazione del movimento non verrà salvata sul database.");

View File

@ -22,6 +22,7 @@
#define F_PROTFPPRO 230
#define F_RITFATT 231
#define F_PROKEY 232
#define F_COLFPPRO 233
#define F_CLIFO 128
#define F_CODCLIFOR 151

View File

@ -609,9 +609,16 @@ BEGIN
DRIVENBY F_VALUTAINTRA
END
BOOLEAN F_COLFPPRO
BEGIN
PROMPT 1 18 "Registrazione collegata a FPPRO"
FLAGS "D"
END
STRING F_PROTFPPRO 18
BEGIN
PROMPT 1 18 "Codice Protocollo FPPRO "
PROMPT 1 19 "Codice Protocollo FPPRO "
FIELD PROGFPPRO
FLAGS "D"
END
@ -619,6 +626,7 @@ STRING F_PROKEY 80
BEGIN
PROMPT 1 18 "db key"
HELP "Chiave database"
FIELD KEYFPPRO
FLAGS "H"
END

View File

@ -20,6 +20,7 @@
#include <doc.h>
#include <occas.h>
#include "../fp/fplib.h"
#include "../f1/f1lib.h"
///////////////////////////////////////////////////////////
// Funzioni di decodifica/calcolo
@ -2261,15 +2262,15 @@ bool TPrimanota_application::caus_query_handler(TMask_field& f, KEY key)
void TPrimanota_application::check_fppro_fields(TMask& m)
{
if (app().is_fp(&m))
if (app().has_f1_db(&m))
{
if (!TPro_msk::check_causale(m.get(F_CODCAUS)) && m.find_by_id(F_PROTFPPRO) != NULL)
if (!check_causale(m.get(F_CODCAUS)) && m.find_by_id(F_PROTFPPRO) != NULL)
{
m.hide(F_PROTFPPRO);
m.disable(DLG_LINK);
}
else
if (TPro_msk::check_causale(m.get(F_CODCAUS)) && m.find_by_id(F_PROTFPPRO) != NULL && m.field(F_PROTFPPRO).hidden())
if (check_causale(m.get(F_CODCAUS)) && m.find_by_id(F_PROTFPPRO) != NULL && m.field(F_PROTFPPRO).hidden())
{
m.show(F_PROTFPPRO);
m.enable(DLG_LINK);
@ -3006,7 +3007,8 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
const bool ic = ixc->active() && (alleg < 5 || alleg == 7) && paiv.full() && !m.get_bool(F_LIQDIFF);
ixc->set(ic ? "X" : "");
}
fppro_mask(f, key);
if(m.get(F_PROKEY).empty())
fppro_mask(f, key);
}
}
@ -3846,28 +3848,37 @@ bool TPrimanota_application::quadratura_handler(TMask_field& f, KEY key)
bool TPrimanota_application::fppro_mask(TMask_field& f, KEY key)
{
TMask& cg_msk = f.mask();
if (!app().get_isfp() || key != K_SPACE && key != K_TAB || !TPro_msk::check_causale(f.mask().get(F_CODCAUS)))
if (!app().get_isfp() || key != K_SPACE && key != K_TAB || !check_causale(f.mask().get(F_CODCAUS)))
return true;
auto msk = std::make_shared<TPro_msk>(cg_msk);
app()._pro_mask = msk;
//load_list(msk, key);
//if(load_fppro_mask(msk))
if (msk->load_fppro_mask(msk.get()))
{
msk->run();
// Riporto dati FPPRO su maschera Prima Nota
cg_msk.set(F_NUMDOCEXT, msk->get(F_NUMEROI));
cg_msk.set(F_NUMDOC, TString(msk->get(F_NUMEROI)).right(7));
cg_msk.set(F_DATADOC, msk->get(F_DATAI));
cg_msk.set(F_TOTALE, msk->get(F_TOTDOCI));
cg_msk.set(F_PROTFPPRO, msk->get(F_PROTFPPROI));
cg_msk.set(F_PROKEY, msk->get(F_FPPROKEYSI));
cg_msk.set(F_NUMDOCEXT, msk->get_numdoc());
cg_msk.set(F_NUMDOC, msk->get_numdoc().right(7));
cg_msk.set(F_DATADOC, msk->get_datadoc());
cg_msk.set(F_TOTALE, msk->get_totdoc());
//cg_msk.set(F_PROTFPPRO, msk->get_protocollo());
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;
}
bool TPrimanota_application::is_collegato(TMask_field& f)
{
TMask& cg_msk = f.mask();
const bool has_prokey = !cg_msk.get(F_PROKEY).empty();
f.set(has_prokey ? "X" : " ");
return has_prokey;
}
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
@ -3955,12 +3966,8 @@ bool TPro_msk::fppro_ok_handler(TMask_field& f, KEY k)
{
if(!loaded && *row->get(0) == 'X')
{
msk.set(F_NUMEROI, row->get(5));
msk.set(F_DATAI, row->get(3));
msk.set(F_TOTDOCI, row->get(4));
TString protocollo; protocollo << TDate(row->get(2)).year() << "-" << row->get(9) << "/" << row->get(10);
msk.set(F_PROTFPPROI, protocollo);
msk.set(F_FPPROKEYSI, row->get(11));
//TProtocollo protocollo(TDate(row->get(2)).year(), row->get(9), row->get(10));
app()._pro_mask->set_doc(row->get(5), row->get(3), row->get(4), "", row->get(11));
loaded = true;
ok = true;
break;
@ -3997,21 +4004,6 @@ bool TPro_msk::date_handler(TMask_field& f, KEY k)
return ok;
}
bool TPro_msk::check_causale(const TString& cod_caus)
{
bool nc = false;
bool nc_acq = false;
bool fa = false;
TCausale caus(cod_caus);
if ((nc = caus.tipo_doc() == "NC"))
nc_acq = caus.reg().tipo() == TIPO_REG_ACQ;
fa = caus.tipo_doc() == "FA";
return fa || nc && nc_acq;
}
void TPro_msk::fppro_selfatt() const
{
const TMask& mask = *this;
@ -4059,6 +4051,15 @@ bool TPro_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
return true;
}
void TPro_msk::set_doc(const char* numero, const char* datadoc, const char* totdoc, const char* protfppro, const char* fpprokeys)
{
_numero = numero;
_datadoc = datadoc;
_totdoc = totdoc;
_protfppro.sset(protfppro);
_fpprokeys = fpprokeys;
}
TString& TPro_msk::query_fppro(const TString& keyprginvio, const TString& keyheaderfatt, const TString& keybodyfatt,
const TString& where_str)
{
@ -4142,7 +4143,7 @@ void TPro_msk::abilita_piva(TMask* msk)
}
}
TPro_msk::TPro_msk(TMask& cg_msk) : TAutomask("cg2fppro"), _parent_mask(cg_msk)
TPro_msk::TPro_msk(TMask& cg_msk) : TAutomask("cg2fppro")
{
TMask::set_handler(DLG_CONFIG, fppro_handler);
TMask::set_handler(DLG_LINK, fppro_ok_handler);

View File

@ -34,8 +34,10 @@
#endif
#include <automask.h>
#include "../f1/f1lib.h"
#define TIPO_REG_ACQ 2
#define TIPO_REG_ACQ 2
#define K_ELIMMAS 0 // Key per eliminazione massima
class TPro_msk;
class TDati_mov_auto;
@ -96,6 +98,8 @@ class TPrimanota_application : public TRelation_application
TAssoc_array _colori; // Colori delle righe
bool _isfp;
shared_ptr<TPro_msk> _pro_mask;
friend class TPro_msk;
static bool showpartite_handler(TMask_field& f, KEY k);
static bool speserimb_handler(TMask_field& f, KEY k);
@ -180,6 +184,7 @@ class TPrimanota_application : public TRelation_application
// Handlers per aggancio FPPRO
// Bottone per maschera FPPRO
static bool fppro_mask(TMask_field& f, KEY key);
static bool is_collegato(TMask_field& f);
static void fppromask_set_handl(TMask* msk);
static void load_list(TMask* msk, KEY k);
@ -204,7 +209,7 @@ protected: // TApplication
bool save_dbmov() const;
// Pulisce il mov e db dai firerimenti FPPRO (in MODE_MOD per edit/delete)
void clean_fppro();
bool is_fp(TMask* m);
bool has_f1_db(TMask* m);
virtual bool save(bool check_dirty);
bool get_mask_swap_file(TFilename& name) const;
@ -376,7 +381,12 @@ public:
class TPro_msk : public TAutomask
{
TMask& _parent_mask;
TString _numero;
TDate _datadoc;
real _totdoc;
TProtocollo _protfppro;
TString _fpprokeys;
// Handlers per aggancio FPPRO
// Bottone carica documenti in maschera FPPRO
static bool fppro_handler(TMask_field& f, KEY k);
@ -388,6 +398,15 @@ class TPro_msk : public TAutomask
void fppro_selfatt() const;
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
public:
void set_doc(const char* numero, const char* datadoc, const char* totdoc, const char* protfppro, const char* fpprokeys);
TString get_numdoc() const { return _numero; }
TDate get_datadoc() const { return _datadoc; }
real get_totdoc() const { return _totdoc; }
TProtocollo& get_protocollo() { return _protfppro; }
TString get_fpprokeys() const { return _fpprokeys; }
static TString& query_fppro(const TString& keyprginvio, const TString& keyheaderfatt, const TString& keybodyfatt, const TString& where_str);
static TString& query_fppro(const TString& codforn, const TString& date);
static TString& query_fppro(const TString& stato_piva, const TString& piva, const TString& date);
@ -396,7 +415,6 @@ public:
//bool is_fp();
// Carica documenti FPPRO sulla maschera
static bool load_fppro_mask(TMask* msk, KEY k = 32);
static bool check_causale(const TString& cod_caus);
TPro_msk() = delete;
TPro_msk(TMask& cg_msk);
};

180
src/f1/f1lib.cpp Normal file
View File

@ -0,0 +1,180 @@
#include "f1lib.h"
#include "config.h"
#include "modaut.h"
#include "cg2103.h"
#include "cg2102.h"
#include "execp.h"
#include "cfven.h"
#include "../fp/fp0400a.h"
#include "reputils.h"
TString& TProtocollo::prot_in(const int year, const char* tipoprot, const char* progres)
{
static TString protocollo;
TString tipo(tipoprot);
if (tipo.empty())
tipo << "no_prot";
protocollo.cut(0) << year << "-" << tipo << "/" << progres;
return protocollo;
}
void TProtocollo::set(const TProtocollo prot)
{
_year = prot._year;
_tipoprot = prot._tipoprot;
_progres = prot._progres;
}
void TProtocollo::sset(const char* prot)
{
TToken_string tok(prot, '-');
_year = tok.get_int();
TToken_string p(tok.get(), '/');
_tipoprot = p.get();
_progres = p.get();
}
TString& TProtocollo::get_prot() const
{
return prot_in(_year, _tipoprot, _progres);
}
void set_ini_codcaus(const TString& codcaus, const bool nc)
{
ini_set_string(FILE_CONFIG, FILE_SECTION, nc? F1_CAUSNC : F1_CAUSFA, codcaus);
}
const char* get_ini_codcaus(const bool nc)
{
return ini_get_string(FILE_CONFIG, FILE_SECTION, nc ? F1_CAUSNC : F1_CAUSFA);
}
const char* get_codcaus(const char * tipodoc, const char* codcf)
{
TLocalisamfile cfven(LF_CFVEN);
cfven.put(CFV_TIPOCF, "F");
cfven.put(CFV_CODCF, codcf);
const char* codcaus = "";
const char* codcausnc = "";
const bool nc = TString(tipodoc) == "TD04";
if (cfven.read() == NOERR)
{
codcaus = cfven.get(CFV_CODCAUS);
codcausnc = cfven.get(CFV_CODCAUSNC);
}
if (nc)
{
if (!TString(codcausnc).empty())
return codcausnc;
}
else
{
if (!TString(codcaus).empty())
return codcaus;
}
return get_ini_codcaus(nc);
}
bool get_endatareg()
{
return ini_get_bool(FILE_CONFIG, FILE_SECTION, "endatareg");
}
TString get_datainireg()
{
return ini_get_string(FILE_CONFIG, FILE_SECTION, "datainireg");
}
TString get_dataendreg()
{
return ini_get_string(FILE_CONFIG, FILE_SECTION, "dataendreg");
}
void set_endatareg(bool enable)
{
ini_set_bool(FILE_CONFIG, FILE_SECTION, "endatareg", enable);
}
void set_datainireg(const TString& date)
{
ini_set_string(FILE_CONFIG, FILE_SECTION, "datainireg", date);
}
void set_dataendreg(const TString& date)
{
ini_set_string(FILE_CONFIG, FILE_SECTION, "dataendreg", date);
}
bool check_causale(const TString& cod_caus)
{
return check_causale(cod_caus, "FA") || check_causale(cod_caus, "NC");
}
bool check_causale(const TString& cod_caus, const TString& tipo_doc)
{
TCausale caus(cod_caus);
if(tipo_doc == "FA")
return caus.tipo_doc() == "FA";
if (tipo_doc == "NC")
{
bool nc;
bool nc_acq = false;
if ((nc = caus.tipo_doc() == "NC"))
nc_acq = caus.reg().tipo() == iva_acquisti;
return nc && nc_acq;
}
return false;
}
void run_cont_ini()
{
static TString run_string;
#ifdef DBG
run_string.cut(0) << "cg2 -0 -i" << F1_INIREGCONT << "*" << ".ini" << " /u" << user();
#else
run_string.cut(0) << "cg2 -0 -i" << TFilename().tempdir() << "\\" << F1_INIREGCONT << "*" << ".ini" << " /u" << user();
#endif
TExternal_app(run_string).run();
}
void TF1_log::log(int severity, const char* msg)
{
if (_log == nullptr)
{
_log = new TLog_report("Stato contabilizzazione:");
// Tento l'eliminazione del file
std::remove("f1_cg.log");
}
static TString txt;
txt.cut(0);
if (severity == LOG_MSG)
txt << "[message] : ";
else if(severity == LOG_WARN)
txt << "[warning] : ";
else if (severity == LOG_ERR)
txt << "[error] : ";
txt << msg;
_log->log(severity, txt);
// Scrivo anche su file
std::filebuf fb;
fb.open("f1_cg.log", std::ios::out | std::ios::app);
std::ostream os(&fb);
os << txt << std::endl;
fb.close();
}
bool TF1_log::show_log()
{
if (_log)
{
_log->preview();
delete _log;
_log = NULL;
}
return true;
}

73
src/f1/f1lib.h Normal file
View File

@ -0,0 +1,73 @@
#ifndef _F1LIBH_
#define _F1LIBH_
#include "strings.h"
#include "config.h"
#include "report.h"
#include "reputils.h"
#define FILE_CONFIG CONFIG_DITTA
#define FILE_SECTION "f1"
#define F1_CAUSFA "causfa"
#define F1_CAUSNC "causnc"
#define F1_INIREGCONT "cg2CONTAB"
#define LOG_MSG 0
#define LOG_WARN 1
#define LOG_ERR 2
enum err_cont
{
no_codcaus = -1,
no_selected = -2,
is_already_cont = -3,
is_ready = 0
};
class TProtocollo : TObject
{
int _year{};
TString _tipoprot;
TString _progres;
public:
TProtocollo() = default;
TProtocollo(const int year, const char* tipoprot, const char* progres): _year(year), _tipoprot(tipoprot), _progres(progres) { }
void set(TProtocollo prot);
void sset(const char* prot);
TString& get_prot() const;
int get_year() const { return _year; }
TString& get_tipoprot() { return _tipoprot; }
TString& get_progres() { return _progres; }
static TString& prot_in(int year, const char* tipoprot, const char* progres);
operator const char*() const { return static_cast<const char*>(get_prot()); }
};
class TF1_log : TObject
{
TLog_report* _log;
public:
TF1_log() : _log(nullptr){}
void log(int severity, const char* msg);
bool show_log();
};
void set_ini_codcaus(const TString& codcaus, bool nc = false);
const char* get_ini_codcaus(bool nc = false);
const char* get_codcaus(const char * tipodoc, const char* codcf);
bool get_endatareg();
TString get_datainireg();
TString get_dataendreg();
void set_endatareg(bool enable);
void set_datainireg(const TString& date);
void set_dataendreg(const TString& date);
// Controlla se il "cod_caus" e' per Fatture d'acquisto o Note Credito d'Acquisto
bool check_causale(const TString& cod_caus);
// Controlla se il "cod_caus" ha come "tipo_doc" FA o NC (di acquisto)
bool check_causale(const TString& cod_caus, const TString& tipo_doc);
void run_cont_ini();
#endif

View File

@ -1,18 +1,19 @@
/////////////////////////////////////////////////////////////////////////////////////
// TPassive_mask
/////////////////////////////////////////////////////////////////////////////////////
#include "defmask.h"
#include "automask.h"
#include "applicat.h"
#include <progind.h>
#include "tsdb.h"
#include "fp0400a.h"
#include "fplib.h"
#include "sheet.h"
#include "execp.h"
#include "dongle.h"
#include <map>
#include "../f1/f1lib.h"
#include "mov.h"
#define FILTER_NOASS ""
#define FILTER_ASS "E"
#define FILTER_ALL "A"
#define FILTER_CONT "C"
enum
{
@ -26,11 +27,18 @@ enum
};
enum { filtri = 0, elenco_fe = 1, elenco_err = 2 }; // Enum per bottoni toolbar (numero pagina in cui mi trovo)
/////////////////////////////////////////////////////////////////////////////////////
// TPassive_mask
/////////////////////////////////////////////////////////////////////////////////////
class TPassive_mask : public TAutomask
{
TLog_report* _log;
bool _f1;
protected:
bool _filter_changed;
TFilename tmp_dir;
TFilename _tmp_dir;
struct TForn_err
{
int forn_code;
@ -43,17 +51,29 @@ protected:
void select_all(int sheet_field);
// Tasto nuovo: apre nuovo fornitore valorizzando già i dati dalla fattura
void new_forn();
void new_forn();
// Tasto aggiorna: aggiorna cliente che non corrisponde.
void aggiorna_forn();
void salva_for() const;
void clean_cg0(const TString& filename) const;
void run_cg0(const TString& filename) const;
void aggiorna_forn();
void salva_for() const;
void clean_ini(const TString& filename) const;
void run_cg0(const TString& filename) const;
void elenco_prots_sel(TString& string) const;
// Gestione F1
int prepara_contab() const;
void log_contab();
void contabilizza();
TDate load_data() const;
// Handlers
static bool causfa_handler(TMask_field& f, KEY k);
static bool causnc_handler(TMask_field& f, KEY k);
void fattsel(int dlg, TField_event& e);
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
void check_buttons(int p);
void next_page(int p) override;
// Elenco dei protocolli selezionati
void elenco_prots_sel(TString& string) const;
void fill();
static int find_fornitore(TLocalisamfile& clifo);
static void add_row_err_forn(int forn_code, TSheet_field& sf_err, TString& denom);
@ -61,16 +81,11 @@ protected:
// Aggiunge i protocolli che sono già presenti per le fatture nel db alla tabellina per il filtro
void aggiungi_prot() const;
void init();
void load_all_fields();
public:
void save_all_fields() const;
TString& get_fattsel() const;
TPassive_mask() : TAutomask("fp0400a"), _filter_changed(true)
{
tmp_dir = tmp_dir.tempdir();
load_all_fields();
}
TPassive_mask(bool f1);
};
void TPassive_mask::set_filter_changed()
@ -80,7 +95,8 @@ void TPassive_mask::set_filter_changed()
void TPassive_mask::next_page(int p)
{
//if(true)
check_buttons(p);
if (_filter_changed && p != 1000)
{
fill();
@ -97,10 +113,24 @@ void TPassive_mask::fill()
TString prots_query;
TLocalisamfile clifo(LF_CLIFO);
const TDate dal = get(F_DATAINI);
const TDate al = get(F_DATAEND);
const TString& ordin = get(F_FATTORD);
const TString& verso_ord = get(F_VERSOORD);
TDate dal;
TDate al;
const TString& filter_elab = get_fattsel();
const TDate reg_dal(get(F_DATAINI));
const TDate reg_al(get(F_DATAEND));
const TString& ordin = get(F_FATTORD);
const TString& verso_ord = get(F_VERSOORD);
if(get_fattsel() == FILTER_CONT)
{
dal = "20010101";
al = TDate(TODAY);
}
else
{
dal = get(F_DATAINI);
al = get(F_DATAEND);
}
sf.hide();
sf.destroy();
@ -171,15 +201,19 @@ void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TShee
const TString& paa_piva = fp_db().sq_get("P_IVA");
const TString& paa_codpaese = fp_db().sq_get("COD_PAESE");
const TString& paa_codsdi = fp_db().sq_get("COD_SDI");
const TString& prot = fp_db().sq_get("TIPO_PROT");
const TDate& dataregcont = fp_db().sq_get_date("DATAREGCONT");
const TString& filter_elab = get(F_FATTSEL);
const TString& filter_elab = get_fattsel();
const bool is_contab = dataregcont != TDate("20010101");
clifo.zero();
clifo.put(CLI_TIPOCF, 'F');
const int forn_code = find_fornitore(clifo);
if( filter_elab.blank() && forn_code != 0 || filter_elab == "E" && forn_code == 0 || filter_elab == "A")
const bool data_range = dataregcont >= TDate(get(F_DATAINIREG)) && dataregcont <= TDate(get(F_DATAENDREG));
if( filter_elab.blank() && forn_code != 0 // Filtro sui non associati
|| filter_elab == FILTER_ASS && forn_code == 0 && !is_contab // Filtro sui associati e non contab.
|| filter_elab == FILTER_CONT && forn_code == 0 && is_contab && data_range // Filtro solo contabilizzati e data
|| filter_elab == FILTER_ALL) // Tutte
{
TToken_string& row = sf.row(-1);
if (denom.blank()) {
@ -228,7 +262,7 @@ void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TShee
row.add(fp_db().sq_get("ATTACHMENT") != "0" ? "" : "X");
row.add(paa_codsdi.blank() ? fp_db().sq_get("PEC") : paa_codsdi);
row.add(denom);
row.add(fp_db().sq_get("ANNO_PROT") << (prot.empty() ? "" : "-") << prot << "/" << fp_db().sq_get("NUM_PROT") << (prot.empty() ? " (no prot.)" : ""));
row.add(TProtocollo(fp_db().sq_get_int("ANNO_PROT"), fp_db().sq_get("TIPO_PROT"), fp_db().sq_get("NUM_PROT")));
TString key_prot; key_prot << fp_db().sq_get("KEYPROG") << ";" << fp_db().sq_get("KEYHEAD") << ";" << fp_db().sq_get("KEYFATT");
row.add(key_prot);
}
@ -283,13 +317,28 @@ void TPassive_mask::add_row_err_forn(const int forn_code, TSheet_field& sf_err,
}
}
TString& TPassive_mask::get_fattsel() const
{
static TString fattsel;
fattsel.cut(0);
if (get_bool(F_FORNOTASS))
return fattsel;
if (get_bool(F_FORASS))
return fattsel << FILTER_ASS;
if (get_bool(F_FORALL))
return fattsel << FILTER_ALL;
if (get_bool(F_CONTABIL))
return fattsel << FILTER_CONT;
return fattsel;
}
int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
{
TString paa_codfisc = fp_db().sq_get("COD_FISC");
const TString paa_piva = fp_db().sq_get("P_IVA");
TString paa_codpaese = fp_db().sq_get("COD_PAESE");
const TString fppro_tipocf = fp_db().sq_get("TIPO_CF");
TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
TString paa_codfisc = fp_db().sq_get("COD_FISC");
const TString paa_piva = fp_db().sq_get("P_IVA");
TString paa_codpaese = fp_db().sq_get("COD_PAESE");
const TString fppro_tipocf = fp_db().sq_get("TIPO_CF");
TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
// Cerco se il fornitore è presente in Campo
int found_clifo = -1;
@ -338,6 +387,23 @@ int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
clifo.put(CLI_COFI, paa_codfisc);
clifo.read() == NOERR ? found_clifo = 4 : found_clifo = -14; // Se il cod fisc corrisponde setto a 2
}
// Se lo trovo controllo che non abbia il flag di sospeso se no ricerco ancora
bool noerr = true;
if (found_clifo == 2)
{
while (clifo.get_bool(CLI_SOSPESO) && noerr && clifo.get(CLI_PAIV) == paa_piva)
noerr = clifo.next() == NOERR;
if (clifo.get_bool(CLI_SOSPESO) || !noerr || clifo.get(CLI_PAIV) != paa_piva)
found_clifo = -5;
}
else if (found_clifo == 4)
{
while (clifo.get_bool(CLI_SOSPESO) && noerr && clifo.get(CLI_COFI) == paa_codfisc)
noerr = clifo.next() == NOERR;
if (clifo.get_bool(CLI_SOSPESO) || !noerr || clifo.get(CLI_COFI) != paa_codfisc)
found_clifo = -14;
}
return found_clifo;
}
@ -347,11 +413,45 @@ void TPassive_mask::init()
aggiungi_prot();
}
void TPassive_mask::load_all_fields()
bool TPassive_mask::causfa_handler(TMask_field& f, KEY k)
{
if (k == K_TAB && f.focusdirty())
{
TMask& msk = f.mask();
const TString& codcaus = msk.get(F_CAUSFA);
if (!check_causale(codcaus, "FA"))
{
warning_box("Impossibile selezionare questa causale registrazione.\nPrego inserire una causale di Fattura Acquisti");
msk.field(F_CAUSFA).set("");
msk.field(F_DESCAUSFA).set("");
set_ini_codcaus("");
return false;
}
set_ini_codcaus(codcaus);
}
return true;
}
void TPassive_mask::select_all(int sheet_field)
bool TPassive_mask::causnc_handler(TMask_field& f, KEY k)
{
if (k == K_TAB && f.focusdirty())
{
TMask& msk = f.mask();
const TString& codcaus = msk.get(F_CAUSNC);
if (!check_causale(codcaus, "NC"))
{
warning_box("Impossibile selezionare questa causale registrazione.\nPrego inserire una causale di Nota Credito Acquisti.");
msk.field(F_CAUSNC).set("");
msk.field(F_DESCAUSNC).set("");
set_ini_codcaus("", true);
return false;
}
set_ini_codcaus(codcaus, true);
}
return true;
}
void TPassive_mask::select_all(const int sheet_field)
{
TSheet_field& docs = sfield(sheet_field);
TString_array& sht = docs.rows_array();
@ -370,7 +470,6 @@ void TPassive_mask::salva_for() const
{
if(fp_db().sq_is_connect())
{
TString q_update; // Query per update
TSheet_field& sf = sfield(F_DOCS);
TLocalisamfile clifo(LF_CLIFO); // Leggo in Campo per controllare che il codice cliente non sia errato
@ -379,7 +478,7 @@ void TPassive_mask::salva_for() const
if (row->starts_with("X") && strcmp(clifo.get(CLI_CODCF), "17") == 0)
bool simo = true;
TString cod_forn = row->get(sf.cid2index(S_FORNITORE));
if(row->starts_with("X") && cod_forn != "")
if(row->starts_with("X") && !cod_forn.empty())
{
clifo.zero();
clifo.setkey(1);
@ -387,11 +486,11 @@ void TPassive_mask::salva_for() const
clifo.put(CLI_CODCF, cod_forn);
if(clifo.read() == NOERR)
{
q_update = "";
TString q_update = "";
TToken_string key(row->get(sf.cid2index(S_PROKEY)), ';');
TString clifo_cofi = clifo.get(CLI_COFI);
TString clifo_paiv = clifo.get(CLI_PAIV);
if (clifo_cofi != "" && strcmp(row->get(sf.cid2index(S_CODFISC)), clifo_cofi) == 0 || clifo_paiv != "" && strcmp(row->get(sf.cid2index(S_PARIVA)), clifo_paiv) == 0)
const TString& clifo_cofi = clifo.get(CLI_COFI);
const TString& clifo_paiv = clifo.get(CLI_PAIV);
if (!clifo_cofi.empty() && strcmp(row->get(sf.cid2index(S_CODFISC)), clifo_cofi) == 0 || !clifo_paiv.empty() && strcmp(row->get(sf.cid2index(S_PARIVA)), clifo_paiv) == 0)
{
q_update << "UPDATE FPPRO00F SET PZ_TIPOCF = 'F', PZ_CLIFOR = '" << row->get(sf.cid2index(S_FORNITORE)) << "' WHERE PZ_KEYPRGINVIO = '" << key.get(0) << "' AND PZ_KEYHEADERFATT = '" << key.get(1) << "' AND PZ_KEYBODYFATT = '" << key.get(2) << "'";
fp_db().sq_set_exec(q_update, false);
@ -407,25 +506,188 @@ void TPassive_mask::salva_for() const
}
}
void TPassive_mask::clean_cg0(const TString& filename) const
void TPassive_mask::clean_ini(const TString& filename) const
{
static TString remove_string;
remove_string.cut(0) << tmp_dir << "\\" << filename << "*.*";
#ifdef DBG
remove_string.cut(0) << filename << "*.ini";
#else
remove_string.cut(0) << _tmp_dir << "\\" << filename << "*.*";
#endif
remove_files(remove_string, false);
}
void TPassive_mask::run_cg0(const TString& filename) const
{
static TString run_string;
run_string.cut(0) << "cg0 -1 -i" << tmp_dir << "\\" << filename << "*" << ".ini" << " /u" << user();
run_string.cut(0) << "cg0 -1 -i" << _tmp_dir << "\\" << filename << "*" << ".ini" << " /u" << user();
TExternal_app(run_string).run();
}
int TPassive_mask::prepara_contab() const
{
int n_sel = 0;
TSheet_field& sf = sfield(F_DOCS);
sf.hide();
clean_ini(F1_INIREGCONT);
FOR_EACH_SHEET_ROW(sf, n, row) {
if (row->starts_with("X"))
{
if(!TString(row->get(sf.cid2index(S_NUMREGCONT))).empty())
return n+1000;
TString codcaus(get_codcaus(row->get(2), row->get(10)));
if (codcaus.empty())
return no_codcaus;
n_sel++;
TString num; num.format("%04d", n);
TFilename newf_ini;
#ifndef DBG
newf_ini.tempdir() << "\\" << F1_INIREGCONT << num << ".ini";
#else
newf_ini << F1_INIREGCONT << num << ".ini";
#endif
TConfig contab_ini(newf_ini, "Transaction");
contab_ini.set("Action", "INSERT");
contab_ini.set_paragraph(LF_MOV); // [23]
contab_ini.set("CODCAUS", codcaus);
contab_ini.set("CODCF", row->get(sf.cid2index(S_FORNITORE)));
contab_ini.set("DATACOMP", TDate(TODAY));
contab_ini.set("DATADOC", row->get(sf.cid2index(S_DATADOC)));
contab_ini.set("NUMDOCEXT", row->get(sf.cid2index(S_NDOC)));
contab_ini.set("NUMDOC", TString(row->get(sf.cid2index(S_NDOC))).right(7));
contab_ini.set("TOTDOC", abs(real(row->get(sf.cid2index(S_TOTDOC)))).string());
contab_ini.set("KEYFPPRO", row->get(sf.cid2index(S_PROKEY)));
row->add("", 0);
}
}
sf.force_update();
sf.show();
if (n_sel == 0)
return no_selected;
return is_ready;
}
void TPassive_mask::log_contab()
{
TFilename cg_ini;
TString msg;
TF1_log log;
std::vector<TString> doc_saved, doc_canceled;
FOR_EACH_SHEET_ROW(sfield(F_DOCS), n, row)
{
TString num; num.format("%04d", n);
#ifdef DBG
cg_ini = TString(F1_INIREGCONT) << num << ".ini";
#else
cg_ini = TFilename().tempdir() << "\\" << TString(F1_INIREGCONT) << num << ".ini";
#endif
if(cg_ini.exist())
{
TConfig config(cg_ini, "Transaction");
TString numdoc;
if (config.get("Result") == "OK")
{
numdoc = config.get("NUMDOC", "23");
doc_saved.insert(doc_saved.end(), numdoc);
}
else if(config.get("Result") == "CANCEL")
{
numdoc = config.get("NUMDOC", "23");
doc_canceled.insert(doc_canceled.end(), numdoc);
}
}
}
const int elem_save = doc_saved.size();
const int elem_canc = doc_canceled.size();
if (elem_save > 0)
{
if (elem_save == 1)
msg << "Il documento n. '" << doc_saved[0] << "' e' stata registrato.";
else
msg << "Sono stati registrati " << elem_save << " documenti.";
if (elem_save > 1)
for (int i = 0; i < elem_save; i++)
msg << "\n - Documento n. '" << doc_saved[i] << "'";
log.log(LOG_MSG, msg);
}
if (elem_canc > 0)
{
msg.cut(0);
if (elem_canc == 1)
msg << "La registrazione del documento n. '" << doc_canceled[0] << "' e' stata annullata.";
else
msg << "Sono state annullate " << elem_canc << " registrazioni.";
if (elem_canc > 1)
for (int i = 0; i < elem_canc; i++)
msg << "\n - Documento n. '" << doc_canceled[i] << "'";
log.log(LOG_WARN, msg);
}
if (elem_save > 0 || elem_canc > 0)
log.show_log();
}
void TPassive_mask::contabilizza()
{
const int stato = prepara_contab();
switch(stato)
{
case is_ready:
run_cont_ini(); // Eseguo gli ini
log_contab(); // Mostro stato contabilizzate/annullate
clean_ini(F1_INIREGCONT);
fill(); // Ricarico sheet per togliere quelli contabilizzati
break;
case no_codcaus:
message_box("Attenzione, il fornitore non ha associato nessun codice causale predefinito.\nPrego selezionare un codice causale per la contabilizzazione.");
next_page(1000);
break;
case no_selected:
message_box("Selezionare almeno un documento.");
break;
default: break;
}
if(stato >= 1000)
{
TSheet_field& sf = sfield(F_DOCS);
TToken_string& row = sf.row(stato - 1000);
const TString ndoc = row.get_int(sf.cid2index(S_NDOC));
const TDate datadoc = row.get(sf.cid2index(S_DATADOC));
const int nreg = row.get_int(sf.cid2index(S_NUMREGCONT));
TString msg;
msg << "Attenzione il doc " << ndoc << " del " << datadoc << " e' gia' stato registrato con numero reg. " << nreg;
warning_box(msg);
fill();
}
}
TDate TPassive_mask::load_data() const
{
TString date; date << ini_get_string(CONFIG_DITTA, "fp", "dataini_fp04");
TDate start_date(TODAY);
if(!date.empty())
start_date = date;
else
start_date.set_day(1);
return start_date;
}
void TPassive_mask::new_forn()
{
TSheet_field& sf = sfield(F_ERR);
static const TString newf = "fpnewf";
clean_cg0(newf);
clean_ini(newf);
FOR_EACH_SHEET_ROW(sf, nr, row)
{
const TString denom = row->get(sf.cid2index(S_RAGSERR));
@ -478,7 +740,7 @@ void TPassive_mask::aggiorna_forn()
{
TSheet_field& sf = sfield(F_ERR);
static const TString newf = "fpaggf";
clean_cg0(newf);
clean_ini(newf);
FOR_EACH_SHEET_ROW(sf, nr, row)
{
const TString denom = row->get(sf.cid2index(S_RAGSERR));
@ -526,6 +788,28 @@ void TPassive_mask::aggiorna_forn()
}
void TPassive_mask::fattsel(const int dlg, TField_event& e)
{
if (e == fe_init)
{
set(F_FORNOTASS, "X");
set(F_FORASS, "");
set(F_FORALL, "");
set(F_CONTABIL, "");
}
else
{
set(F_FORNOTASS, dlg == F_FORNOTASS ? "X" : "");
set(F_FORASS, dlg == F_FORASS ? "X" : "");
set(F_FORALL, dlg == F_FORALL ? "X" : "");
set(F_CONTABIL, dlg == F_CONTABIL ? "X" : "");
}
field(F_DATAINI).enable(!get_bool(F_CONTABIL));
field(F_DATAEND).enable(!get_bool(F_CONTABIL));
field(F_DATAINIREG).enable(get_bool(F_CONTABIL));
field(F_DATAENDREG).enable(get_bool(F_CONTABIL));
}
bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
switch (o.dlg())
@ -538,6 +822,20 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
if(e == fe_init)
init();
break;
case F_DOCS:
if (e == se_query_modify)
break;
case DLG_USER:
if (e == fe_button && jolly > 0 && get_fattsel() == FILTER_CONT)
{
TSheet_field& sf = sfield(F_DOCS);
TToken_string& row = sf.row(sf.selected());
TRectype mov(LF_MOV);
mov.put(MOV_NUMREG, row.get(sf.cid2index(S_NUMREGCONT)));
if (mov.edit())
fill();
}
break;
case DLG_ALL:
if (e == fe_button)
switch (curr_page())
@ -570,15 +868,13 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
if (curr_page() == elenco_err)
aggiorna_forn();
break;
case DLG_EXPORT:
if (e == fe_button && curr_page() == elenco_fe)
contabilizza();
break;
case F_DATAINI:
if (e == fe_init)
{
TDate inizio_mese = TDate(TODAY); inizio_mese.set_day(1);
o.set(inizio_mese);
//o.set(ini_get_string(CONFIG_DITTA, "fp", "LastXML", "01-01-2019"));
}
//else if (e == fe_close)
// ini_set_string(CONFIG_DITTA, "fp", "LastXML", o.get());
if (e == fe_init)
o.set(load_data());
break;
case F_DATAEND:
if (e == fe_init)
@ -586,6 +882,9 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
break;
default: break;
}
if (o.dlg() >= F_FORNOTASS && o.dlg() <= F_CONTABIL)
if (e == fe_modify || e == fe_init)
fattsel(o.dlg(), e);
if ((e == fe_modify || e >= se_enter) && jolly == 0)
if (o.dlg() >= START_MASK && o.dlg() <= END_MASK || o.dlg() == F_PROT)
set_filter_changed();
@ -593,6 +892,32 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
return true;
}
void TPassive_mask::check_buttons(const int p)
{
const TString& fattsel = get_fattsel();
const bool err_forn = fattsel.empty() || fattsel == FILTER_ALL;
field(DLG_EXPORT).enable((curr_page() + p == 1 || p == 1001) && _f1 && fattsel != FILTER_CONT);
field(DLG_SAVEREC).enable((curr_page() + p == 1 || p == 1001) && (fattsel.empty() || fattsel == FILTER_ASS));
if (p >= 1000)
{
field(DLG_NEWREC).enable(p == 1002 && err_forn);
field(DLG_RECALC).enable(p == 1002 && err_forn);
}
else
{
field(DLG_NEWREC).enable((curr_page() + p == 2 || curr_page() + p == 3) && err_forn);
field(DLG_RECALC).enable((curr_page() + p == 2 || curr_page() + p == 3) && err_forn);
}
}
TPassive_mask::TPassive_mask(bool f1) : TAutomask("fp0400a"), _f1(f1), _filter_changed(true)
{
_tmp_dir = _tmp_dir.tempdir();
TMask::set_handler(F_CAUSFA, causfa_handler);
TMask::set_handler(F_CAUSNC, causnc_handler);
}
/////////////////////////////////////////////////////////////////////////////////////
// TPassive_app
@ -600,18 +925,63 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
class TPassive_app : public TSkeleton_application
{
void load_mask(const TPassive_mask& mask) const;
bool check_f1() const;
void save_field(const TPassive_mask& mask);
public:
void main_loop() override;
TPassive_app() = default;
};
void TPassive_app::load_mask(const TPassive_mask& mask) const
{
if (check_f1())
{
mask.field(F_CAUSFA).set(get_ini_codcaus());
mask.field(F_CAUSNC).set(get_ini_codcaus(true));
mask.field(F_DATAINIREG).enable(mask.get_fattsel() == FILTER_CONT);
mask.field(F_DATAINIREG).set(get_datainireg());
if(mask.field(F_DATAINIREG).get().empty())
{
TDate start(TODAY);
start.set_day(1);
mask.field(F_DATAINIREG).set(start);
}
mask.field(F_DATAENDREG).enable(mask.get_fattsel() == FILTER_CONT);
mask.field(F_DATAENDREG).set(TDate(TODAY));
}
else
{
mask.field(F_GROUPCON).hide();
mask.field(F_GROUPCAU).hide();
}
}
bool TPassive_app::check_f1() const
{
return has_module(F1AUT);
}
void TPassive_app::save_field(const TPassive_mask& mask)
{
if (check_f1())
{
set_ini_codcaus(mask.get(F_CAUSFA));
set_datainireg(mask.get(F_DATAINIREG));
}
ini_set_string(CONFIG_DITTA, "fp", "dataini_fp04", mask.get(F_DATAINI));
}
void TPassive_app::main_loop()
{
TPassive_mask mask;
TPassive_mask mask(check_f1());
load_mask(mask);
while(mask.run() == K_ENTER)
{
}
save_field(mask);
}
int fp0400(int argc, char * argv[])

View File

@ -1,15 +1,26 @@
#define START_MASK 501
#define F_DATAINI 501
#define F_DATAEND 502
#define F_SAVEFOR 503
#define F_FATTSEL 504
#define F_FATTORD 505
#define F_VERSOORD 506
#define F_FORNOTASS 501
#define F_FORASS 502
#define F_FORALL 503
#define F_CONTABIL 504
#define F_DATAINI 505
#define F_DATAEND 506
#define F_DATAINIREG 507
#define F_DATAENDREG 508
#define F_FATTORD 510
#define F_VERSOORD 511
#define F_CAUSFA 512
#define F_DESCAUSFA 513
#define F_CAUSNC 514
#define F_DESCAUSNC 515
#define F_GROUPCON 516
#define F_GROUPCAU 517
#define END_MASK 599
#define F_PROT 401
#define S_SELCODPROT 101
#define S_CODPROT 102

View File

@ -28,38 +28,82 @@ BEGIN
PICTURE BMP_RECALC
END
BUTTON DLG_EXPORT 10 2
BEGIN
PROMPT 4 1 "Contabilizzaz."
PICTURE TOOL_EXPORT
END
#include <helpbar.h>
ENDPAGE
PAGE "Fatture Passive" 0 2 0 0
GROUPBOX DLG_NULL 30 7
BEGIN
PROMPT 0 1 "@BFornitori"
END
BOOLEAN F_FORNOTASS
BEGIN
PROMPT 1 2 "Non Associati"
END
BOOLEAN F_FORASS
BEGIN
PROMPT 1 3 "Associati"
END
BOOLEAN F_FORALL
BEGIN
PROMPT 1 4 "Tutti"
END
DATE F_DATAINI
BEGIN
PROMPT 1 1 "Data iniziale"
PROMPT 1 5 "Data iniziale"
CHECKTYPE REQUIRED
END
DATE F_DATAEND
BEGIN
PROMPT 50 1 "Data finale "
PROMPT 1 6 "Data finale "
VALIDATE DATE_CMP_FUNC >= F_DATAINI
WARNING "La data finale non può essere minore della data iniziale"
CHECKTYPE REQUIRED
END
RADIOBUTTON F_FATTSEL 3 80
GROUPBOX F_GROUPCON 30 5
BEGIN
PROMPT 1 2 "Fatture da visualizzare"
ITEM "|Non elaborate"
ITEM "E|Elaborate"
ITEM "A|Tutte"
FLAGS "Z"
PROMPT 0 10 "@BContabilita'"
END
BOOLEAN F_CONTABIL
BEGIN
PROMPT 1 11 "Contabilizzate"
MODULE F1
END
DATE F_DATAINIREG
BEGIN
PROMPT 1 12 "Data iniziale"
CHECKTYPE REQUIRED
MODULE F1
END
DATE F_DATAENDREG
BEGIN
PROMPT 1 13 "Data finale "
VALIDATE DATE_CMP_FUNC >= F_DATAINIREG
WARNING "La data finale non può essere minore della data iniziale"
CHECKTYPE REQUIRED
MODULE F1
END
RADIOBUTTON F_FATTORD 20 20
BEGIN
PROMPT 1 5 "Ordinamento fatture per "
PROMPT 31 1 "Ordinamento fatture per "
ITEM "|Data Ricezione"
ITEM "D|Data Documento"
FLAGS ""
@ -67,19 +111,108 @@ END
RADIOBUTTON F_VERSOORD 20 20
BEGIN
PROMPT 25 5 "Ordinamento:"
PROMPT 52 1 "Ordinamento:"
ITEM "|Decrescente"
ITEM "C|Crescente"
FLAGS ""
END
SPREADSHEET F_PROT 25 10
SPREADSHEET F_PROT 25 4
BEGIN
PROMPT 1 10 "Selezionare o aggiungere un filtro sul Tipo Progressivo"
PROMPT 31 5 "Selezionare o aggiungere un filtro sul Tipo Progressivo"
ITEM "@1"
ITEM "Codice\nProtocol.@12"
END
GROUPBOX F_GROUPCAU 59 7
BEGIN
PROMPT 31 10 "@BSelezionare Causale per Registrazione Contabile:"
END
STRING F_CAUSFA 3
BEGIN
PROMPT 32 11 "Causale per Fattura Acquisti (FA) "
FLAGS "UZ"
FIELD CODCAUS
USE LF_CAUSALI
INPUT CODCAUS F_CAUSFA
DISPLAY "Codice" CODCAUS
DISPLAY "Descrizione@50" DESCR
DISPLAY "Tipo" TIPODOC
DISPLAY "Registro" REG
DISPLAY "SC" TIPOMOV
DISPLAY "CA" MOVIND
DISPLAY "CE" COLLCESP
DISPLAY "770" M770
OUTPUT F_CAUSFA CODCAUS
OUTPUT F_DESCAUSFA DESCR
ADD RUN cg0 -4
CHECKTYPE NORMAL
WARNING "Causale assente"
MODULE F1
END
STRING F_DESCAUSFA 50
BEGIN
PROMPT 32 12 ""
USE LF_CAUSALI KEY 2
CHECKTYPE NORMAL
INPUT DESCR F_DESCAUSFA
DISPLAY "Descrizione@50" DESCR
DISPLAY "Codice" CODCAUS
DISPLAY "Tipo" TIPODOC
DISPLAY "Registro" REG
DISPLAY "SC" TIPOMOV
DISPLAY "CA" MOVIND
DISPLAY "CE" COLLCESP
DISPLAY "770" M770
COPY OUTPUT F_CAUSFA
ADD RUN cg0 -4
MODULE F1
END
STRING F_CAUSNC 3
BEGIN
PROMPT 32 13 "Causale per Nota Credito Acquisti [TD04]"
FLAGS "UZ"
FIELD CODCAUS
USE LF_CAUSALI
INPUT CODCAUS F_CAUSNC
DISPLAY "Codice" CODCAUS
DISPLAY "Descrizione@50" DESCR
DISPLAY "Tipo" TIPODOC
DISPLAY "Registro" REG
DISPLAY "SC" TIPOMOV
DISPLAY "CA" MOVIND
DISPLAY "CE" COLLCESP
DISPLAY "770" M770
OUTPUT F_CAUSNC CODCAUS
OUTPUT F_DESCAUSNC DESCR
ADD RUN cg0 -4
CHECKTYPE NORMAL
WARNING "Causale assente"
MODULE F1
END
STRING F_DESCAUSNC 50
BEGIN
PROMPT 32 14 ""
USE LF_CAUSALI KEY 2
CHECKTYPE NORMAL
INPUT DESCR F_DESCAUSNC
DISPLAY "Descrizione@50" DESCR
DISPLAY "Codice" CODCAUS
DISPLAY "Tipo" TIPODOC
DISPLAY "Registro" REG
DISPLAY "SC" TIPOMOV
DISPLAY "CA" MOVIND
DISPLAY "CE" COLLCESP
DISPLAY "770" M770
COPY OUTPUT F_CAUSNC
ADD RUN cg0 -4
MODULE F1
END
ENDPAGE
PAGE "Elenco Fatture" 0 2 0 0

View File

@ -615,7 +615,7 @@ static bool is_sirio_station(const char* hostname)
"SPOCK", // Alessandro ?
"ARCHIMEDE", // Alessandro
"SIRIOCOMP",
"NBK_SPALACINO_ACERW10", // Simone
"NBK_SPALACINO_A", // Simone
NULL
};
for (int i = 0; ranger[i]; i++)