Rese non univoche le chiavi (2 e 3) dei documenti
Aggiunto il metodo statico tipo ai documenti git-svn-id: svn://10.65.10.50/trunk@5029 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ed66fbfe3a
commit
5e7e1a8fcd
@ -70,5 +70,5 @@ DATAAGG|5|8|0|Data ultimo aggiornamento
|
||||
UTENTE|1|10|0|Utente ultimo aggiornamento
|
||||
3
|
||||
PROVV+ANNO+CODNUM+NDOC|
|
||||
TIPOCF+CODCF+PROVV+ANNO+DATADOC+CODNUM+NDOC|
|
||||
DATADOC+PROVV+ANNO+CODNUM+NDOC|
|
||||
TIPOCF+CODCF+PROVV+ANNO+DATADOC+CODNUM+NDOC|X
|
||||
DATADOC+PROVV+ANNO+CODNUM+NDOC|X
|
||||
|
@ -438,6 +438,7 @@ public:
|
||||
const TString& valuta() const { return get("CODVAL"); }
|
||||
const real cambio() const { return get_real("CAMBIO"); }
|
||||
bool tipo_valido() const { return get("TIPODOC").not_empty(); }
|
||||
static const TTipo_documento& tipo(const char * tipodoc);
|
||||
const TTipo_documento& tipo() const;
|
||||
void set_tipo(const char * tipo) { head().put("TIPODOC", tipo);}
|
||||
void set_liv_giac_len(int liv, int len) { _liv_len[liv - 1] = len;}
|
||||
|
@ -945,10 +945,9 @@ long TDocumento::get_next_key(char provv, int anno, const char* codnum) const
|
||||
return n;
|
||||
}
|
||||
|
||||
const TTipo_documento& TDocumento::tipo() const
|
||||
const TTipo_documento& TDocumento::tipo(const char * tipodoc)
|
||||
{
|
||||
const TString16 tipodoc(get("TIPODOC"));
|
||||
CHECK(tipodoc.not_empty(), "Tipo documento nullo");
|
||||
CHECK(tipodoc && *tipodoc, "Tipo documento nullo");
|
||||
TTipo_documento * o = (TTipo_documento*)_tipi.objptr(tipodoc);
|
||||
if (o == NULL)
|
||||
{
|
||||
@ -958,6 +957,11 @@ const TTipo_documento& TDocumento::tipo() const
|
||||
return *o;
|
||||
}
|
||||
|
||||
const TTipo_documento& TDocumento::tipo() const
|
||||
{
|
||||
return tipo(get("TIPODOC"));
|
||||
}
|
||||
|
||||
bool TDocumento::raggruppabile(const TDocumento& doc, TToken_string& campi) const
|
||||
{
|
||||
bool ok = raggruppabile() && doc.raggruppabile();
|
||||
|
Loading…
x
Reference in New Issue
Block a user