Patch level : 10.0 patch 767
Files correlati : ve0.exe Ricompilazione Demo : [ ] Commento : visualizzazione giacenza componenti impostare la variabile nella ini della maschera: ART_TO_SHOW= 1|1 (livello|riga) Corretta visualizzazione interattiva della giacenza di articoli con distinta Corretta evasione ordini per riferimenti Cambiato l'ordine nei riferimenti nella evasione ordini Ora per inserire la stringa di riferimento normale nel riferimento bisogna scrivere [RIF] Dalla versione 3.2 git-svn-id: svn://10.65.10.50/trunk@20600 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a105e76eec
commit
566481462f
@ -1,4 +1,5 @@
|
||||
#include <recset.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "velib.h"
|
||||
@ -146,13 +147,19 @@ const char TTipo_documento::tipocf() const
|
||||
|
||||
const TString& TTipo_documento::riferimento(const TDocumento & doc, TString& rif) const
|
||||
{
|
||||
rif = get("S1");
|
||||
rif = esc(get("S1"));
|
||||
int p = rif.find('{');
|
||||
bool ok = true;
|
||||
|
||||
while (p >= 0)
|
||||
{
|
||||
{
|
||||
char conn = ' ';
|
||||
int q = p + 1;
|
||||
|
||||
if (rif[q] == '\\' || rif[q] == '&' || rif[q] == '|')
|
||||
conn = rif[q++];
|
||||
const int last = rif.find('}');
|
||||
const TString16 field_name(rif.sub(p + 1, last));
|
||||
const TString16 field_name(rif.sub(q, last));
|
||||
const TFieldref field(field_name, LF_DOC);
|
||||
if (last < 0)
|
||||
rif.cut(p);
|
||||
@ -163,19 +170,42 @@ const TString& TTipo_documento::riferimento(const TDocumento & doc, TString& rif
|
||||
rif[p + i] = rif[last + i + 1];
|
||||
}
|
||||
|
||||
TString val;
|
||||
|
||||
if (field.file() == LF_DOC)
|
||||
rif.insert(field.read(doc), p);
|
||||
{
|
||||
val = field.read(doc);
|
||||
rif.insert(val, p);
|
||||
}
|
||||
else
|
||||
{
|
||||
TString8 key(doc.get(DOC_TIPOCF));
|
||||
key << '|' << doc.get(DOC_CODCF);
|
||||
|
||||
const TRectype& rec = cache().get(field.file(), key);
|
||||
rif.insert(field.read(rec), p);
|
||||
val = field.read(rec);
|
||||
rif.insert(val, p);
|
||||
}
|
||||
|
||||
switch (conn)
|
||||
{
|
||||
case '\\' :
|
||||
ok = val.full();
|
||||
break;
|
||||
case '&' :
|
||||
ok &= val.full();
|
||||
break;
|
||||
case '|' :
|
||||
ok |= val.full();
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
|
||||
p = rif.find('{');
|
||||
}
|
||||
if (!ok)
|
||||
rif.cut(0);
|
||||
return rif;
|
||||
}
|
||||
|
||||
@ -376,12 +406,19 @@ void TTipo_documento::read_formule()
|
||||
if(_field_qta_mag.blank())
|
||||
_field_qta_mag = _field_qta;
|
||||
_field_qtaevasa_mag = prof.get("QTAEVASA_MAG");
|
||||
if(_field_qtaevasa_mag.blank())
|
||||
_field_qtaevasa_mag = _field_qtaevasa;
|
||||
if(_field_qtaevasa_mag.blank())
|
||||
_field_qtaevasa_mag = _field_qtaevasa;
|
||||
_check_qta = prof.get_char("CHECK_QTA", "MAIN");
|
||||
_load_cont = prof.get_bool("LOAD_CONT", "MAIN");
|
||||
_raee_cod = prof.get("RAEE_COD", "MAIN");
|
||||
_raee_fld = prof.get("RAEE_FLD", "MAIN");
|
||||
|
||||
TToken_string str = prof.get("ART_TO_SHOW", "MAIN");
|
||||
_liv = str.get_int();
|
||||
_row = str.get_int();
|
||||
|
||||
if (_liv > 0 && _row == 0)
|
||||
_row = 1;
|
||||
|
||||
_str_desc_doc = prof.get("DESCRIZIONE_DOC");
|
||||
_str_desc_rdoc = prof.get("DESCRIZIONE_RDOC");
|
||||
@ -394,10 +431,10 @@ void TTipo_documento::read_formule()
|
||||
bool TTipo_documento::stato_with_mov_mag(const char stato) const
|
||||
{
|
||||
if (!mov_mag())
|
||||
return FALSE;
|
||||
return false;
|
||||
const char stato_finale(stato_mov_finale());
|
||||
if (stato_finale > ' ' && stato > stato_finale)
|
||||
return FALSE;
|
||||
return false;
|
||||
const char stato_iniziale(stato_mov_iniziale());
|
||||
return stato >= stato_iniziale;
|
||||
}
|
||||
@ -446,7 +483,7 @@ bool TTipo_documento::scarica_residuo() const
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Espressione documento
|
||||
// Espressione rdocumento
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
TExpr_documento::TExpr_documento(const char* expression, TTypeexp type,
|
||||
|
Loading…
x
Reference in New Issue
Block a user