Patch level :4.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :errore riporto


git-svn-id: svn://10.65.10.50/trunk@14175 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2006-07-12 10:07:26 +00:00
parent 58d15b8e31
commit d68b45c9da

View File

@ -408,6 +408,8 @@ private:
void put_column(TRectype & statrec,int col, const TSVriep_record& curr);
const real fc_um(const TRectype& statrec,const TSVriep_record& rieprec);
void invalid_columns(TRectype & statrec);
void standardize_um(TSVriep_record& rieprec, bool force=FALSE);
// generazione del file di output
@ -1717,12 +1719,12 @@ void TStampa_stat::standardize_um(TSVriep_record& rieprec, bool force)
if (tipoart==RIGA_MERCE || tipoart==RIGA_OMAGGI)
{
// è un articolo (<M>erce); converto alla UM principale dell'art.
_umart->setkey(1);
_umart->put(UMART_CODART,rieprec.get(SVR_CODART));
_umart->put(UMART_NRIGA,1);
_umart->read();
um = _umart->get(UMART_UM);
fc = _umart->get_real(UMART_FC);
TString key(rieprec.get(SVR_CODART));
key << "|1";
const TRectype& rec_umart = cache().get(LF_UMART, key);
um = rec_umart.get(UMART_UM);
fc = rec_umart.get_real(UMART_FC);
}
else
{
@ -1758,18 +1760,19 @@ const real TStampa_stat::fc_um(const TRectype& statrec,const TSVriep_record& rie
// è un articolo (<M>erce)
TString80 art = rieprec.get(SVR_CODART); art.trim();
_umart->setkey(2);
_umart->put(UMART_CODART, art);
_umart->put(UMART_UM, um);
if (_umart->read() == NOERR)
TLocalisamfile umart(LF_UMART);
umart.setkey(2);
umart.put(UMART_CODART, art);
umart.put(UMART_UM, um);
if (umart.read() == NOERR)
{
fc = _umart->get_real(UMART_FC);
_umart->put(UMART_UM, statum);
if (_umart->read() == NOERR)
fc = umart.get_real(UMART_FC);
umart.put(UMART_UM, statum);
if (umart.read() == NOERR)
{
// è una UM dell'articolo: uso i fc per convertirla
um = _umart->get(UMART_UM);
fc /= _umart->get_real(UMART_FC);
um = umart.get(UMART_UM);
fc /= umart.get_real(UMART_FC);
}
}
else