Merge remote-tracking branch 'origin/R_10_00' into R_10_00
This commit is contained in:
commit
003ce9faaa
3
cd/test/cg0856.txt
Normal file
3
cd/test/cg0856.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cg2.exe
|
||||
|
||||
Corretto ricalcolo automatico scadenze con inserimento normale (senza f1)
|
95
cd/test/cg0856a.ini
Normal file
95
cd/test/cg0856a.ini
Normal file
@ -0,0 +1,95 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[cg2]
|
||||
Edit_23 = cg2 -0
|
||||
File(2) = cg2.exe|X
|
||||
Patch = 0856
|
||||
Versione = 21511200
|
||||
|
||||
[cg99]
|
||||
Kill(0) = bastesc.rep|x
|
||||
Kill(1) = bastcam.msk|x
|
||||
Kill(2) = bastscc.rep|x
|
||||
Kill(3) = bastivd.msk|x
|
||||
Kill(4) = batbtra.msk|x
|
||||
Kill(5) = batbcve.msk|x
|
||||
Kill(6) = batbdpn.msk|x
|
||||
Kill(7) = bastpdb.msk|x
|
||||
Kill(8) = batbcco.msk|x
|
||||
Kill(9) = bastzon.rep|x
|
||||
Kill(10) = batbdel.msk|x
|
||||
Kill(11) = bastcfi.msk|x
|
||||
Kill(12) = batbinl.msk|x
|
||||
Kill(13) = batbind.msk|x
|
||||
Kill(14) = bastreg.msk|x
|
||||
Kill(15) = bastreg.rep|x
|
||||
Kill(16) = batbleg.msk|x
|
||||
Kill(17) = bastvet.rep|x
|
||||
Kill(18) = batblbu.msk|x
|
||||
Kill(19) = bastdpn.rep|x
|
||||
Kill(20) = bastcco.msk|x
|
||||
Kill(21) = bastarb.msk|x
|
||||
Kill(22) = batbnot.msk|x
|
||||
Kill(23) = batbzon.msk|x
|
||||
Kill(24) = bastmsp.msk|x
|
||||
Kill(25) = batbpdb.msk|x
|
||||
Kill(26) = batblia.msk|x
|
||||
Kill(27) = batbpor.msk|x
|
||||
Kill(28) = bastesc.msk|x
|
||||
Kill(29) = bastndo.msk|x
|
||||
Kill(30) = bastvet.msk|x
|
||||
Kill(31) = bastpdb.rep|x
|
||||
Kill(32) = bastzon.msk|x
|
||||
Kill(33) = batblia.msk|x
|
||||
Kill(34) = batbndo.msk|x
|
||||
Kill(35) = bastpor.rep|x
|
||||
Kill(36) = bastndo.rep|x
|
||||
Kill(37) = bastcfi.rep|x
|
||||
Kill(38) = bastcco.rep|x
|
||||
Kill(39) = bastver.rep|x
|
||||
Kill(40) = bastcve.rep|x
|
||||
Kill(41) = batbmsp.msk|x
|
||||
Kill(42) = batbtit.msk|x
|
||||
Kill(43) = batbcam.msk|x
|
||||
Kill(44) = batbivd.msk|x
|
||||
Kill(45) = batbscc.msk|x
|
||||
Kill(46) = batbreg.msk|x
|
||||
Kill(47) = bastivd.rep|x
|
||||
Kill(48) = bastleg.msk|x
|
||||
Kill(49) = bastarb.rep|x
|
||||
Kill(50) = bastscc.msk|x
|
||||
Kill(51) = bastntb.msk|x
|
||||
Kill(52) = cg2fppro.msk|x
|
||||
Kill(53) = batbcfi.msk|x
|
||||
Kill(54) = bastleg.rep|x
|
||||
Kill(55) = batbesc.msk|x
|
||||
Kill(56) = bastntb.rep|x
|
||||
Kill(57) = bastver.msk|x
|
||||
Kill(58) = bastpor.msk|x
|
||||
Kill(59) = batbver.msk|x
|
||||
Kill(60) = batbarb.msk|x
|
||||
Kill(61) = cgtbcon.msk|x
|
||||
Kill(62) = bastnot.msk|x
|
||||
Kill(63) = batbins.msk|x
|
||||
Kill(64) = bastdpn.msk|x
|
||||
Kill(65) = bastnot.rep|x
|
||||
Kill(66) = bastmsp.rep|x
|
||||
Kill(67) = batbvet.msk|x
|
||||
Kill(68) = bastcve.msk|x
|
||||
Kill(69) = bastcam.rep|x
|
||||
Kill(70) = batbntb.msk|x
|
||||
|
||||
[cg]
|
||||
Data = 17-07-2019
|
||||
Descrizione = Contabilita' Generale
|
||||
Dischi = 1
|
||||
Moduli = ba
|
||||
OEM =
|
||||
Patch = 856
|
||||
PostProcess = bainst -0 CG
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/cg0856a1.zip
Normal file
BIN
cd/test/cg0856a1.zip
Normal file
Binary file not shown.
5
cd/test/cg0858.txt
Normal file
5
cd/test/cg0858.txt
Normal file
@ -0,0 +1,5 @@
|
||||
cg5000a.msk
|
||||
cg2100c.msk
|
||||
cg2.exe
|
||||
|
||||
Condizionata la data di competenza costi ricavi al flag di studio "Gestione data competenza costi/ricavi"
|
101
cd/test/cg0858a.ini
Normal file
101
cd/test/cg0858a.ini
Normal file
@ -0,0 +1,101 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[cg1]
|
||||
File(177) = cg5000a.msk|X
|
||||
Patch = 0858
|
||||
Versione = 21511200
|
||||
|
||||
[cg2]
|
||||
Edit_23 = cg2 -0
|
||||
File(2) = cg2.exe|X
|
||||
File(5) = cg2100c.msk|X
|
||||
Patch = 0858
|
||||
Versione = 21511200
|
||||
|
||||
[cg99]
|
||||
Kill(0) = bastdpn.rep|x
|
||||
Kill(1) = batbpdb.msk|x
|
||||
Kill(2) = bastpdb.rep|x
|
||||
Kill(3) = batblbu.msk|x
|
||||
Kill(4) = bastmsp.msk|x
|
||||
Kill(5) = bastvet.msk|x
|
||||
Kill(6) = batbpor.msk|x
|
||||
Kill(7) = batblia.msk|x
|
||||
Kill(8) = batblia.msk|x
|
||||
Kill(9) = bastzon.msk|x
|
||||
Kill(10) = bastreg.rep|x
|
||||
Kill(11) = bastarb.msk|x
|
||||
Kill(12) = bastreg.msk|x
|
||||
Kill(13) = bastcco.msk|x
|
||||
Kill(14) = bastvet.rep|x
|
||||
Kill(15) = batbzon.msk|x
|
||||
Kill(16) = batbleg.msk|x
|
||||
Kill(17) = batbnot.msk|x
|
||||
Kill(18) = bastcfi.msk|x
|
||||
Kill(19) = batbdel.msk|x
|
||||
Kill(20) = batbind.msk|x
|
||||
Kill(21) = batbinl.msk|x
|
||||
Kill(22) = batbver.msk|x
|
||||
Kill(23) = bastnot.rep|x
|
||||
Kill(24) = bastpor.msk|x
|
||||
Kill(25) = bastdpn.msk|x
|
||||
Kill(26) = batbntb.msk|x
|
||||
Kill(27) = batbvet.msk|x
|
||||
Kill(28) = bastmsp.rep|x
|
||||
Kill(29) = bastarb.rep|x
|
||||
Kill(30) = batbesc.msk|x
|
||||
Kill(31) = cgtbcon.msk|x
|
||||
Kill(32) = bastleg.msk|x
|
||||
Kill(33) = bastleg.rep|x
|
||||
Kill(34) = batbarb.msk|x
|
||||
Kill(35) = bastver.msk|x
|
||||
Kill(36) = batbins.msk|x
|
||||
Kill(37) = bastntb.rep|x
|
||||
Kill(38) = bastnot.msk|x
|
||||
Kill(39) = bastver.rep|x
|
||||
Kill(40) = batbscc.msk|x
|
||||
Kill(41) = bastntb.msk|x
|
||||
Kill(42) = bastcco.rep|x
|
||||
Kill(43) = batbivd.msk|x
|
||||
Kill(44) = bastscc.msk|x
|
||||
Kill(45) = bastivd.rep|x
|
||||
Kill(46) = batbcfi.msk|x
|
||||
Kill(47) = batbreg.msk|x
|
||||
Kill(48) = cg2fppro.msk|x
|
||||
Kill(49) = bastndo.msk|x
|
||||
Kill(50) = bastpor.rep|x
|
||||
Kill(51) = batbmsp.msk|x
|
||||
Kill(52) = bastesc.msk|x
|
||||
Kill(53) = batbndo.msk|x
|
||||
Kill(54) = bastcve.rep|x
|
||||
Kill(55) = bastcfi.rep|x
|
||||
Kill(56) = batbcam.msk|x
|
||||
Kill(57) = bastndo.rep|x
|
||||
Kill(58) = batbtit.msk|x
|
||||
Kill(59) = bastcam.rep|x
|
||||
Kill(60) = bastcve.msk|x
|
||||
Kill(61) = bastzon.rep|x
|
||||
Kill(62) = batbcco.msk|x
|
||||
Kill(63) = bastcam.msk|x
|
||||
Kill(64) = bastesc.rep|x
|
||||
Kill(65) = batbcve.msk|x
|
||||
Kill(66) = batbtra.msk|x
|
||||
Kill(67) = bastivd.msk|x
|
||||
Kill(68) = bastscc.rep|x
|
||||
Kill(69) = bastpdb.msk|x
|
||||
Kill(70) = batbdpn.msk|x
|
||||
|
||||
[cg]
|
||||
Data = 19-07-2019
|
||||
Descrizione = Contabilita' Generale
|
||||
Dischi = 1
|
||||
Moduli = ba
|
||||
OEM =
|
||||
Patch = 858
|
||||
PostProcess = bainst -0 CG
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/cg0858a1.zip
Normal file
BIN
cd/test/cg0858a1.zip
Normal file
Binary file not shown.
3
cd/test/cg0860.txt
Normal file
3
cd/test/cg0860.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cg2.exe
|
||||
|
||||
Corretta importazione scadenze con f1
|
95
cd/test/cg0860a.ini
Normal file
95
cd/test/cg0860a.ini
Normal file
@ -0,0 +1,95 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[cg2]
|
||||
Edit_23 = cg2 -0
|
||||
File(145) = cg2.exe|X
|
||||
Patch = 0860
|
||||
Versione = 21511200
|
||||
|
||||
[cg99]
|
||||
Kill(0) = batbdel.msk|x
|
||||
Kill(1) = bastdpn.msk|x
|
||||
Kill(2) = cgtbcon.msk|x
|
||||
Kill(3) = bastcfi.msk|x
|
||||
Kill(4) = bastpor.msk|x
|
||||
Kill(5) = batbesc.msk|x
|
||||
Kill(6) = batbvet.msk|x
|
||||
Kill(7) = bastleg.rep|x
|
||||
Kill(8) = batbntb.msk|x
|
||||
Kill(9) = bastleg.msk|x
|
||||
Kill(10) = batbzon.msk|x
|
||||
Kill(11) = batbinl.msk|x
|
||||
Kill(12) = bastvet.rep|x
|
||||
Kill(13) = batbind.msk|x
|
||||
Kill(14) = batbnot.msk|x
|
||||
Kill(15) = bastnot.rep|x
|
||||
Kill(16) = batbleg.msk|x
|
||||
Kill(17) = batbver.msk|x
|
||||
Kill(18) = bastarb.msk|x
|
||||
Kill(19) = bastreg.rep|x
|
||||
Kill(20) = bastcco.msk|x
|
||||
Kill(21) = bastreg.msk|x
|
||||
Kill(22) = bastcam.rep|x
|
||||
Kill(23) = batbcve.msk|x
|
||||
Kill(24) = batbtit.msk|x
|
||||
Kill(25) = bastesc.rep|x
|
||||
Kill(26) = batbdpn.msk|x
|
||||
Kill(27) = bastivd.msk|x
|
||||
Kill(28) = batbtra.msk|x
|
||||
Kill(29) = bastndo.msk|x
|
||||
Kill(30) = bastcfi.rep|x
|
||||
Kill(31) = bastzon.rep|x
|
||||
Kill(32) = cg2fppro.msk|x
|
||||
Kill(33) = bastcve.rep|x
|
||||
Kill(34) = bastcve.msk|x
|
||||
Kill(35) = bastndo.rep|x
|
||||
Kill(36) = bastcam.msk|x
|
||||
Kill(37) = batbcam.msk|x
|
||||
Kill(38) = batbcco.msk|x
|
||||
Kill(39) = bastver.rep|x
|
||||
Kill(40) = bastivd.rep|x
|
||||
Kill(41) = batbmsp.msk|x
|
||||
Kill(42) = bastnot.msk|x
|
||||
Kill(43) = bastscc.msk|x
|
||||
Kill(44) = bastpor.rep|x
|
||||
Kill(45) = batbreg.msk|x
|
||||
Kill(46) = batbndo.msk|x
|
||||
Kill(47) = batbcfi.msk|x
|
||||
Kill(48) = bastesc.msk|x
|
||||
Kill(49) = bastarb.rep|x
|
||||
Kill(50) = bastver.msk|x
|
||||
Kill(51) = bastntb.msk|x
|
||||
Kill(52) = bastmsp.rep|x
|
||||
Kill(53) = batbarb.msk|x
|
||||
Kill(54) = batbscc.msk|x
|
||||
Kill(55) = bastntb.rep|x
|
||||
Kill(56) = batbivd.msk|x
|
||||
Kill(57) = batbins.msk|x
|
||||
Kill(58) = bastcco.rep|x
|
||||
Kill(59) = bastpdb.msk|x
|
||||
Kill(60) = bastscc.rep|x
|
||||
Kill(61) = bastzon.msk|x
|
||||
Kill(62) = batblia.msk|x
|
||||
Kill(63) = batbpdb.msk|x
|
||||
Kill(64) = bastdpn.rep|x
|
||||
Kill(65) = bastvet.msk|x
|
||||
Kill(66) = bastmsp.msk|x
|
||||
Kill(67) = batblbu.msk|x
|
||||
Kill(68) = bastpdb.rep|x
|
||||
Kill(69) = batblia.msk|x
|
||||
Kill(70) = batbpor.msk|x
|
||||
|
||||
[cg]
|
||||
Data = 23-07-2019
|
||||
Descrizione = Contabilita' Generale
|
||||
Dischi = 1
|
||||
Moduli = ba
|
||||
OEM =
|
||||
Patch = 860
|
||||
PostProcess = bainst -0 CG
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/cg0860a1.zip
Normal file
BIN
cd/test/cg0860a1.zip
Normal file
Binary file not shown.
@ -2,3 +2,4 @@ fp0.exe
|
||||
|
||||
Bloccata selezione multipla per contabilizzazione
|
||||
Corretto codice causale da fornitore: andava a leggere il codforn dalla colonna sbagliata
|
||||
Aggiunto controllo per fornitore tipo 4: non associo
|
||||
|
@ -7,7 +7,7 @@ Patch = 856
|
||||
Versione = 21511200
|
||||
|
||||
[fp]
|
||||
Data = 15-07-2019
|
||||
Data = 17-07-2019
|
||||
Descrizione = Fattura Elettronica
|
||||
Dischi = 1
|
||||
Moduli = cg,ve
|
||||
|
Binary file not shown.
3
cd/test/lv0858.txt
Normal file
3
cd/test/lv0858.txt
Normal file
@ -0,0 +1,3 @@
|
||||
lv3.exe
|
||||
|
||||
Corretto codice contratto lavanderie andava sul campo sbagliato
|
22
cd/test/lv0858a.ini
Normal file
22
cd/test/lv0858a.ini
Normal file
@ -0,0 +1,22 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[lv1]
|
||||
Edit_168 = lv0 -3
|
||||
File(63) = lv3.exe|X
|
||||
Patch = 0858
|
||||
Versione = 21511200
|
||||
|
||||
[lv]
|
||||
Data = 22-07-2019
|
||||
Descrizione = Gestione lavanderie
|
||||
Dischi = 1
|
||||
Moduli = ve,mg
|
||||
OEM = 2
|
||||
Patch = 858
|
||||
PostProcess = bainst -0 LV
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/lv0858a1.zip
Normal file
BIN
cd/test/lv0858a1.zip
Normal file
Binary file not shown.
5
cd/test/lv0860.txt
Normal file
5
cd/test/lv0860.txt
Normal file
@ -0,0 +1,5 @@
|
||||
lv0300a.msk
|
||||
lv2.exe
|
||||
|
||||
Aggiunto dettaglio consegne alla fatturazione
|
||||
Nella configurazione prima pagina c'è il flag dettaglio consegne
|
23
cd/test/lv0860a.ini
Normal file
23
cd/test/lv0860a.ini
Normal file
@ -0,0 +1,23 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[lv1]
|
||||
Edit_168 = lv0 -3
|
||||
File(6) = lv0300a.msk|X
|
||||
File(46) = lv2.exe|X
|
||||
Patch = 860
|
||||
Versione = 21511200
|
||||
|
||||
[lv]
|
||||
Data = 22-07-2019
|
||||
Descrizione = Gestione lavanderie
|
||||
Dischi = 1
|
||||
Moduli = ve,mg
|
||||
OEM = 2
|
||||
Patch = 860
|
||||
PostProcess = bainst -0 LV
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/lv0860a1.zip
Normal file
BIN
cd/test/lv0860a1.zip
Normal file
Binary file not shown.
4
cd/test/lv0862.txt
Normal file
4
cd/test/lv0862.txt
Normal file
@ -0,0 +1,4 @@
|
||||
lv0300a.msk
|
||||
lv2.exe
|
||||
Aggiunto dettaglio consegne alla fatturazione
|
||||
Nella configurazione prima pagina c'è il flag dettaglio consegne
|
23
cd/test/lv0862a.ini
Normal file
23
cd/test/lv0862a.ini
Normal file
@ -0,0 +1,23 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[lv1]
|
||||
Edit_168 = lv0 -3
|
||||
File(6) = lv0300a.msk|X
|
||||
File(46) = lv2.exe|X
|
||||
Patch = 0862
|
||||
Versione = 21511200
|
||||
|
||||
[lv]
|
||||
Data = 22-07-2019
|
||||
Descrizione = Gestione lavanderie
|
||||
Dischi = 1
|
||||
Moduli = ve,mg
|
||||
OEM = 2
|
||||
Patch = 862
|
||||
PostProcess = bainst -0 LV
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/lv0862a1.zip
Normal file
BIN
cd/test/lv0862a1.zip
Normal file
Binary file not shown.
@ -111,6 +111,11 @@ TMask* TPrimanota_application::load_mask(int n)
|
||||
m->set_handler(F_SHEETIVA, iva_handler);
|
||||
m->show(F_LIQDIFF, _liqdiff);
|
||||
m->set_handler(F_NUMDOCEXT, ndocext_handler);
|
||||
if (ini_get_bool(CONFIG_STUDIO, "CG", "GesCompCR"))
|
||||
{
|
||||
m->show(F_DATACOMPCR);
|
||||
m->set_handler(F_DATACOMPCR, datacompcr_handler);
|
||||
}
|
||||
|
||||
TSheet_field& is = m->sfield(F_SHEETIVA);
|
||||
is.set_notify(iva_notify);
|
||||
@ -191,8 +196,6 @@ TMask* TPrimanota_application::load_mask(int n)
|
||||
// Se esiste lo sheet delle rate
|
||||
if (is_fattura())
|
||||
{
|
||||
m->set_handler(F_DATACOMPCR, datacompcr_handler);
|
||||
|
||||
TSheet_field& ps = m->sfield(FS_RATESHEET);
|
||||
|
||||
ps.set_notify(pag_notify);
|
||||
@ -2405,7 +2408,6 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
|
||||
}
|
||||
if (_f1_ini && msk.find_by_id(FS_RECALC) != NULL)
|
||||
{
|
||||
//msk.set(F_TOTALE, calcola_imp());
|
||||
msk.set(F_COLFPPRO, "X");
|
||||
msk.set(FS_RECALC, "");
|
||||
set_scad_f1(msk);
|
||||
@ -2421,24 +2423,18 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
|
||||
|
||||
void TPrimanota_application::set_scad_f1(TMask& m)
|
||||
{
|
||||
const TString& cp = m.get(F_CODPAG);
|
||||
const TString& dt = m.get(F_DATADOC);
|
||||
set_pagamento(cp, dt);
|
||||
set_totale_pagamento(false);
|
||||
|
||||
TPagamento& pag = pagamento();
|
||||
if (m.field(FS_RECALC).enabled())
|
||||
{
|
||||
m.set(FS_RDIFFER, "1");
|
||||
m.set(FS_NAMEPAG, pag.name());
|
||||
m.set(FS_TIPOPR, pag.desc_tpr());
|
||||
m.set(FS_MCOMM, pag.mese_commerciale() ? "X" : "");
|
||||
m.set(FS_RECALC, "");
|
||||
m.set(FS_NRATE, pag.n_rate());
|
||||
}
|
||||
pag.set_rate_auto();
|
||||
TSheet_field& ps = m.sfield(FS_RATESHEET);
|
||||
pag.set_sheet(ps); // prepara lo sheet
|
||||
const int rate = ps.items();
|
||||
m.set(FS_RDIFFER, "1");
|
||||
m.set(FS_MCOMM, "");
|
||||
m.set(FS_RECALC, "");
|
||||
m.set(FS_NRATE, rate);
|
||||
|
||||
// Correggo le percentuali
|
||||
const real totale = real(m.get(F_TOTALE)) + real(m.get(F_RITFIS));
|
||||
for (int i = 0; i < rate; i++)
|
||||
ps.row(i).add(real(ps.row(i).get(1)) * CENTO / totale, 3);
|
||||
|
||||
set_banche(m);
|
||||
_pag_rows = ps.rows_array(); // copia sheet
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ DATE F_DATACOMPCR
|
||||
BEGIN
|
||||
PROMPT 1 3 "Data comp.c/r "
|
||||
FIELD DATACOMPCR
|
||||
FLAGS "G"
|
||||
FLAGS "HG"
|
||||
END
|
||||
|
||||
STRING F_CODCAUS 3
|
||||
|
@ -1760,7 +1760,7 @@ bool TPrimanota_application::iva_notify(TSheet_field& iva, int r, KEY k)
|
||||
real pimponibile(pag.imponibile(inv));
|
||||
pimponibile.round(pag.round(inv));
|
||||
|
||||
if ((pimposta != imposta || pimponibile != imponibile) && !a.has_f1_db(&m))
|
||||
if ((pimposta != imposta || pimponibile != imponibile) && (!a._f1_ini && (a._pro_mask == nullptr || !a._pro_mask->should_bring_back())))
|
||||
a.set_scadenze(m); // Ricalcola rate
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ bool TPrimanota_application::codpag_handler(TMask_field& f, KEY key)
|
||||
TMask& m = f.mask();
|
||||
TPrimanota_application& a = app();
|
||||
const bool set_scad = a.is_fattura() && m.page_enabled(2); // E' attiva pagina 3
|
||||
if (key == K_ENTER && (!a._f1_ini && (!a._f1_ini && (a._pro_mask == nullptr || !a._pro_mask->should_bring_back()))))
|
||||
if (key == K_ENTER && (!a._f1_ini && (a._pro_mask == nullptr || !a._pro_mask->should_bring_back())))
|
||||
{
|
||||
if (set_scad && f.empty())
|
||||
{
|
||||
|
@ -19,3 +19,4 @@
|
||||
#define FLD_DESAGV 119
|
||||
#define CHK_RICACQ 120
|
||||
#define CHK_NOIDRG 121
|
||||
#define CHK_02GESCOMPCR 122
|
@ -160,6 +160,12 @@ BEGIN
|
||||
FIELD Cg02SN
|
||||
END
|
||||
|
||||
BOOLEAN CHK_02GESCOMPCR
|
||||
BEGIN
|
||||
PROMPT 3 8 "Gestione data competenza costi/ricavi"
|
||||
FIELD GesCompCR
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
enum
|
||||
{
|
||||
tipo_forn_4 = -16, // Trovato fornitore ma ha tipo 4. Da inserire a manina.
|
||||
no_cf = -14, // Non trovato con cod. fisc. (se non ho nemmeno la p.iva)
|
||||
no_match_cf = -15, // Trovato forn. ma il cod. fisc non corrisponde
|
||||
no_forn = -5, // Non trovato forn. con p.iva
|
||||
@ -400,6 +401,9 @@ void TPassive_mask::add_row_err_forn(const int forn_code, TSheet_field& sf_err,
|
||||
case no_cf:
|
||||
row_err.add("Fornitore senza P. IVA, non trovato il codice fiscale");
|
||||
break;
|
||||
case tipo_forn_4:
|
||||
row_err.add("Fornitore con codice 4. Inserire manualmente il fornitore giusto.");
|
||||
break;
|
||||
default:
|
||||
row_err.add("Errore durante identificazione fornitore.");
|
||||
break;
|
||||
@ -459,18 +463,15 @@ void TPassive_mask::auto_assoc()
|
||||
|
||||
int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
|
||||
{
|
||||
TString paa_codfisc = fp_db().sq_get("COD_FISC");
|
||||
const TString paa_piva = fp_db().sq_get("P_IVA");
|
||||
TString paa_codpaese = fp_db().sq_get("COD_PAESE");
|
||||
const TString fppro_tipocf = fp_db().sq_get("TIPO_CF");
|
||||
TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
|
||||
TString paa_codfisc = fp_db().sq_get("COD_FISC");
|
||||
const TString paa_piva = fp_db().sq_get("P_IVA");
|
||||
TString paa_codpaese = fp_db().sq_get("COD_PAESE");
|
||||
const TString fppro_tipocf = fp_db().sq_get("TIPO_CF");
|
||||
TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
|
||||
|
||||
// Cerco se il fornitore è presente in Campo
|
||||
int found_clifo = -1;
|
||||
|
||||
if (fppro_codcf == "17")
|
||||
bool simo = true;
|
||||
|
||||
TString piva;
|
||||
// Leggo dall FPPRO se è già stato salvato il fornitore
|
||||
// Se è già salvato nell FPPRO ricerco in Campo col codice fornitore (chiave 1)
|
||||
@ -479,56 +480,57 @@ int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
|
||||
clifo.setkey(1);
|
||||
clifo.put(CLI_CODCF, fppro_codcf);
|
||||
// Se trovo dall FPPRO setto a 0
|
||||
clifo.read() == NOERR ? found_clifo = 0 : found_clifo = -3;
|
||||
clifo.read() == NOERR ? found_clifo = saved_db : found_clifo = err_match_db;
|
||||
}
|
||||
else if (paa_codpaese.full() && (piva = paa_piva).full()) // Se non c'è nell FPPRO ricerco con chiave 5
|
||||
{
|
||||
if (piva == "01903590154")
|
||||
bool simo = true;
|
||||
clifo.setkey(5);
|
||||
clifo.put(CLI_STATOPAIV, paa_codpaese);
|
||||
clifo.put(CLI_PAIV, paa_piva);
|
||||
clifo.read() == NOERR ? found_clifo = 2 : found_clifo = -1; // Se trovo con partita iva setto a 2
|
||||
clifo.read() == NOERR ? found_clifo = found_piva : found_clifo = -1; // Se trovo con partita iva setto a 2
|
||||
|
||||
if (found_clifo != 2 && paa_codpaese == "IT") // Se non l'ho trovato potrebbe essere italiano e ha codice paese blank
|
||||
if (found_clifo != found_piva && paa_codpaese == "IT") // Se non l'ho trovato potrebbe essere italiano e ha codice paese blank
|
||||
{
|
||||
clifo.put(CLI_PAIV, paa_piva);
|
||||
clifo.put(CLI_STATOPAIV, "");
|
||||
clifo.read() == NOERR ? found_clifo = 2 : found_clifo = -5; // Se trovo con partita iva setto a 2
|
||||
clifo.read() == NOERR ? found_clifo = found_piva : found_clifo = no_forn; // Se trovo con partita iva setto a 2
|
||||
}
|
||||
// Se trovo con p.iva controllo il cod. fisc. e, se c'è da db e se c'è in clienti-fornitori, altrimenti vado avanti
|
||||
if (found_clifo == 2 && paa_codfisc.full() && clifo.get(CLI_COFI).full())
|
||||
if (found_clifo == found_piva && paa_codfisc.full() && clifo.get(CLI_COFI).full())
|
||||
{
|
||||
if (clifo.get(CLI_COFI) == paa_codfisc) // Controllo che il cod fisc (se c'è) corrisponda
|
||||
found_clifo = 2;
|
||||
found_clifo = found_piva;
|
||||
else
|
||||
found_clifo = -15;
|
||||
found_clifo = no_match_cf;
|
||||
}
|
||||
}
|
||||
// Altrimenti lo cerco con chiave 4, se ho il codice fiscale o ho il cod fisc e l'ho trovato con p iva
|
||||
else if (paa_codfisc.full())
|
||||
{
|
||||
clifo.setkey(4);
|
||||
clifo.setkey(found_cf);
|
||||
clifo.put(CLI_COFI, paa_codfisc);
|
||||
clifo.read() == NOERR ? found_clifo = 4 : found_clifo = -14; // Se il cod fisc corrisponde setto a 2
|
||||
clifo.read() == NOERR ? found_clifo = found_cf : found_clifo = no_cf; // Se il cod fisc corrisponde setto a 2
|
||||
}
|
||||
|
||||
// Se lo trovo controllo che non abbia il flag di sospeso se no ricerco ancora
|
||||
bool noerr = true;
|
||||
if (found_clifo == 2)
|
||||
if (found_clifo == found_piva)
|
||||
{
|
||||
while (clifo.get_bool(CLI_SOSPESO) && noerr && clifo.get(CLI_PAIV) == paa_piva)
|
||||
noerr = clifo.next() == NOERR;
|
||||
if (clifo.get_bool(CLI_SOSPESO) || !noerr || clifo.get(CLI_PAIV) != paa_piva)
|
||||
found_clifo = -5;
|
||||
found_clifo = no_forn;
|
||||
}
|
||||
else if (found_clifo == 4)
|
||||
else if (found_clifo == found_cf)
|
||||
{
|
||||
while (clifo.get_bool(CLI_SOSPESO) && noerr && clifo.get(CLI_COFI) == paa_codfisc)
|
||||
noerr = clifo.next() == NOERR;
|
||||
if (clifo.get_bool(CLI_SOSPESO) || !noerr || clifo.get(CLI_COFI) != paa_codfisc)
|
||||
found_clifo = -14;
|
||||
found_clifo = no_cf;
|
||||
}
|
||||
|
||||
// Controllo che non abbia 4 come tipo fornitore
|
||||
found_clifo = found_clifo == found_piva && clifo.get(CLI_ALLEG) == "4" ? tipo_forn_4 : found_clifo;
|
||||
|
||||
return found_clifo;
|
||||
}
|
||||
|
@ -101,6 +101,8 @@
|
||||
|
||||
#define F_DOTSTO 278
|
||||
|
||||
#define F_DETTCONS 279
|
||||
|
||||
#define F_BACKUP 300
|
||||
|
||||
#define S_CODNUM_RIT 101
|
||||
|
@ -166,7 +166,7 @@ BEGIN
|
||||
FLAGS "UP"
|
||||
END
|
||||
|
||||
STRING F_DESTIPODOC_FAT 50
|
||||
STRING F_DESTIPODOC_FAT 50 30
|
||||
BEGIN
|
||||
PROMPT 24 5 ""
|
||||
HELP "Descrizione tipo documento"
|
||||
@ -177,6 +177,14 @@ BEGIN
|
||||
COPY OUTPUT F_TIPODOC_FAT
|
||||
END
|
||||
|
||||
BOOLEAN F_DETTCONS
|
||||
BEGIN
|
||||
PROMPT 60 5 "Dettaglio consegne"
|
||||
FIELD DettCons
|
||||
MESSAGE TRUE CLEAR,F_RIFTEST
|
||||
MESSAGE FALSE ENABLE,F_RIFTEST
|
||||
END
|
||||
|
||||
BOOLEAN F_RIFTEST
|
||||
BEGIN
|
||||
PROMPT 2 6 "Scrivi riferimenti in testata documento"
|
||||
|
@ -124,8 +124,8 @@ protected:
|
||||
virtual bool doc_raggruppabili(const TDocumento& doc_in, const TDocumento& doc_out, TToken_string& campi) const ;
|
||||
virtual bool doc_raggruppabile(const TDocumento & doc) const { return true; }
|
||||
virtual void campi_raggruppamento_righe(TToken_string& campi_riga) const;
|
||||
virtual bool gestione_riferimenti() const { return true; }
|
||||
virtual bool riferimenti_in_testa() const { return true; }
|
||||
// virtual bool gestione_riferimenti() const { return true; }
|
||||
// virtual bool riferimenti_in_testa() const { return true; }
|
||||
virtual TRiga_documento& find_or_create_row(TDocumento& doc_out, const TRiga_documento & rin,const char lavtype);
|
||||
virtual bool get_num_tip_out(const TDocumento& doc_out, TString& codnum, TString& tipodoc) const;
|
||||
|
||||
@ -511,24 +511,26 @@ int TFatturazione_lavanderie::write_fatt_ragg(const bool solotot)
|
||||
void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_documenti& doc_in)
|
||||
{
|
||||
const bool use_indsp = ini_get_bool(CONFIG_DITTA, "mg", "MOV_INDSPED");
|
||||
const bool riftest = ini_get_bool(CONFIG_DITTA, "lv", "RifTest");
|
||||
const bool zero_note = ini_get_bool(CONFIG_DITTA, "lv", "ZeroNote");
|
||||
|
||||
const bool dett_cons = ini_get_bool(CONFIG_DITTA, "lv", "DettCons");
|
||||
const bool riftest = !dett_cons && ini_get_bool(CONFIG_DITTA, "lv", "RifTest");
|
||||
|
||||
//scorro tutti i documenti di output generati precedentemente
|
||||
for (int id = 0; id < doc_out.items(); id++)
|
||||
{
|
||||
//instanzio il documento e recupero le variabili di interesse per recuperare
|
||||
//il contratto del cliente in questione
|
||||
TDocumento& doc = doc_out[id];
|
||||
const long clifo = doc.get_long(DOC_CODCF);
|
||||
TRecord_array original_rows = doc.body();
|
||||
const long clifo = doc.get_long(DOC_CODCF);
|
||||
|
||||
const int indsped = doc.get_int(DOC_CODINDSP);
|
||||
TLaundry_contract contr(clifo,indsped,_data_elab);
|
||||
//flag per il calcolo sul valore convenzionale e sul fisso per dotazione iniziale
|
||||
bool valconvcli = false;
|
||||
bool fixdotin = false;
|
||||
bool elcons = contr.get_bool(LVCONDV_ELCONS);
|
||||
bool rifbol = contr.get_bool(LVCONDV_RIFBOL);
|
||||
// bool fixdotin = false;
|
||||
bool elcons = contr.get_bool(LVCONDV_ELCONS);
|
||||
bool rifbol = !dett_cons && contr.get_bool(LVCONDV_RIFBOL);
|
||||
|
||||
const bool splitpay = doc.anno() > 2015 && doc.clifor().get_bool(CLI_SPLITPAY);
|
||||
real consvconv;
|
||||
@ -556,6 +558,8 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do
|
||||
|
||||
if (doc.physical_rows() > 0 && doc[1].is_descrizione())
|
||||
{
|
||||
const TString desc = doc[1].get(RDOC_DESCR);
|
||||
|
||||
if (elcons)
|
||||
{
|
||||
TRiga_documento& rout = doc[1];
|
||||
@ -564,7 +568,7 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do
|
||||
rout.put(RDOC_DESCEST, "");
|
||||
}
|
||||
else
|
||||
if (!rifbol)
|
||||
if (!rifbol || dett_cons)
|
||||
doc.destroy_row(1, true);
|
||||
}
|
||||
|
||||
@ -739,7 +743,9 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do
|
||||
else // se il tipo canone è impostato a nessuno o % sul valore convenzionale per cliente vado in ambedue i casi ad eseguire il ciclo che analizza i tipi forfait
|
||||
{
|
||||
//per ogni documento, scorro tutte le sue righe
|
||||
for (int i = 1; i <= doc.physical_rows() ; i++)
|
||||
const int rigamerce = doc.physical_rows() > 0 && doc[1].is_descrizione() ? 2 : 1;
|
||||
|
||||
for (int i = rigamerce; i <= doc.physical_rows() ; i++)
|
||||
{
|
||||
TRiga_documento& rout = doc[i];
|
||||
|
||||
@ -1340,12 +1346,28 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do
|
||||
}
|
||||
}
|
||||
}
|
||||
for(int h = doc.physical_rows(); h > 0; h--)
|
||||
const int rigamerce = doc.physical_rows() > 0 && doc[1].is_descrizione() ? 2 : 1;
|
||||
|
||||
for(int h = doc.physical_rows(); h >= rigamerce; h--)
|
||||
{
|
||||
TRiga_documento& rdoc = doc[h];
|
||||
if (rdoc.get(RDOC_DESCR).empty() || ((rdoc.imponibile().is_zero() && rdoc.get_real(RDOC_QTA).is_zero())))
|
||||
doc.destroy_row(h, true);
|
||||
}
|
||||
if (dett_cons)
|
||||
{
|
||||
for (int i = 1; i <= original_rows.rows(); i++)
|
||||
{
|
||||
if (((TRiga_documento &) original_rows[i]).is_descrizione())
|
||||
{
|
||||
TRiga_documento & r = doc.new_row(original_rows[i].get(RDOC_TIPORIGA));
|
||||
|
||||
doc.copy_data(r, original_rows[i]);
|
||||
r.zero(RDOC_PREZZO);
|
||||
r.zero(RDOC_CODIVA);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int id = doc_out.items() - 1; id >= 0 ; id--)
|
||||
{
|
||||
|
@ -566,29 +566,29 @@ bool TGestione_bolle_msk::lv_bolla_handler(TMask_field& f, KEY k)
|
||||
else
|
||||
{
|
||||
doc.put(DOC_CODCF, codcf);
|
||||
((TMask &)dmsk).set(F_CODCF, codcf);
|
||||
((TMask &)dmsk).set(F_CODCF, codcf);
|
||||
doc.put(DOC_DATADOC, datadoc);
|
||||
((TMask &)dmsk).set(F_DATADOC, datadoc);
|
||||
((TMask &)dmsk).set(F_DATADOC, datadoc);
|
||||
if (indsped == 0)
|
||||
{
|
||||
doc.put(DOC_CODINDSP, "");
|
||||
((TMask &)dmsk).set(F_CODINDSP, "");
|
||||
doc.put(DOC_CODINDSP, "");
|
||||
((TMask &)dmsk).set(F_CODINDSP, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
doc.put(DOC_CODINDSP, indsped);
|
||||
((TMask &)dmsk).set(F_CODINDSP, indsped);
|
||||
}
|
||||
doc.put(DOC_CONTRATTO, codcont);
|
||||
((TMask &)dmsk).set(F_LVCODCONT, codcont);
|
||||
else
|
||||
{
|
||||
doc.put(DOC_CODINDSP, indsped);
|
||||
((TMask &)dmsk).set(F_CODINDSP, indsped);
|
||||
}
|
||||
doc.put(DOC_CODCONT, codcont);
|
||||
((TMask &)dmsk).set(F_LVCODCONT, codcont);
|
||||
|
||||
const TDate dataprco = dmsk.proponi_dataprco();
|
||||
|
||||
if (dataprco.ok() && dmsk.get(F_LVDATAPRCO).blank())
|
||||
{
|
||||
((TMask &)dmsk).set(F_LVDATAPRCO, dataprco);
|
||||
doc.put("DATAPRCO", dataprco);
|
||||
}
|
||||
if (dataprco.ok() && dmsk.get(F_LVDATAPRCO).blank())
|
||||
{
|
||||
((TMask &)dmsk).set(F_LVDATAPRCO, dataprco);
|
||||
doc.put("DATAPRCO", dataprco);
|
||||
}
|
||||
}
|
||||
|
||||
if (dmsk._stcodcf == codcf && dmsk._stcodcont == codcont && nrighe > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user