Patch level : 12.0 976
Files correlati : tp0.exe Commento : - 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.
This commit is contained in:
parent
76dfb8b482
commit
13ee345b49
@ -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())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user