git-svn-id: svn://10.65.10.50/branches/R_10_00@23058 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8d59b4ec1e
commit
0a8e1aaec0
@ -813,18 +813,18 @@ bool TPreventivo_emsk::on_dist_event(TOperable_field& o, TField_event e, long jo
|
||||
TPreventivo_tree& t = tree();
|
||||
while (t.dett(_iddist, 0))
|
||||
t.kill_node();
|
||||
TString80 codart, desc;
|
||||
const int last = rdist.last_row();
|
||||
int n = 0;
|
||||
for (int r = rdist.first_row(); r > 0 && r <= last; r = rdist.succ_row(r))
|
||||
{
|
||||
const TRectype& rd = rdist.row(r);
|
||||
TRectype* rec = t.dett(_iddist, n++, true);
|
||||
codart = rd.get(RDIST_CODCOMP);
|
||||
rec->put(RDOC_CODART, codart);
|
||||
desc = rd.get(RDIST_DESCR);
|
||||
const TCodice_articolo codart = rd.get(RDIST_CODCOMP);
|
||||
TString80 desc = rd.get(RDIST_DESCR);
|
||||
if (desc.empty())
|
||||
desc = cache().get(LF_ANAMAG, codart, ANAMAG_DESCR);
|
||||
|
||||
TRectype* rec = t.dett(_iddist, n++, true);
|
||||
rec->put(RDOC_CODART, codart);
|
||||
rec->put(RDOC_DESCR, desc);
|
||||
rec->put(RDOC_UMQTA, rd.get(RDIST_UM));
|
||||
rec->put(RDOC_QTA, rd.get(RDIST_EXPR));
|
||||
@ -1293,20 +1293,22 @@ TPreventivo_emsk::TPreventivo_emsk() : TPreventivo_msk("pe1400b"), _tree(NULL),
|
||||
if (_has_db)
|
||||
{
|
||||
TISAM_recordset dist("USE DIST");
|
||||
_has_db = dist.items() >= 5;
|
||||
_has_db = dist.items() >= 4;
|
||||
}
|
||||
if (!_has_db)
|
||||
{
|
||||
TMask& dist = sfield(F_DISTINTE).sheet_mask();
|
||||
TList_field& tipoa = dist.lfield(D_TIPOA);
|
||||
TToken_string cod = tipoa.get_codes();
|
||||
TToken_string val = tipoa.get_values();
|
||||
if (cod.items() == 2)
|
||||
const TToken_string cod = tipoa.get_codes();
|
||||
if (!_has_db && cod.items() >= 2)
|
||||
{
|
||||
cod.destroy(0);
|
||||
val.destroy(0);
|
||||
tipoa.replace_items(cod, val);
|
||||
TToken_string* m1 = tipoa.message(1);
|
||||
tipoa.replace_items("A", TR("Articolo"));
|
||||
if (m1 != NULL)
|
||||
{
|
||||
TToken_string* m0 = tipoa.message(0);
|
||||
if (m0 != NULL)
|
||||
*m0 = *m1;
|
||||
}
|
||||
tipoa.disable();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -585,6 +585,7 @@ BEGIN
|
||||
MESSAGE HIDE,D_CODART|HIDE,D_DESART|SHOW,D_CODDIS|SHOW,D_DESDIS
|
||||
ITEM "A|Articolo"
|
||||
MESSAGE HIDE,D_CODDIS|HIDE,D_DESDIS|SHOW,D_CODART|SHOW,D_DESART
|
||||
FLAGS "G"
|
||||
FIELD STATORIGA
|
||||
END
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user