Patch level :10.0

Files correlati     :lv0.exe, lv0400a.msk
Ricompilazione Demo : [ ]
Commento            :
Correzzioni sui contratti


git-svn-id: svn://10.65.10.50/trunk@18805 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
rajitgill 2009-04-30 12:40:50 +00:00
parent d5776467b8
commit eae4ff153c
2 changed files with 37 additions and 9 deletions

View File

@ -140,7 +140,17 @@ bool TContratti_msk::on_art_select()
{ {
const int pos = id2pos(id); const int pos = id2pos(id);
if (pos > 0) if (pos > 0)
fld(pos).set(row.get(ss.cid2index(id - 400))); {
TMask_field& f = fld(pos);
const TString& oldval = f.get();
const char* newval = row.get(ss.cid2index(id - 400));
if (oldval != newval)
{
f.set(newval);
if (f.is_kind_of(CLASS_LIST_FIELD))
f.on_hit();
}
}
} }
if (field(F_PPCONF).empty()) if (field(F_PPCONF).empty())
@ -148,12 +158,16 @@ bool TContratti_msk::on_art_select()
set(F_CALCCONS, "0"); set(F_CALCCONS, "0");
set(F_ARROT, ""); set(F_ARROT, "");
disable(F_CALCCONS); disable(F_CALCCONS);
disable(F_ARROT); disable(F_ARROT);
rowmask.field(S_CALCCONS).disable();
rowmask.field(S_ARROT).disable();
} }
else else
{ {
enable(F_CALCCONS); enable(F_CALCCONS);
enable(F_ARROT); enable(F_ARROT);
rowmask.field(S_CALCCONS).enable();
rowmask.field(S_ARROT).enable();
set(F_ARROT, "X"); set(F_ARROT, "X");
TToken_string row = ss.row(ss.selected()); TToken_string row = ss.row(ss.selected());
@ -266,8 +280,16 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
const int pos=id2pos(id); const int pos=id2pos(id);
if (pos>0) if (pos>0)
{ {
fld(pos).set(row.get(ss.cid2index(id-400))); TMask_field& f = fld(pos);
fld(pos).set_dirty(false); const TString& oldval = f.get();
const char* newval = row.get(ss.cid2index(id - 400));
if (oldval != newval)
{
f.set(newval);
if (f.is_kind_of(CLASS_LIST_FIELD))
f.on_hit();
}
f.set_dirty(false);
} }
} }
@ -336,9 +358,14 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
{ {
const short rowid = o.dlg() - 400; const short rowid = o.dlg() - 400;
const int index = ss.cid2index(rowid); const int index = ss.cid2index(rowid);
ss.sheet_mask().set(rowid,o.get()); const TString& oldval = ss.sheet_mask().get(rowid);
ss.row(sel).add(o.get(),index); const TString& newval = o.get();
ss.force_update(sel); if (newval != oldval)
{
ss.sheet_mask().set(rowid,newval);
ss.row(sel).add(newval,index);
ss.force_update(sel);
}
} }
} }
break; break;

View File

@ -723,9 +723,8 @@ END
LISTBOX S_VCARTCLI 1 20 LISTBOX S_VCARTCLI 1 20
BEGIN BEGIN
PROMPT 45 8 "Per " PROMPT 45 8 "Per "
ITEM "N|Nessuno"
ITEM "C|Cliente"
ITEM "A|Articolo" ITEM "A|Articolo"
ITEM "C|Cliente"
FIELD VCARTCLI FIELD VCARTCLI
GROUP 1 GROUP 1
END END
@ -734,6 +733,7 @@ CURRENCY S_PREZZOST 15
BEGIN BEGIN
PROMPT 2 9 "In vigore " PROMPT 2 9 "In vigore "
FIELD PREZZO FIELD PREZZO
FLAGS "U"
GROUP 2 GROUP 2
END END
@ -741,6 +741,7 @@ CURRENCY S_PREZZORN 15
BEGIN BEGIN
PROMPT 30 9 "Di rinnovo " PROMPT 30 9 "Di rinnovo "
FIELD PREZRIN FIELD PREZRIN
FLAGS "U"
GROUP 2 GROUP 2
END END