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

This commit is contained in:
Simone Palacino 2020-07-14 09:52:31 +02:00
commit 6376fddbab
15 changed files with 335 additions and 134 deletions

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

@ -0,0 +1,3 @@
bacnv.exe
Migliorata la funzione di correzzione delle righe documento anche per chi ha il CONAI. E' sufficiente che ci siano anche le sottocategorie vecchie nella tabella.

31
cd/test/ba0978a.ini Normal file
View File

@ -0,0 +1,31 @@
[Main]
Demo=0
[ba0]
File(14) = bacnv.exe|X
Patch = 0978
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 = 11-07-2020
Descrizione = Base
Dischi = 1
Moduli = sy
OEM =
Patch = 978
PostProcess = bainst -0 BA
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ba0978a1.zip Normal file

Binary file not shown.

View File

@ -1,15 +1,9 @@
f9prospintegr.rep
fpmenu.men
f90.exe f90.exe
f90100a.msk
f90100d.msk
f90200a.msk
f90100b.msk
f90100c.msk
sql\f90\f90100.sql
f90300a.msk
sql\f90\f90102.sql
f90300b.msk
sql\f90\f90104.sql
Modificato pescaggio file documento cartaceo dalla spotlight se esiste. Modificato pescaggio file docuemnto cartaceo dalla spotlight se esiste.
Modificato guessing movimenti passivi per associazione automatica piu' "intelligente" con FPPRO.
Correzione controllo annessi obligatori.
Correzione controllo movimento collegato (per rev. charge).
Corretto messaggio di errore generazione prospetto integrativo.
Correzione esportazione numero documento per le vendite secondo la regola che viene utilizzata nell'invio fp dove viene fatto il leading di 0 se esiste prefisso/suffisso.
Correzione conferma estratti e segna sul movimento che e' estratto.

View File

@ -3,23 +3,11 @@ Demo=0
[f90] [f90]
File(0) = f90.exe|X File(0) = f90.exe|X
File(1) = f90100a.msk|X Patch = 976
File(2) = f90100b.msk|X
File(3) = f90100c.msk|X
File(4) = f90100d.msk|X
File(5) = f90200a.msk|X
File(6) = f90300a.msk|X
File(7) = f90300b.msk|X
File(8) = f9prospintegr.rep|X
File(9) = fpmenu.men|X
File(10) = sql\f90\f90100.sql|X
File(11) = sql\f90\f90102.sql|X
File(12) = sql\f90\f90104.sql|X
Patch = 0976
Versione = 21511200 Versione = 21511200
[f9] [f9]
Data = 08-07-2020 Data = 09-07-2020
Descrizione = Archiviazione Sostitutiva Descrizione = Archiviazione Sostitutiva
Dischi = 1 Dischi = 1
Moduli = fp,cg Moduli = fp,cg

Binary file not shown.

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

@ -0,0 +1,3 @@
tp0.exe
Sistemata la gestione delle rettifiche CONAI

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

@ -0,0 +1,21 @@
[Main]
Demo=0
[tp0]
File(0) = tp0.exe|X
Patch = 978
Versione = 21511200
[tp]
Data = 30-06-2020
Descrizione = Trasferimento PACK
Dischi = 1
Moduli = ve
OEM =
Patch = 978
PostProcess =
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/tp0978a1.zip Normal file

Binary file not shown.

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

@ -0,0 +1,3 @@
ve0.exe
Se cancello tutte le righe merce o omaggio da un documento con CONAI la riga di addebito viene trasformata in una riga normale per gestire le rettifiche CONAI con copia documento

132
cd/test/ve0978a.ini Normal file
View File

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

BIN
cd/test/ve0978a1.zip Normal file

Binary file not shown.

View File

@ -2453,6 +2453,7 @@ void TConversione_archivi::update_righe_doc()
TCursor frr(new TRelation("%FRR")); TCursor frr(new TRelation("%FRR"));
const int fritems = frr.items(); const int fritems = frr.items();
TString_array formule; TString_array formule;
TAssoc_array tipidoc;
for (frr = 0L; frr.pos() < fritems; ++frr) for (frr = 0L; frr.pos() < fritems; ++frr)
formule.add(frr.curr().get("CODTAB")); formule.add(frr.curr().get("CODTAB"));
@ -2461,6 +2462,14 @@ void TConversione_archivi::update_righe_doc()
const TString4 tipo = r.get(RDOC_TIPORIGA); const TString4 tipo = r.get(RDOC_TIPORIGA);
const TTipo_riga_documento & tiporiga = TRiga_documento::tipo(tipo); const TTipo_riga_documento & tiporiga = TRiga_documento::tipo(tipo);
bool changed = false; bool changed = false;
TToken_string key(r.get(RDOC_PROVV));
key.add(r.get_int(RDOC_ANNO));
key.add(r.get(RDOC_CODNUM));
key.add(r.get_int(RDOC_NDOC));
const TString tipodoc = cache().get(LF_DOC, key, DOC_TIPODOC);
const bool has_conai = cache().get("%TIP", tipodoc, "B6") == "X";
if (tiporiga.is_merce() || tiporiga.is_omaggio()) if (tiporiga.is_merce() || tiporiga.is_omaggio())
{ {
@ -2472,9 +2481,11 @@ void TConversione_archivi::update_righe_doc()
r.zero(old_conai_peso[j]); r.zero(old_conai_peso[j]);
changed = true; changed = true;
} }
const TString & sottocat = r.get(conai_sottocat_name(j + 1));
if (sottocat.full() && cache().get("&VESCC", sottocat).empty()) const TString & sottocat = r.get(conai_sottocat_name(j + 1));
const TRectype & rec_sottocat = cache().get("&VESCC", sottocat);
if (!has_conai && sottocat.full() && rec_sottocat.empty())
r.zero(conai_sottocat_name(j + 1)); r.zero(conai_sottocat_name(j + 1));
if (r.get(conai_sottocat_name(j + 1)).blank() && if (r.get(conai_sottocat_name(j + 1)).blank() &&
r.get(conai_peso_name(j + 1)).full()) r.get(conai_peso_name(j + 1)).full())

View File

@ -99,10 +99,10 @@ protected:
bool scrivi_csv(const TRectype& prima_riga, TDichiarazione_CONAI_csv_recordset& csv, bool scrivi_csv(const TRectype& prima_riga, TDichiarazione_CONAI_csv_recordset& csv,
const TCONAI_class conai_specie, const TString & sottoclass, const TCONAI_class conai_specie, const TString & sottoclass,
const TString& conai_codsp, TLog_report &log) const; const TString& conai_codsp, TLog_report &log) const;
void scrivi_csv_doc_con_riga_generata(const TDocumento& doc, const int n_riga_generata, void scrivi_csv_doc_generata(const TDocumento& doc, const int n_riga_generata,
TDichiarazione_CONAI_csv_recordset& csv, const TCONAI_class conai_specie, TDichiarazione_CONAI_csv_recordset& csv, const TCONAI_class conai_specie,
const TString & sottoclass, const TString& conai_codsp, TLog_report &log) const; const TString & sottoclass, const TString& conai_codsp, TLog_report &log) const;
void scrivi_csv_doc_rettifiche(const TDocumento& doc, TDichiarazione_CONAI_csv_recordset& csv, void scrivi_csv_doc_not_generata(const TDocumento& doc, TDichiarazione_CONAI_csv_recordset& csv,
const TCONAI_class conai_specie, const TString & sottoclass, const TCONAI_class conai_specie, const TString & sottoclass,
const TString& conai_codsp) const; const TString& conai_codsp) const;
@ -147,7 +147,7 @@ real TDichiarazione_CONAI::clifo_conai(const TCli_for& clifo, const TCONAI_class
} }
//riempie recordset con le righe CONAI del documento che contiene una riga generata CONAI //riempie recordset con le righe CONAI del documento che contiene una riga generata CONAI
void TDichiarazione_CONAI::scrivi_csv_doc_con_riga_generata(const TDocumento& doc, const int n_riga_generata, void TDichiarazione_CONAI::scrivi_csv_doc_generata(const TDocumento& doc, const int n_riga_generata,
TDichiarazione_CONAI_csv_recordset& csv, TDichiarazione_CONAI_csv_recordset& csv,
const TCONAI_class conai_specie, const TString & sottoclass, const TCONAI_class conai_specie, const TString & sottoclass,
const TString& conai_codsp, TLog_report &log) const const TString& conai_codsp, TLog_report &log) const
@ -316,7 +316,7 @@ void TDichiarazione_CONAI::scrivi_csv_doc_con_riga_generata(const TDocumento& do
//riempie recordset con le righe CONAI del documento che NON ha una riga generata CONAI; trattasi di documenti.. //riempie recordset con le righe CONAI del documento che NON ha una riga generata CONAI; trattasi di documenti..
//..farlocchi costruiti ad arte per correggere le vaccate dei rompiscatolifici //..farlocchi costruiti ad arte per correggere le vaccate dei rompiscatolifici
void TDichiarazione_CONAI::scrivi_csv_doc_rettifiche(const TDocumento& doc, TDichiarazione_CONAI_csv_recordset& csv, void TDichiarazione_CONAI::scrivi_csv_doc_not_generata(const TDocumento& doc, TDichiarazione_CONAI_csv_recordset& csv,
const TCONAI_class conai_specie, const TString & sottoclass, const TCONAI_class conai_specie, const TString & sottoclass,
const TString& conai_codsp) const const TString& conai_codsp) const
{ {
@ -331,7 +331,26 @@ void TDichiarazione_CONAI::scrivi_csv_doc_rettifiche(const TDocumento& doc, TDic
TString80 clifo_paiv; TString80 clifo_paiv;
//cerca la percentuale di esenzione conai sul cliente (controllo //cerca la percentuale di esenzione conai sul cliente (controllo
const real cfven_perc_conai = clifo_conai(clifo, conai_specie, clifo_paiv, doc); const real cfven_perc_conai = clifo_conai(clifo, conai_specie, clifo_paiv, doc);
bool ok = cfven_perc_conai >= CENTO;
if (!ok)
{
bool has_rettifica = false;
FOR_EACH_PHYSICAL_RDOC(doc, j, rdoc)
{
//c'è la riga generata con codart di tipo conai (sia automatica che manuale)?
if (rdoc->get(RDOC_CODART) == conai_codsp && !rdoc->is_generata())
{
has_rettifica = true;
break;
}
}
ok |= has_rettifica;
}
if (ok)
{
const int nrighe = doc.rows(); const int nrighe = doc.rows();
//ciclo di riempimento delle righe csv;scandisce solo l'array con i valori compilati //ciclo di riempimento delle righe csv;scandisce solo l'array con i valori compilati
@ -438,6 +457,7 @@ void TDichiarazione_CONAI::scrivi_csv_doc_rettifiche(const TDocumento& doc, TDic
} }
} }
} }
}
} }
@ -454,9 +474,9 @@ bool TDichiarazione_CONAI::scrivi_csv(const TRectype& prima_riga, TDichiarazione
#ifdef DBG #ifdef DBG
//check di debug //check di debug
if (numdoc == 1451) if (numdoc == 935L)
const int cazzone = 1; const int cazzone = 1;
if (numdoc == 5L) if ((numdoc == 308L) || (numdoc == 343L))
int i = 1; int i = 1;
#endif #endif
//documento della prima riga e quindi anche di tutte le altre righe conai //documento della prima riga e quindi anche di tutte le altre righe conai
@ -517,23 +537,9 @@ bool TDichiarazione_CONAI::scrivi_csv(const TRectype& prima_riga, TDichiarazione
} }
} }
if (n_riga_generata > 0) if (n_riga_generata > 0)
scrivi_csv_doc_con_riga_generata(doc, n_riga_generata, csv, conai_specie, sottoclass, conai_codsp, log); scrivi_csv_doc_generata(doc, n_riga_generata, csv, conai_specie, sottoclass, conai_codsp, log);
else else
{ scrivi_csv_doc_not_generata(doc, csv, conai_specie, sottoclass, conai_codsp);
bool has_rettifica = false;
FOR_EACH_PHYSICAL_RDOC(doc, j, rdoc)
{
//c'è la riga generata con codart di tipo conai (sia automatica che manuale)?
if (rdoc->get(RDOC_CODART) == conai_codsp && !rdoc->is_generata())
{
has_rettifica = true;
break;
}
}
if (has_rettifica)
scrivi_csv_doc_rettifiche(doc, csv, conai_specie, sottoclass, conai_codsp);
}
return true; return true;
} }

View File

@ -3073,15 +3073,18 @@ void TDocumento::update_conai()
const TDate dataees = cfven.get(CFV_DATAECONAI); const TDate dataees = cfven.get(CFV_DATAECONAI);
const bool esponi_esenti = ini_get_bool(CONFIG_DITTA, "ve", "ESPONIESENTI"); const bool esponi_esenti = ini_get_bool(CONFIG_DITTA, "ve", "ESPONIESENTI");
real perc_esenz; real perc_esenz;
const int rows = physical_rows();
bool to_delete = false;
// Come prima cosa mi calcolo le qta conai // Come prima cosa mi calcolo le qta conai
update_conai_qta(); update_conai_qta();
for (int i = physical_rows(); i > 0; i--) for (int i = 1; i <= rows; i++)
{ {
TRiga_documento& r = row(i); TRiga_documento& r = row(i);
const bool tipo_conai = r.get_char("GENTIPO") == 'C'; const bool tipo_conai = r.get_char("GENTIPO") == 'C';
to_delete |= (!tipo_conai) && (r.is_merce() || r.is_omaggio());
// Elimina righe generate // Elimina righe generate
if (tipo_conai) if (tipo_conai)
{ {
@ -3112,9 +3115,15 @@ void TDocumento::update_conai()
destroy_row(i, true); destroy_row(i, true);
} }
else else
if (to_delete)
destroy_row(i, true); destroy_row(i, true);
conai_aggiornati.add(sottocat, sottocat); conai_aggiornati.add(sottocat, sottocat);
} }
if (!to_delete)
{
r.zero(RDOC_GENERATA);
r.zero(RDOC_GENTIPO);
}
} }
} }