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

This commit is contained in:
Mattia Tollari 2019-06-11 11:13:05 +02:00
commit 398b77ac67
49 changed files with 1772 additions and 211 deletions

View File

@ -64,7 +64,7 @@
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\src\include;..\src\xvaga;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\src\include;..\src\xvaga;..\src\xvtdb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -114,7 +114,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\src\include;..\src\xvaga;..\src\xvtdb;..\src\cg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\src\include;..\src\xvaga;..\src\xvtdb;..\src\xvtdb;..\src\cg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;__LONGDOUBLE__;_WINDOWS;__LONGDOUBLE__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@ -214,6 +214,7 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\src\cg\cg2300.cpp" />
<ClCompile Include="..\src\cg\cglib01.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -271,6 +272,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</MskCompiler>
<MskCompiler Include="..\src\cg\cg2200a.uml" />
<MskCompiler Include="..\src\cg\cg2300a.uml" />
<MskCompiler Include="..\src\cg\cg2FPPRO.uml" />
</ItemGroup>
<ItemGroup>
@ -286,6 +288,7 @@
<ClInclude Include="..\src\cg\cg2107.h" />
<ClInclude Include="..\src\cg\cg21sld.h" />
<ClInclude Include="..\src\cg\cg2200.h" />
<ClInclude Include="..\src\cg\cg2300a.h" />
<ClInclude Include="..\src\cg\cgFPPRO.h" />
<ClInclude Include="..\src\cg\cglib01.h" />
<ClInclude Include="..\src\cg\cglib02.h" />

View File

@ -72,6 +72,9 @@
<ClCompile Include="..\src\in\inlib01.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cg2300.cpp">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<MskCompiler Include="..\src\cg\cg2100a.uml">
@ -125,6 +128,9 @@
<MskCompiler Include="..\src\cg\cg2FPPRO.uml">
<Filter>Masks</Filter>
</MskCompiler>
<MskCompiler Include="..\src\cg\cg2300a.uml">
<Filter>Masks</Filter>
</MskCompiler>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\cg\cg2.h">
@ -175,6 +181,9 @@
<ClInclude Include="..\src\cg\cgFPPRO.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\src\cg\cg2300a.h">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="campo.rc" />

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>-0 /uADMIN</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>-2 /uADMIN</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>

View File

@ -236,6 +236,9 @@
<SqlCompiler Include="..\src\fp\sql\fp0106.sql">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</SqlCompiler>
<SqlCompiler Include="..\src\fp\sql\fp0108.sql">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</SqlCompiler>
</ItemGroup>
<ItemGroup>
<SqlCompiler Include="..\src\fp\sql\fp0102.sql">

View File

@ -111,6 +111,9 @@
<SqlCompiler Include="..\src\fp\sql\fp0106.sql">
<Filter>Sqls</Filter>
</SqlCompiler>
<SqlCompiler Include="..\src\fp\sql\fp0108.sql">
<Filter>Sqls</Filter>
</SqlCompiler>
</ItemGroup>
<ItemGroup>
<Library Include="..\lib\fplib.lib">

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

@ -0,0 +1,4 @@
cg5.exe
- Disabilitato il campo credito utilizzato in IVA se il periodo è a credito
- Risolta Issue #40

93
cd/test/cg0806a.ini Normal file
View File

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

BIN
cd/test/cg0806a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,7 @@
cg2.exe
Corretto salvataggio movimenti: ora si puo' salvare anche uscendo o annullando
Tolto controllo se F8: inutile basta avere fp e f1
Corretto flag registrazione collegata a fppro quando apro da monito passive
Cambiato messaggio in registrazione quando si modifica una registrazione gia' collegata a fppro
Aggiunto controllo data inizio fatturazione nell'handler del campo DATAREG

94
cd/test/cg0808a.ini Normal file
View File

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

BIN
cd/test/cg0808a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
cg2300a.msk
cg2.exe
Aggiunto programma per riepilogo delle registrazioni con competenza al mese precedente (manca punto dal menu)
cg2.exe -2 /uADMIN per eseguirlo

95
cd/test/cg0812a.ini Normal file
View File

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

BIN
cd/test/cg0812a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
cgmenu.men
cg2.exe
cg2300a.msk
Aggiunto programma per riepilogo delle registrazioni con competenza al mese precedente

100
cd/test/cg0814a.ini Normal file
View File

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

BIN
cd/test/cg0814a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
cg2.exe
Corretto salvataggio quando si esce o si annulla e si conferma lo stesso la registrazione

94
cd/test/cg0816a.ini Normal file
View File

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

BIN
cd/test/cg0816a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,8 @@
cg2100c.msk
cg2.exe
cg2300a.msk
Correzione inserimento scadenze con protoc. ini
Modificate posizioni campi prima nota
Correzione maschera cg2300a per compatibilita' con schermi piu' piccoli
Visualizzate solo registrazioni con flag liq. mese prec.

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

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

BIN
cd/test/cg0820a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
fp0.exe
fp0400a.msk
Corretto salvataggio data inizio fatturazione: salvava un booleano invece della data (?!)
Cambiato titolo groupbox valodi default contabilizzazione

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

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

BIN
cd/test/fp0808a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
ve2400.msk
- Risolta Issue #39

129
cd/test/ve0806a.ini Normal file
View File

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

BIN
cd/test/ve0806a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
ve6.exe
ve0.exe
Nel caso di numero partita dal numero documento di riferimento è stato aggiunto il controllo che il fornitore sia lo stesso
quando cerca il documento di riferimento sui documenti.

130
cd/test/ve0818a.ini Normal file
View File

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

BIN
cd/test/ve0818a1.zip Normal file

Binary file not shown.

View File

@ -9,10 +9,9 @@ int main(int argc,char** argv)
switch(n)
{
case 1:
cg2200(argc, argv); break;
default:
cg2100(argc, argv); break;
case 1: cg2200(argc, argv); break;
case 2: cg2300(argc, argv); break;
default: cg2100(argc, argv); break;
}
return 0;
}

View File

@ -3,5 +3,6 @@
int cg2100(int argc, char** argv);
int cg2200(int argc, char** argv);
int cg2300(int argc, char** argv);
#endif // __CG2_H

View File

@ -1255,7 +1255,6 @@ int TPrimanota_application::read(TMask& m)
return _rel->status();
}
// Trasferisce i dati da maschera a movimento di prima nota
void TPrimanota_application::mask2rel(const TMask& m)
{
@ -1446,6 +1445,13 @@ void TPrimanota_application::check_saldi()
}
}
void TPrimanota_application::write_fppro()
{
// Controllo se la registrazione ha avuto effetto anche su FPPRO allora salvo riferimento sul mov
if (save_fppro() > 0 && !save_dbmov())
message_box(TString("ATTENZIONE:") << " non è stato possibile salvare i riferimenti del documento in ingresso per questo movimento.\n" <<
"Movimento registrato senza collegamento ai documenti in ingresso.");
}
int TPrimanota_application::write(const TMask& m)
{
@ -1470,6 +1476,8 @@ int TPrimanota_application::write(const TMask& m)
const int err = _rel->write(true);
if (err == NOERR)
{
write_fppro();
_saldi.registra();
check_saldi();
@ -1558,6 +1566,8 @@ int TPrimanota_application::rewrite(const TMask& m)
const int err = _rel->rewrite(true);
if (err == NOERR)
{
write_fppro();
_saldi.registra();
check_saldi();
@ -1602,10 +1612,10 @@ void TPrimanota_application::clean_fppro()
TMask& msk = curr_mask();
const KEY last_key = msk.last_key();
// Controlli: solo in mod modifica; che abbia fp (no F8); che non sono in salvataggio
// Controlli: solo in mod modifica; che abbia fp-f1 (no F8); che non sono in salvataggio
if (_mode != MODE_MOD
|| !has_f1_db(&msk)
|| last_key != K_DEL && last_key != K_SAVE && last_key != K_ELIMMAS)
|| last_key != K_DEL && last_key != K_SAVE && last_key != K_ELIMMAS && last_key != K_QUIT)
return;
const TString& numreg = msk.get(F_NUMREG);
@ -1624,7 +1634,7 @@ void TPrimanota_application::set_has_f1_db(TMask* m)
if (m->find_by_id(F_DATAREG) != NULL && !m->get(F_DATAREG).empty())
{
if (TDate(m->get(F_DATAREG)) >= TDate(fp_settings().get_data_start_fatt()))
_isfp = has_module(F1AUT) && !fp_settings().get_db_indirizzo().empty() && !fp_settings().is_f8();
_isfp = has_module(F1AUT) && !fp_settings().get_db_indirizzo().empty();
else
_isfp = false;
_is_set_fpcheck = true;
@ -2206,7 +2216,8 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
const int start_items = pag.items();
msk.reset(FS_RECALC); // Disabilita ricalcolo automatico
for (int i = 0; ini.set_paragraph(format("%d,%d", LF_SCADENZE, i + 1)); i++)
int i;
for (i = 0; ini.set_paragraph(format("%d,%d", LF_SCADENZE, i + 1)); i++)
{
TToken_string& row = pag.row(i);
if (i >= start_items)
@ -2216,14 +2227,6 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
add_not_empty(row, 0, ini, SCAD_DATASCAD);
add_not_empty(row, 1, ini, SCAD_IMPORTO);
add_not_empty(row, 2, ini, SCAD_IMPORTOVAL);
// pag_notify(pag, i, K_ENTER);
}
int i;
for (i = 0; i < pag.items(); i++)
{
TToken_string& row = pag.row(i);
row.add(msk.get(FS_NSABI), 7);
row.add(msk.get(FS_NSCAB), 8);
row.add(msk.get(FS_VSABI), 9);
@ -2254,12 +2257,15 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
}
}
if (_f1_ini && msk.find_by_id(FS_RECALC) != NULL)
{
msk.set(F_COLFPPRO, "X");
msk.set(FS_RECALC, "");
}
if (_f1_liq && msk.find_by_id(F_DIFFERITA) != NULL)
{
TDate datadoc(msk.get(F_DATADOC)); datadoc.set_day(1);
TDate datareg(msk.get(F_DATAREG)); datareg.set_day(1);
if(datadoc < datareg)
if(datadoc < datareg && (double)datadoc.year() == real(msk.get(F_ANNOIVA)))
msk.set(F_DIFFERITA, "X");
}
}
@ -2271,18 +2277,8 @@ bool TPrimanota_application::save(bool check_dirty)
_swap_mask = false;
return true;
}
const int fp_code = save_fppro();
const bool saved = TRelation_application::save(check_dirty);
// Controllo se la registrazione ha avuto effetto anche su FPPRO allora salvo riferimento sul mov
if (saved)
{
if(fp_code > 0 && !save_dbmov())
message_box(TString("ATTENZIONE:") << " non è stato possibile salvare i riferimenti del documento in ingresso per questo movimento.\n" <<
"Movimento registrato senza collegamento ai documenti in ingresso.");
}
return saved;
return TRelation_application::save(check_dirty);
}
void TPrimanota_application::dump_rec(TConfig & ini, const TRectype & rec, int row, int pref)
@ -2410,13 +2406,12 @@ int TPrimanota_application::save_fppro()
}
// Anzitutto guardo la modalita' in cui sono
// Se in modalita' inserimento continuo normalmente
// Se in modalita' inserimento continuo normalmente o in mod. modifica
// Guardo se quel documento corrisponde a un doc in FPPRO
// Lancio messaggio di avvertimento pulisco su db e proseguo col salvataggio del documento modificato
if (_mode != MODE_INS)
{
// Se in modalita' modifica e sto salvando
// Guardo se quel documento corrisponde a un doc in FPPRO
// Lancio messaggio di avvertimento pulisco su db e proseguo col salvataggio del documento modificato
if(_mode == MODE_MOD && last == K_SAVE)
if(_mode == MODE_MOD)
{
TString query;
query << "SELECT COUNT(*) AS COUNT FROM FPPRO00F WHERE PZ_NUMREGCONT = '" << msk.get(F_NUMREG) << "'";
@ -2424,34 +2419,26 @@ int TPrimanota_application::save_fppro()
if (fp_db().sq_get_int("COUNT") != 0)
{
message_box(TString("Attenzione!") << " E' stato modificato un movimento già collegato a un documento in ingresso.");
clean_fppro(); // Pulisco db
save_dbmov(); // Svuoto riferimento doc ingresso sul mov
clean_fppro(); // Pulisco db
save_dbmov(true); // Svuoto riferimento doc ingresso sul mov
}
}
// In altre modalita' esco senza fare nulla sul db
else return pro_notsaved;
else return pro_notsaved; // In altre modalita' esco senza fare nulla sul db
}
// Controllo che sto registrando un documento FA Fattura di Acquisto o NC Acquisto
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.");
return pro_notsaved;
}
const TDate data_operazione(msk.get(F_DATAREG));
const TDate data_documento(msk.get(F_DATADOC));
const TString& numero_docext = msk.get(F_NUMDOCEXT);
const TString& numero_doc = msk.get(F_NUMDOC);
const TString& codforn = msk.get(F_CODCLIFOR);
const TString& stato_piva = msk.get(F_STATOPAIV);
const TString& piva = msk.get(F_PIVA);
const TString& tot_doc = msk.get(F_TOTALE);
TToken_string fppro_keys(msk.get(F_PROKEY), ';');
const TString& keyprginvio = fppro_keys.get();
const TString& keyheaderfatt = fppro_keys.get();
const TString& keybodyfatt = fppro_keys.get();
const TDate data_operazione(msk.get(F_DATAREG));
const TDate data_documento(msk.get(F_DATADOC));
const TString& numero_docext = msk.get(F_NUMDOCEXT);
const TString& numero_doc = msk.get(F_NUMDOC);
const TString& tot_doc = msk.get(F_TOTALE);
TToken_string fppro_keys(msk.get(F_PROKEY), ';');
const TString& keyprginvio = fppro_keys.get();
const TString& keyheaderfatt = fppro_keys.get();
const TString& keybodyfatt = fppro_keys.get();
TString where_str;
where_str << " (PZ_DATA = \'" << data_documento.date2ansi() << "\' AND PQ_IMPTOTDOC = \'" << tot_doc << "\' AND PZ_NUMERO = \'" << (!numero_docext.empty() ? numero_docext : numero_doc) << "\') ";
@ -2461,17 +2448,21 @@ int TPrimanota_application::save_fppro()
const int n = fp_db().sq_items();
if (n != 1)
{
warning_box(TString("Attenzione, ") << "al movimento non è stato abbinato nessun documento elettronico.\n" <<
"Per consentire una corretta archiviazione sostitutiva si consiglia di non confermare la registrazione e di procedere\n" <<
"all'identificazione del fornitore tramite il monitor fatture passive.\n" <<
warning_box(TString("Attenzione, ") << "al movimento non è stato abbinato nessun documento elettronico.\n" <<
"Per consentire una corretta archiviazione sostitutiva si consiglia di non confermare la registrazione e di procedere\n" <<
"all'identificazione del fornitore tramite il monitor fatture passive.\n" <<
"In caso di documento escluso dalla fatturazione elettronica ignorate questo messaggio.");
return pro_notsaved;
}
const int numreg = fp_db().sq_get_int("PZ_NUMREGCONT");
if (numreg != 0)
{
error_box(TString("Il documento ") << data_documento.year() << " / " << numero_doc << " è già stato inserito con la registrazione numero " << numreg << "\nSalvataggio su protocollo in ingresso impossibile.");
return pro_notsaved;
const bool key = noyes_box(
TString("Il documento ") << data_documento.year() << " / " << numero_doc <<
" è già stato inserito con la registrazione numero " << numreg <<
"\nSi desidera continuare comunque?");
if(!key)
return pro_notsaved;
}
// Devo controllare che la data operazione sia maggiore della data ric
@ -2497,7 +2488,7 @@ int TPrimanota_application::save_fppro()
return saved? pro_noerr : pro_notsaved;
}
bool TPrimanota_application::save_dbmov() const
bool TPrimanota_application::save_dbmov(bool clean) const
{
const TMask& msk = curr_mask();
const TString& numreg = msk.get(H_NUMREG);
@ -2508,7 +2499,7 @@ bool TPrimanota_application::save_dbmov() const
bool ok = mov.read() == NOERR;
if (ok)
{
mov.put(MOV_KEYFPPRO, keyfppro);
mov.put(MOV_KEYFPPRO, !clean ? keyfppro : "");
ok = mov.rewrite() == NOERR;
}
return ok;

View File

@ -611,13 +611,13 @@ END
BOOLEAN F_COLFPPRO
BEGIN
PROMPT 1 18 "Registrazione collegata a FPPRO"
PROMPT 1 20 "Registrazione collegata a FPPRO"
FLAGS "D"
END
STRING F_PROKEY 80
BEGIN
PROMPT 1 18 "db key"
PROMPT 1 19 "db key"
HELP "Chiave database"
FIELD KEYFPPRO
FLAGS "H"

View File

@ -2262,10 +2262,13 @@ bool TPrimanota_application::caus_query_handler(TMask_field& f, KEY key)
void TPrimanota_application::check_fppro_fields(TMask& m)
{
if (!check_causale(m.get(F_CODCAUS)) || !app().has_f1_db(&m))
const bool after_data = TDate(m.get(F_DATAREG)) >= TDate(fp_settings().get_data_start_fatt());
if (!check_causale(m.get(F_CODCAUS)) || !app().has_f1_db(&m) || !after_data)
{
if(m.find_by_id(DLG_LINK) != NULL)
m.disable(DLG_LINK);
if (m.find_by_id(F_COLFPPRO) != NULL)
m.hide(F_COLFPPRO);
}
else
{
@ -3977,7 +3980,7 @@ bool TPro_msk::fppro_ok_handler(TMask_field& f, KEY k)
sf.force_update();
if(!ok)
message_box("Nessun documento selezionato.");
msk.stop_run(20334);
msk.stop_run(K_QUIT);
return true;
}

View File

@ -208,21 +208,26 @@ protected: // TApplication
virtual void mask2ini(const TMask& msk, TConfig& ini);
// Metodi per aggancio FPPRO (solo su operazioni di Fattura di Acquisto)
// Metodo chiamato dalla write e rewrite per salvare su db fatt.
void write_fppro();
// Salvo dati fornitore e registrazione contabile sul db FPPRO
int save_fppro();
// Salva sul movimento il riferimento al documento in FPPRO
bool save_dbmov() const;
// Salva sul movimento il riferimento al documento in FPPRO (keys)
bool save_dbmov(bool clean = false) const;
// Pulisce il mov e db dai firerimenti FPPRO (in MODE_MOD per edit/delete)
void clean_fppro();
// setta variabili prima del controllo has_f1_db
void set_has_f1_db(TMask* m);
bool has_f1_db(TMask* m);
virtual bool save(bool check_dirty);
bool get_mask_swap_file(TFilename& name) const;
bool force_mask_swap(const TCausale& old_caus, const TCausale& new_caus);
protected: // TRelation_application
void check_f1_ini();
void check_f1_ini(); // setto variabili se ho f1 o liq nei parametri (ini da fp)
virtual bool user_create();
virtual bool user_destroy();
virtual bool changing_mask(int mode);

288
src/cg/cg2300.cpp Normal file
View File

@ -0,0 +1,288 @@
#include "cg2.h"
#include "applicat.h"
#include "automask.h"
#include "cg2300a.h"
#include "cg2103.h"
#include "lffiles.h"
#include "isam.h"
#include "mov.h"
#include <map>
#include "rmov.h"
#include <vector>
#include "pconti.h"
#define INI_ANNO "riep_anno"
#define INI_MESE "riep_mese"
class TCompetenze_mask : public TAutomask
{
struct cont_contr_t
{
int gruppo;
int conto;
int s_conto;
real importo;
};
std::vector<int> _regs;
std::vector<cont_contr_t> _conts;
const char* get_ini(bool dataini) const;
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
// Funzione becera di ordinamento del vettore _conts
void sort_conts(bool sort_by_imp = true);
static void swap_items(cont_contr_t* it, cont_contr_t* jt);
static bool is_minor_of(cont_contr_t* jt, cont_contr_t* it);
static TString get_descr(int gruppo, int conto, int s_conto);
void fill_contc();
void fill();
public:
TCompetenze_mask() : TAutomask("cg2300a.msk") { }
};
const char* TCompetenze_mask::get_ini(bool dataini) const
{
if (dataini)
return ini_get_string(CONFIG_DITTA, "cg", INI_ANNO, "");
return ini_get_string(CONFIG_DITTA, "cg", INI_MESE, "");
}
bool TCompetenze_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
switch (o.dlg())
{
case DLG_LINK:
if (e == fe_button)
if (get(F_ANNO).full() && get(F_MESE).full())
fill();
else if (get(F_ANNO).blank())
message_box("Inserire un anno");
else if (get(F_MESE).blank())
message_box("Inserire un mese");
break;
case DLG_USER:
if (e == fe_button && jolly > 0)
{
TSheet_field& sf = sfield(F_MOVS);
TToken_string& row = sf.row(sf.selected());
TRectype mov(LF_MOV);
mov.put(MOV_NUMREG, row.get(sf.cid2index(F_NUMREG)));
if (mov.edit())
fill();
}
case F_ANNO:
if (e == fe_init) set(F_ANNO, get_ini(true));
break;
case F_MESE:
if (e == fe_init)
set(F_MESE, get_ini(false));
break;
default: break;
}
return true;
}
TString TCompetenze_mask::get_descr(int gruppo, int conto, int s_conto)
{
TLocalisamfile pcont(LF_PCON);
pcont.put(PCN_GRUPPO, gruppo);
pcont.put(PCN_CONTO, conto);
pcont.put(PCN_SOTTOCONTO, s_conto);
pcont.read();
return pcont.get(PCN_DESCR);
}
bool TCompetenze_mask::is_minor_of(cont_contr_t* jt, cont_contr_t* it)
{
return jt->gruppo < it->gruppo
|| (jt->gruppo == it->gruppo && jt->conto < it->conto)
|| (jt->gruppo == it->gruppo && jt->conto == it->conto
&& jt->s_conto < it->s_conto);
}
void TCompetenze_mask::swap_items(cont_contr_t* it, cont_contr_t* jt)
{
const cont_contr_t appo = *it;
*it = *jt;
*jt = appo;
}
void TCompetenze_mask::sort_conts(bool sort_by_imp)
{
// Sopra 100 rischia di essere leggermente lento?
if (1 < _conts.size() && _conts.size() < 100)
for (auto it = _conts.begin(); it != _conts.end(); ++it)
for (auto jt = (it+1); jt != _conts.end(); ++jt)
if (sort_by_imp && jt->importo > it->importo || !sort_by_imp && is_minor_of(&(*jt), &(*it)))
swap_items(&(*it), &(*jt));
}
void TCompetenze_mask::fill_contc()
{
TSheet_field& sf = sfield(F_CONTC);
TLocalisamfile rmovs(LF_RMOV);
sf.hide();
sf.reset();
_conts.clear();
// Per ogni registrazione
for (int i = 0; i < _regs.size(); ++i)
{
const int numreg = _regs[i];
rmovs.zero();
rmovs.put(RMV_NUMREG, numreg);
rmovs.put(RMV_NUMRIG, 0);
int riga = 0;
if (rmovs.read())
{
// Per ogni riga della registrazione
for (; rmovs.get_int(RMV_NUMREG) == numreg; rmovs.next())
{
const int gruppo = rmovs.get_int(RMV_GRUPPOC);
const int numcontc = rmovs.get_int(RMV_CONTOC);
const int s_conto = rmovs.get_int(RMV_SOTTOCONTOC);
const TString& tipocc = rmovs.get(RMV_TIPOCC);
const real importo(rmovs.get(RMV_IMPORTO));
if (tipocc.blank()) // Solo se il tipo di conto di contr. e' un conto, cioe' vuoto
{
// Cerco se ho già la chiave
auto it = _conts.begin();
for (; it != _conts.end(); ++it)
{
if (it->gruppo == gruppo
&& it->conto == numcontc
&& it->s_conto == s_conto)
break;
}
if (it != _conts.end())
it->importo += importo;
else
_conts.insert(_conts.end(), { gruppo, numcontc, s_conto, importo });
}
}
}
}
sort_conts(get(F_ORDIN) == "X");
real tot; tot = 0;
for (auto it = _conts.begin(); it != _conts.end(); ++it)
{
const int gruppo = it->gruppo;
const int conto = it->conto;
const int s_conto = it->s_conto;
const TString& descr = get_descr(gruppo, conto, s_conto);
TToken_string& row = sf.row(-1);
row.add(gruppo);
row.add(conto);
row.add(s_conto);
row.add(descr);
row.add(it->importo);
tot += it->importo;
}
sf.force_update();
sf.show();
set(F_TOT, tot);
}
void TCompetenze_mask::fill()
{
const int anno = get_int(F_ANNO);
const int mese = get_int(F_MESE);
TSheet_field& sf = sfield(F_MOVS);
TLocalisamfile movs(LF_MOV);
sf.hide();
sf.reset();
_regs.clear();
movs.setkey(2);
const TDate dataini(1, mese, anno);
TDate dataend(dataini); dataend.set_end_month();
movs.put(MOV_DATAREG, dataini);
if (movs.read() != NULL)
{
for (; movs.next() == NOERR && movs.get_date(MOV_DATAREG) <= dataend; )
{
const int month_liq = movs.get_int(MOV_MESELIQ);
const TDate datareg(movs.get(MOV_DATAREG));
const TDate datacomp(movs.get(MOV_DATACOMP));
if (month_liq != 0)
{
_regs.insert(_regs.end(), movs.get_int(MOV_NUMREG));
TToken_string& row = sf.row(-1);
row.add(movs.get(MOV_NUMREG));
row.add(datareg);
row.add(movs.get(MOV_DATADOC));
row.add(TCausale(movs.get(MOV_CODCAUS)).tipo_doc());
row.add(month_liq);
row.add(movs.get(MOV_NUMDOC));
row.add(movs.get(MOV_PROTIVA));
row.add(movs.get(MOV_DESCR));
}
}
}
sf.force_update();
sf.show();
fill_contc();
}
///////////////////////////////////////////////////////////////////////////////
// TCompetenze_app
///////////////////////////////////////////////////////////////////////////////
class TCompetenze_app : public TSkeleton_application
{
TCompetenze_mask* _msk;
protected:
void set_ini(bool dataini, const TString& set) const;
void save_fields() const;
public:
void main_loop() override;
TCompetenze_app() : _msk() {};
};
void TCompetenze_app::set_ini(bool dataini, const TString& set) const
{
if (!set.empty())
{
if (dataini)
ini_set_string(CONFIG_DITTA, "cg", INI_ANNO, set);
else
ini_set_string(CONFIG_DITTA, "cg", INI_MESE, set);
}
}
void TCompetenze_app::save_fields() const
{
set_ini(true, _msk->get(F_ANNO));
set_ini(false, _msk->get(F_MESE));
}
void TCompetenze_app::main_loop()
{
_msk = new TCompetenze_mask;
while (_msk->run() == K_ENTER) {}
save_fields();
}
int cg2300(int argc, char** argv)
{
TCompetenze_app* app = new TCompetenze_app;
app->run(argc, argv, TR("Registrazioni Competenza Precedente"));
delete app;
return 0;
}

26
src/cg/cg2300a.h Normal file
View File

@ -0,0 +1,26 @@
#define START_MASK 501
#define F_ANNO 501
#define F_MESE 502
#define F_TOT 503
#define F_ORDIN 504
#define END_MASK 599
#define F_MOVS 201
#define F_NUMREG 101
#define F_DATAREG 102
#define F_DATADOC 103
#define F_CODCAUS 104
#define F_MESELIQ 105
#define F_NUMDOC 106
#define F_PROTIVA 107
#define F_DESCR 108
#define F_CONTC 202
#define F_GRPCONTC 101
#define F_NUMCONTC 102
#define F_SOTCONTC 103
#define F_DESCRCON 104
#define F_TOTCONTC 105

200
src/cg/cg2300a.uml Normal file
View File

@ -0,0 +1,200 @@
#include "cg2300a.h"
TOOLBAR "topbar" 0 0 0 2
BUTTON DLG_LINK 2 2
BEGIN
PROMPT 3 1 "Calcola"
PICTURE TOOL_ELABORA
END
BUTTON DLG_NULL
BEGIN
PROMPT 2 2 ""
END
BUTTON DLG_QUIT 2 2
BEGIN
PROMPT 1 1 ""
END
ENDPAGE
PAGE "Movimenti" 0 4 0 0
NUMBER F_ANNO 4
BEGIN
PROMPT 0 0 "Anno "
WARNING "Inserire un anno"
END
NUMBER F_MESE 2
BEGIN
PROMPT 24 0 "Mese "
SHEET " |Mese@30"
ITEM "|"
ITEM "1|Gennaio"
ITEM "2|Febbraio"
ITEM "3|Marzo"
ITEM "4|Aprile"
ITEM "5|Maggio"
ITEM "6|Giugno"
ITEM "7|Luglio"
ITEM "8|Agosto"
ITEM "9|Settembre"
ITEM "10|Ottobre"
ITEM "11|Novembre"
ITEM "12|Dicembre"
HELP "Mese dichiarazione"
FLAGS ""
CHECKTYPE REQUIRED
END
SPREADSHEET F_MOVS 0 9
BEGIN
PROMPT 1 1 ""
ITEMS "Numero"
ITEMS "Data"
ITEMS "Data Doc"
ITEMS "Causale"
ITEMS "Mese Liq.@7"
ITEMS "Documento"
ITEMS "Protoc."
ITEMS "Descrizione"
END
RADIOBUTTON F_ORDIN 1 40
BEGIN
PROMPT 1 11 "Ordina per "
ITEM "|Numero conto"
ITEM "X|Importo"
FLAGS "Z"
END
SPREADSHEET F_CONTC 0 -2
BEGIN
PROMPT 1 14 ""
ITEMS "Gruppo\nControp.@5"
ITEMS "Conto\nControp.@5"
ITEMS "Sottoconto\nControp.@7"
ITEMS "Descr. Conto"
ITEMS "Totale"
END
NUMBER F_TOT 10 2
BEGIN
PROMPT 1 -1 "Totale "
END
ENDPAGE
ENDMASK
PAGE "Elementi" -1 -1 50 5
NUMBER F_NUMREG 7
BEGIN
PROMPT 1 1 "Numero "
FLAGS "D"
END
DATE F_DATAREG
BEGIN
PROMPT 1 2 "Data reg."
FLAGS "D"
END
DATE F_DATADOC
BEGIN
PROMPT 1 3 "Data doc."
FLAGS "D"
END
STRING F_CODCAUS 3
BEGIN
PROMPT 1 4 "Causale "
FLAGS "D"
END
NUMBER F_MESELIQ 2
BEGIN
PROMPT 1 5 "Causale "
FLAGS "D"
END
NUMBER F_NUMDOC 7
BEGIN
PROMPT 1 6 "Documento"
FLAGS "D"
END
NUMBER F_PROTIVA 6
BEGIN
PROMPT 1 7 "Protoc."
FLAGS "D"
END
STRING F_DESCR 50
BEGIN
PROMPT 1 8 "Descrizione"
FLAGS "D"
END
ENDPAGE
TOOLBAR "Movimento" 0 0 0 2
BUTTON DLG_OK 2 2
BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_USER 2 2
BEGIN
PROMPT 1 1 "Collega"
PICTURE TOOL_LINK
END
BUTTON DLG_CANCEL 2 2
BEGIN
PROMPT 1 1 ""
END
ENDPAGE
ENDMASK
PAGE "Elem CONTROP" -1 -1 50 5
NUMBER F_GRPCONTC 3
BEGIN
PROMPT 1 1 "Gruppo di contropartita"
FLAGS "D"
END
NUMBER F_NUMCONTC 3
BEGIN
PROMPT 1 2 "Numero conto di contropartita"
FLAGS "D"
END
NUMBER F_SOTCONTC 7
BEGIN
PROMPT 1 2 "Numero sottoconto "
FLAGS "D"
END
STRING F_DESCRCON 50
BEGIN
PROMPT 1 3 "Descrizione conto contropartita"
FLAGS "D"
END
NUMBER F_TOTCONTC 10 2
BEGIN
PROMPT 1 4 "Totale conto contropartita"
FLAGS "D"
END
ENDPAGE
ENDMASK

View File

@ -423,11 +423,11 @@ bool Visliq_app::sel_mese_sh1 (TMask_field& f, KEY k)
if (sm.is_running())
{
// TBC controllare se sono i dati giusti in tt
sm.field(102).set(tt.get(1));
sm.field(103).set(tt.get(2));
sm.field(104).set(tt.get(3));
sm.field(105).set(tt.get(4));
sm.field(106).set(tt.get(5));
sm.field(S_RISULTATO).set(tt.get(cid2index(S_RISULTATO)));
sm.field(S_DEBCRED1 ).set(tt.get(cid2index(S_DEBCRED1)));
sm.field(S_RIMBORSO).set(tt.get(cid2index(S_RIMBORSO)));
sm.field(S_RETTIFICHE).set(tt.get(cid2index(S_RETTIFICHE)));
sm.field(S_DEBCRED2).set(tt.get(cid2index(S_DEBCRED2)));
}
sh.row(sel) = tt;
@ -436,13 +436,14 @@ bool Visliq_app::sel_mese_sh1 (TMask_field& f, KEY k)
if (app().look_del(month,1))
{
TToken_string& tv = sv.row(sel == (sh.items() - 1) ? sel -1 : sel);
tv.add(app().del()->get("D0"),1);
tv.add(app().del()->get("S7"),2);
tv.add(app().del()->get("S8"),3);
tv.add(app().del()->get("S9"),4);
tv.add(app().del()->get("R0"),5);
sv.force_update(sel == (sh.items() - 1) ? sel -1 : sel);
const int nrow = sel == (sh.items() - 1) ? sel - 1 : sel;
sv.set_row_cell(S_DATA, app().del()->get("D0"), nrow);
sv.set_row_cell(S_ABI, app().del()->get("S7"), nrow);
sv.set_row_cell(S_CAB, app().del()->get("S8"),nrow);
sv.set_row_cell(S_CONC, app().del()->get("S9"),nrow);
sv.set_row_cell(S_VERSAMENTO, app().del()->get("R0"), nrow);
sv.force_update(nrow);
}
return true;
@ -452,11 +453,11 @@ bool Visliq_app::enable_date(TMask_field& f, KEY k)
{
if (k == K_TAB && (f.focusdirty()|| !f.mask().is_running()))
{
const bool enable = f.mask().get(104).full() || f.mask().get(109).full();
const bool enable = f.mask().get(S_RIMBORSO).full() || f.mask().get(S_CREDF24).full();
f.mask().enable(110, enable);
f.mask().enable(S_DATAAUT, enable);
if (!enable)
f.mask().set(110, "");
f.mask().set(S_DATAAUT, "");
}
return true;
}
@ -1657,19 +1658,25 @@ void Visliq_app::read_general(TMask& m)
const real r1 = _lim->get_real("R1");
const real r5 = _lim->get_real("R5");
const int row = sh.set_row_cell(S_MESE, itoname(i));
const TString debcred1 = ris == ZERO ? "" : (ris > ZERO ? "D" : "C");
real r0 = _lim->get_real("R0");
const TString debcred3 = r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C");
sh.set_row_cell(S_IVA, abs(r0), row);
sh.set_row_cell(S_DEBCRED3, debcred3, row);
sh.set_row_cell(S_RISULTATO, abs(ris), row);
sh.set_row_cell(S_DEBCRED1, ris == ZERO ? "" : (ris > ZERO ? "D" : "C"), row);
sh.set_row_cell(S_DEBCRED1, debcred1, row);
sh.set_row_cell(S_RIMBORSO, r1, row);
sh.set_row_cell(S_RETTIFICHE, abs(r5), row);
sh.set_row_cell(S_DEBCRED2, r5 == ZERO ? "" : (r5 > ZERO ? "D" : "C"), row);
const real criva = _lim->get_real("R15");
const real criva = debcred1 == "C" ? ZERO : _lim->get_real("R15");
const real crf24 = _lim->get_real("R16");
const real autf24 = _lim->get_real("R20");
bool enable_date = r1 != ZERO;
sh.set_row_cell(S_CREDIVA, criva, row);
sh.enable_cell(row, S_CREDIVA, debcred3 == "D");
sh.set_row_cell(S_CREDF24PRE,crf24, row);
sh.set_row_cell(S_CREDF24, autf24 , row);
enable_date |= autf24 != ZERO;
@ -1698,11 +1705,6 @@ void Visliq_app::read_general(TMask& m)
}
else
sh.set_row_cell(S_CREDRES, ZERO, row);
real r0 = _lim->get_real("R0");
sh.set_row_cell(S_IVA, abs(r0).string(), row);
sh.set_row_cell(S_DEBCRED3, r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), row);
sh.set_row_cell(S_DESCR, _lim->get("S3"), row);
// sh.row(row) = (*tt);
}
@ -1819,12 +1821,12 @@ void Visliq_app::write_general(TMask& m)
bool vfrommask = sv.selected() == (i == 12 ? row + 1 : row) && svm.is_running();
TToken_string& tt_lo = (TToken_string&)_liq_rows[row];
TToken_string& tt_ln = sh.row(row);
// TToken_string& tt_ln = sh.row(row);
// risolve menata del dettaglio si'/no
if (lfrommask)
for (int i = 1; i <= 13; i++)
tt_ln.add(shm.get(101+i),i);
sh.set_row_cell(101 + i, shm.get(101+i), row);
// saltare una riga se dicembre (riga 11 == acconto)
TToken_string& tt_vo = (TToken_string&)_vers_rows[i == 12 ? row + 1 : row];
@ -1833,7 +1835,7 @@ void Visliq_app::write_general(TMask& m)
if (vfrommask)
{
for (int i = 1; i <= 5; i++)
tt_vn.add(svm.get(101+i),i);
sh.set_row_cell(101 + i, svm.get(101+i), row);
}
// traduci contenuto righe in real pila
@ -1841,7 +1843,6 @@ void Visliq_app::write_general(TMask& m)
real nrett(sh.get_real_row_cell(row, S_RETTIFICHE));
real orimb(tt_lo.get(cid2index(S_RIMBORSO)));
real nrimb(sh.get_real_row_cell(row, S_RIMBORSO));
real crcode(sh.get_real_row_cell(row, S_CREDIVA));
real crf24(sh.get_real_row_cell(row, S_CREDF24PRE));
real oautf24(tt_lo.get(cid2index(S_CREDF24)));
real autf24(sh.get_real_row_cell(row, S_CREDF24));
@ -1852,8 +1853,8 @@ void Visliq_app::write_general(TMask& m)
real overs(tt_vo.get(cid2index(S_VERSAMENTO)));
real nvers(sv.get_real_row_cell(row, S_VERSAMENTO));
TDate odate(tt_vo.get(cid2index(S_DATAAUT)));
TDate ndate(sv.get_date_row_cell(row, S_DATAAUT));
TDate odate(tt_vo.get(cid2index(S_DATA)));
TDate ndate(sv.get_date_row_cell(row, S_DATA));
TString8 oabi(tt_vo.get(cid2index(S_ABI)));
TString8 nabi(sv.get_str_row_cell(row, S_ABI));
TString8 ocab(tt_vo.get(cid2index(S_CAB)));
@ -2047,16 +2048,16 @@ void Visliq_app::write_general(TMask& m)
round_imposta(intr);
_lim->put("R14",intr);
}
if (gestione_manuale)
_lim->put("R15", crcode);
_lim->put("R16", crf24);
_lim->put("R20", autf24);
_lim->put("D1", dautf24);
if (compensabile)
{
const real criva(tt_ln.get(6));
if (row == 3)
int i = 1;
const real criva(sh.get_real_row_cell(row, S_CREDIVA));
cr_res += autf24;
cr_res -= crf24;
cr_res -= criva;
@ -2064,7 +2065,9 @@ void Visliq_app::write_general(TMask& m)
sh.set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, 7);
else
sh.set_back_and_fore_color(NORMAL_BACK_COLOR, NORMAL_COLOR, row, 7);
}
if (gestione_manuale)
_lim->put("R15", criva);
}
_lim->put("S3", descr);
_lim->rewrite();
@ -2099,25 +2102,21 @@ void Visliq_app::write_general(TMask& m)
const real iva_acq = _lam->get_real("R1"); // IVA vendite
const real ris = iva_ven - iva_acq;
tt_ln.add(abs(ris).string(), 1);
tt_ln.add(ris == 0 ? "" : (ris > 0 ? "D" : "C"), 2);
sh.set_row_cell(S_RISULTATO, abs(ris), row);
sh.set_row_cell(S_DEBCRED1, ris == ZERO ? "" : (ris > ZERO ? "D" : "C"), row);
tt_ln.add((_lim->get_real("R1")).string(),3);
sh.set_row_cell( S_RIMBORSO, _lim->get_real("R1"), row);
int sr5 = (_lim->get_real("R5")).sign();
real r5abs = abs(_lim->get_real("R5"));
real r5 = (_lim->get_real("R5"));
tt_ln.add(r5abs.string(),4);
tt_ln.add(sr5 == 0 ? "" : (sr5 > 0 ? "D" : "C"),5);
if ( cr_res < ZERO)
tt_ln.add("",10);
else
tt_ln.add(cr_res.string(), 10);
sh.set_row_cell(S_RETTIFICHE, abs(r5), row);
sh.set_row_cell(S_DEBCRED2, r5 == ZERO ? "" : (r5 > ZERO? "D" : "C"), row);
sh.set_row_cell(S_CREDRES, cr_res < ZERO ? ZERO : cr_res, row);
real r0 = _lim->get_real("R0");
tt_ln.add(abs(r0).string(), 11);
tt_ln.add(r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), 12);
sh.set_row_cell(S_IVA, abs(r0), row);
sh.set_row_cell(S_DEBCRED3, r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), row);
}
_from_one = false;
} // for mese liq. (riga sheet)

View File

@ -264,6 +264,7 @@ Item_02 = "Per tipo costo/ricavo", "cg3 -6 C", "F"
Item_03 = "Intracomunitarie", "cg3 -6 N", "F"
Item_04 = "Doppie", "cg3 -7", "F"
Item_05 = "Emesse in Split-Payment", "ba8 -4 cgstsplit.rep", "F"
Item_06 = "Periodo comp. IVA prec.", "cg2 -2", "F"
[CGMENU_027]
Caption = "Gestione acconti IVA"

View File

@ -126,7 +126,7 @@ END
GROUPBOX F_GROUPCAU 59 8
BEGIN
PROMPT 31 10 "@BSelezionare Causale per Registrazione Contabile:"
PROMPT 31 10 "@BParametri di default per Registrazione Contabile:"
END
STRING F_CAUSFA 3

View File

@ -249,7 +249,7 @@ void TFP_settings::set_no_export_pronto(const bool no_export_pronto) const
void TFP_settings::set_data_start_fatt(const char* date) const
{
ini_set_bool(FILE_CONFIG, FILE_SECTION, FP_DATASTARTFATT, date);
ini_set_string(FILE_CONFIG, FILE_SECTION, FP_DATASTARTFATT, date);
}
void TFP_settings::remove_para_ini(int idx)

97
src/fp/sql/fp0108.sql Normal file
View File

@ -0,0 +1,97 @@
CREATE TABLE F9DRD00K (
F9RCSOC CHAR(10) NOT NULL DEFAULT '' ,
F9RIDES CHAR(18) NOT NULL DEFAULT '' ,
F9RFPDE CHAR(1) NOT NULL DEFAULT '' ,
F9RDDES CHAR(256) NOT NULL DEFAULT '' ,
F9RFTDC CHAR(1) NOT NULL DEFAULT '' ,
F9RUESD DATE NOT NULL DEFAULT GETDATE() ,
F9RUESA DATE NOT NULL DEFAULT GETDATE() ,
F9RUTEE CHAR(10) NOT NULL DEFAULT '' ,
F9RUHES DATETIME NOT NULL DEFAULT GETDATE() ,
F9RIDAS CHAR(2) NOT NULL DEFAULT '' ,
F9RIDWA CHAR(2) NOT NULL DEFAULT '' ,
F9RDSIW CHAR(256) NOT NULL DEFAULT '' ,
F9RUHIM DATETIME NOT NULL DEFAULT GETDATE() ,
F9RIISO CHAR(1) NOT NULL DEFAULT '' ,
F9RUHIS DATETIME NOT NULL DEFAULT GETDATE() ,
F9RSINW CHAR(2) NOT NULL DEFAULT '' ,
F9RDSIN CHAR(256) NOT NULL DEFAULT '' ,
F9RPCDC CHAR(256) NOT NULL DEFAULT '' ,
PRIMARY KEY( F9RCSOC , F9RIDES , F9RFPDE ) ) ;
CREATE TABLE F9DRT00K (
F9TCSOC CHAR(10) NOT NULL DEFAULT '' ,
F9TCADO CHAR(10) NOT NULL DEFAULT '' ,
F9TDDES CHAR(30) NOT NULL DEFAULT '' ,
F9TCLDC CHAR(10) NOT NULL DEFAULT '' ,
F9TCSOS CHAR(6) NOT NULL DEFAULT '' ,
F9TCCAU CHAR(6) NOT NULL DEFAULT '' ,
F9TTCAU CHAR(6) NOT NULL DEFAULT '' ,
F9TTMOV CHAR(6) NOT NULL DEFAULT '' ,
PRIMARY KEY( F9TCSOC , F9TCADO ) ) ;
CREATE TABLE F9IVA00K (
F9ICSOC CHAR(10) NOT NULL DEFAULT '' ,
F9IIDLA CHAR(18) NOT NULL DEFAULT '' ,
F9IFPDE CHAR(1) NOT NULL DEFAULT '' ,
F9IAFES CHAR(4) NOT NULL DEFAULT '' ,
F9IGIVA CHAR(1) NOT NULL DEFAULT '' ,
F9ITPGI CHAR(10) NOT NULL DEFAULT '' ,
F9IDXML CHAR(1) NOT NULL DEFAULT '' ,
F9ITCFO CHAR(1) NOT NULL DEFAULT '' ,
F9ICCFO CHAR(10) NOT NULL DEFAULT '' ,
F9IDRSO CHAR(60) NOT NULL DEFAULT '' ,
F9IIDFI CHAR(30) NOT NULL DEFAULT '' ,
F9IPIVA CHAR(28) NOT NULL DEFAULT '' ,
F9ICFIS CHAR(16) NOT NULL DEFAULT '' ,
F9ICADO CHAR(10) NOT NULL DEFAULT '' ,
F9ICSOS CHAR(6) NOT NULL DEFAULT '' ,
F9INDOC CHAR(20) NOT NULL DEFAULT '' ,
F9IUDOC DATE NOT NULL DEFAULT GETDATE() ,
F9ISIVA CHAR(10) NOT NULL DEFAULT '' ,
F9ICREG CHAR(6) NOT NULL DEFAULT '' ,
F9INPRI CHAR(20) NOT NULL DEFAULT '' ,
F9IUPRI DATE NOT NULL DEFAULT GETDATE() ,
F9IFOOA CHAR(10) NOT NULL DEFAULT '' ,
F9ITROT CHAR(6) NOT NULL DEFAULT '' ,
F9INRRO CHAR(20) NOT NULL DEFAULT '' ,
F9IURGO DATE NOT NULL DEFAULT GETDATE() ,
F9ICLDF CHAR(10) NOT NULL DEFAULT '' ,
F9INMF1 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLDN CHAR(10) NOT NULL DEFAULT '' ,
F9INMF2 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLDA CHAR(10) NOT NULL DEFAULT '' ,
F9INMF3 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLD4 CHAR(10) NOT NULL DEFAULT '' ,
F9INMF4 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLD5 CHAR(10) NOT NULL DEFAULT '' ,
F9INMF5 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLD6 CHAR(10) NOT NULL DEFAULT '' ,
F9INMF6 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLD7 CHAR(10) NOT NULL DEFAULT '' ,
F9INMF7 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLD8 CHAR(10) NOT NULL DEFAULT '' ,
F9INMF8 CHAR(100) NOT NULL DEFAULT '' ,
F9ICLD9 CHAR(10) NOT NULL DEFAULT '' ,
F9INMF9 CHAR(100) NOT NULL DEFAULT '' ,
F9ICL10 CHAR(10) NOT NULL DEFAULT '' ,
F9INM10 CHAR(100) NOT NULL DEFAULT '' ,
F9IUTEE CHAR(10) NOT NULL DEFAULT '' ,
F9IUHEL DATETIME NOT NULL DEFAULT GETDATE() ,
F9IUHEW DATETIME NOT NULL DEFAULT GETDATE() ,
PRIMARY KEY( F9ICSOC , F9IIDLA , F9IFPDE , F9ISIVA , F9ICREG , F9INPRI , F9IUPRI , F9ITPGI ) ) ;
CREATE TABLE F9PWA00K (
F9PCSOC CHAR(10) NOT NULL DEFAULT '' ,
F9PCDFN CHAR(2) NOT NULL DEFAULT '' ,
F9PCDNT CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA1 CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA2 CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA3 CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA4 CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA5 CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA6 CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA7 CHAR(2) NOT NULL DEFAULT '' ,
F9PCDA8 CHAR(2) NOT NULL DEFAULT '' ,
F9PPCDC CHAR(256) NOT NULL DEFAULT '' ,
PRIMARY KEY( F9PCSOC ) ) ;

View File

@ -165,12 +165,12 @@ public:
virtual int set_row_cell(short id, const real& value, int nrow = -1);
virtual int set_row_cell(short id, const TDate& value, int nrow = -1);
virtual const char * get_str_row_cell(int nrow, short id) { return row(nrow).get(); }
virtual char get_char_row_cell(int nrow, short id) { return row(nrow).get_char(); }
virtual long get_long_row_cell(int nrow, short id) { return row(nrow).get_long(); }
virtual int get_int_row_cell(int nrow, short id) { return row(nrow).get_int(); }
virtual real get_real_row_cell(int nrow, short id) { return real(row(nrow).get()); }
virtual TDate get_date_row_cell(int nrow, short id) { return TDate(row(nrow).get()); }
virtual const char * get_str_row_cell(int nrow, short id) { return row(nrow).get(cid2index(id)); }
virtual char get_char_row_cell(int nrow, short id) { return row(nrow).get_char(cid2index(id)); }
virtual long get_long_row_cell(int nrow, short id) { return row(nrow).get_long(cid2index(id)); }
virtual int get_int_row_cell(int nrow, short id) { return row(nrow).get_int(cid2index(id)); }
virtual real get_real_row_cell(int nrow, short id) { return real(row(nrow).get(cid2index(id))); }
virtual TDate get_date_row_cell(int nrow, short id) { return TDate(row(nrow).get(cid2index(id))); }
char separator() const { return _separator; }

View File

@ -537,6 +537,7 @@ static TBill _co_cliente, // conto clifo per movimento d'anticipo
static bool _numpart_pro; // se true prende il numero rif. partita dal numero protocollo
static bool _numpart_mon; // se true prende il numero rif. partita dal mese
static char _part_type; // tipi di numero partita "D" codcumento, "P" protocollo IVA, "M" Mese
static bool _part_acq_ndoc; // numero partita acquisti acquisti numero doc
static bool _sc_enabled; // se true il saldaconto di ditta è abilitato
static bool _in_enabled; // se true l'intra è abilitato
static TToken_string* _search_seq = NULL;
@ -858,8 +859,8 @@ bool TContabilizzazione::load_parameters()
_sc_enabled = conf.get_bool("GesSal","cg");
_in_enabled = dongle().active(INAUT);
_numpart_pro = conf.get_bool("RifPro", "cg");
_numpart_mon = conf.get_bool("RifMonth", "cg");
_part_type = 'D';
_numpart_mon = conf.get_bool("RifMonth", "cg");
_part_type = 'D';
if (_numpart_pro) _part_type = 'P';
else
if (_numpart_mon) _part_type = 'M';
@ -2701,44 +2702,56 @@ error_type TContabilizzazione::write_scadenze(TDocumento& doc, bool recontabiliz
// int anno = head.get_int(MOV_ANNOIVA);
int anno = 0;
TString8 numpart; // Max. 7 chars
const TString4 tipocf = doc.get(DOC_TIPOCF);
if (doc.get(DOC_TIPOCF) == "F" || is_nc)
if (tipocf == "F" || is_nc)
{
anno = doc.get_int(DOC_ANNORIF);
anno = doc.get_int(DOC_ANNORIF);
numpart = doc.get(DOC_NUMDOCRIF);
if (numpart.full())
{
TString4 codnum = doc.get(DOC_CODNUMRIF);
TToken_string keydoc;
if (numpart.full())
{
TString4 codnum = doc.get(DOC_CODNUMRIF);
TToken_string keydoc;
if (codnum.blank())
codnum = doc.get(DOC_CODNUM);
if (anno <= 0)
{
const TDate ddr = doc.get_date(DOC_DATADOCRIF);
if (anno <= 0)
{
const TDate ddr = doc.get_date(DOC_DATADOCRIF);
anno = ddr.year();
}
anno = ddr.year();
}
keydoc.add(doc.get(DOC_PROVV));
keydoc.add(anno);
keydoc.add(codnum);
keydoc.add(numpart);
const long numreg = atol(cache().get(LF_DOC, keydoc, DOC_NUMREG));
keydoc.add(anno);
keydoc.add(codnum);
keydoc.add(numpart);
const TRectype & docrif = cache().get(LF_DOC, keydoc);
const TString4 & tipocfrif = docrif.get(DOC_TIPOCF);
if (numreg > 0)
{
TPartite_array pa; pa.add_numreg(numreg);
const TPartita* game = pa.first();
if (game != NULL)
{
anno = game->anno();
numpart = game->numero();
}
}
}
if (tipocf == tipocfrif)
{
const long codcf = docrif.get_long(DOC_CODCF);
if (codcf == doc.get_long(DOC_CODCF))
{
const long numreg = docrif.get_long( DOC_NUMREG);
if (numreg > 0)
{
TPartite_array pa; pa.add_numreg(numreg);
const TPartita* game = pa.first();
if (game != NULL)
{
anno = game->anno();
numpart = game->numero();
}
}
}
}
}
}
if (anno <= 0 || numpart.blank())
{

View File

@ -518,42 +518,55 @@ long TGenerazione_effetti::group_bills(TAssoc_array& group_array, bool interatti
if (numpart_mon)
part_type = 'M';
if (doc.get(DOC_TIPOCF) == "F" || is_nota_credito)
const TString4 tipocf = doc.get(DOC_TIPOCF);
if (tipocf == "F" || is_nota_credito)
{
anno = doc.get_int(DOC_ANNORIF);
numpart = doc.get(DOC_NUMDOCRIF); // Max. 7 chars
if (numpart.full())
{
TString4 codnum = doc.get(DOC_CODNUMRIF);
TToken_string keydoc;
TString4 codnum = doc.get(DOC_CODNUMRIF);
TToken_string keydoc;
if (codnum.blank())
codnum = doc.get(DOC_CODNUM);
if (anno <= 0)
{
const TDate ddr = doc.get_date(DOC_DATADOCRIF);
anno = ddr.year();
}
keydoc.add(doc.get(DOC_PROVV));
keydoc.add(anno);
keydoc.add(codnum);
keydoc.add(numpart);
const long numreg = atol(cache().get(LF_DOC, keydoc, DOC_NUMREG));
if (numreg > 0)
{
TPartite_array pa; pa.add_numreg(numreg);
const TPartita* game = pa.first();
if (game != NULL)
if (codnum.blank())
codnum = doc.get(DOC_CODNUM);
if (anno <= 0)
{
anno = game->anno();
numpart = game->numero();
const TDate ddr = doc.get_date(DOC_DATADOCRIF);
anno = ddr.year();
}
}
keydoc.add(doc.get(DOC_PROVV));
keydoc.add(anno);
keydoc.add(codnum);
keydoc.add(numpart);
const TRectype & docrif = cache().get(LF_DOC, keydoc);
const char tipocfrif = docrif.get_char(DOC_TIPOCF);
if (tipocf == tipocfrif)
{
const long codcf = docrif.get_long(DOC_CODCF);
if (codcf == doc.get_long(DOC_CODCF))
{
const long numreg = docrif.get_long(DOC_NUMREG);
if (numreg > 0)
{
TPartite_array pa; pa.add_numreg(numreg);
const TPartita* game = pa.first();
if (game != NULL)
{
anno = game->anno();
numpart = game->numero();
}
}
}
}
}
}
if (anno <= 0 || numpart.blank())
@ -801,42 +814,53 @@ void TGenerazione_effetti::generate_bill(TDocumento& doc, bool interattivo) // b
if (numpart_mon)
part_type = 'M';
if (doc.get(DOC_TIPOCF) == "F" || is_nota_credito)
if (tipocf == 'F' || is_nota_credito)
{
anno = doc.get_int(DOC_ANNORIF);
numpart = doc.get(DOC_NUMDOCRIF); // Max. 7 chars
if (numpart.full())
{
TString4 codnum = doc.get(DOC_CODNUMRIF);
TToken_string keydoc;
{
TString4 codnum = doc.get(DOC_CODNUMRIF);
TToken_string keydoc;
if (codnum.blank())
codnum = doc.get(DOC_CODNUM);
if (anno <= 0)
{
const TDate ddr = doc.get_date(DOC_DATADOCRIF);
anno = ddr.year();
}
keydoc.add(doc.get(DOC_PROVV));
keydoc.add(anno);
keydoc.add(codnum);
keydoc.add(numpart);
const long numreg = atol(cache().get(LF_DOC, keydoc, DOC_NUMREG));
if (numreg > 0)
{
TPartite_array pa; pa.add_numreg(numreg);
const TPartita* game = pa.first();
if (game != NULL)
if (codnum.blank())
codnum = doc.get(DOC_CODNUM);
if (anno <= 0)
{
anno = game->anno();
numpart = game->numero();
const TDate ddr = doc.get_date(DOC_DATADOCRIF);
anno = ddr.year();
}
}
keydoc.add(doc.get(DOC_PROVV));
keydoc.add(anno);
keydoc.add(codnum);
keydoc.add(numpart);
const TRectype & docrif = cache().get(LF_DOC, keydoc);
const char tipocfrif = docrif.get_char(DOC_TIPOCF);
if (tipocf == tipocfrif)
{
const long codcf = docrif.get_long(DOC_CODCF);
if (codcf == doc.get_long(DOC_CODCF))
{
const long numreg = docrif.get_long(DOC_NUMREG);
if (numreg > 0)
{
TPartite_array pa; pa.add_numreg(numreg);
const TPartita* game = pa.first();
if (game != NULL)
{
anno = game->anno();
numpart = game->numero();
}
}
}
}
}
}
if (anno <= 0 || numpart.blank())