Merge remote-tracking branch 'origin/R_10_00' into R_10_00
This commit is contained in:
commit
80d9ab4dbd
3
cd/test/ba0968.txt
Normal file
3
cd/test/ba0968.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
bacnv.exe
|
||||||
|
|
||||||
|
Aggiunta conversione per sistemare le righe documento
|
31
cd/test/ba0968a.ini
Normal file
31
cd/test/ba0968a.ini
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[Main]
|
||||||
|
Demo=0
|
||||||
|
|
||||||
|
[ba0]
|
||||||
|
File(14) = bacnv.exe|X
|
||||||
|
Patch = 0968
|
||||||
|
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 = 13-06-2020
|
||||||
|
Descrizione = Base
|
||||||
|
Dischi = 1
|
||||||
|
Moduli = sy
|
||||||
|
OEM =
|
||||||
|
Patch = 968
|
||||||
|
PostProcess = bainst -0 BA
|
||||||
|
PreProcess =
|
||||||
|
Prezzo(1) =
|
||||||
|
Prezzo(2) =
|
||||||
|
Versione = 21511200
|
||||||
|
|
BIN
cd/test/ba0968a1.zip
Normal file
BIN
cd/test/ba0968a1.zip
Normal file
Binary file not shown.
@ -1,3 +1,3 @@
|
|||||||
ci1.exe
|
ci1.exe
|
||||||
|
|
||||||
La stampoa rilevazione ore per commessa/CdC dave errore con codici commessa/Cdc più lunghi di 16 caratteri
|
La stampa rilevazione ore per commessa/CdC dave errore con codici commessa/Cdc più lunghi di 16 caratteri
|
||||||
|
3
cd/test/sy0968.txt
Normal file
3
cd/test/sy0968.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
bamenu.men
|
||||||
|
|
||||||
|
Aggiunta conversione per sistemare le righe documento
|
21
cd/test/sy0968a.ini
Normal file
21
cd/test/sy0968a.ini
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Main]
|
||||||
|
Demo=0
|
||||||
|
|
||||||
|
[sy1]
|
||||||
|
File(35) = bamenu.men|X
|
||||||
|
Patch = 0968
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[sy]
|
||||||
|
Data = 13-06-2020
|
||||||
|
Descrizione = Sistema
|
||||||
|
Dischi = 1
|
||||||
|
Moduli =
|
||||||
|
OEM =
|
||||||
|
Patch = 968
|
||||||
|
PostProcess =
|
||||||
|
PreProcess =
|
||||||
|
Prezzo(1) =
|
||||||
|
Prezzo(2) =
|
||||||
|
Versione = 21511200
|
||||||
|
|
BIN
cd/test/sy0968a1.zip
Normal file
BIN
cd/test/sy0968a1.zip
Normal file
Binary file not shown.
104
src/ba/bacnv.cpp
104
src/ba/bacnv.cpp
@ -205,6 +205,7 @@ public:
|
|||||||
//roba per il file della rilevazione ore
|
//roba per il file della rilevazione ore
|
||||||
void convert_rilore();
|
void convert_rilore();
|
||||||
long convert_CONAI();
|
long convert_CONAI();
|
||||||
|
void update_righe_doc();
|
||||||
|
|
||||||
TConversione_archivi() : _oldditta(0), _codditta(0), _error(0), _exitcode(1) {}
|
TConversione_archivi() : _oldditta(0), _codditta(0), _error(0), _exitcode(1) {}
|
||||||
};
|
};
|
||||||
@ -382,6 +383,8 @@ bool TConversione_archivi::menu(MENU_TAG)
|
|||||||
case 26:
|
case 26:
|
||||||
_exitcode = convert_CONAI();
|
_exitcode = convert_CONAI();
|
||||||
break;
|
break;
|
||||||
|
case 27:
|
||||||
|
update_righe_doc();
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2214,49 +2217,14 @@ void TConversione_archivi::convert_profile(const char* profile_name)
|
|||||||
|
|
||||||
void TConversione_archivi::convert_CONAI_righe()
|
void TConversione_archivi::convert_CONAI_righe()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
TArray old_conai_cod;
|
|
||||||
TArray old_conai_peso;
|
|
||||||
TArray new_conai_cod;
|
|
||||||
TArray new_conai_peso;
|
|
||||||
*/
|
|
||||||
TFast_isamfile f(LF_RIGHEDOC);
|
TFast_isamfile f(LF_RIGHEDOC);
|
||||||
TCursor c(new TRelation(LF_RIGHEDOC));
|
TCursor c(new TRelation(LF_RIGHEDOC));
|
||||||
|
|
||||||
/* c.relation()->add(LF_DOC, "PROVV==PROVV|ANNO==ANNO|CODNUM==CODNUM|NDOC==NDOC");
|
|
||||||
c.relation()->add("%TIP", "CODTAB==TIPODOC", 1, LF_DOC, 200);
|
|
||||||
c.setfilter("200@->B6==\"X\""); */
|
|
||||||
c.relation()->lfile().set_curr(new TAuto_variable_rectype(LF_RIGHEDOC));
|
c.relation()->lfile().set_curr(new TAuto_variable_rectype(LF_RIGHEDOC));
|
||||||
TRectype & r = c.curr();
|
TRectype & r = c.curr();
|
||||||
TToken_string key;
|
TToken_string key;
|
||||||
const long items = c.items();
|
const long items = c.items();
|
||||||
TProgind pi(items, TR("Conversione righe documento..."), false);
|
TProgind pi(items, TR("Conversione righe documento..."), false);
|
||||||
|
|
||||||
/*old_conai_cod.add(new TRecfield(r, "RG1:CONSCACC"));
|
|
||||||
old_conai_cod.add(new TRecfield(r, "RG1:CONSCALL"));
|
|
||||||
old_conai_cod.add(new TRecfield(r, "RG1:CONSCCAR"));
|
|
||||||
old_conai_cod.add(new TRecfield(r, "RG1:CONSCPLA"));
|
|
||||||
old_conai_cod.add(new TRecfield(r, "RG1:CONSCLEG"));
|
|
||||||
old_conai_cod.add(new TRecfield(r, "RG1:CONSCVET"));
|
|
||||||
old_conai_peso.add(new TRecfield(r, "RG1:CONPUACC"));
|
|
||||||
old_conai_peso.add(new TRecfield(r, "RG1:CONPUALL"));
|
|
||||||
old_conai_peso.add(new TRecfield(r, "RG1:CONPUCAR"));
|
|
||||||
old_conai_peso.add(new TRecfield(r, "RG1:CONPUPLA"));
|
|
||||||
old_conai_peso.add(new TRecfield(r, "RG1:CONPULEG"));
|
|
||||||
old_conai_peso.add(new TRecfield(r, "RG1:CONPUVET"));
|
|
||||||
new_conai_cod.add(new TRecfield(r, "RG1:CCON(1)"));
|
|
||||||
new_conai_cod.add(new TRecfield(r, "RG1:CCON(2)"));
|
|
||||||
new_conai_cod.add(new TRecfield(r, "RG1:CCON(3)"));
|
|
||||||
new_conai_cod.add(new TRecfield(r, "RG1:CCON(4)"));
|
|
||||||
new_conai_cod.add(new TRecfield(r, "RG1:CCON(6)"));
|
|
||||||
new_conai_cod.add(new TRecfield(r, "RG1:CCON(6)"));
|
|
||||||
new_conai_peso.add(new TRecfield(r, "RG1:PCON(1)"));
|
|
||||||
new_conai_peso.add(new TRecfield(r, "RG1:PCON(2)"));
|
|
||||||
new_conai_peso.add(new TRecfield(r, "RG1:PCON(3)"));
|
|
||||||
new_conai_peso.add(new TRecfield(r, "RG1:PCON(4)"));
|
|
||||||
new_conai_peso.add(new TRecfield(r, "RG1:PCON(5)"));
|
|
||||||
new_conai_peso.add(new TRecfield(r, "RG1:PCON(6)")); */
|
|
||||||
|
|
||||||
const char * const old_conai_cod[CONAI_CLASSES] = { "CONSCACC", "CONSCALL", "CONSCCAR", "CONSCPLA", "CONSCLEG", "CONSCVET" };
|
const char * const old_conai_cod[CONAI_CLASSES] = { "CONSCACC", "CONSCALL", "CONSCCAR", "CONSCPLA", "CONSCLEG", "CONSCVET" };
|
||||||
const char * const old_conai_peso[CONAI_CLASSES] = { "CONPUACC", "CONPUALL", "CONPUCAR", "CONPUPLA", "CONPULEG", "CONPUVET" };
|
const char * const old_conai_peso[CONAI_CLASSES] = { "CONPUACC", "CONPUALL", "CONPUCAR", "CONPUPLA", "CONPULEG", "CONPUVET" };
|
||||||
|
|
||||||
@ -2287,7 +2255,6 @@ void TConversione_archivi::convert_CONAI_righe()
|
|||||||
|
|
||||||
for (int j = 0; j < CONAI_CLASSES; j++)
|
for (int j = 0; j < CONAI_CLASSES; j++)
|
||||||
{
|
{
|
||||||
// TString16 cat = (const char *)((TRecfield&)old_conai_cod[j]);
|
|
||||||
TString16 cat = r.get(old_conai_cod[j]);
|
TString16 cat = r.get(old_conai_cod[j]);
|
||||||
|
|
||||||
if (cat.full())
|
if (cat.full())
|
||||||
@ -2296,13 +2263,6 @@ void TConversione_archivi::convert_CONAI_righe()
|
|||||||
|
|
||||||
if (new_cat.full() && new_cat != cat)
|
if (new_cat.full() && new_cat != cat)
|
||||||
cat = new_cat;
|
cat = new_cat;
|
||||||
|
|
||||||
/*
|
|
||||||
(TRecfield&) new_conai_cod[pos] = cat;
|
|
||||||
(TRecfield&) new_conai_peso[pos++] = (const char *)((TRecfield&) old_conai_peso[j]);
|
|
||||||
(TRecfield&) old_conai_cod[j] = "";
|
|
||||||
(TRecfield&) old_conai_peso[j] = "";
|
|
||||||
*/
|
|
||||||
r.put(conai_sottocat_name(pos), cat);
|
r.put(conai_sottocat_name(pos), cat);
|
||||||
r.put(conai_peso_name(pos++), r.get(old_conai_peso[j]));
|
r.put(conai_peso_name(pos++), r.get(old_conai_peso[j]));
|
||||||
r.zero(old_conai_cod[j]);
|
r.zero(old_conai_cod[j]);
|
||||||
@ -2319,7 +2279,6 @@ void TConversione_archivi::convert_CONAI_righe()
|
|||||||
|
|
||||||
if (new_cat.full() && new_cat != cat)
|
if (new_cat.full() && new_cat != cat)
|
||||||
{
|
{
|
||||||
/// (TRecfield&)new_conai_cod[j] = new_cat;
|
|
||||||
r.put(conai_sottocat_name(j + 1), new_cat);
|
r.put(conai_sottocat_name(j + 1), new_cat);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
@ -2475,6 +2434,63 @@ long TConversione_archivi::convert_CONAI()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Sistem le righe documento
|
||||||
|
|
||||||
|
void TConversione_archivi::update_righe_doc()
|
||||||
|
{
|
||||||
|
TFast_isamfile f(LF_RIGHEDOC);
|
||||||
|
TCursor c(new TRelation(LF_RIGHEDOC)); c.relation()->lfile().set_curr(new TAuto_variable_rectype(LF_RIGHEDOC));
|
||||||
|
TRectype & r = c.curr();
|
||||||
|
const long items = c.items();
|
||||||
|
TProgind pi(items, TR("Aggiornamento righe documento..."), false);
|
||||||
|
const char * const old_conai_cod[CONAI_CLASSES] = { "CONSCACC", "CONSCALL", "CONSCCAR", "CONSCPLA", "CONSCLEG", "CONSCVET" };
|
||||||
|
const char * const old_conai_peso[CONAI_CLASSES] = { "CONPUACC", "CONPUALL", "CONPUCAR", "CONPUPLA", "CONPULEG", "CONPUVET" };
|
||||||
|
TCursor frr(new TRelation("%FRR"));
|
||||||
|
const int fritems = frr.items();
|
||||||
|
TString_array formule;
|
||||||
|
|
||||||
|
for (frr = 0L; frr.pos() < fritems; ++frr)
|
||||||
|
formule.add(frr.curr().get("CODTAB"));
|
||||||
|
for (c = 0L; c.pos() < items && pi.addstatus(1); ++c)
|
||||||
|
{
|
||||||
|
const TString4 tipo = r.get(RDOC_TIPORIGA);
|
||||||
|
const TTipo_riga_documento & tiporiga = TRiga_documento::tipo(tipo);
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
if (tiporiga.is_merce() || tiporiga.is_omaggio())
|
||||||
|
{
|
||||||
|
for (int j = 0; j < CONAI_CLASSES; j++)
|
||||||
|
{
|
||||||
|
if (r.get(old_conai_peso[j]).full())
|
||||||
|
{
|
||||||
|
r.zero(old_conai_cod[j]);
|
||||||
|
r.zero(old_conai_peso[j]);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
if (r.get(conai_sottocat_name(j + 1)).blank() &&
|
||||||
|
r.get(conai_peso_name(j + 1)).full())
|
||||||
|
{
|
||||||
|
r.zero(conai_peso_name(j + 1));
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (tiporiga.is_descrizione())
|
||||||
|
{
|
||||||
|
for (int i = 0; i < fritems; i++)
|
||||||
|
if (r.get(formule[i]).full())
|
||||||
|
{
|
||||||
|
r.zero(formule[i]);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (changed && r.rewrite(f) != NOERR)
|
||||||
|
cantwrite_box(f.description());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Programma di conversione archivi speciale
|
// Programma di conversione archivi speciale
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -134,6 +134,7 @@ Item_03 = "Aggiornamento profili documento personalizzati", "bacnv 23", ""
|
|||||||
Item_04 = "Conversione documenti CONAI", "bacnv 24", ""
|
Item_04 = "Conversione documenti CONAI", "bacnv 24", ""
|
||||||
Item_05 = "Gestione attivazione licenze", "ba2 -7", ""
|
Item_05 = "Gestione attivazione licenze", "ba2 -7", ""
|
||||||
Item_06 = "Aggiornamento Nazioni ISO 2017" "ba7 -4", ""
|
Item_06 = "Aggiornamento Nazioni ISO 2017" "ba7 -4", ""
|
||||||
|
Item_04 = "Aggiornamento righe documento", "bacnv 27", ""
|
||||||
|
|
||||||
[MENU_PREFERITI]
|
[MENU_PREFERITI]
|
||||||
Caption = "Preferiti"
|
Caption = "Preferiti"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user