Patch level : 12.0 612
Files correlati : tp0.exe Commento : Corretta imortazione dati CONAI per Dania
This commit is contained in:
parent
2513026e6a
commit
8d47743d40
@ -6,12 +6,14 @@
|
||||
// Assegna sottocategoria e peso di una classe CONAI solo se non vuoti
|
||||
bool TArticolo_pack::set_conai(TCONAI_class cc, const TString& scat, const real& weight)
|
||||
{
|
||||
const bool ok = conai_configured_class(cc) && scat.full() && !weight.is_zero();
|
||||
const bool ok = conai_configured_class(cc) && scat.full(); // && !weight.is_zero();
|
||||
if (ok)
|
||||
{
|
||||
_conai_scat[cc] = scat;
|
||||
_conai_peso[cc] = weight;
|
||||
}
|
||||
else
|
||||
_conai_scat[cc] = EMPTY_STRING;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -24,7 +26,8 @@ TArticolo_pack::TArticolo_pack(const TRectype& anamag) : TRectype(anamag)
|
||||
|
||||
const TString4 sotcat = anamag_sotcat.read(anamag); // Usually CA40
|
||||
const real peso = anamag_weight.read(anamag); // Should be > 0
|
||||
set_conai(cc, sotcat, peso); // Validates all parameters
|
||||
|
||||
set_conai(cc, sotcat, peso); // Validates all parameters
|
||||
}
|
||||
}
|
||||
|
||||
@ -831,7 +834,6 @@ bool TPack_ddt::trasferisci()
|
||||
pesi_anamag++;
|
||||
}
|
||||
}
|
||||
|
||||
// La sottocategoria della bolla prevale su quella anagrafica impostata sopra
|
||||
const TString4 conai_subclass = get_str("SubclassCode");
|
||||
const TCONAI_class ct = conai_str2class(conai_subclass);
|
||||
@ -851,15 +853,18 @@ bool TPack_ddt::trasferisci()
|
||||
{
|
||||
TGeneric_distrib d(peso_imballo_ddt, 3);
|
||||
FOR_EACH_CONFIGURED_CONAI_CLASS(cc)
|
||||
d.add(art.conai_weight(cc));
|
||||
if (art.conai_subclass(cc).full())
|
||||
d.add(art.conai_weight(cc));
|
||||
FOR_EACH_CONFIGURED_CONAI_CLASS(cc)
|
||||
rdoc.put(conai_peso_name(cc), d.get());
|
||||
if (art.conai_subclass(cc).full())
|
||||
rdoc.put(conai_peso_name(cc), d.get());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Il peso in bolla coincide con quello in anagrafica: devo riportarli
|
||||
FOR_EACH_CONFIGURED_CONAI_CLASS(cc)
|
||||
rdoc.put(conai_peso_name(cc), art.conai_weight(cc));
|
||||
if (art.conai_subclass(cc).full())
|
||||
rdoc.put(conai_peso_name(cc), art.conai_weight(cc));
|
||||
}
|
||||
/* }
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user