Patch level : 12.00 1284
Files correlati : ve0.exe ve2.exe ve2400.msk Commento : Non era possibile svuotare una riga conai suglii articoli Se le svuotavo tutte ricaricava i vvalori di prima della conversione Il calcolo CONAI viene fatto anche se riattivo la registrazione con shift-F12
This commit is contained in:
parent
c56c125350
commit
be916eb207
@ -1883,73 +1883,6 @@ TArticolo_conai::TArticolo_conai(const TString& codart, TLog_report * log)
|
||||
err = conart.next();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Vado a cercare sempre nelle vecchie tabelle dell'articolo, Perchè giovane padawan?
|
||||
* La risposta è semplice, tutti i programmi che non verranno aggiornati da queste modifiche (es. Importazione Pack/SKNT)
|
||||
* scrivono li e quindi va tenuta la compatibilità
|
||||
*/
|
||||
|
||||
if (_sc.empty())
|
||||
{
|
||||
TLocalisamfile anamag(LF_ANAMAG);
|
||||
TRectype & ranamag = anamag.curr();
|
||||
|
||||
ranamag.put(ANAMAG_CODART, _codart);
|
||||
if (ranamag.read(anamag) == NOERR) // Non dovrebbe mai fallire
|
||||
{
|
||||
const TString& conaisc = ranamag.get(ANAMAG_CONAISC);
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
const TString& con = conaisc.mid(i * 4, 4);
|
||||
|
||||
if (con.full())
|
||||
{
|
||||
const TString& categoria = con.left(2);
|
||||
const TString& sottocat = con.right(2);
|
||||
const TString fldname = conai2anamagfld(categoria);
|
||||
|
||||
if (fldname != "ERROR")
|
||||
{
|
||||
_sc.add(con);
|
||||
|
||||
const real peso = ranamag.get_real(fldname);
|
||||
|
||||
_peso.add(peso);
|
||||
if ((log != nullptr) && (peso==ZERO))
|
||||
log->log(0, format("articolo :%s - peso unitario a zero", (const char *)_codart));
|
||||
}
|
||||
#ifdef DBG
|
||||
else
|
||||
{
|
||||
TString msg; msg.format("Errore nome campo: Articolo %s - Sottocategoria %s", (const char *)_codart, (const char *)con);
|
||||
|
||||
message_box(msg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
TString categoria = __conai_default_values[i];
|
||||
const TString& sottocat = categoria.right(2);
|
||||
categoria = categoria.left(2);
|
||||
const TString fldname = conai2anamagfld(categoria);
|
||||
const real peso = ranamag.get_real(fldname);
|
||||
if (peso != ZERO)
|
||||
{
|
||||
_sc.add((TString)__conai_default_values[i]);
|
||||
|
||||
const real peso = ranamag.get_real(fldname);
|
||||
|
||||
_peso.add(peso);
|
||||
if (log != nullptr)
|
||||
log->log(0, format("articolo :%s - peso unitario: kg %s senza categoria, impostato a: %s%s", (const char *)_codart,
|
||||
(const char *)peso.stringa(), (const char *)categoria, (const char *)sottocat));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// causali
|
||||
|
Loading…
x
Reference in New Issue
Block a user