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

This commit is contained in:
Mattia Tollari 2019-05-30 15:04:56 +02:00
commit 68b7da3923
102 changed files with 2031 additions and 612 deletions

Binary file not shown.

Binary file not shown.

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

@ -0,0 +1,3 @@
ba1.exe
Corretta numerazione moduli

34
cd/test/ba0792a.ini Normal file
View File

@ -0,0 +1,34 @@
[Main]
Demo=0
[ba1]
Edit_4 = ba3 -0
Edit_5 = ba3 -0
Edit_6 = ba4 -1
File(477) = ba1.exe|X
Patch = 0792
Versione = 21511200
[ba99]
Kill(0) = wxmsw240.dll|x
Kill(1) = batbsce.txt|x
Kill(2) = bastfsc.rep|x
Kill(3) = bastfsc.msk|x
Kill(4) = bastcms.msk|x
Kill(5) = bastcms.rep|x
Kill(6) = bastuue.rep|x
Kill(7) = bastuue.msk|x
[ba]
Data = 21-05-2019
Descrizione = Base
Dischi = 1
Moduli = sy
OEM =
Patch = 792
PostProcess = bainst -0 BA
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ba0792a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
recdesc\f20.trr
recdesc\f20.dir
Issue #33
Aumentata a 80 caratteri la lunghezza del campo PEC

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

@ -0,0 +1,32 @@
[Main]
Demo=0
[ba2]
File(366) = recdesc\f20.dir|X
File(367) = recdesc\f20.trr|X
Patch = 0794
Versione = 21511200
[ba99]
Kill(0) = batbsce.txt|x
Kill(1) = wxmsw240.dll|x
Kill(2) = bastcms.rep|x
Kill(3) = bastcms.msk|x
Kill(4) = bastfsc.msk|x
Kill(5) = bastfsc.rep|x
Kill(6) = bastuue.msk|x
Kill(7) = bastuue.rep|x
[ba]
Data = 21-05-2019
Descrizione = Base
Dischi = 1
Moduli = sy
OEM =
Patch = 794
PostProcess = bainst -0 BA
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ba0794a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
recdesc\f23.trr
recdesc\f23.dir
Eliminato campo protocollo fppro che non serviva

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

@ -0,0 +1,32 @@
[Main]
Demo=0
[ba2]
File(372) = recdesc\f23.dir|X
File(373) = recdesc\f23.trr|X
Patch = 0804
Versione = 21511200
[ba99]
Kill(0) = wxmsw240.dll|x
Kill(1) = batbsce.txt|x
Kill(2) = bastfsc.rep|x
Kill(3) = bastfsc.msk|x
Kill(4) = bastcms.msk|x
Kill(5) = bastcms.rep|x
Kill(6) = bastuue.rep|x
Kill(7) = bastuue.msk|x
[ba]
Data = 30-05-2019
Descrizione = Base
Dischi = 1
Moduli = sy
OEM =
Patch = 804
PostProcess = bainst -0 BA
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ba0804a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
cg2.exe
Corretta numerazione moduli

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

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

BIN
cd/test/cg0792a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
cg0200a.msk
Issue #33
Aumentata a 80 caratteri la lunghezza del campo PEC

97
cd/test/cg0794a.ini Normal file
View File

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

BIN
cd/test/cg0794a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
cg4.exe
Corretta gestione del reverse charge non veniva più tolto dal volume d'affari

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

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

BIN
cd/test/cg0796a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
cg2.exe
Aggiunto controllo su data operazione maggiore della data di inizio fatturazione elettronica
Modifica modaut

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

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

BIN
cd/test/cg0798a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
cg5500b.msk
cg5.exe
Spostata la colonna iva a credito o debito nella seconda colonna nella visualizzazione liquidazione

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

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

BIN
cd/test/cg0800a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
cg0800a.msk
cg0800a.rep
cg0.exe
Ricompilato programma, maschera, report mancanti Stampa progressivi avanzata

99
cd/test/cg0802a.ini Normal file
View File

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

BIN
cd/test/cg0802a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
cg2.exe
cg2100c.msk
Tolto codice protocollo dai movimenti, non serve
Periodo liquidazione precedente default gestito con f1

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

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

BIN
cd/test/cg0804a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
dc800000.frm
dse.frm
Corretti form distinte codice cliente-fornitore

29
cd/test/ef0792a.ini Normal file
View File

@ -0,0 +1,29 @@
[Main]
Demo=0
[ef1]
Edit_163 = ef0 -1
Edit_5 = ef0 -6
File(1) = dc800000.frm|X
File(4) = dse.frm|X
Patch = 0792
Versione = 21511200
[ef99]
Kill(0) = eftbbnp.msk|x
Kill(1) = efstbnp.msk|x
Kill(2) = efstbnp.rep|x
[ef]
Data = 21-05-2019
Descrizione = Effetti
Dischi = 1
Moduli = ve
OEM =
Patch = 792
PostProcess = bainst -0 EF
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ef0792a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
fp0.exe
Corretta numerazione moduli

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

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

BIN
cd/test/fp0792a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
fp0.exe
fp0100a.msk
Aggiunta data inizio periodo fatturazione elettronica in configurazione

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

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

BIN
cd/test/fp0798a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
fp0.exe
(monitor passive - f1): Corretto messaggio dopo contabilizzazione
Corretta procedura aggiornamento fornitore

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

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

BIN
cd/test/fp0802a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,7 @@
fp0.exe
fp0400a.msk
Aggiunto flag periodo liquidazione precedente default (f1)
Aggiunta a contabil. autom.: scadenze, importi e imponibili
Risolto problema visualizzazione massimo 4 righe log contabil.
Aggiunti num reg e prot iva in messaggio di log

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

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

BIN
cd/test/fp0804a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
lv0.exe
lv0600a.msk
lv0600a.rep
Corretto report e programma per storico consegne lavanderie: andava a leggere un codice numerazione fisso e non quello della configurazione

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

@ -0,0 +1,24 @@
[Main]
Demo=0
[lv1]
Edit_168 = lv0 -3
File(0) = lv0.exe|X
File(28) = lv0600a.msk|X
File(29) = lv0600a.rep|X
Patch = 0790
Versione = 21511200
[lv]
Data = 20-05-2019
Descrizione = Gestione lavanderie
Dischi = 1
Moduli = ve,mg
OEM = 2
Patch = 0790
PostProcess = bainst -0 LV
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/lv0790a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
pec.frm
Rifatta una patch.
Il campo 106 dell' (H)eader (O)dd è dati pagamento.

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

@ -0,0 +1,21 @@
[Main]
Demo=0
[sc1]
File(0) = pec.frm|X
Patch = 0792
Versione = 21511200
[sc]
Data = 21-05-2019
Descrizione = Saldaconto
Dischi = 1
Moduli =
OEM =
Patch = 792
PostProcess =
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/sc0792a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
campo.aut
Corretta numerazione moduli

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

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

BIN
cd/test/sy0792a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,4 @@
tf0.exe
tf0200a.msk
Aggiunto flag per elaborazione liquidazione IVA periodica seguendo la data competenza o no

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

@ -0,0 +1,20 @@
[Main]
Demo=0
[tf1]
File(0) = tf0.exe|X
File(2) = tf0200a.msk|X
Patch = 0794
Versione = 21511200
[tf]
Data = 22-05-2019
Descrizione = Trasferimento fatture
Dischi = 1
Moduli = cg
OEM =
Patch = 794
PostProcess =
PreProcess =
Versione = 21511200

BIN
cd/test/tf0794a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,5 @@
tf0.exe
tf0200a.msk
Aggiunta possibilità di registrare liquidazione IVA periodica utilizzando o no la data di competenza.
CON SCELTA DIVERSA PER ATTIVE E PASSIVE

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

@ -0,0 +1,20 @@
[Main]
Demo=0
[tf1]
File(0) = tf0.exe|X
File(2) = tf0200a.msk|X
Patch = 0796
Versione = 21511200
[tf]
Data = 23-05-2019
Descrizione = Trasferimento fatture
Dischi = 1
Moduli = cg
OEM =
Patch = 796
PostProcess =
PreProcess =
Versione = 21511200

BIN
cd/test/tf0796a1.zip Normal file

Binary file not shown.

View File

@ -35,7 +35,7 @@ or Ordini
ef Effetti ef Effetti
db Distinta Base db Distinta Base
pr Provvigioni Agenti pr Provvigioni Agenti
?? Modulo vario ex-cu Codice Unico Progetto fp Fatturazione tra Privati + PA
sv Statistiche di Vendita sv Statistiche di Vendita
mr Manufacturing Resource Planning mr Manufacturing Resource Planning
?? Modulo vario ex-ec Collegamento E-commerce ?? Modulo vario ex-ec Collegamento E-commerce
@ -47,4 +47,6 @@ bs Bee Store
ha Hardy Caffè ha Hardy Caffè
ri Riclassificazioni ri Riclassificazioni
gv Gestione versamenti gv Gestione versamenti
tf Trasferimento Fatture tf Trasferimento Fatture
f1 Cont. Fatture Passive Elettroniche F1
f9 Archiviazione Sostitutiva

View File

@ -612,7 +612,7 @@ BEGIN
CHECKTYPE REQUIRED CHECKTYPE REQUIRED
END END
STRING F_PEC 50 23 STRING F_PEC 80 45
BEGIN BEGIN
PROMPT 2 9 "Pec " PROMPT 2 9 "Pec "
FIELD PEC FIELD PEC

View File

@ -54,7 +54,7 @@ public:
TPrimanota_application::TPrimanota_application() TPrimanota_application::TPrimanota_application()
: _rel(NULL), _mode(0), _iva(nessuna_iva), _causale(NULL), _giornale(NULL), : _rel(NULL), _mode(0), _iva(nessuna_iva), _causale(NULL), _giornale(NULL),
_lastreg(0), _last_dreg(TODAY), _last_dcom(TODAY), _automatico(NULL), _swap_mask(false) _lastreg(0), _last_dreg(TODAY), _last_dcom(TODAY), _automatico(NULL), _swap_mask(false), _is_set_fpcheck(false), _f1_ini(false), _f1_liq(false)
{ {
memset(_msk, 0, sizeof(_msk)); memset(_msk, 0, sizeof(_msk));
} }
@ -125,7 +125,6 @@ TMask* TPrimanota_application::load_mask(int n)
ism.set_handler(CG_RISCONTO, sheet_risconto_handler); ism.set_handler(CG_RISCONTO, sheet_risconto_handler);
if (!has_f1_db(m)) if (!has_f1_db(m))
{ {
m->hide(F_PROTFPPRO);
if (m->find_by_id(F_COLFPPRO) != NULL) if (m->find_by_id(F_COLFPPRO) != NULL)
m->hide(F_COLFPPRO); m->hide(F_COLFPPRO);
if(m->find_by_id(DLG_LINK) != NULL) if(m->find_by_id(DLG_LINK) != NULL)
@ -226,6 +225,22 @@ TMask* TPrimanota_application::load_mask(int n)
return m; return m;
} }
void TPrimanota_application::check_f1_ini()
{
for (int i = 0; i < argc(); i++)
{
TString arg(argv(i));
if (arg.find("-f1") != -1)
{
_f1_ini = true;
}
if (arg.find("-liq") != -1)
{
_f1_liq = true;
}
}
}
bool TPrimanota_application::user_create() bool TPrimanota_application::user_create()
{ {
open_files(LF_TABCOM, LF_TAB, LF_CAUSALI, LF_RCAUSALI, LF_CLIFO, LF_PCON, 0); open_files(LF_TABCOM, LF_TAB, LF_CAUSALI, LF_RCAUSALI, LF_CLIFO, LF_PCON, 0);
@ -252,7 +267,8 @@ bool TPrimanota_application::user_create()
load_mask(0); load_mask(0);
load_colors(); load_colors();
check_f1_ini();
return true; return true;
} }
@ -665,6 +681,7 @@ void TPrimanota_application::init_mask(TMask& m)
fill_sheet(m); // Riempe righe contabili coi conti della causale fill_sheet(m); // Riempe righe contabili coi conti della causale
m.hide(F_LINKDOC); m.hide(F_LINKDOC);
set_has_f1_db(&m);
} }
void TPrimanota_application::init_query_mode(TMask& m) void TPrimanota_application::init_query_mode(TMask& m)
@ -703,6 +720,7 @@ void TPrimanota_application::init_query_mode(TMask& m)
m.set(F_CODCAUS, ini.get(MOV_CODCAUS)); m.set(F_CODCAUS, ini.get(MOV_CODCAUS));
m.send_key(K_SPACE, DLG_NEWREC); m.send_key(K_SPACE, DLG_NEWREC);
} }
set_has_f1_db(&m);
} }
@ -947,6 +965,18 @@ void TPrimanota_application::init_insert_mode(TMask& m)
} }
} }
void TPrimanota_application::f1_init_modify(TMask& m, const TRectype& mov)
{
const bool after_data_inizio_fe = TDate(mov.get(MOV_DATADOC)) >= TDate(fp_settings().get_data_start_fatt());
if (m.find_by_id(F_COLFPPRO) != NULL && after_data_inizio_fe)
m.set(F_COLFPPRO, mov.get(MOV_KEYFPPRO).empty() ? " " : "X");
else if(m.find_by_id(F_COLFPPRO) != NULL && !after_data_inizio_fe)
{
m.field(F_COLFPPRO).hide();
m.field(DLG_LINK).disable();
}
}
void TPrimanota_application::init_modify_mode(TMask& m) void TPrimanota_application::init_modify_mode(TMask& m)
{ {
init_mask(m); // Inizializzazione standard init_mask(m); // Inizializzazione standard
@ -1052,13 +1082,8 @@ void TPrimanota_application::init_modify_mode(TMask& m)
m.enable(F_BOLLACODCLI, causale().tipo_doc() == "BD"); m.enable(F_BOLLACODCLI, causale().tipo_doc() == "BD");
m.enable(F_BOLLARAGCLI, causale().tipo_doc() == "BD"); 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");
}
f1_init_modify(m, mov);
} }
// Controlla sulla causale se il segno del totale documento (ritsoc=false) // Controlla sulla causale se il segno del totale documento (ritsoc=false)
@ -1594,14 +1619,26 @@ void TPrimanota_application::clean_fppro()
fp_db().sq_commit(); fp_db().sq_commit();
} }
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();
else
_isfp = false;
_is_set_fpcheck = true;
}
else if (!_is_set_fpcheck)
{
_isfp = false;
_is_set_fpcheck = true;
}
}
bool TPrimanota_application::has_f1_db(TMask* m) bool TPrimanota_application::has_f1_db(TMask* m)
{ {
static bool is_set_fpcheck = false; set_has_f1_db(m);
if (!is_set_fpcheck)
{
_isfp = has_module(F1AUT) && !fp_settings().get_db_indirizzo().empty() && !fp_settings().is_f8();
is_set_fpcheck = true;
}
return _isfp; return _isfp;
} }
@ -2019,203 +2056,212 @@ HIDDEN bool add_not_empty(TToken_string& str, int pos, TConfig& ini, const char*
void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query) void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
{ {
TRelation_application::ini2mask(ini, msk, query); TRelation_application::ini2mask(ini, msk, query);
if (query) if (query)
{ {
set_not_empty(msk, F_CODCAUS, ini, MOV_CODCAUS); set_not_empty(msk, F_CODCAUS, ini, MOV_CODCAUS);
TString16 val = ini.get(MOV_DATAREG); TString16 val = ini.get(MOV_DATAREG);
if (val.blank()) if (val.blank())
{ {
const long numreg = ini.get_long(MOV_NUMREG); const long numreg = ini.get_long(MOV_NUMREG);
if (numreg > 0) if (numreg > 0)
{ {
TLocalisamfile& mov = _rel->file(); TLocalisamfile& mov = _rel->file();
mov.put(MOV_NUMREG, numreg); mov.put(MOV_NUMREG, numreg);
if (mov.read() == NOERR) if (mov.read() == NOERR)
val = mov.get(MOV_DATAREG); // Serve ad evitare segnalazioni su esercizi non esistenti val = mov.get(MOV_DATAREG); // Serve ad evitare segnalazioni su esercizi non esistenti
} }
if (val.blank()) if (val.blank())
val = TDate(TODAY).string(); val = TDate(TODAY).string();
} }
msk.set(F_DATAREG, val); msk.set(F_DATAREG, val);
} }
else else
{ {
_as400 = false; _as400 = false;
if (ini.set_paragraph("24,1")) if (ini.set_paragraph("24,1"))
_as400 = !ini.exist(RMV_ROWTYPE) && ini.get_int(RMV_NUMRIG) == 1; _as400 = !ini.exist(RMV_ROWTYPE) && ini.get_int(RMV_NUMRIG) == 1;
if (msk.id2pos(F_ANNORIF) > 0) if (msk.id2pos(F_ANNORIF) > 0)
set_not_empty(msk, F_ANNORIF, ini, PART_ANNO); set_not_empty(msk, F_ANNORIF, ini, PART_ANNO);
if (msk.id2pos(F_NUMRIF) > 0) if (msk.id2pos(F_NUMRIF) > 0)
set_not_empty(msk, F_NUMRIF, ini, PART_NUMPART); set_not_empty(msk, F_NUMRIF, ini, PART_NUMPART);
if (iva() != nessuna_iva) if (iva() != nessuna_iva)
{ {
if (msk.id2pos(F_SOLAIVA) >= 0 && ini.exist("SOLAIVA")) if (msk.id2pos(F_SOLAIVA) >= 0 && ini.exist("SOLAIVA"))
msk.set(F_SOLAIVA, ini.get("SOLAIVA")); msk.set(F_SOLAIVA, ini.get("SOLAIVA"));
if (msk.id2pos(F_CODIVA) >= 0) if (msk.id2pos(F_CODIVA) >= 0)
msk.set(F_CODIVA, ini.get("CODIVA")); msk.set(F_CODIVA, ini.get("CODIVA"));
add_cgs_tot(msk); add_cgs_tot(msk);
TSheet_field& is = ivas();
for (int i = 0; ini.set_paragraph(LF_RMOVIVA, i+1); i++)
{
TToken_string& riga = is.row(i);
iva_notify(is, i, K_SPACE);
add_not_empty(riga, 0, ini, RMI_IMPONIBILE); // Imponibile 101
add_not_empty(riga, 1, ini, RMI_CODIVA); // IVA 102
add_not_empty(riga, 2, ini, RMI_TIPODET); // Detrazione 103
add_not_empty(riga, 3, ini, RMI_IMPOSTA); // Imposta 104
TBill c; ini2bill(ini, c, false);
if (c.gruppo() > 0)
c.add_to(riga, 4, 0x7); // Conto 105-110
iva_notify(is, i, K_ENTER);
}
// Genera eventuali righe per ritenute fiscali e sociali TSheet_field& is = ivas();
const short frit[4] = { F_RITFIS, F_RITSOC, F_REVCHARGE, 0 }; for (int i = 0; ini.set_paragraph(LF_RMOVIVA, i + 1); i++)
const char trit[4] = { 'F', 'S', 'V', '\0' }; {
for (int i = 0; frit[i]; i++) TToken_string& riga = is.row(i);
{
TEdit_field& ritfld = msk.efield(frit[i]);
if (!ritfld.empty() && ritfld.active())
add_cgs_ritenute(trit[i]);
}
calcola_imp(); // Calcola totale imponibile ed imposte iva_notify(is, i, K_SPACE);
} add_not_empty(riga, 0, ini, RMI_IMPONIBILE); // Imponibile 101
add_not_empty(riga, 1, ini, RMI_CODIVA); // IVA 102
TSheet_field& cg = cgs(); add_not_empty(riga, 2, ini, RMI_TIPODET); // Detrazione 103
for (int i = 0; ini.set_paragraph(format("%d,%d", LF_RMOV, i+1)); i++) add_not_empty(riga, 3, ini, RMI_IMPOSTA); // Imposta 104
{
char tipo = ini.get_char(RMV_ROWTYPE);
if (tipo < ' ') tipo = ' ';
TBill conto; ini2bill(ini, conto, false);
if (_as400 && conto.tipo() <= ' ')
conto.find();
int numrig = ini.get_int(RMV_NUMRIG)-1; TBill c; ini2bill(ini, c, false);
if (numrig != i) // Controllo se ho un numero riga valido if (c.gruppo() > 0)
{ c.add_to(riga, 4, 0x7); // Conto 105-110
numrig = -1; // Normalmente aggiungi la riga in fondo
// Cerca una riga che abbia già il tipo ed il conto richiesto
if (strchr(" DINT", tipo) != NULL)
{
int nr = -1;
if (tipo == 'I' || tipo == ' ')
nr = bill2pos(conto, tipo);
else
nr = type2pos(tipo);
if (nr < 0)
tipo = ' ';
else
if (get_cgs_imp(nr).is_zero() || tipo == 'T')
numrig = nr;
}
}
TToken_string& riga = cg.row(numrig);
if (numrig < 0 || _as400 || !(cg.cell_disabled(numrig, 0) && cg.cell_disabled(numrig, 1)))
{
TString4 sez = ini.get(RMV_SEZIONE); sez.strip("\"");
if (sez == "A" || sez == "D")
{
TImporto import(sez[0], real(ini.get(RMV_IMPORTO)));
if (!import.is_zero())
import.add_to(riga, 0); // Dare/Avere 101-102
}
}
if (numrig < 0 || !cg.cell_disabled(numrig, 3))
{
if (conto.gruppo() > 0)
conto.add_to(riga, 2, 0x3); // Conto 103-107
}
riga.add("", 7); // Codice descrizione 108
add_not_empty(riga, 8, ini, RMV_DESCR); // Descrizione riga 109
ini2bill(ini, conto, true);
if (conto.gruppo() > 0)
conto.add_to(riga, 9, 0x3); // Contropartita 110-114
add_cup_or_cig(CG_CUP, ini, riga); // CUP 115-116 iva_notify(is, i, K_ENTER);
add_cup_or_cig(CG_CIG, ini, riga); // CIG 117-118
riga.add(tipo, cg.cid2index(CG_ROWTYPE)); // Tipo di riga 119
}
if (is_fattura())
{
if (msk.insert_mode())
{
// Propone condizioni di pagamento e banche
TEdit_field& clifo = msk.efield(F_CODCLIFOR);
if (!clifo.empty() && clifo.active())
{
clifo.set_focusdirty();
clifo.on_hit(); // was clifo_handler(clifo, K_TAB);
}
}
TSheet_field& pag = pags();
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++)
{
TToken_string& row = pag.row(i);
if (i >= start_items)
pag_notify(pag, i, K_CTRL+K_INS);
pag_notify(pag, i, K_SPACE);
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; // Genera eventuali righe per ritenute fiscali e sociali
for (i = 0; i < pag.items(); i++) const short frit[4] = { F_RITFIS, F_RITSOC, F_REVCHARGE, 0 };
{ const char trit[4] = { 'F', 'S', 'V', '\0' };
TToken_string& row = pag.row(i); for (int i = 0; frit[i]; i++)
{
TEdit_field& ritfld = msk.efield(frit[i]);
if (!ritfld.empty() && ritfld.active())
add_cgs_ritenute(trit[i]);
}
calcola_imp(); // Calcola totale imponibile ed imposte
}
TSheet_field& cg = cgs();
for (int i = 0; ini.set_paragraph(format("%d,%d", LF_RMOV, i + 1)); i++)
{
char tipo = ini.get_char(RMV_ROWTYPE);
if (tipo < ' ') tipo = ' ';
TBill conto; ini2bill(ini, conto, false);
if (_as400 && conto.tipo() <= ' ')
conto.find();
int numrig = ini.get_int(RMV_NUMRIG) - 1;
if (numrig != i) // Controllo se ho un numero riga valido
{
numrig = -1; // Normalmente aggiungi la riga in fondo
// Cerca una riga che abbia già il tipo ed il conto richiesto
if (strchr(" DINT", tipo) != NULL)
{
int nr = -1;
if (tipo == 'I' || tipo == ' ')
nr = bill2pos(conto, tipo);
else
nr = type2pos(tipo);
if (nr < 0)
tipo = ' ';
else
if (get_cgs_imp(nr).is_zero() || tipo == 'T')
numrig = nr;
}
}
TToken_string& riga = cg.row(numrig);
if (numrig < 0 || _as400 || !(cg.cell_disabled(numrig, 0) && cg.cell_disabled(numrig, 1)))
{
TString4 sez = ini.get(RMV_SEZIONE); sez.strip("\"");
if (sez == "A" || sez == "D")
{
TImporto import(sez[0], real(ini.get(RMV_IMPORTO)));
if (!import.is_zero())
import.add_to(riga, 0); // Dare/Avere 101-102
}
}
if (numrig < 0 || !cg.cell_disabled(numrig, 3))
{
if (conto.gruppo() > 0)
conto.add_to(riga, 2, 0x3); // Conto 103-107
}
riga.add("", 7); // Codice descrizione 108
add_not_empty(riga, 8, ini, RMV_DESCR); // Descrizione riga 109
ini2bill(ini, conto, true);
if (conto.gruppo() > 0)
conto.add_to(riga, 9, 0x3); // Contropartita 110-114
add_cup_or_cig(CG_CUP, ini, riga); // CUP 115-116
add_cup_or_cig(CG_CIG, ini, riga); // CIG 117-118
riga.add(tipo, cg.cid2index(CG_ROWTYPE)); // Tipo di riga 119
}
if (is_fattura())
{
if (msk.insert_mode())
{
// Propone condizioni di pagamento e banche
TEdit_field& clifo = msk.efield(F_CODCLIFOR);
if (!clifo.empty() && clifo.active())
{
clifo.set_focusdirty();
clifo.on_hit(); // was clifo_handler(clifo, K_TAB);
}
}
TSheet_field& pag = pags();
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++)
{
TToken_string& row = pag.row(i);
if (i >= start_items)
pag_notify(pag, i, K_CTRL + K_INS);
pag_notify(pag, i, K_SPACE);
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_NSABI), 7);
row.add(msk.get(FS_NSCAB), 8); row.add(msk.get(FS_NSCAB), 8);
row.add(msk.get(FS_VSABI), 9); row.add(msk.get(FS_VSABI), 9);
row.add(msk.get(FS_VSCAB), 10); row.add(msk.get(FS_VSCAB), 10);
pag_notify(pag, i, K_ENTER); pag_notify(pag, i, K_ENTER);
} }
// In inserimento tento di riempire anche le scadenze // In inserimento tento di riempire anche le scadenze
if (msk.insert_mode() && (i == 0 || real::is_null(pag.row(0).get(1)))) if (msk.insert_mode() && (i == 0 || real::is_null(pag.row(0).get(1))))
{ {
TString4 codpag = msk.get(F_CODPAG); TString4 codpag = msk.get(F_CODPAG);
if (codpag.empty()) if (codpag.empty())
{ {
TToken_string key; TToken_string key;
key = iva() == iva_acquisti ? "F" : "C"; key = iva() == iva_acquisti ? "F" : "C";
key.add(ini.get(MOV_CODCF, "23")); key.add(ini.get(MOV_CODCF, "23"));
codpag = cache().get(LF_CLIFO, key, CLI_CODPAG); codpag = cache().get(LF_CLIFO, key, CLI_CODPAG);
} }
if (codpag.full()) if (codpag.full())
{ {
msk.set(FS_RECALC, "X"); // Forza ricalcolo automatico msk.set(FS_RECALC, "X"); // Forza ricalcolo automatico
msk.set(F_CODPAG, codpag); msk.set(F_CODPAG, codpag);
set_scadenze(msk); set_scadenze(msk);
} }
} }
pagamento().set_sheet(pag); pagamento().set_sheet(pag);
} }
} }
if (_f1_ini && msk.find_by_id(FS_RECALC) != NULL)
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)
msk.set(F_DIFFERITA, "X");
}
} }
bool TPrimanota_application::save(bool check_dirty) bool TPrimanota_application::save(bool check_dirty)
@ -2436,9 +2482,6 @@ int TPrimanota_application::save_fppro()
return pro_notsaved; return pro_notsaved;
} }
/*const TString keyprginvio = fp_db().sq_get("PZ_KEYPRGINVIO");
const TString keyheaderfatt = fp_db().sq_get("PZ_KEYHEADERFATT");
const TString keybodyfatt = fp_db().sq_get("PZ_KEYBODYFATT");*/
const int numregcont = msk.get_int(F_NUMREG); const int numregcont = msk.get_int(F_NUMREG);
const int clifor = msk.get_int(F_CODCLIFOR); const int clifor = msk.get_int(F_CODCLIFOR);
@ -2459,7 +2502,6 @@ bool TPrimanota_application::save_dbmov() const
const TMask& msk = curr_mask(); const TMask& msk = curr_mask();
const TString& numreg = msk.get(H_NUMREG); const TString& numreg = msk.get(H_NUMREG);
const TString& keyfppro = msk.get(F_PROKEY); const TString& keyfppro = msk.get(F_PROKEY);
const TString& progfppro = msk.get(F_PROTFPPRO);
TLocalisamfile mov(LF_MOV); TLocalisamfile mov(LF_MOV);
mov.put(MOV_NUMREG, numreg); mov.put(MOV_NUMREG, numreg);
@ -2467,7 +2509,6 @@ bool TPrimanota_application::save_dbmov() const
if (ok) if (ok)
{ {
mov.put(MOV_KEYFPPRO, keyfppro); mov.put(MOV_KEYFPPRO, keyfppro);
mov.put(MOV_PROGFPPRO, progfppro);
ok = mov.rewrite() == NOERR; ok = mov.rewrite() == NOERR;
} }
return ok; return ok;

View File

@ -19,7 +19,6 @@
#define F_DATACOMP 116 #define F_DATACOMP 116
#define F_ANNOIVA 117 #define F_ANNOIVA 117
#define F_NUMDOCEXT 130 #define F_NUMDOCEXT 130
#define F_PROTFPPRO 230
#define F_RITFATT 231 #define F_RITFATT 231
#define F_PROKEY 232 #define F_PROKEY 232
#define F_COLFPPRO 233 #define F_COLFPPRO 233

View File

@ -615,13 +615,6 @@ BEGIN
FLAGS "D" FLAGS "D"
END END
STRING F_PROTFPPRO 18
BEGIN
PROMPT 1 19 "Codice Protocollo FPPRO "
FIELD PROGFPPRO
FLAGS "D"
END
STRING F_PROKEY 80 STRING F_PROKEY 80
BEGIN BEGIN
PROMPT 1 18 "db key" PROMPT 1 18 "db key"

View File

@ -2262,19 +2262,17 @@ bool TPrimanota_application::caus_query_handler(TMask_field& f, KEY key)
void TPrimanota_application::check_fppro_fields(TMask& m) void TPrimanota_application::check_fppro_fields(TMask& m)
{ {
if (app().has_f1_db(&m)) if (!check_causale(m.get(F_CODCAUS)) || !app().has_f1_db(&m))
{ {
if (!check_causale(m.get(F_CODCAUS)) && m.find_by_id(F_PROTFPPRO) != NULL) if(m.find_by_id(DLG_LINK) != NULL)
{
m.hide(F_PROTFPPRO);
m.disable(DLG_LINK); m.disable(DLG_LINK);
} }
else else
if (check_causale(m.get(F_CODCAUS)) && m.find_by_id(F_PROTFPPRO) != NULL && m.field(F_PROTFPPRO).hidden()) {
{ if (m.find_by_id(DLG_LINK) != NULL)
m.show(F_PROTFPPRO); m.enable(DLG_LINK);
m.enable(DLG_LINK); if (m.find_by_id(F_COLFPPRO) != NULL)
} m.show(F_COLFPPRO);
} }
} }
@ -2461,6 +2459,7 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
} }
} }
} }
check_fppro_fields(f.mask());
return ok; return ok;
} }

View File

@ -36,7 +36,6 @@
#include <automask.h> #include <automask.h>
#include "../f1/f1lib.h" #include "../f1/f1lib.h"
#define TIPO_REG_ACQ 2
#define K_ELIMMAS 0 // Key per eliminazione massima #define K_ELIMMAS 0 // Key per eliminazione massima
class TPro_msk; class TPro_msk;
@ -99,7 +98,11 @@ class TPrimanota_application : public TRelation_application
TAssoc_array _colori; // Colori delle righe TAssoc_array _colori; // Colori delle righe
bool _isfp; bool _isfp;
shared_ptr<TPro_msk> _pro_mask; shared_ptr<TPro_msk> _pro_mask;
friend class TPro_msk; bool _is_set_fpcheck;
int _last_date;
bool _f1_ini;
bool _f1_liq;
friend class TPro_msk;
static bool showpartite_handler(TMask_field& f, KEY k); static bool showpartite_handler(TMask_field& f, KEY k);
static bool speserimb_handler(TMask_field& f, KEY k); static bool speserimb_handler(TMask_field& f, KEY k);
@ -188,6 +191,8 @@ class TPrimanota_application : public TRelation_application
static void fppromask_set_handl(TMask* msk); static void fppromask_set_handl(TMask* msk);
static void load_list(TMask* msk, KEY k); static void load_list(TMask* msk, KEY k);
static void f1_init_modify(TMask& m, const TRectype& mov);
void reset_sheet_row(TSheet_field& s, int n); void reset_sheet_row(TSheet_field& s, int n);
int crea_somma_spese(TImporto& imp); int crea_somma_spese(TImporto& imp);
void update_saldo_riga(int r); void update_saldo_riga(int r);
@ -209,6 +214,7 @@ protected: // TApplication
bool save_dbmov() const; bool save_dbmov() const;
// Pulisce il mov e db dai firerimenti FPPRO (in MODE_MOD per edit/delete) // Pulisce il mov e db dai firerimenti FPPRO (in MODE_MOD per edit/delete)
void clean_fppro(); void clean_fppro();
void set_has_f1_db(TMask* m);
bool has_f1_db(TMask* m); bool has_f1_db(TMask* m);
virtual bool save(bool check_dirty); virtual bool save(bool check_dirty);
@ -216,6 +222,7 @@ protected: // TApplication
bool force_mask_swap(const TCausale& old_caus, const TCausale& new_caus); bool force_mask_swap(const TCausale& old_caus, const TCausale& new_caus);
protected: // TRelation_application protected: // TRelation_application
void check_f1_ini();
virtual bool user_create(); virtual bool user_create();
virtual bool user_destroy(); virtual bool user_destroy();
virtual bool changing_mask(int mode); virtual bool changing_mask(int mode);
@ -354,6 +361,7 @@ public:
static bool iva_notify(TSheet_field& s, int r, KEY key); static bool iva_notify(TSheet_field& s, int r, KEY key);
static bool cg_notify(TSheet_field& s, int r, KEY key); static bool cg_notify(TSheet_field& s, int r, KEY key);
bool get_isfp() const { return _isfp; } bool get_isfp() const { return _isfp; }
int get_lastdate() { return _last_date; }
TMask * mask(CGMaskType type) { return _msk[type]; } TMask * mask(CGMaskType type) { return _msk[type]; }

View File

@ -1186,7 +1186,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
} }
#ifdef DBG #ifdef DBG
if (nr == 97882 || nr == 98707) if (nr == 97882 || nr == 98707)
int i = 1; int i = 1;
#endif #endif
const TRectype& rcs = _cur->curr(LF_CAUSALI); const TRectype& rcs = _cur->curr(LF_CAUSALI);
const TDate datareg = _mov->get_date(MOV_DATAREG); const TDate datareg = _mov->get_date(MOV_DATAREG);
@ -1241,7 +1241,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
#ifdef DBG #ifdef DBG
if (nr == 97882 || nr == 98707) if (nr == 97882 || nr == 98707)
int i = 1; int i = 1;
#endif #endif
if (fattrit) if (fattrit)
@ -1556,7 +1556,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
long nr = _mov->get_long(MOV_NUMREG); long nr = _mov->get_long(MOV_NUMREG);
if (nr == 97882 || nr == 98707) if (nr == 97882 || nr == 98707)
int i = 1; int i = 1;
#endif #endif
if ((soloiva && if ((soloiva &&
@ -4164,10 +4164,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
if (!look_pla(att)) if (!look_pla(att))
continue; continue;
const real vf1 = _pla->get("R14"); const real vf1 = _pla->get_real("R14");
const real vf2 = _pla->get("S1"); const real vf2 = _pla->get_real("S1");
const real iaq = _pla->get("R11"); // IVA acquisti const real iaq = _pla->get_real("R11"); // IVA acquisti
const real ppg = _pla->get("R12"); // pro-rata pagato const real ppg = _pla->get_real("R12"); // pro-rata pagato
vol_aff_1 += vf1; vol_aff_1 += vf1;
vol_aff_2 += vf2; vol_aff_2 += vf2;
@ -4187,7 +4187,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
const real ris = vf1 + vf2; // gia' esclusi: NS, B3, cess. amm const real ris = vf1 + vf2; // gia' esclusi: NS, B3, cess. amm
// calcola nuovo prorata dal 1998 per ogni attivita' (miste: 1+2) // calcola nuovo prorata dal 1998 per ogni attivita' (miste: 1+2)
const real rsa = ris - (es_c1a-es_c1a_am) - (es_c3-es_c3_am); const real rsa = ris - (es_c1a-es_c1a_am) - (es_c3-es_c3_am) - ven_rev;
const real rsn = rsa - es_c1; const real rsn = rsa - es_c1;
if (!rsa.is_zero()) if (!rsa.is_zero())
{ {

View File

@ -1164,10 +1164,11 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
real vrc = _pla->get_real("R18"); // Vendite reverse charge real vrc = _pla->get_real("R18"); // Vendite reverse charge
real iaq = _pla->get_real("R11"); // IVA acquisti real iaq = _pla->get_real("R11"); // IVA acquisti
real ppg = _pla->get_real("R12"); // pro-rata pagato real ppg = _pla->get_real("R12"); // pro-rata pagato
real ven_rev = _pla->get_real("R18");
// calcola nuovo prorata per ogni attivita' (miste: 1+2) // calcola nuovo prorata per ogni attivita' (miste: 1+2)
real pr; real pr;
const real rsa = ris - (e3-e5) - (e4-e6); const real rsa = ris - (e3-e5) - (e4-e6) - ven_rev;
const real rsn = rsa - e1; const real rsn = rsa - e1;
if (!rsa.is_zero()) if (!rsa.is_zero())

View File

@ -559,13 +559,13 @@ bool Visliq_app::calc_int(TMask_field& f, KEY k)
round_imposta(intr); round_imposta(intr);
vers = vers_netto + intr; vers = vers_netto + intr;
f.mask().set(106, vers); f.mask().set(S_VERSAMENTO, vers);
f.mask().set(107, intr); f.mask().set(S_INTERESSI, intr);
TToken_string& row = sv.row(sel); TToken_string& row = sv.row(sel);
row.add(vers, 5); sv.set_row_cell(row, S_VERSAMENTO, vers);
row.add(intr, 6); sv.set_row_cell(row, S_INTERESSI, intr);
sv.force_update(sel); sv.force_update(sel);
} }
} }
@ -638,12 +638,12 @@ bool Visliq_app::vis_all()
_mask->set_handler(DLG_PRINT, print_handler); _mask->set_handler(DLG_PRINT, print_handler);
sh.sheet_mask().set_handler(100, sel_mese_sh1); sh.sheet_mask().set_handler(100, sel_mese_sh1);
sh.sheet_mask().set_handler(104, enable_date); sh.sheet_mask().set_handler(S_RIMBORSO, enable_date);
sh.sheet_mask().set_handler(109, enable_date); sh.sheet_mask().set_handler(S_CREDF24, enable_date);
sh.sheet_mask().set_handler(110, check_date); sh.sheet_mask().set_handler(S_DATAAUT, check_date);
sv.sheet_mask().set_handler(100, sel_mese_sh2); sv.sheet_mask().set_handler(100, sel_mese_sh2);
sv.sheet_mask().set_handler(106, calc_int); sv.sheet_mask().set_handler(S_VERSAMENTO, calc_int);
const bool new_print_2000 = true; // _year >= 2000; const bool new_print_2000 = true; // _year >= 2000;
const bool compensabile = _lia->get("S9") == "CM"; const bool compensabile = _lia->get("S9") == "CM";
@ -652,16 +652,16 @@ bool Visliq_app::vis_all()
if (compensabile) if (compensabile)
{ {
const bool gestione_manuale = _lia->get_bool("B6"); const bool gestione_manuale = _lia->get_bool("B6");
sh.enable_column(107, gestione_manuale); sh.enable_column(S_CREDIVA, gestione_manuale);
for (int id = 108; shm.id2pos(id) > 0; id++) for (int id = S_CREDF24PRE; shm.id2pos(id) > 0; id++)
{ {
if ((id > 107 && id <= 110) || id == 114) if ((id > S_CREDIVA && id <= S_DATAAUT) || id == S_DESCR)
sh.enable_column(id, true); sh.enable_column(id, true);
} }
} }
else else
sh.enable_column(110); sh.enable_column(S_DATAAUT);
// fill the mask in // fill the mask in
read_general(*_mask); read_general(*_mask);
@ -1477,24 +1477,25 @@ void Visliq_app::recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field
if (sl != NULL) if (sl != NULL)
{ {
TToken_string& t = sl->row(row); TToken_string& t = sl->row(row);
t.add(itoname(i),0);
sl->set_row_cell(t, S_MESE, itoname(i));
const real iva_ven = _lam->get_real("R0"); // IVA acquisti const real iva_ven = _lam->get_real("R0"); // IVA acquisti
const real iva_acq = _lam->get_real("R1"); // IVA vendite const real iva_acq = _lam->get_real("R1"); // IVA vendite
const real ris = iva_ven - iva_acq; const real ris = iva_ven - iva_acq;
t.add(abs(ris).string(), 1); sl->set_row_cell(t, S_RISULTATO, abs(ris).string());
const real r1 = _lim->get_real("R1"); const real r1 = _lim->get_real("R1");
bool enable_date = !r1.is_zero(); bool enable_date = !r1.is_zero();
const real r5 = _lim->get_real("R5"); const real r5 = _lim->get_real("R5");
t.add(ris == ZERO ? "" : (ris > ZERO ? "D" : "C"), 2); sl->set_row_cell(t, S_DEBCRED1, ris == ZERO ? "" : (ris > ZERO ? "D" : "C"));
t.add(r1, 3); sl->set_row_cell(t, S_RIMBORSO, r1);
t.add(abs(r5), 4); sl->set_row_cell(t, S_RETTIFICHE, abs(r5));
if (!r5.is_zero()) if (!r5.is_zero())
t.add(r5 >ZERO ? "D" : "C", 5); sl->set_row_cell(t, S_DEBCRED2, r5 >ZERO ? "D" : "C");
const real criva = _lim->get_real("R15"); const real criva = _lim->get_real("R15");
const real crf24 = _lim->get_real("R16"); const real crf24 = _lim->get_real("R16");
@ -1502,11 +1503,11 @@ void Visliq_app::recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field
TDate dautf24 = _lim->get_date("D1"); TDate dautf24 = _lim->get_date("D1");
enable_date |= !autf24.is_zero(); enable_date |= !autf24.is_zero();
t.add(criva, 6); sl->set_row_cell(t, S_CREDIVA, criva);
t.add(crf24, 7); sl->set_row_cell(t, S_CREDF24PRE, crf24);
t.add(autf24, 8); sl->set_row_cell(t, S_CREDF24, autf24);
if (enable_date) if (enable_date)
t.add(dautf24, 9); sl->set_row_cell(t, S_DATAAUT, dautf24);
if (compensabile) if (compensabile)
{ {
cr_res += autf24; cr_res += autf24;
@ -1514,33 +1515,32 @@ void Visliq_app::recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field
cr_res -= criva; cr_res -= criva;
if (cr_res < ZERO) if (cr_res < ZERO)
{ {
sl->set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, 7); sl->set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, sl->cid2index(S_CREDF24PRE));
t.add("", 10); sl->set_row_cell(t, S_CREDRES, "");
} }
else else
{ {
sl->set_back_and_fore_color(NORMAL_BACK_COLOR, NORMAL_COLOR, row, 7); sl->set_back_and_fore_color(NORMAL_BACK_COLOR, NORMAL_COLOR, row, sl->cid2index(S_CREDF24PRE));
t.add(cr_res, 10); sl->set_row_cell(t, S_CREDRES, cr_res);
} }
} }
else else
t.add("", 10); sl->set_row_cell(t, S_CREDRES, "");
real r0 = _lim->get_real("R0"); real r0 = _lim->get_real("R0");
if (compensabile) if (compensabile)
r0 += autf24; r0 += autf24;
t.add(abs(r0).string(), 11); sl->set_row_cell(t, S_IVA, abs(r0).string());
t.add(r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), 12); sl->set_row_cell(t, S_DEBCRED3, r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"));
t.add(_lim->get("S3"), 13); t.add(_lim->get("S3"), 13);
for (int kk = 3; kk < 6 ; kk++) for (int kk = 3; kk < 6 ; kk++)
sl->enable_cell(row, kk); sl->enable_cell(row, kk);
sl->enable_cell(row, 7); sl->enable_cell(row, S_CREDF24PRE);
sl->enable_cell(row, 8); sl->enable_cell(row, S_CREDF24);
sl->enable_cell(row, 9); sl->enable_cell(row, S_DATAAUT, enable_date);
sl->enable_cell(row, 9, enable_date); sl->enable_cell(row, S_DESCR);
sl->enable_cell(row, 14);
} }
} }
sl->force_update(); sl->force_update();
@ -1644,79 +1644,68 @@ void Visliq_app::read_general(TMask& m)
const int row = (i/step) - 1; const int row = (i/step) - 1;
if (!look_lim(i)) if (!look_lim(i))
{ {
if (sh.items() < row) TToken_string & t = sh.row(row);
sh.row(row) = *(new TToken_string("||||||"));
else t.cut(0);
sh.row(row) = "||||||";
sh.disable_cell(row, -1); sh.disable_cell(row, -1);
continue;
} }
else
TToken_string* tt = NULL; {
if (sh.items() < row) const real iva_ven = _lam->get_real("R0"); // IVA acquisti
tt = new TToken_string(80); const real iva_acq = _lam->get_real("R1"); // IVA vendite
else const real ris = iva_ven - iva_acq;
tt = &(sh.row(row)); 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));
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_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 iva_ven = _lam->get_real("R0"); // IVA acquisti const real criva = _lim->get_real("R15");
const real iva_acq = _lam->get_real("R1"); // IVA vendite const real crf24 = _lim->get_real("R16");
const real ris = iva_ven -iva_acq; const real autf24 = _lim->get_real("R20");
bool enable_date = r1 != ZERO;
const real r1 = _lim->get_real("R1");
const real r5abs = abs(_lim->get_real("R5"));
tt->add(itoname(i),0); sh.set_row_cell(S_CREDIVA, criva, row);
tt->add(abs(ris).string(),1); sh.set_row_cell(S_CREDF24PRE,crf24, row);
sh.set_row_cell(S_CREDF24, autf24 , row);
const int sris = ris.sign(); enable_date |= autf24 != ZERO;
const int sr5 = (_lim->get_real("R5")).sign(); if (enable_date)
tt->add(sris == 0 ? "" : (sris > 0 ? "D" : "C"),2);
tt->add(r1.string(),3);
tt->add(r5abs.string(),4);
bool enable_date = !r1.is_zero();
tt->add(sr5 == 0 ? "" : (sr5 > 0 ? "D" : "C"),5);
const real criva = _lim->get_real("R15");
tt->add(criva.string(), 6);
const real crf24 = _lim->get_real("R16");
tt->add(crf24.string(),7);
const real autf24 = _lim->get_real("R20");
tt->add(autf24.string(),8);
enable_date |= !autf24.is_zero();
TDate dautf24 = _lim->get_date("D1");
if (enable_date)
tt->add(dautf24.string(),9);
sh.enable_cell(row, 9, enable_date);
if (compensabile)
{
cr_res += autf24;
cr_res -= crf24;
cr_res -= criva;
if (cr_res < ZERO)
{ {
sh.set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, 7); const TDate dautf24 = _lim->get_date("D1");
tt->add("", 10);
sh.set_row_cell(S_DATAAUT, dautf24, row);
}
sh.enable_cell(row, sh.cid2index(S_DATAAUT), enable_date);
if (compensabile)
{
cr_res += autf24;
cr_res -= crf24;
cr_res -= criva;
if (cr_res < ZERO)
{
sh.set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, sh.cid2index(S_CREDF24PRE));
sh.set_row_cell(S_CREDRES, ZERO, row);
}
else
{
sh.set_back_and_fore_color(NORMAL_BACK_COLOR, NORMAL_COLOR, row, sh.cid2index(S_CREDF24PRE));
sh.set_row_cell(S_CREDRES, cr_res , row);
}
} }
else else
{ sh.set_row_cell(S_CREDRES, ZERO, row);
sh.set_back_and_fore_color(NORMAL_BACK_COLOR, NORMAL_COLOR, row, 7);
tt->add(cr_res.string(), 10);
}
}
else
tt->add("", 10);
real r0 = _lim->get_real("R0");
//if (compensabile) real r0 = _lim->get_real("R0");
// r0 += autf24;
tt->add(abs(r0).string(), 11); sh.set_row_cell(S_IVA, abs(r0).string(), row);
tt->add(r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), 12); sh.set_row_cell(S_DEBCRED3, r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), row);
tt->add(_lim->get("S3"), 13); sh.set_row_cell(S_DESCR, _lim->get("S3"), row);
sh.row(row) = (*tt); // sh.row(row) = (*tt);
}
} }
sh.force_update(); sh.force_update();
@ -1743,10 +1732,11 @@ void Visliq_app::read_general(TMask& m)
if (m >= 12) if (m >= 12)
m = tipod == 7 ? 12 : 13; m = tipod == 7 ? 12 : 13;
// supercauto // supercauto
if (m <= 0) continue; if (m <= 0)
continue;
versamenti[m - 1] += _del->get_real("R0"); versamenti[m - 1] += _del->get_real("R0");
interessi[m - 1] += _del->get_real("R1"); interessi[m - 1] += _del->get_real("R1");
date[m-1] = _del->get_date("D0"); date[m-1] = _del->get_date("D0");
TToken_string& b = banche[m-1]; TToken_string& b = banche[m-1];
b.add(_del->get("S7"),0); b.add(_del->get("S7"),0);
@ -1759,33 +1749,26 @@ void Visliq_app::read_general(TMask& m)
sv.destroy(); sv.destroy();
for (int i = 1; i <= 13; i++) for (int i = 1; i <= 13; i++)
{ {
if (!is_month_ok(i) && i != 13) if (!is_month_ok(i) && i != 13)
continue; continue;
nomemese = itoname(i == 13 ? 12 : i);
if (nomemese == "4 Trimestre")
nomemese = TR("4 Tr.");
if (i == 12) nomemese << TR(" acconto");
if (i == 13) nomemese << TR(" saldo");
nomemese = itoname(i == 13 ? 12 : i); const int row = sv.set_row_cell(S_MESE, nomemese); // mese
if (nomemese == "4 Trimestre")
nomemese = TR("4 Tr."); sv.set_row_cell(S_DATA, date[i - 1], row); // data vers.
if (i == 12) nomemese << TR(" acconto"); sv.set_row_cell(S_ABI, banche[i - 1].get(0), row); // azienda
if (i == 13) nomemese << TR(" saldo"); sv.set_row_cell(S_CAB, banche[i - 1].get(1), row); // dipendenza
sv.set_row_cell(S_CONC, banche[i - 1].get(2), row); // concessionaria
TToken_string tt; sv.set_row_cell(S_VERSAMENTO, versamenti[i - 1], row);// versamenti
tt.add(nomemese,0); // mese sv.set_row_cell(S_INTERESSI, interessi[i - 1], row);// interessi
tt.add(date[i-1].string(),1); // data vers.
tt.add(banche[i-1].get(0),2); // azienda
tt.add(banche[i-1].get(1),3); // dipendenza
tt.add(banche[i-1].get(2),4); // concessionaria
tt.add(versamenti[i - 1].string(), 5);// versamenti
tt.add(interessi[i - 1].string(), 6);// interessi
sv.row(-1) = tt; if (i == 12)
if (i == 12) sv.disable_cell(sv.items() - 1, -1);
sv.enable_cell(sv.items() - 1, -1, false);
} }
// sh.enable_column(0, false);
// sv.enable_column(0, false);
sh.force_update();
sv.force_update(); sv.force_update();
// save initial rows // save initial rows
@ -1840,10 +1823,8 @@ void Visliq_app::write_general(TMask& m)
// risolve menata del dettaglio si'/no // risolve menata del dettaglio si'/no
if (lfrommask) if (lfrommask)
{
for (int i = 1; i <= 13; i++) for (int i = 1; i <= 13; i++)
tt_ln.add(shm.get(101+i),i); tt_ln.add(shm.get(101+i),i);
}
// saltare una riga se dicembre (riga 11 == acconto) // saltare una riga se dicembre (riga 11 == acconto)
TToken_string& tt_vo = (TToken_string&)_vers_rows[i == 12 ? row + 1 : row]; TToken_string& tt_vo = (TToken_string&)_vers_rows[i == 12 ? row + 1 : row];
@ -1856,47 +1837,49 @@ void Visliq_app::write_general(TMask& m)
} }
// traduci contenuto righe in real pila // traduci contenuto righe in real pila
real orett(tt_lo.get(4)); real orett(tt_lo.get(cid2index(S_RETTIFICHE)));
real nrett(tt_ln.get(4)); real nrett(sh.get_real_row_cell(row, S_RETTIFICHE));
real orimb(tt_lo.get(3)); real orimb(tt_lo.get(cid2index(S_RIMBORSO)));
real nrimb(tt_ln.get(3)); real nrimb(sh.get_real_row_cell(row, S_RIMBORSO));
real overs(tt_vo.get(5)); real crcode(sh.get_real_row_cell(row, S_CREDIVA));
real nvers(tt_vn.get(5)); real crf24(sh.get_real_row_cell(row, S_CREDF24PRE));
real crcode(tt_ln.get(6)); real oautf24(tt_lo.get(cid2index(S_CREDF24)));
real crf24(tt_ln.get(7)); real autf24(sh.get_real_row_cell(row, S_CREDF24));
real oautf24(tt_lo.get(8)); TDate dautf24(sh.get_date_row_cell(row, S_DATAAUT));
real autf24(tt_ln.get(8)); TString odbcr(tt_lo.get(cid2index(S_DEBCRED2)));
TDate dautf24(tt_ln.get(9)); TString ndbcr(sh.get_str_row_cell(row, S_DEBCRED2));
TDate odate(tt_vo.get(1)); TString descr(sh.get_str_row_cell(row, S_DESCR));
TDate ndate(tt_vn.get(1));
TString odbcr(tt_lo.get(5)); real overs(tt_vo.get(cid2index(S_VERSAMENTO)));
TString ndbcr(tt_ln.get(5)); real nvers(sv.get_real_row_cell(row, S_VERSAMENTO));
TString8 oabi (tt_vo.get(2)); TDate odate(tt_vo.get(cid2index(S_DATAAUT)));
TString8 nabi (tt_vn.get(2)); TDate ndate(sv.get_date_row_cell(row, S_DATAAUT));
TString8 ocab (tt_vo.get(3)); TString8 oabi(tt_vo.get(cid2index(S_ABI)));
TString8 ncab (tt_vn.get(3)); TString8 nabi(sv.get_str_row_cell(row, S_ABI));
TString ocon (tt_vo.get(4)); TString8 ocab(tt_vo.get(cid2index(S_CAB)));
TString ncon (tt_vn.get(4)); TString8 ncab(sv.get_str_row_cell(row, S_CAB));
TString descr(tt_ln.get(13)); TString ocon(tt_vo.get(cid2index(S_CONC)));
TString ncon(sv.get_str_row_cell(row, S_CONC));
if (odbcr == "C") orett = -orett; if (odbcr == "C") orett = -orett;
if (ndbcr == "C") nrett = -nrett; if (ndbcr == "C") nrett = -nrett;
// acconto (si considererà solo a dicembre) // acconto (si considererà solo a dicembre)
TToken_string& vo = (TToken_string&)_vers_rows[_freqviva == "M" ? 11 : 3]; TToken_string& vo = (TToken_string&)_vers_rows[_freqviva == "M" ? 11 : 3];
TToken_string& vn = sv.row(_freqviva == "M" ? 11 : 3); const int row_acc = _freqviva == "M" ? 11 : 3;
real oacct (vo.get(5));
real nacct (vn.get(5)); real oacct(tt_vo.get(cid2index(S_VERSAMENTO)));
TDate aodate(vo.get(1)); real nacct(sv.get_real_row_cell(row_acc, S_VERSAMENTO));
TDate andate(vn.get(1)); TDate aodate(tt_vo.get(cid2index(S_DATA)));
TString8 aoabi (vo.get(2)); TDate andate(sv.get_date_row_cell(row_acc, S_DATA));
TString8 anabi (vn.get(2)); TString8 aoabi(tt_vo.get(cid2index(S_ABI)));
TString8 aocab (vo.get(3)); TString8 anabi(sv.get_str_row_cell(row_acc, S_ABI));
TString8 ancab (vn.get(3)); TString8 aocab(tt_vo.get(cid2index(S_CAB)));
TString aocon (vo.get(4)); TString8 ancab(sv.get_str_row_cell(row_acc, S_CAB));
TString ancon (vn.get(4)); TString aocon(tt_vo.get(cid2index(S_CONC)));
TString ancon(sv.get_str_row_cell(row_acc, S_CONC));
was_lim = look_lim(i);
was_lim = look_lim(i);
if (!was_lim) if (!was_lim)
carry = false; // blocca riporto crediti e debiti carry = false; // blocca riporto crediti e debiti
@ -2109,7 +2092,7 @@ void Visliq_app::write_general(TMask& m)
} }
// Rimetti a posto righe sheet se serve // Rimetti a posto righe sheet se serve
if (was_lim) if (was_lim) // qui
{ {
const real iva_ven = _lam->get_real("R0"); // IVA acquisti const real iva_ven = _lam->get_real("R0"); // IVA acquisti

View File

@ -35,3 +35,24 @@
#define F_CODDITTA2 201 #define F_CODDITTA2 201
#define F_RAGSOC2 202 #define F_RAGSOC2 202
#define S_MESE 101
#define S_IVA 102
#define S_DEBCRED3 103
#define S_RISULTATO 104
#define S_DEBCRED1 105
#define S_RIMBORSO 106
#define S_RETTIFICHE 107
#define S_DEBCRED2 108
#define S_CREDIVA 109
#define S_CREDF24PRE 110
#define S_CREDF24 111
#define S_DATAAUT 112
#define S_CREDRES 113
#define S_DESCR 114
#define S_DATA 102
#define S_ABI 103
#define S_CAB 104
#define S_CONC 105
#define S_VERSAMENTO 106
#define S_INTERESSI 107

View File

@ -63,6 +63,8 @@ SPREADSHEET F_VISLIQ1 -2 -1
BEGIN BEGIN
PROMPT 0 7 "Liquidazione" PROMPT 0 7 "Liquidazione"
ITEM "Mese@10" ITEM "Mese@10"
ITEM "IVA dovuta o\na credito@15"
ITEM "D/C@3"
ITEM "Risultato@15" ITEM "Risultato@15"
ITEM "D/C@3" ITEM "D/C@3"
ITEM "IVA rimborso@15" ITEM "IVA rimborso@15"
@ -73,8 +75,6 @@ BEGIN
ITEM "Credito anno in corso\nautorizzato F24@20" ITEM "Credito anno in corso\nautorizzato F24@20"
ITEM "Data autorizzazione@20" ITEM "Data autorizzazione@20"
ITEM "Credito IVA\nresiduo@15" ITEM "Credito IVA\nresiduo@15"
ITEM "IVA dovuta o\na credito@15"
ITEM "D/C@3"
ITEM "Descrizione@50" ITEM "Descrizione@50"
END END
@ -122,20 +122,20 @@ ENDPAGE
PAGE "Prospetto mensile" -1 -1 75 22 PAGE "Prospetto mensile" -1 -1 75 22
STRING 101 20 STRING S_MESE 20
BEGIN BEGIN
PROMPT 1 1 "Mese " PROMPT 1 1 "Mese "
FLAGS "D" FLAGS "D"
END END
CURRENCY 102 15 CURRENCY S_RISULTATO 15
BEGIN BEGIN
PROMPT 1 2 "Risultato " PROMPT 1 2 "Risultato "
FLAGS "D" FLAGS "D"
END END
LIST 103 1 10 LIST S_DEBCRED1 1 10
BEGIN BEGIN
PROMPT 57 2 "" PROMPT 57 2 ""
ITEM " | " ITEM " | "
@ -144,20 +144,20 @@ BEGIN
FLAGS "DU" FLAGS "DU"
END END
CURRENCY 104 15 CURRENCY S_RIMBORSO 15
BEGIN BEGIN
PROMPT 1 3 "IVA rimborso " PROMPT 1 3 "IVA rimborso "
PICTURE "." PICTURE "."
GROUP 11 GROUP 11
END END
CURRENCY 105 15 CURRENCY S_RETTIFICHE 15
BEGIN BEGIN
PROMPT 1 4 "IVA rettifiche " PROMPT 1 4 "IVA rettifiche "
GROUP 11 GROUP 11
END END
LIST 106 1 10 LIST S_DEBCRED2 1 10
BEGIN BEGIN
PROMPT 57 4 "" PROMPT 57 4 ""
ITEM " | " ITEM " | "
@ -167,28 +167,28 @@ BEGIN
GROUP 11 GROUP 11
END END
CURRENCY 107 15 CURRENCY S_CREDIVA 15
BEGIN BEGIN
PROMPT 1 5 "Credito utilizzato IVA " PROMPT 1 5 "Credito utilizzato IVA "
FLAGS "D" FLAGS "D"
GROUP 12 GROUP 12
END END
CURRENCY 108 15 CURRENCY S_CREDF24PRE 15
BEGIN BEGIN
PROMPT 1 6 "Credito utilizzato F24 anno precedente " PROMPT 1 6 "Credito utilizzato F24 anno precedente "
GROUP 12 GROUP 12
FLAGS "D" FLAGS "D"
END END
CURRENCY 109 15 CURRENCY S_CREDF24 15
BEGIN BEGIN
PROMPT 1 7 "Credito autorizzato F24 anno in corso " PROMPT 1 7 "Credito autorizzato F24 anno in corso "
GROUP 12 GROUP 12
FLAGS "D" FLAGS "D"
END END
DATE 110 DATE S_DATAAUT
BEGIN BEGIN
PROMPT 1 8 "Data di autorizzazione " PROMPT 1 8 "Data di autorizzazione "
GROUP 12 GROUP 12
@ -197,21 +197,21 @@ BEGIN
FLAGS "D" FLAGS "D"
END END
CURRENCY 111 15 CURRENCY S_CREDRES 15
BEGIN BEGIN
PROMPT 1 9 "Credito IVA residuo " PROMPT 1 9 "Credito IVA residuo "
FLAGS "D" FLAGS "D"
GROUP 12 GROUP 12
END END
CURRENCY 112 15 CURRENCY S_IVA 15
BEGIN BEGIN
PROMPT 1 10 "IVA dovuta o credito " PROMPT 1 10 "IVA dovuta o credito "
FLAGS "D" FLAGS "D"
GROUP 12 GROUP 12
END END
LIST 113 1 10 LIST S_DEBCRED3 1 10
BEGIN BEGIN
PROMPT 57 10 "" PROMPT 57 10 ""
ITEM " | " ITEM " | "
@ -221,7 +221,7 @@ BEGIN
GROUP 11 GROUP 11
END END
STRING 114 50 35 STRING S_DESCR 50 35
BEGIN BEGIN
PROMPT 1 11 "Descr. " PROMPT 1 11 "Descr. "
GROUP 12 GROUP 12
@ -244,18 +244,18 @@ ENDPAGE
PAGE "Prospetto versamenti" -1 -1 50 12 PAGE "Prospetto versamenti" -1 -1 50 12
STRING 101 20 STRING S_MESE 20
BEGIN BEGIN
PROMPT 1 1 "Mese " PROMPT 1 1 "Mese "
FLAGS "D" FLAGS "D"
END END
DATE 102 DATE S_DATA
BEGIN BEGIN
PROMPT 1 2 "Data " PROMPT 1 2 "Data "
END END
NUMBER 103 5 NUMBER S_ABI 5
BEGIN BEGIN
PROMPT 1 3 "Codice ABI " PROMPT 1 3 "Codice ABI "
HELP "Codice ABI banca di appoggio" HELP "Codice ABI banca di appoggio"
@ -272,7 +272,7 @@ BEGIN
END END
NUMBER 104 5 NUMBER S_CAB 5
BEGIN BEGIN
PROMPT 1 4 "Codice CAB " PROMPT 1 4 "Codice CAB "
HELP "Codice CAB banca di appoggio" HELP "Codice CAB banca di appoggio"
@ -292,7 +292,7 @@ BEGIN
END END
NUMBER 105 3 NUMBER S_CONC 3
BEGIN BEGIN
PROMPT 1 5 "Concessione " PROMPT 1 5 "Concessione "
FLAGS "RZ" FLAGS "RZ"
@ -306,20 +306,17 @@ BEGIN
HELP "Codice Concessione del Comune di residenza fiscale" HELP "Codice Concessione del Comune di residenza fiscale"
END END
CURRENCY S_VERSAMENTO 15
CURRENCY 106 15
BEGIN BEGIN
PROMPT 1 6 "Versamenti " PROMPT 1 6 "Versamenti "
END END
CURRENCY 107 15 CURRENCY S_INTERESSI 15
BEGIN BEGIN
PROMPT 1 6 "Interessi " PROMPT 1 6 "Interessi "
FLAGS "RD" FLAGS "RD"
END END
BUTTON 100 10 2 BUTTON 100 10 2
BEGIN BEGIN
PROMPT -11 -1 "Dettaglio" PROMPT -11 -1 "Dettaglio"

View File

@ -1,3 +1,3 @@
20 20
0 0
$clifo|774|774|875|0|Clienti/Fornitori||| $clifo|||905|0|Clienti/Fornitori|||

View File

@ -34,7 +34,7 @@ PTELEX|1|10|0|Prefisso del numero di TELEX
TELEX|1|30|0|Prefisso del numero di TELEX TELEX|1|30|0|Prefisso del numero di TELEX
MAIL|1|50|0|Indirizzo di posta elettronica generico MAIL|1|50|0|Indirizzo di posta elettronica generico
BYMAIL|8|1|0|Consenso all' invio dei documenti per posta elettronica BYMAIL|8|1|0|Consenso all' invio dei documenti per posta elettronica
PEC|1|50|0|Indirizzo di posta elettronica certificato PEC|1|80|0|Indirizzo di posta elettronica certificato
DOCMAIL|1|50|0|Indirizzo di posta elettronica per i documenti DOCMAIL|1|50|0|Indirizzo di posta elettronica per i documenti
DATANASC|5|8|0|Data di nascita DATANASC|5|8|0|Data di nascita
STATONASC|2|3|0|Codice stato di nascita STATONASC|2|3|0|Codice stato di nascita
@ -64,10 +64,10 @@ ENTE|1|4|0|Codice ente pubblico di appartenenza (Dipendente Pubblico)
SPLITPAY|8|1|0|Ente pubblico soggetto a split payment SPLITPAY|8|1|0|Ente pubblico soggetto a split payment
UTENTE|1|32|0|Utente dell'ultima modifica UTENTE|1|32|0|Utente dell'ultima modifica
DATAAGG|5|8|0|Data ultima modifica DATAAGG|5|8|0|Data ultima modifica
CODRFSO|1|6|0|Codice Rappresentate Fisc/Stabile Org CODRFSO|1|6|0|Missing description
DATARFSO|5|8|0|Data Rappresentate Fisc/Stabile Org DATARFSO|5|8|0|Missing description
INIFATTEL|5|8|0|Data inizio fatturazione elettronica INIFATTEL|5|8|0|Missing description
INIREVCHG|5|8|0|Data inizio reverse charge INIREVCHG|5|8|0|Missing description
6 6
TIPOCF+CODCF| TIPOCF+CODCF|
TIPOCF+UPPER(RAGSOC)|X TIPOCF+UPPER(RAGSOC)|X

View File

@ -1,3 +1,3 @@
23 23
0 0
$mov|0|0|479|0|Movimenti di prima nota|NMOV|| $mov|96174|96174|559|0|Movimenti di prima nota|NMOV||

View File

@ -1,5 +1,5 @@
23 23
59 60
ANNOES|9|4|0|Codice esercizio ANNOES|9|4|0|Codice esercizio
NUMREG|3|7|0|Numero di operazione NUMREG|3|7|0|Numero di operazione
DATAREG|5|8|0|Data operazione DATAREG|5|8|0|Data operazione
@ -59,6 +59,7 @@ CFBOLLADOG|1|7|0|Codice fornitore a cui
TFINVIO|7|1|0|Flag Invio Trasferimento Fatture TFINVIO|7|1|0|Flag Invio Trasferimento Fatture
TFDATA|5|8|0|Data ultimo invio Trasferimento Fatture TFDATA|5|8|0|Data ultimo invio Trasferimento Fatture
IVALIQ|8|1|0|Iva per cassa liquidata completamente IVALIQ|8|1|0|Iva per cassa liquidata completamente
KEYFPPRO|1|80|0|Chiavi dell'FPPRO [KEYPRGINVIO;KEYHEADERFATT;KEYBODYFATT]
4 4
NUMREG| NUMREG|
DATAREG+NUMREG|X DATAREG+NUMREG|X

View File

@ -1,6 +1,6 @@
USE 31 USE 31
JOIN 14 INTO NPROGTR==NPROGTR JOIN 14 INTO NPROGTR==NPROGTR
JOIN 20 INTO TIPOCF=="F" CODCF==CODCF JOIN 20 INTO TIPOCF=="C" CODCF==CODCF
JOIN 17 TO 20 INTO TIPOCF==TIPOCF CODCF==CODCF JOIN 17 TO 20 INTO TIPOCF==TIPOCF CODCF==CODCF
JOIN 16 TO 17 INTO TIPOCF==TIPOCF CODCF==CODCF CODIND==CODINDEFF JOIN 16 TO 17 INTO TIPOCF==TIPOCF CODCF==CODCF CODIND==CODINDEFF
JOIN 13 TO 20 INTO COM==COMCF JOIN 13 TO 20 INTO COM==COMCF
@ -70,7 +70,7 @@ END
STRING 6 20 STRING 6 20
BEGIN BEGIN
KEY "scritta titolo righe del body" KEY "scritta titolo righe del body"
PROMPT 2 7 "CREDITORE" PROMPT 2 7 "DEBITORE"
END END
STRING 7 10 STRING 7 10
BEGIN BEGIN
@ -112,12 +112,12 @@ END
SECTION BODY ODD 6 SECTION BODY ODD 6
STRING 15 2 1 STRING 15 2 1
BEGIN BEGIN
KEY "creditore" KEY "debitore"
PROMPT 1 1 "@B" PROMPT 1 1 "@B"
END END
STRING 16 25 2 STRING 16 25 2
BEGIN BEGIN
KEY "creditore" KEY "debitore"
PROMPT 2 1 "" PROMPT 2 1 ""
FIELD 20->RAGSOC FIELD 20->RAGSOC
MESSAGE INC,FL->2 MESSAGE INC,FL->2

View File

@ -1,6 +1,6 @@
USE 31 USE 31
JOIN 14 INTO NPROGTR==NPROGTR JOIN 14 INTO NPROGTR==NPROGTR
JOIN 20 INTO TIPOCF=="C" CODCF==CODCF JOIN 20 INTO TIPOCF==TIPOCF CODCF==CODCF
JOIN 17 TO 20 INTO TIPOCF==TIPOCF CODCF==CODCF JOIN 17 TO 20 INTO TIPOCF==TIPOCF CODCF==CODCF
JOIN 16 TO 17 INTO TIPOCF==TIPOCF CODCF==CODCF CODIND==CODINDEFF JOIN 16 TO 17 INTO TIPOCF==TIPOCF CODCF==CODCF CODIND==CODINDEFF
JOIN 13 TO 20 INTO COM==COMCF JOIN 13 TO 20 INTO COM==COMCF

View File

@ -92,6 +92,11 @@ TString get_dataendreg()
return ini_get_string(FILE_CONFIG, FILE_SECTION, "dataendreg"); return ini_get_string(FILE_CONFIG, FILE_SECTION, "dataendreg");
} }
bool get_periodprec()
{
return ini_get_bool(CONFIG_DITTA, FILE_SECTION, "flag_periodprec");
}
void set_endatareg(bool enable) void set_endatareg(bool enable)
{ {
ini_set_bool(FILE_CONFIG, FILE_SECTION, "endatareg", enable); ini_set_bool(FILE_CONFIG, FILE_SECTION, "endatareg", enable);
@ -107,6 +112,11 @@ void set_dataendreg(const TString& date)
ini_set_string(FILE_CONFIG, FILE_SECTION, "dataendreg", date); ini_set_string(FILE_CONFIG, FILE_SECTION, "dataendreg", date);
} }
void set_periodprec(bool flag)
{
ini_set_bool(CONFIG_DITTA, FILE_SECTION, "flag_periodprec", flag);
}
bool check_causale(const TString& cod_caus) bool check_causale(const TString& cod_caus)
{ {
return check_causale(cod_caus, "FA") || check_causale(cod_caus, "NC"); return check_causale(cod_caus, "FA") || check_causale(cod_caus, "NC");
@ -130,13 +140,13 @@ bool check_causale(const TString& cod_caus, const TString& tipo_doc)
return false; return false;
} }
void run_cont_ini() void run_cont_ini(bool liq)
{ {
static TString run_string; static TString run_string;
#ifdef DBG #ifdef DBG
run_string.cut(0) << "cg2 -0 -i" << F1_INIREGCONT << "*" << ".ini" << " /u" << user(); run_string.cut(0) << "cg2 -0 -i" << F1_INIREGCONT << "*" << ".ini" << " -f1" << (liq? " -liq" : " ") << " /u" << user();
#else #else
run_string.cut(0) << "cg2 -0 -i" << TFilename().tempdir() << "\\" << F1_INIREGCONT << "*" << ".ini" << " /u" << user(); run_string.cut(0) << "cg2 -0 -i" << TFilename().tempdir() << "\\" << F1_INIREGCONT << "*" << ".ini" << " -f1" << (liq ? " -liq" : " ") << " /u" << user();
#endif #endif
TExternal_app(run_string).run(); TExternal_app(run_string).run();
} }
@ -151,14 +161,7 @@ void TF1_log::log(int severity, const char* msg)
} }
static TString txt; static TString txt;
txt.cut(0); txt.cut(0) << msg;
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); _log->log(severity, txt);
// Scrivo anche su file // Scrivo anche su file
std::filebuf fb; std::filebuf fb;
@ -166,8 +169,8 @@ void TF1_log::log(int severity, const char* msg)
std::ostream os(&fb); std::ostream os(&fb);
os << txt << std::endl; os << txt << std::endl;
fb.close(); fb.close();
} }
bool TF1_log::show_log() bool TF1_log::show_log()
{ {
if (_log) if (_log)

View File

@ -55,19 +55,23 @@ public:
bool show_log(); bool show_log();
}; };
void set_ini_codcaus(const TString& codcaus, bool nc = false);
const char* get_ini_codcaus(bool nc = false); const char* get_ini_codcaus(bool nc = false);
const char* get_codcaus(const char * tipodoc, const char* codcf); const char* get_codcaus(const char * tipodoc, const char* codcf);
bool get_endatareg(); bool get_endatareg();
TString get_datainireg(); TString get_datainireg();
TString get_dataendreg(); TString get_dataendreg();
bool get_periodprec();
void set_ini_codcaus(const TString& codcaus, bool nc = false);
void set_endatareg(bool enable); void set_endatareg(bool enable);
void set_datainireg(const TString& date); void set_datainireg(const TString& date);
void set_dataendreg(const TString& date); void set_dataendreg(const TString& date);
void set_periodprec(bool flag);
// Controlla se il "cod_caus" e' per Fatture d'acquisto o Note Credito d'Acquisto // Controlla se il "cod_caus" e' per Fatture d'acquisto o Note Credito d'Acquisto
bool check_causale(const TString& cod_caus); bool check_causale(const TString& cod_caus);
// Controlla se il "cod_caus" ha come "tipo_doc" FA o NC (di acquisto) // 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); bool check_causale(const TString& cod_caus, const TString& tipo_doc);
void run_cont_ini(); void run_cont_ini(bool liq);
#endif #endif

View File

@ -48,6 +48,7 @@ void TParametri_mask::save_all() const
fp_settings().set_check_not_block(get_bool(F_CHECK_NOT_BLOCK)); fp_settings().set_check_not_block(get_bool(F_CHECK_NOT_BLOCK));
fp_settings().set_no_sconti_fatt(get_bool(F_CHECK_NO_SCONTI)); fp_settings().set_no_sconti_fatt(get_bool(F_CHECK_NO_SCONTI));
fp_settings().set_no_export_pronto(get_bool(F_CHECK_NO_EXPORT_PRONTO)); fp_settings().set_no_export_pronto(get_bool(F_CHECK_NO_EXPORT_PRONTO));
fp_settings().set_data_start_fatt(get_date(F_STARTFATTEL));
TFP_righe_custom().save_sheet(sfield(F_FORMPERS)); TFP_righe_custom().save_sheet(sfield(F_FORMPERS));
TFP_nota_piede_f().save_sheet(sfield(F_NPFSHEET)); TFP_nota_piede_f().save_sheet(sfield(F_NPFSHEET));
} }
@ -226,6 +227,10 @@ bool TParametri_mask::on_field_event(TOperable_field& o, TField_event e, long jo
} }
} }
break; break;
case F_STARTFATTEL:
if (e == fe_init)
field(F_STARTFATTEL).set(fp_settings().get_data_start_fatt());
break;
default: default:
break; break;
} }

View File

@ -11,6 +11,7 @@
#define F_CHECK_NOT_BLOCK 211 #define F_CHECK_NOT_BLOCK 211
#define F_CHECK_NO_SCONTI 212 #define F_CHECK_NO_SCONTI 212
#define F_CHECK_NO_EXPORT_PRONTO 213 #define F_CHECK_NO_EXPORT_PRONTO 213
#define F_STARTFATTEL 214
#define F_SETPATCH 301 #define F_SETPATCH 301
#define F_ENPTYTABLE 302 #define F_ENPTYTABLE 302

View File

@ -87,6 +87,16 @@ BEGIN
FLAGS "" FLAGS ""
END END
GROUPBOX DLG_NULL 78 3
BEGIN
PROMPT 1 16 "@BInizio Fatturazione Elettronica"
END
DATE F_STARTFATTEL
BEGIN
PROMPT 2 17 "Data inizio (default 01-01-2019)"
END
ENDPAGE ENDPAGE
PAGE "Configurazione (2) " 0 2 0 0 PAGE "Configurazione (2) " 0 2 0 0

View File

@ -14,6 +14,7 @@
#define FILTER_ASS "E" #define FILTER_ASS "E"
#define FILTER_ALL "A" #define FILTER_ALL "A"
#define FILTER_CONT "C" #define FILTER_CONT "C"
#define PARA_FP "fp"
enum enum
{ {
@ -53,7 +54,7 @@ protected:
// Tasto nuovo: apre nuovo fornitore valorizzando già i dati dalla fattura // Tasto nuovo: apre nuovo fornitore valorizzando già i dati dalla fattura
void new_forn(); void new_forn();
// Tasto aggiorna: aggiorna cliente che non corrisponde. // Tasto aggiorna: aggiorna cliente che non corrisponde.
void aggiorna_forn(); bool aggiorna_forn();
void salva_for() const; void salva_for() const;
void clean_ini(const TString& filename) const; void clean_ini(const TString& filename) const;
void run_cg0(const TString& filename) const; void run_cg0(const TString& filename) const;
@ -151,7 +152,7 @@ void TPassive_mask::fill()
"LEFT JOIN PAA2600F PAA26 ON P1_KEYPRGINVIO = PP_KEYPRGINVIO and P1_KEYHEADERFATT = PP_KEYHEADERFATT and P1_KEYBODYFATT = PP_KEYBODYFATT\n" << "LEFT JOIN PAA2600F PAA26 ON P1_KEYPRGINVIO = PP_KEYPRGINVIO and P1_KEYHEADERFATT = PP_KEYHEADERFATT and P1_KEYBODYFATT = PP_KEYBODYFATT\n" <<
"LEFT JOIN PAA3200F PAA32 ON P1_KEYPRGINVIO = PU_KEYPRGINVIO and P1_KEYHEADERFATT = PU_KEYHEADERFATT and P1_KEYBODYFATT = PU_KEYBODYFATT\n" << "LEFT JOIN PAA3200F PAA32 ON P1_KEYPRGINVIO = PU_KEYPRGINVIO and P1_KEYHEADERFATT = PU_KEYHEADERFATT and P1_KEYBODYFATT = PU_KEYBODYFATT\n" <<
"LEFT JOIN FPPRO00F FPPRO ON P1_KEYPRGINVIO = PZ_KEYPRGINVIO and P1_KEYHEADERFATT = PZ_KEYHEADERFATT and P1_KEYBODYFATT = PZ_KEYBODYFATT\n" << "LEFT JOIN FPPRO00F FPPRO ON P1_KEYPRGINVIO = PZ_KEYPRGINVIO and P1_KEYHEADERFATT = PZ_KEYHEADERFATT and P1_KEYBODYFATT = PZ_KEYBODYFATT\n" <<
"WHERE P7_DATA >= \'" << dal.date2ansi() << "\' AND P7_DATA <= \'" << al.date2ansi() << "\'" << prots_query << "\n" << "WHERE PZ_DATAORARIC >= \'" << dal.date2ansi() << "\' AND PZ_DATAORARIC < \'" << al.date2ansi()+1 << "\'" << prots_query << "\n" <<
"GROUP BY YEAR(P7_DATA), P7_TIPODOC, P7_NUMERO, P7_DATA, PZ_DATAORARIC, PQ_IMPTOTDOC, PZ_NUMREGCONT, PZ_DATAREGCONT, P2_ANADENOMIN, P2_ANANOME, P2_ANACOGNOME, P2_FISCIVACOD, P2_CODFISCALE, P2_FISCIVAPAESE,\n" << "GROUP BY YEAR(P7_DATA), P7_TIPODOC, P7_NUMERO, P7_DATA, PZ_DATAORARIC, PQ_IMPTOTDOC, PZ_NUMREGCONT, PZ_DATAREGCONT, P2_ANADENOMIN, P2_ANANOME, P2_ANACOGNOME, P2_FISCIVACOD, P2_CODFISCALE, P2_FISCIVAPAESE,\n" <<
"P1_CODDEST, PU_PEC, P1_KEYPRGINVIO, P1_KEYHEADERFATT, P1_KEYBODYFATT, PZ_TIPOPROT, PZ_NUMPROT, PZ_ANNOPROT, PZ_TIPOCF, PZ_CLIFOR\n" << "P1_CODDEST, PU_PEC, P1_KEYPRGINVIO, P1_KEYHEADERFATT, P1_KEYBODYFATT, PZ_TIPOPROT, PZ_NUMPROT, PZ_ANNOPROT, PZ_TIPOCF, PZ_CLIFOR\n" <<
"ORDER BY " << (ordin == "D"? "P7_DATA" : "PZ_DATAORARIC") << " " << (verso_ord == "C"? "ASC" : "DESC"); "ORDER BY " << (ordin == "D"? "P7_DATA" : "PZ_DATAORARIC") << " " << (verso_ord == "C"? "ASC" : "DESC");
@ -512,7 +513,7 @@ void TPassive_mask::clean_ini(const TString& filename) const
#ifdef DBG #ifdef DBG
remove_string.cut(0) << filename << "*.ini"; remove_string.cut(0) << filename << "*.ini";
#else #else
remove_string.cut(0) << _tmp_dir << "\\" << filename << "*.*"; remove_string.cut(0) << _tmp_dir << "\\" << filename << "*.ini";
#endif #endif
remove_files(remove_string, false); remove_files(remove_string, false);
} }
@ -520,7 +521,11 @@ void TPassive_mask::clean_ini(const TString& filename) const
void TPassive_mask::run_cg0(const TString& filename) const void TPassive_mask::run_cg0(const TString& filename) const
{ {
static TString run_string; static TString run_string;
run_string.cut(0) << "cg0 -1 -i" << _tmp_dir << "\\" << filename << "*" << ".ini" << " /u" << user(); #ifdef DBG
run_string.cut(0) << "cg0 -1 -i" << filename << "*.ini" << " /u" << user();
#else
run_string.cut(0) << "cg0 -1 -i" << _tmp_dir << "\\" << filename << "*.ini" << " /u" << user();
#endif
TExternal_app(run_string).run(); TExternal_app(run_string).run();
} }
@ -550,6 +555,7 @@ int TPassive_mask::prepara_contab() const
newf_ini << F1_INIREGCONT << num << ".ini"; newf_ini << F1_INIREGCONT << num << ".ini";
#endif #endif
TConfig contab_ini(newf_ini, "Transaction"); TConfig contab_ini(newf_ini, "Transaction");
TString prokeys = row->get(sf.cid2index(S_PROKEY));
contab_ini.set("Action", "INSERT"); contab_ini.set("Action", "INSERT");
@ -561,7 +567,41 @@ int TPassive_mask::prepara_contab() const
contab_ini.set("NUMDOCEXT", row->get(sf.cid2index(S_NDOC))); 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("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("TOTDOC", abs(real(row->get(sf.cid2index(S_TOTDOC)))).string());
contab_ini.set("KEYFPPRO", row->get(sf.cid2index(S_PROKEY))); contab_ini.set("KEYFPPRO", prokeys);
// Se ci sono le scadenze esporto anche quelle
TToken_string keys(prokeys, ';');
TString where_q;
where_q << "WHERE PO_KEYPRGINVIO = '" << keys.get() << "'";
where_q << " AND PO_KEYHEADERFATT = '" << keys.get() << "'";
where_q << " AND PO_KEYBODYFATT = '" << keys.get() << "'";
TString query; query << "SELECT PO_RIGA AS RIGA, PO_DATASCADENZA AS DATA, PO_IMPORTO AS IMPORTO \nFROM PAA2500F \n" << where_q;
fp_db().sq_set_exec(query,false);
for (bool ok = fp_db().sq_next(); ok; ok = fp_db().sq_next())
{
const int riga = real(fp_db().sq_get("RIGA")).integer();
contab_ini.set_paragraph(LF_SCADENZE, riga); // Setto il paragrafo con riga scad
contab_ini.set("DATASCAD", fp_db().sq_get_date("DATA"));
contab_ini.set("IMPORTO", fp_db().sq_get("IMPORTO"));
contab_ini.set("NRATA", riga);
contab_ini.set("NRIGA", "1");
}
where_q.cut(0) << "WHERE PL_KEYPRGINVIO = '" << keys.get(0);
where_q << "' AND PL_KEYHEADERFATT = '" << keys.get();
where_q << "' AND PL_KEYBODYFATT = '" << keys.get() << "'";
query.cut(0) << "SELECT PL_IMPONIBILE AS IMPONIBILE, PL_IMPOSTA AS IMPOSTA \nFROM PAA2200F \n" << where_q;
fp_db().sq_set_exec(query, false);
int i = 1;
for (bool ok = fp_db().sq_next(); ok; ok = fp_db().sq_next(), i++)
{
contab_ini.set_paragraph(LF_RMOVIVA, i);
contab_ini.set("IMPONIBILE", fp_db().sq_get("IMPONIBILE"));
contab_ini.set("IMPOSTA", fp_db().sq_get("IMPOSTA"));
contab_ini.set("NRIGA", i);
}
row->add("", 0); row->add("", 0);
} }
@ -581,7 +621,7 @@ void TPassive_mask::log_contab()
TFilename cg_ini; TFilename cg_ini;
TString msg; TString msg;
TF1_log log; TF1_log log;
std::vector<TString> doc_saved, doc_canceled; std::vector<TString> doc_saved, doc_canceled, save_numreg, save_protiv;
FOR_EACH_SHEET_ROW(sfield(F_DOCS), n, row) FOR_EACH_SHEET_ROW(sfield(F_DOCS), n, row)
{ {
TString num; num.format("%04d", n); TString num; num.format("%04d", n);
@ -594,10 +634,17 @@ void TPassive_mask::log_contab()
{ {
TConfig config(cg_ini, "Transaction"); TConfig config(cg_ini, "Transaction");
TString numdoc; TString numdoc;
TString numreg;
TString protiv;
if (config.get("Result") == "OK") if (config.get("Result") == "OK")
{ {
numdoc = config.get("NUMDOC", "23"); numdoc = config.get("NUMDOC", "23");
numreg = config.get("NUMREG", "23");
protiv = config.get("PROTIVA", "23");
doc_saved.insert(doc_saved.end(), numdoc); doc_saved.insert(doc_saved.end(), numdoc);
save_numreg.insert(save_numreg.end(), numreg);
save_protiv.insert(save_protiv.end(), protiv);
} }
else if(config.get("Result") == "CANCEL") else if(config.get("Result") == "CANCEL")
{ {
@ -611,13 +658,15 @@ void TPassive_mask::log_contab()
if (elem_save > 0) if (elem_save > 0)
{ {
if (elem_save == 1) if (elem_save == 1)
msg << "Il documento n. '" << doc_saved[0] << "' e' stata registrato."; msg << "Il documento n. '" << doc_saved[0] << "' e' stato registrato con numero movimento contabile '" << save_numreg[0] << "' e protocollo iva '" << save_protiv[0] << "'.";
else else
msg << "Sono stati registrati " << elem_save << " documenti."; msg << "Sono stati registrati " << elem_save << " documenti.";
if (elem_save > 1) if (elem_save > 1)
for (int i = 0; i < elem_save; i++) for (int i = 0; i < elem_save; i++)
msg << "\n - Documento n. '" << doc_saved[i] << "'"; msg << "\n - Documento n. '" << doc_saved[i] << "': movimento contabile '" << save_numreg[0] << "', protocollo iva '" << save_protiv[0] << "'";
log.log(LOG_MSG, msg); TToken_string msg_tok(msg, '\n');
for(int i=0; i<msg_tok.items(); i++)
log.log(LOG_MSG, msg_tok.get());
} }
if (elem_canc > 0) if (elem_canc > 0)
{ {
@ -629,7 +678,9 @@ void TPassive_mask::log_contab()
if (elem_canc > 1) if (elem_canc > 1)
for (int i = 0; i < elem_canc; i++) for (int i = 0; i < elem_canc; i++)
msg << "\n - Documento n. '" << doc_canceled[i] << "'"; msg << "\n - Documento n. '" << doc_canceled[i] << "'";
log.log(LOG_WARN, msg); TToken_string msg_tok(msg, '\n');
for (int i = 0; i < msg_tok.items(); i++)
log.log(LOG_WARN, msg_tok.get());
} }
if (elem_save > 0 || elem_canc > 0) if (elem_save > 0 || elem_canc > 0)
log.show_log(); log.show_log();
@ -642,7 +693,8 @@ void TPassive_mask::contabilizza()
switch(stato) switch(stato)
{ {
case is_ready: case is_ready:
run_cont_ini(); // Eseguo gli ini run_cont_ini(get_bool(F_PERIODPREC));
// Eseguo gli ini
log_contab(); // Mostro stato contabilizzate/annullate log_contab(); // Mostro stato contabilizzate/annullate
clean_ini(F1_INIREGCONT); clean_ini(F1_INIREGCONT);
fill(); // Ricarico sheet per togliere quelli contabilizzati fill(); // Ricarico sheet per togliere quelli contabilizzati
@ -688,6 +740,7 @@ void TPassive_mask::new_forn()
TSheet_field& sf = sfield(F_ERR); TSheet_field& sf = sfield(F_ERR);
static const TString newf = "fpnewf"; static const TString newf = "fpnewf";
clean_ini(newf); clean_ini(newf);
FOR_EACH_SHEET_ROW(sf, nr, row) FOR_EACH_SHEET_ROW(sf, nr, row)
{ {
const TString denom = row->get(sf.cid2index(S_RAGSERR)); const TString denom = row->get(sf.cid2index(S_RAGSERR));
@ -710,7 +763,11 @@ void TPassive_mask::new_forn()
TString num; num.format("%04d", nr); TString num; num.format("%04d", nr);
TFilename newf_ini; TFilename newf_ini;
newf_ini.tempdir() << "\\" << newf << num << ".ini"; #ifdef DBG
newf_ini << newf << num << ".ini";
#else
newf_ini.tempdir() << "\\" << newf << num << ".ini";
#endif
TConfig forn_conf(newf_ini, "Transaction"); TConfig forn_conf(newf_ini, "Transaction");
@ -736,11 +793,12 @@ void TPassive_mask::new_forn()
sf.force_update(); sf.force_update();
} }
void TPassive_mask::aggiorna_forn() bool TPassive_mask::aggiorna_forn()
{ {
TSheet_field& sf = sfield(F_ERR); TSheet_field& sf = sfield(F_ERR);
static const TString newf = "fpaggf"; static const TString newf = "fpaggf";
clean_ini(newf); clean_ini(newf);
int count = 0;
FOR_EACH_SHEET_ROW(sf, nr, row) FOR_EACH_SHEET_ROW(sf, nr, row)
{ {
const TString denom = row->get(sf.cid2index(S_RAGSERR)); const TString denom = row->get(sf.cid2index(S_RAGSERR));
@ -749,9 +807,10 @@ void TPassive_mask::aggiorna_forn()
const int& n_row_elenco = forn_err.fatt_err; // Prendo che numero di riga a cui mi riferisco in fatture const int& n_row_elenco = forn_err.fatt_err; // Prendo che numero di riga a cui mi riferisco in fatture
TSheet_field& f_docs = sfield(F_DOCS); // Prendo SheetField da elenco fatture TSheet_field& f_docs = sfield(F_DOCS); // Prendo SheetField da elenco fatture
TToken_string& row_elenco_fatt = f_docs.row(n_row_elenco); // Prendo riga dall'elenco delle fatture TToken_string& row_elenco_fatt = f_docs.row(n_row_elenco); // Prendo riga dall'elenco delle fatture
if (row->starts_with("X") && cod_forn == no_match_cf) if (row->starts_with("X") && cod_forn == no_match_cf)
{ {
count++;
TLocalisamfile clifo(LF_CLIFO); TLocalisamfile clifo(LF_CLIFO);
clifo.setkey(5); clifo.setkey(5);
clifo.put(CLI_TIPOCF, 'F'); clifo.put(CLI_TIPOCF, 'F');
@ -769,7 +828,11 @@ void TPassive_mask::aggiorna_forn()
{ {
TString num; num.format("%04d", nr); TString num; num.format("%04d", nr);
TFilename newf_ini; TFilename newf_ini;
#ifdef DBG
newf_ini << newf << num << ".ini";
#else
newf_ini.tempdir() << "\\" << newf << num << ".ini"; newf_ini.tempdir() << "\\" << newf << num << ".ini";
#endif
TConfig forn_conf(newf_ini, "Transaction"); TConfig forn_conf(newf_ini, "Transaction");
forn_conf.set("Action", "MODIFY"); forn_conf.set("Action", "MODIFY");
@ -778,13 +841,20 @@ void TPassive_mask::aggiorna_forn()
forn_conf.set("TIPOCF", "F"); forn_conf.set("TIPOCF", "F");
forn_conf.set("COFI", row->get(sf.cid2index(S_CODFIERR))); forn_conf.set("COFI", row->get(sf.cid2index(S_CODFIERR)));
forn_conf.set("CODCF", clifo.get(CLI_CODCF)); forn_conf.set("CODCF", clifo.get(CLI_CODCF));
TString codsdi; codsdi << row_elenco_fatt.get(16);
row->add("", 0); if (!codsdi.empty() && codsdi != "0000000")
{
forn_conf.set_paragraph("17");
forn_conf.set("PADESTIN", codsdi);
}
} }
} }
row->add("", 0);
} }
run_cg0(newf); if (count)
run_cg0(newf);
sf.force_update(); sf.force_update();
return count;
} }
@ -855,8 +925,11 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
break; break;
case DLG_SAVEREC: case DLG_SAVEREC:
if (e == fe_button) if (e == fe_button)
if(curr_page() == elenco_fe) if (curr_page() == elenco_fe)
{
salva_for(); salva_for();
fill();
}
break; break;
case DLG_NEWREC: case DLG_NEWREC:
if(e == fe_button) if(e == fe_button)
@ -866,7 +939,8 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
case DLG_RECALC: case DLG_RECALC:
if (e == fe_button) if (e == fe_button)
if (curr_page() == elenco_err) if (curr_page() == elenco_err)
aggiorna_forn(); if (aggiorna_forn())
fill();
break; break;
case DLG_EXPORT: case DLG_EXPORT:
if (e == fe_button && curr_page() == elenco_fe) if (e == fe_button && curr_page() == elenco_fe)
@ -880,6 +954,10 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
if (e == fe_init) if (e == fe_init)
o.set(TDate(TODAY)); o.set(TDate(TODAY));
break; break;
case F_PERIODPREC:
if (e == fe_init)
o.set(get_periodprec()? "X" : "");
break;
default: break; default: break;
} }
if (o.dlg() >= F_FORNOTASS && o.dlg() <= F_CONTABIL) if (o.dlg() >= F_FORNOTASS && o.dlg() <= F_CONTABIL)
@ -970,8 +1048,9 @@ void TPassive_app::save_field(const TPassive_mask& mask)
{ {
set_ini_codcaus(mask.get(F_CAUSFA)); set_ini_codcaus(mask.get(F_CAUSFA));
set_datainireg(mask.get(F_DATAINIREG)); set_datainireg(mask.get(F_DATAINIREG));
set_periodprec(mask.get_bool(F_PERIODPREC));
} }
ini_set_string(CONFIG_DITTA, "fp", "dataini_fp04", mask.get(F_DATAINI)); ini_set_string(CONFIG_DITTA, PARA_FP, "dataini_fp04", mask.get(F_DATAINI));
} }
void TPassive_app::main_loop() void TPassive_app::main_loop()

View File

@ -15,6 +15,7 @@
#define F_DESCAUSNC 515 #define F_DESCAUSNC 515
#define F_GROUPCON 516 #define F_GROUPCON 516
#define F_GROUPCAU 517 #define F_GROUPCAU 517
#define F_PERIODPREC 518
#define END_MASK 599 #define END_MASK 599

View File

@ -124,7 +124,7 @@ BEGIN
ITEM "Codice\nProtocol.@12" ITEM "Codice\nProtocol.@12"
END END
GROUPBOX F_GROUPCAU 59 7 GROUPBOX F_GROUPCAU 59 8
BEGIN BEGIN
PROMPT 31 10 "@BSelezionare Causale per Registrazione Contabile:" PROMPT 31 10 "@BSelezionare Causale per Registrazione Contabile:"
END END
@ -213,6 +213,11 @@ BEGIN
MODULE F1 MODULE F1
END END
BOOLEAN F_PERIODPREC
BEGIN
PROMPT 33 16 "Selezione automatica liquid. periodo precedente"
END
ENDPAGE ENDPAGE
PAGE "Elenco Fatture" 0 2 0 0 PAGE "Elenco Fatture" 0 2 0 0
@ -290,7 +295,6 @@ BEGIN
PICTURE TOOL_LINK PICTURE TOOL_LINK
END END
BUTTON DLG_CANCEL 2 2 BUTTON DLG_CANCEL 2 2
BEGIN BEGIN
PROMPT 1 1 "" PROMPT 1 1 ""

View File

@ -302,6 +302,7 @@ public:
const TString& get_fld_dest() const; const TString& get_fld_dest() const;
const TString& get_fld_dest_usr() const; const TString& get_fld_dest_usr() const;
const TString& get_cofi_tras() const; const TString& get_cofi_tras() const;
const TString& get_data_start_fatt() const;
const bool get_gest_alleg() const; const bool get_gest_alleg() const;
const bool get_allega_fat() const; const bool get_allega_fat() const;
const bool get_esp_pri_empty() const; const bool get_esp_pri_empty() const;
@ -334,6 +335,7 @@ public:
void set_body_mail(const char* msg, int idx = -1) const; void set_body_mail(const char* msg, int idx = -1) const;
void set_no_sconti_fatt(const bool no_sconti_fatt) const; void set_no_sconti_fatt(const bool no_sconti_fatt) const;
void set_no_export_pronto(const bool no_export_pronto) const; void set_no_export_pronto(const bool no_export_pronto) const;
void set_data_start_fatt(const char* date) const;
void set_npf(const char * tipodoc, const char* msg, int idx) const; void set_npf(const char * tipodoc, const char* msg, int idx) const;
void set_npf_tipodoc(const TString& tipodoc, int indx) const; void set_npf_tipodoc(const TString& tipodoc, int indx) const;

View File

@ -1639,7 +1639,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
paf1200f.set("PB_RIFNUMLINEA", 0L); paf1200f.set("PB_RIFNUMLINEA", 0L);
paf1200f.set("PB_IDDOC", con); paf1200f.set("PB_IDDOC", con);
paf1200f.set("PB_DATADOCO", datadoc); paf1200f.set("PB_DATADOCO", datadoc);
paf1200f.set("PB_COMMESSACONV", com); paf1200f.set("PB_COMMCONVENZ", com);
paf1200f.set("PB_CODCUP", cup); paf1200f.set("PB_CODCUP", cup);
paf1200f.set("PB_CODCIG", cig); paf1200f.set("PB_CODCIG", cig);
paf1200f.set("PB_GESTIONE", "D"); paf1200f.set("PB_GESTIONE", "D");

View File

@ -24,6 +24,7 @@
#define FP_NOTA_PIEDE_F "npf" // Nota piede fattura #define FP_NOTA_PIEDE_F "npf" // Nota piede fattura
#define FP_CHECK_NO_SCONTI_FATT "noscontifatt" #define FP_CHECK_NO_SCONTI_FATT "noscontifatt"
#define FP_CHECK_NO_EXPORT_PRONTO "noexportpronto" #define FP_CHECK_NO_EXPORT_PRONTO "noexportpronto"
#define FP_DATASTARTFATT "datastartfatt"
// Sheet fp0300 // Sheet fp0300
#define FP_SLD_COD "SLD" #define FP_SLD_COD "SLD"
@ -87,6 +88,11 @@ const TString& TFP_settings::get_cofi_tras() const
return ini_get_string(FILE_CONFIG, FILE_SECTION, FP_COFI_TRAS); return ini_get_string(FILE_CONFIG, FILE_SECTION, FP_COFI_TRAS);
} }
const TString& TFP_settings::get_data_start_fatt() const
{
return ini_get_string(FILE_CONFIG, FILE_SECTION, FP_DATASTARTFATT, "01-01-2019");
}
const bool TFP_settings::get_gest_alleg() const const bool TFP_settings::get_gest_alleg() const
{ {
return ini_get_bool(FILE_CONFIG, FILE_SECTION, FP_GEST_ALLEG); return ini_get_bool(FILE_CONFIG, FILE_SECTION, FP_GEST_ALLEG);
@ -241,6 +247,11 @@ void TFP_settings::set_no_export_pronto(const bool no_export_pronto) const
ini_set_bool(FILE_CONFIG, FILE_SECTION, FP_CHECK_NO_EXPORT_PRONTO, no_export_pronto); ini_set_bool(FILE_CONFIG, FILE_SECTION, FP_CHECK_NO_EXPORT_PRONTO, no_export_pronto);
} }
void TFP_settings::set_data_start_fatt(const char* date) const
{
ini_set_bool(FILE_CONFIG, FILE_SECTION, FP_DATASTARTFATT, date);
}
void TFP_settings::remove_para_ini(int idx) void TFP_settings::remove_para_ini(int idx)
{ {
ini_remove(FILE_CONFIG, FILE_SECTION, FP_MAIL, idx); ini_remove(FILE_CONFIG, FILE_SECTION, FP_MAIL, idx);

View File

@ -48,11 +48,10 @@
#define BSAUT 45 #define BSAUT 45
#define HAAUT 46 #define HAAUT 46
#define RIAUT 47 #define RIAUT 47
#define VDAUT 48 #define GVAUT 48
#define GVAUT 49 #define TFAUT 49
#define TFAUT 50 #define F1AUT 50
#define F1AUT 51 #define F9AUT 51
#define F9AUT 52
#define ENDAUT 52 #define ENDAUT 52

View File

@ -18,6 +18,11 @@ extern "C"
#include <urldefid.h> #include <urldefid.h>
#include <utility.h> #include <utility.h>
int cid2index(short cid)
{
return xvtil_cid2index(cid);
}
class TCell_property : public TObject class TCell_property : public TObject
{ {
COLOR _back, _fore; COLOR _back, _fore;
@ -3064,6 +3069,71 @@ const char* TSheet_field::cell(int r, int c) const
return v ? v : " "; return v ? v : " ";
} }
int TSheet_field::set_row_cell(short id, const char * value, int nrow)
{
if (nrow < 0)
nrow = first_empty();
set_row_cell(row(nrow), id, value);
#ifdef DBG
const TToken_string & r = row(nrow);
#endif
return nrow;
}
int TSheet_field::set_row_cell(short id, char value, int nrow)
{
if (nrow < 0)
nrow = first_empty();
set_row_cell(row(nrow), id, value);
#ifdef DBG
const TToken_string & r = row(nrow);
#endif
return nrow;
}
int TSheet_field::set_row_cell(short id, long value, int nrow)
{
if (nrow < 0)
nrow = first_empty();
set_row_cell(row(nrow), id, value);
#ifdef DBG
const TToken_string & r = row(nrow);
#endif
return nrow;
}
int TSheet_field::set_row_cell(short id, int value, int nrow)
{
if (nrow < 0)
nrow = first_empty();
set_row_cell(row(nrow), id, value);
#ifdef DBG
const TToken_string & r = row(nrow);
#endif
return nrow;
}
int TSheet_field::set_row_cell(short id, const real& value, int nrow)
{
if (nrow < 0)
nrow = first_empty();
set_row_cell(row(nrow), id, value);
#ifdef DBG
const TToken_string & r = row(nrow);
#endif
return nrow;
}
int TSheet_field::set_row_cell(short id, const TDate& value, int nrow)
{
if (nrow < 0)
nrow = first_empty();
set_row_cell(row(nrow), id, value);
#ifdef DBG
const TToken_string & r = row(nrow);
#endif
return nrow;
}
// Certified 100% // Certified 100%
// Ritorna l'indice della prima riga vuota dello sheet // Ritorna l'indice della prima riga vuota dello sheet

View File

@ -18,6 +18,7 @@ class TRecord_array;
class TRelation; class TRelation;
#endif #endif
#define FIRST_FIELD 101 #define FIRST_FIELD 101
#define K_ROWEDIT ( K_CTRL + 'I' ) #define K_ROWEDIT ( K_CTRL + 'I' )
@ -35,6 +36,7 @@ typedef bool (*SPREADSHEET_NOTIFY)(TSheet_field& s, int r, KEY k);
// @type SHEET_USERGETPUT| Prototipo funzione utente che gestisce il caricamento/salvataggio dei dati dello sheet // @type SHEET_USERGETPUT| Prototipo funzione utente che gestisce il caricamento/salvataggio dei dati dello sheet
typedef void (*SHEET_USERGETPUT)(TSheet_field &fld_righe, int item); typedef void (*SHEET_USERGETPUT)(TSheet_field &fld_righe, int item);
int cid2index(short cid);
// @doc EXTERNAL // @doc EXTERNAL
// @class TSheet_field | Classe per la gestione dei campi di uno spreadsheet // @class TSheet_field | Classe per la gestione dei campi di uno spreadsheet
@ -42,113 +44,133 @@ typedef void (*SHEET_USERGETPUT)(TSheet_field &fld_righe, int item);
// @base public | TMask_field // @base public | TMask_field
class TSheet_field : public TLoadable_field class TSheet_field : public TLoadable_field
{ {
// @author:(INTERNAL) Guido // @author:(INTERNAL) Guido
// @cfriend TSpreadsheet // @cfriend TSpreadsheet
friend class TSpreadsheet; friend class TSpreadsheet;
// @access:(INTERNAL) Private Member // @access:(INTERNAL) Private Member
// @cmember:(INTERNAL) Indica se aggiungere a fondo dello spreadsheet o nella riga in cui ti trovi // @cmember:(INTERNAL) Indica se aggiungere a fondo dello spreadsheet o nella riga in cui ti trovi
bool _append; bool _append;
// @cmember:(INTERNAL) Separatore delle TToken_string // @cmember:(INTERNAL) Separatore delle TToken_string
char _separator; char _separator;
// @cmember:(INTERNAL) Flag di autoload // @cmember:(INTERNAL) Flag di autoload
bool _enable_autoload; bool _enable_autoload;
// @cmember:(INTERNAL) Campi di input sulla maschera (key field names) // @cmember:(INTERNAL) Campi di input sulla maschera (key field names)
TToken_string _file_k_names; TToken_string _file_k_names;
// @cmember:(INTERNAL) Campi di input sulla maschera (key field ids) // @cmember:(INTERNAL) Campi di input sulla maschera (key field ids)
TToken_string _file_k_ids; TToken_string _file_k_ids;
// @cmember:(INTERNAL) file delle righe // @cmember:(INTERNAL) file delle righe
TLocalisamfile * _sheetfile; TLocalisamfile * _sheetfile;
// @cmember:(INTERNAL) record array delle righe // @cmember:(INTERNAL) record array delle righe
TRecord_array* _linee_rec; TRecord_array* _linee_rec;
// @cmember:(INTERNAL) indicatore di record array gestito esternamente // @cmember:(INTERNAL) indicatore di record array gestito esternamente
bool _external_record; bool _external_record;
// @cmember:(INTERNAL) funzioni utente per get tra record (array) e array righe // @cmember:(INTERNAL) funzioni utente per get tra record (array) e array righe
SHEET_USERGETPUT _userput; SHEET_USERGETPUT _userput;
// @cmember:(INTERNAL) funzioni utente per put tra righe e record (array) // @cmember:(INTERNAL) funzioni utente per put tra righe e record (array)
SHEET_USERGETPUT _userget; SHEET_USERGETPUT _userget;
// @access Protected Member // @access Protected Member
protected: protected:
// @cmember:(INTERNAL) Identificatore dell' ultima colonna dello sheet // @cmember:(INTERNAL) Identificatore dell' ultima colonna dello sheet
short _last_column_id; short _last_column_id;
// @cmember Ritorna l'identificatore della classe // @cmember Ritorna l'identificatore della classe
virtual word class_id() const; virtual word class_id() const;
virtual bool is_kind_of(word cid) const;
// @cmember Gestisce la chiamata all'handler del campo virtual bool is_kind_of(word cid) const;
virtual bool on_hit();
// @cmember Legge la testata dello spreadsheet da <p scanner>
virtual void parse_head(TScanner& scanner);
// @cmember Legge gli item dello spreadsheet da <p scanner>
virtual bool parse_item(TScanner& scanner);
// @cmember Legge gli input (campi chiave) dello spreadsheet da <p scanner>
void parse_input(TScanner& scanner);
// @cmember Crea lo spreadsheet
virtual void create(WINDOW parent);
// @cmember Setta il focus sul campo // @cmember Gestisce la chiamata all'handler del campo
virtual void highlight() const; virtual bool on_hit();
// @cmember Ricopia i campi della maschera nel record <p n>-esimo
virtual void mask2row(int n, TToken_string & rec);
// @cmember Ricopia i campi del record <p n>-esimo nella maschera
virtual void row2mask(int n, TToken_string & rec, int mode = 0x3);
// @cmember Permette di mettere il focus su una cella
bool set_focus_cell(int riga, int colonna);
//Copy Costructor per impedire la duplicazione accidentale degli sheet // @cmember Legge la testata dello spreadsheet da <p scanner>
TSheet_field(const TSheet_field& s): TLoadable_field(&s.mask()){CHECK(false, "Can't duplicate TSheet_field");} virtual void parse_head(TScanner& scanner);
// @cmember Legge gli item dello spreadsheet da <p scanner>
virtual bool parse_item(TScanner& scanner);
// @cmember Legge gli input (campi chiave) dello spreadsheet da <p scanner>
void parse_input(TScanner& scanner);
// @cmember Crea lo spreadsheet
virtual void create(WINDOW parent);
// @access Public Member // @cmember Setta il focus sul campo
virtual void highlight() const;
// @cmember Ricopia i campi della maschera nel record <p n>-esimo
virtual void mask2row(int n, TToken_string & rec);
// @cmember Ricopia i campi del record <p n>-esimo nella maschera
virtual void row2mask(int n, TToken_string & rec, int mode = 0x3);
// @cmember Permette di mettere il focus su una cella
bool set_focus_cell(int riga, int colonna);
//Copy Costructor per impedire la duplicazione accidentale degli sheet
TSheet_field(const TSheet_field& s) : TLoadable_field(&s.mask()) { CHECK(false, "Can't duplicate TSheet_field"); }
// @access Public Member
public: public:
// @cmember Permette di mettere il focus su una cella // @cmember Permette di mettere il focus su una cella
bool set_focus_cell_id(long rec, short cid); bool set_focus_cell_id(long rec, short cid);
// @cmember Gestisce la pressione del tasto (true se la gestione ha avuto successo) // @cmember Gestisce la pressione del tasto (true se la gestione ha avuto successo)
virtual bool on_key(KEY k); virtual bool on_key(KEY k);
// @cmember Si, sono uno spreadsheet // @cmember Si, sono uno spreadsheet
virtual bool is_sheet() const { return true; } virtual bool is_sheet() const { return true; }
virtual bool empty() const { return items() == 0; } virtual bool empty() const { return items() == 0; }
// @cmember Legge automaticamente la linea dal record array assegnato // @cmember Legge automaticamente la linea dal record array assegnato
virtual bool autoload_line(int i,const TRectype & rec); virtual bool autoload_line(int i, const TRectype & rec);
// @cmember Salva automaticamente la linea nel record array assegnato // @cmember Salva automaticamente la linea nel record array assegnato
virtual bool autosave_line(int i,TRectype & rec); virtual bool autosave_line(int i, TRectype & rec);
// @cmember Legge automaticamente lo sheet dal record array assegnato // @cmember Legge automaticamente lo sheet dal record array assegnato
virtual bool autoload(const TRelation& r); virtual bool autoload(const TRelation& r);
// @cmember Salva automaticamente lo sheet nel record array assegnato // @cmember Salva automaticamente lo sheet nel record array assegnato
virtual bool autosave(TRelation& r) ; virtual bool autosave(TRelation& r);
// @cmember setta la funzione utente che Legge i campi dello sheet // @cmember setta la funzione utente che Legge i campi dello sheet
void set_userget(SHEET_USERGETPUT handler); void set_userget(SHEET_USERGETPUT handler);
// @cmember setta la funzione utente che scrive i campi dello sheet // @cmember setta la funzione utente che scrive i campi dello sheet
void set_userput(SHEET_USERGETPUT handler); void set_userput(SHEET_USERGETPUT handler);
// @cmember carica le chiavi del record array dello sheet // @cmember carica le chiavi del record array dello sheet
TRectype * putkey(const TRelation& r); TRectype * putkey(const TRelation& r);
// @cmember restituisce il record array assegnato allo sheet // @cmember restituisce il record array assegnato allo sheet
TRecord_array * record() const {return _linee_rec;} TRecord_array * record() const { return _linee_rec; }
// @cmember Imposta un record array esterno che contiene le righe dello sheet // @cmember Imposta un record array esterno che contiene le righe dello sheet
void set_lines_record(TRecord_array &); void set_lines_record(TRecord_array &);
// @cmember Ritorna se il record assegnato è gestito esternamente (read/write/remove) // @cmember Ritorna se il record assegnato è gestito esternamente (read/write/remove)
bool external_record() const {return _external_record;} bool external_record() const { return _external_record; }
// @cmember Gestisce i campi della chiave // @cmember Gestisce i campi della chiave
void restart_key(); void restart_key();
TMask_field *get_key(TString & dbfieldname); TMask_field *get_key(TString & dbfieldname);
// @cmember Ritorna una riga dello spreadsheet // @cmember Ritorna una riga dello spreadsheet
TToken_string& row(int n); TToken_string& row(int n);
// @cmember Ritorna un array con tutte le righe dello spreadsheet // @cmember Ritorna un array con tutte le righe dello spreadsheet
TString_array& rows_array() const; TString_array& rows_array() const;
// @cmember Ritorna l'elemento <p c>-esimo della riga <p r> // @cmember Ritorna l'elemento <p c>-esimo della riga <p r>
const char* cell(int r, int c) const; const char* cell(int r, int c) const;
virtual void set_row_cell(TToken_string & row, short id, const char * value) { row.add(value, cid2index(id)); }
virtual void set_row_cell(TToken_string & row, short id, char value) { row.add(value, cid2index(id)); }
virtual void set_row_cell(TToken_string & row, short id, long value) { row.add(value, cid2index(id)); }
virtual void set_row_cell(TToken_string & row, short id, int value) { row.add(value, cid2index(id)); }
virtual void set_row_cell(TToken_string & row, short id, const real& value) { row.add(value, cid2index(id)); }
virtual void set_row_cell(TToken_string & row, short id, const TDate& value) { row.add(value, cid2index(id)); }
virtual int set_row_cell(short id, const char * value, int nrow = -1);
virtual int set_row_cell(short id, char value, int nrow = -1);
virtual int set_row_cell(short id, long value, int nrow = -1);
virtual int set_row_cell(short id, int value, int nrow = -1);
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()); }
char separator() const { return _separator; } char separator() const { return _separator; }

View File

@ -4,6 +4,7 @@
#include "lv0201.h" #include "lv0201.h"
#include "lv0b00.h" #include "lv0b00.h"
#include "lv0600a.h"
class TStampa_tabelle_lv : public TSkeleton_application class TStampa_tabelle_lv : public TSkeleton_application
{ {
@ -70,8 +71,13 @@ void TStampa_tabelle_lv::main_loop()
r.mask2report(m); r.mask2report(m);
} }
} }
else else
ok = r.load(rep); {
if(mskname == "lv0600a")
m.set(F_NUM_G, ini_get_string(CONFIG_DITTA, "lv","NUM_GEN"));
ok = r.load(rep);
r.mask2report(m);
}
} }
} }
if (ok) if (ok)

View File

@ -14,4 +14,5 @@
#define F_CODCAUS_A 213 #define F_CODCAUS_A 213
#define F_DESCAUS_A 214 #define F_DESCAUS_A 214
#define F_ANNO_DA 215 #define F_ANNO_DA 215
#define F_ANNO_A 216 #define F_ANNO_A 216
#define F_NUM_G 217

View File

@ -94,9 +94,9 @@
<sql>USE 34 <sql>USE 34
SELECT BETWEEN(33.DATADOC,#F_DATA_FROM,#F_DATA_TO)&#26;&#26;STR(BETWEEN(33.CODCF,#F_CODCF_FROM,#F_CODCF_TO))&#26;&#26;BETWEEN(CODART,#F_CODARTI_FROM,#F_CODARTI_TO)&#26;&#26;BETWEEN(CODAGG1,#F_CODCAUSA_FROM,#F_CODCAUSA_TO) SELECT BETWEEN(33.DATADOC,#F_DATA_FROM,#F_DATA_TO)&#26;&#26;STR(BETWEEN(33.CODCF,#F_CODCF_FROM,#F_CODCF_TO))&#26;&#26;BETWEEN(CODART,#F_CODARTI_FROM,#F_CODARTI_TO)&#26;&#26;BETWEEN(CODAGG1,#F_CODCAUSA_FROM,#F_CODCAUSA_TO)
BY 33.CODCF 34.CODART 33.DATADOC BY 33.CODCF 34.CODART 33.DATADOC
JOIN 33 TO 34 ALIAS 1000 INTO CODNUM==CODNUM ANNO==ANNO PROVV==PROVV NDOC==NDOC JOIN 33 TO 34 ALIAS 1000 INTO CODNUM==CODNUM ANNO==ANNO PROVV==PROVV NDOC==NDOC
JOIN 20 TO 33 ALIAS 2000 INTO TIPOCF==TIPOCF CODCF==CODCF JOIN 20 TO 33 ALIAS 2000 INTO TIPOCF==TIPOCF CODCF==CODCF
JOIN 47 TO 34 ALIAS 3000 INTO CODART==CODART JOIN 47 TO 34 ALIAS 3000 INTO CODART==CODART
FROM CODNUM="B05" ANNO=#ANNO_FROM FROM CODNUM=#CODNUM_G ANNO=#ANNO_FROM
TO CODNUM="B05" ANNO=#ANNO_TO</sql> TO CODNUM=#CODNUM_G ANNO=#ANNO_TO</sql>
</report> </report>

View File

@ -244,6 +244,13 @@ BEGIN
COPY OUTPUT F_CODCAUS_A COPY OUTPUT F_CODCAUS_A
END END
STRING F_NUM_G 4
BEGIN
PROMPT 2 16 "Numerazione "
FIELD #CODNUM_G
FLAGS "H"
END
ENDPAGE ENDPAGE
ENDMASK ENDMASK

View File

@ -185,7 +185,8 @@ SECTION HEADER ODD 14
KEY "Dati Pagamento" KEY "Dati Pagamento"
PROMPT 2 10 "@bPagamento " PROMPT 2 10 "@bPagamento "
END END
END End
SECTION HEADER LAST 1 SECTION HEADER LAST 1
STRINGA 100 STRINGA 100

View File

@ -20,6 +20,12 @@
#include "tf0200a.h" #include "tf0200a.h"
#define CAMPI_CON_BOOLEAN F_TOTOPATT #define CAMPI_CON_BOOLEAN F_TOTOPATT
#define CONF_MODULO "tf"
#define LAST_DATACOMP_ATT "LASTCOMPATT"
#define LAST_DATACOMP_PAS "LASTCOMPPAS"
#define FLAG_ATT_MOD "ATTDATACOMPMOD"
#define FLAG_PAS_MOD "PASDATACOMPMOD"
#define STOP "$$"
// ComLiqPerIva: Comunicazione Liquidazioni Periodiche IVA // ComLiqPerIva: Comunicazione Liquidazioni Periodiche IVA
@ -209,6 +215,8 @@ void calcola_credito_prec(real& creprec, real& creaprec, bool mensile, int anno,
class TCom_liq_per_iva_msk : public TAutomask class TCom_liq_per_iva_msk : public TAutomask
{ {
bool _last_elab_att; // Flags per controllare se hanno cambiato il tipo di elaborazione (data competenza)
bool _last_elab_pas;
protected: protected:
bool _mensile; bool _mensile;
// Aggiunta questa variabile per specificare se è stato impostato un tipo di liquidazione. // Aggiunta questa variabile per specificare se è stato impostato un tipo di liquidazione.
@ -216,14 +224,48 @@ protected:
bool _init_liq; bool _init_liq;
TRectype _true_data; TRectype _true_data;
void write_datacomp_mod(bool enabled, bool attive);
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
void extractinator(); void extractinator();
void check_old_value(int field, const real& val); void check_old_value(int field, const real& val);
public: public:
TCom_liq_per_iva_msk() : TAutomask("tf0200a"), _true_data(LF_IVALIQ), _init_liq(false) { first_focus(F_ANNO); } TCom_liq_per_iva_msk() : TAutomask("tf0200a"), _true_data(LF_IVALIQ), _init_liq(false)
{
_last_elab_att = ini_get_bool(CONFIG_DITTA, CONF_MODULO, LAST_DATACOMP_ATT, false);
_last_elab_pas = ini_get_bool(CONFIG_DITTA, CONF_MODULO, LAST_DATACOMP_PAS, false);
first_focus(F_ANNO);
}
void save_gen(); void save_gen();
}; };
void TCom_liq_per_iva_msk::write_datacomp_mod(const bool enabled, bool attive)
{
int count = 0;
TString line;
const TDate today(TODAY);
TString mod; mod << user() << (enabled ? "|E|" : "|D|") << today.month() << "." << today.day();
if (attive)
{
line = ini_get_string(CONFIG_DITTA, CONF_MODULO, FLAG_ATT_MOD, STOP, count);
for (; line != STOP; line = ini_get_string(CONFIG_DITTA, CONF_MODULO, FLAG_ATT_MOD, STOP, ++count)) {}
ini_set_string(CONFIG_DITTA, CONF_MODULO, FLAG_ATT_MOD, mod, count);
ini_set_bool(CONFIG_DITTA, CONF_MODULO, LAST_DATACOMP_ATT, enabled);
_last_elab_att = enabled;
}
else
{
line = ini_get_string(CONFIG_DITTA, CONF_MODULO, FLAG_PAS_MOD, STOP, count);
for (; line != STOP; line = ini_get_string(CONFIG_DITTA, CONF_MODULO, FLAG_PAS_MOD, STOP, ++count)) {}
ini_set_string(CONFIG_DITTA, CONF_MODULO, FLAG_PAS_MOD, mod, count);
ini_set_bool(CONFIG_DITTA, CONF_MODULO, LAST_DATACOMP_PAS, enabled);
_last_elab_pas = enabled;
}
}
bool TCom_liq_per_iva_msk::on_field_event(TOperable_field& o, TField_event e, long jolly) bool TCom_liq_per_iva_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
{ {
switch (o.dlg()) switch (o.dlg())
@ -294,7 +336,29 @@ bool TCom_liq_per_iva_msk::on_field_event(TOperable_field& o, TField_event e, lo
} }
} }
break; break;
case F_ATT_COMP:
if(e == fe_init)
set(F_ATT_COMP, _last_elab_att ? "X" : " ");
else if(e == fe_modify)
warning_box("Attenzione la modifica di questo valore comporta un diverso calcolo dei rigo VP2. L'utente è pregato di controllarne la correttezza.\nSi consiglia di ricalcolare e rispedire tutti periodi dell'anno");
break;
case F_PAS_COMP:
if (e == fe_init)
set(F_PAS_COMP, _last_elab_pas ? "X" : " ");
else if (e == fe_modify)
warning_box("Attenzione la modifica di questo valore comporta un diverso calcolo dei rigo VP3. L'utente è pregato di controllarne la correttezza.\nSi consiglia di ricalcolare e rispedire tutti periodi dell'anno");
break;
case DLG_SAVEREC: case DLG_SAVEREC:
if(e == fe_button)
{
bool att_dt_comp = get_bool(F_ATT_COMP);
bool pas_dt_comp = get_bool(F_PAS_COMP);
if (att_dt_comp != _last_elab_att)
write_datacomp_mod(att_dt_comp, true);
if (pas_dt_comp != _last_elab_pas)
write_datacomp_mod(pas_dt_comp, false);
}
if(e != fe_init && !_true_data.empty()) if(e != fe_init && !_true_data.empty())
_true_data.write_rewrite(TLocalisamfile(LF_IVALIQ)); _true_data.write_rewrite(TLocalisamfile(LF_IVALIQ));
} }
@ -417,6 +481,8 @@ void TCom_liq_per_iva_msk::extractinator() // Per gli amici GTFO
real ivaver = ZERO; real ivaver = ZERO;
real ivaverc = ZERO; real ivaverc = ZERO;
const bool att_dt_comp = get_bool(F_ATT_COMP);
const bool pas_dt_comp = get_bool(F_PAS_COMP);
for(; start <= end; start++) for(; start <= end; start++)
{ {
TDate data_da(1, start, anno); TDate data_da(1, start, anno);
@ -448,58 +514,68 @@ void TCom_liq_per_iva_msk::extractinator() // Per gli amici GTFO
cur_iva.set_var("#DADATAREG", data_da); cur_iva.set_var("#DADATAREG", data_da);
cur_iva.set_var("#ADATAREG", data_a); cur_iva.set_var("#ADATAREG", data_a);
for(bool ok = cur_iva.move_first(); ok; ok = cur_iva.move_next()) for (bool ok = cur_iva.move_first(); ok; ok = cur_iva.move_next())
{ {
TString totat, totpas, i; TString totat, totpas, i;
// Controllo che sia un movimento con codice non "non soggetto" // Controllo che sia un movimento con codice non "non soggetto"
TCodiceIVA codiva(cur_iva.get(FIELD_NAME(LF_RMOVIVA, RMI_CODIVA)).as_string()); TCodiceIVA codiva(cur_iva.get(FIELD_NAME(LF_RMOVIVA, RMI_CODIVA)).as_string());
if(codiva.tipo() == "NS") continue; if (codiva.tipo() == "NS") continue;
// Controllo che la registrazione sia di del mese che mi interessa o con flag "liquidazione periodo precedente" // Controllo che la registrazione sia di del mese che mi interessa o con flag "liquidazione periodo precedente"
const int month_reg = cur_iva.get("23." MOV_DATAREG).as_date().month(); const int month_reg = cur_iva.get("23." MOV_DATAREG).as_date().month();
const int month_liq = cur_iva.get("23." MOV_MESELIQ).as_int(); const int month_liq = cur_iva.get("23." MOV_MESELIQ).as_int();
// month_liq viene valorizzato solo se è del mese precedente o sempre? Nei record vecchi ovviamente sarà a zero ma adesso che ci mette? // month_liq viene valorizzato solo se è del mese precedente o sempre? Nei record vecchi ovviamente sarà a zero ma adesso che ci mette?
if ((month_reg == start && (month_liq == 0 || month_liq == month_reg)) || start == month_liq) // Prendo il tipo di registro
TRegistro reg(cur_iva.get(FIELD_NAME(LF_MOV, MOV_REG)).as_string(), anno);
int tiporeg = reg.tipo();
bool is_corrispettivo = reg.corrispettivi();
// Prendiamo l'imponibile
real imp = cur_iva.get("25.IMPONIBILE").as_real();
real imposta = cur_iva.get("25.IMPOSTA").as_real();
if (tiporeg == iva_acquisti)
{ {
// Prendo il tipo di registro if ((!att_dt_comp || !((month_reg == start && (month_liq == 0 || month_liq == month_reg)) || start == month_liq))
TRegistro reg(cur_iva.get(FIELD_NAME(LF_MOV, MOV_REG)).as_string(), anno); && (att_dt_comp || cur_iva.get(LF_MOV, MOV_DATAREG).as_date().month() == data_a.month()))
int tiporeg = reg.tipo(); continue;
bool is_corrispettivo = reg.corrispettivi(); }
else
{
if ((!pas_dt_comp || !((month_reg == start && (month_liq == 0 || month_liq == month_reg)) || start == month_liq))
&& (pas_dt_comp || cur_iva.get(LF_MOV, MOV_DATAREG).as_date().month() == data_a.month()))
continue;
}
// Prendiamo l'imponibile // Se è un movimento IvaXCassa o LiqDiff
real imp = cur_iva.get("25.IMPONIBILE").as_real(); if (has_ixc && (cur_iva.get("23.IVAXCASSA").as_bool() || cur_iva.get("23.LIQDIFF").as_bool()))
real imposta = cur_iva.get("25.IMPOSTA").as_real(); {
if (tiporeg == iva_vendite)
// Se è un movimento IvaXCassa o LiqDiff totopattxc += imp;
if (has_ixc && (cur_iva.get("23.IVAXCASSA").as_bool() || cur_iva.get("23.LIQDIFF").as_bool())) else
totoppasxc += imp;
}
else
{
if (tiporeg == iva_vendite)
{ {
if (tiporeg == iva_vendite) // Controllo il reverse charge, non va calcolato nel totale delle operazioni attive!
totopattxc += imp; // Se non ha una riga di movimento non lo sommo
else TString key_rc = cur_iva.get("23.NUMREG").as_string(); key_rc << "|1";
totoppasxc += imp; if (!cache().get(LF_RMOV, key_rc).empty())
{
// Controllo se è un corrispettivo non scorporato (imponibile e iva assieme)
if (is_corrispettivo && codiva.percentuale() > ZERO && imposta == ZERO)
{
// Nell'imponibile è presente il totale fattura, devo calcolare l'imposta e sottrarla
// Es iva 22% => imp : 122 = x : 100
codiva.scorpora(imp);
}
totopatt += imp;
}
} }
else else
{ totoppas += imp;
if (tiporeg == iva_vendite)
{
// Controllo il reverse charge, non va calcolato nel totale delle operazioni attive!
// Se non ha una riga di movimento non lo sommo
TString key_rc = cur_iva.get("23.NUMREG").as_string(); key_rc << "|1";
if (!cache().get(LF_RMOV, key_rc).empty())
{
// Controllo se è un corrispettivo non scorporato (imponibile e iva assieme)
if (is_corrispettivo && codiva.percentuale() > ZERO && imposta == ZERO)
{
// Nell'imponibile è presente il totale fattura, devo calcolare l'imposta e sottrarla
// Es iva 22% => imp : 122 = x : 100
codiva.scorpora(imp);
}
totopatt += imp;
}
}
else
totoppas += imp;
}
} }
} }

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