Aggiunti alcuni metodi utili.
git-svn-id: svn://10.65.10.50/trunk@3388 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
788d0e2811
commit
8ef74a65b6
@ -167,6 +167,7 @@ int TDocumento::read(const TRectype& rec)
|
|||||||
set_key(*key, pr, an, cn, nu);
|
set_key(*key, pr, an, cn, nu);
|
||||||
|
|
||||||
TLocalisamfile doc(LF_DOC);
|
TLocalisamfile doc(LF_DOC);
|
||||||
|
TLocalisamfile rdoc(LF_RIGHEDOC);
|
||||||
int err = _head.read(doc);
|
int err = _head.read(doc);
|
||||||
|
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
@ -221,6 +222,12 @@ int TDocumento::remove() const
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool TDocumento::in_valuta()
|
||||||
|
{
|
||||||
|
TString16 val(valuta());
|
||||||
|
return (val.not_empty() && val != "LIT");
|
||||||
|
}
|
||||||
|
|
||||||
long TDocumento::get_next_key(char provv, int anno, const char* codnum) const
|
long TDocumento::get_next_key(char provv, int anno, const char* codnum) const
|
||||||
{
|
{
|
||||||
TLocalisamfile doc(LF_DOC);
|
TLocalisamfile doc(LF_DOC);
|
||||||
|
@ -43,8 +43,8 @@ class TDocumento : public TObject
|
|||||||
|
|
||||||
TRectype _head; // Record di testata
|
TRectype _head; // Record di testata
|
||||||
TRecord_array _rows; // Array di TRectype per le righe documenti di vendita.
|
TRecord_array _rows; // Array di TRectype per le righe documenti di vendita.
|
||||||
|
protected:
|
||||||
protected:
|
TRectype & row(int index) { return _rows.row(index, FALSE); }
|
||||||
long get_next_key(char provv, int anno, const char* codnum) const;
|
long get_next_key(char provv, int anno, const char* codnum) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -69,6 +69,9 @@ public:
|
|||||||
int anno() const { return _head.get_int("ANNO"); }
|
int anno() const { return _head.get_int("ANNO"); }
|
||||||
const TString& numerazione() { return _head.get("CODNUM"); }
|
const TString& numerazione() { return _head.get("CODNUM"); }
|
||||||
long numero() const { return _head.get_long("NDOC"); }
|
long numero() const { return _head.get_long("NDOC"); }
|
||||||
|
const TString & valuta() { return _head.get("CODVAL"); }
|
||||||
|
const bool in_valuta();
|
||||||
|
const real cambio() { return _head.get_real("CAMBIO"); }
|
||||||
const TDate& data() const { return _head.get_date("DATADOC"); }
|
const TDate& data() const { return _head.get_date("DATADOC"); }
|
||||||
// const TString& tipodoc() { return _head.get("TIPODOC"); }
|
// const TString& tipodoc() { return _head.get("TIPODOC"); }
|
||||||
const TTipo_documento& tipo() const;
|
const TTipo_documento& tipo() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user