git-svn-id: svn://10.65.10.50/branches/R_10_00@23024 c028cbd2-c16b-5b4b-a496-9718f37d4682

This commit is contained in:
guy 2014-12-10 16:16:17 +00:00
parent ea4db97f58
commit 7a1fb797cf
2 changed files with 14 additions and 8 deletions

View File

@ -85,10 +85,16 @@ const char* const zero_fields[] =
NULL
};
typedef TString20 TCodice_articolo;
///////////////////////////////////////////////////////////
// TArticolo
///////////////////////////////////////////////////////////
class TArticolo : public TMultiple_rectype
{
protected:
TString _codice;
TCodice_articolo _codice;
// la get_str supporta anche la sintassi:
// #LF->fieldname
// oppure:
@ -110,7 +116,7 @@ public:
virtual TObject* dup() const { return new TArticolo(codice()); }
// restituisce il codice (e' un reference "sicuro" ad una stringa interna)
const TString& codice() const;
const TCodice_articolo& codice() const;
const TString& descrizione(const char * lingua = NULL) const;
bool unlock() ;

View File

@ -150,9 +150,9 @@ int TArticolo::read(const char * cod, word op, word lockop)
return read( tmp, op, lockop);
}
const TString& TArticolo::codice() const
const TCodice_articolo& TArticolo::codice() const
{
((TArticolo *)this)->_codice=get(ANAMAG_CODART);
((TCodice_articolo&)_codice) = get(ANAMAG_CODART);
return _codice;
}
@ -1515,9 +1515,9 @@ real TArticolo_giacenza::scorta_minima(const char* codmag,
if (!rec.get(MAG_CODMAG).empty())
{
if (liv_riordino)
sm += rec.get_real("LIVRIOR");
sm += rec.get_real(MAG_LIVRIOR);
else
sm += rec.get_real("SCORTAMIN");
sm += rec.get_real(MAG_SCORTAMIN);
}
}
return sm;