Patch level : 4.0
Files correlati : velib07 Ricompilazione Demo : [ ] Commento : Riportate le features presenti nel file vereplib.cpp ormai obsoleto git-svn-id: svn://10.65.10.50/trunk@14670 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c8da121068
commit
dde4d4cff0
@ -57,16 +57,39 @@ const TVariant& TDocument_recordset::get_field(int num, const char* field) const
|
||||
{
|
||||
const TDocumento& doc = ((TDocument_cache&)_cache).doc(rec);
|
||||
TVariant& var = get_tmp_var();
|
||||
const TFieldref ref(field, logic);
|
||||
if (logic == LF_DOC)
|
||||
|
||||
if (xvt_str_compare_ignoring_case(field, "SEGNO") == 0)
|
||||
{
|
||||
var = ref.read(doc);
|
||||
var = doc.is_nota_credito() ? -UNO : UNO;
|
||||
} else
|
||||
if (xvt_str_compare_ignoring_case(field, "IS_COSTO") == 0)
|
||||
{
|
||||
bool costo = (doc.tipo().is_costo()) || (!doc.tipo().is_ricavo() && doc.get_char(DOC_TIPOCF)=='F');
|
||||
var = costo ? UNO : ZERO;
|
||||
} else
|
||||
if (xvt_str_compare_ignoring_case(field, "IS_RICAVO") == 0)
|
||||
{
|
||||
bool ricavo = (doc.tipo().is_ricavo()) || (!doc.tipo().is_costo() && doc.get_char(DOC_TIPOCF)=='C');
|
||||
var = ricavo ? UNO : ZERO;
|
||||
}
|
||||
else
|
||||
{
|
||||
const int nriga = rec.get_int(RDOC_NRIGA);
|
||||
const TRiga_documento& rdoc = doc[nriga];
|
||||
var = ref.read(rdoc);
|
||||
const TFieldref ref(field, logic);
|
||||
if (logic == LF_DOC)
|
||||
{
|
||||
var = ref.read(doc);
|
||||
}
|
||||
else
|
||||
{
|
||||
const int nriga = rec.get_int(RDOC_NRIGA);
|
||||
if (nriga > 0 && nriga <= doc.rows())
|
||||
{
|
||||
const TRiga_documento& rdoc = doc[nriga];
|
||||
var = ref.read(rdoc);
|
||||
}
|
||||
else
|
||||
var = NULL_VARIANT;
|
||||
}
|
||||
}
|
||||
return var;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user