Patch level : 10.0

Files correlati     : ve0.exe
Ricompilazione Demo : [ ]
Commento            :
Corretto salvataggio codice listino o codice contratto se vuoti


git-svn-id: svn://10.65.10.50/trunk@18952 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-05-27 15:42:59 +00:00
parent 69f548c75b
commit a1efe60ab9
2 changed files with 20 additions and 2 deletions

View File

@ -906,6 +906,7 @@ protected:
int insert_anal_fields(TMask& m, int page, int lf, int& y, short& dlg, short& dlgd, bool required);
void insert_anal_page();
void kill_double_fields(short fld1, short fld2);
public:
virtual bool is_omaggio_enabled() { return true;}

View File

@ -73,6 +73,21 @@ TColor_rule::TColor_rule(const char* desc, const char* expr, TTypeexp type, COLO
// TDocumento_mask
///////////////////////////////////////////////////////////
// Data una coppia di campi, toglie il FIELD a quello invisibile dei due
void TDocumento_mask::kill_double_fields(short fld1, short fld2)
{
for (int i = 0; i < 2; i++)
{
const short id = i == 0 ? fld1 : fld2;
if (id2pos(id) > 0)
{
TEdit_field& f = efield(id);
if (f.hidden())
f.set_field(EMPTY_STRING);
}
}
}
TDocumento_mask::TDocumento_mask(const char* td)
: TVariable_mask(), _progs_page(-1), _condv(NULL), _smartcard(NULL),
_cms_start(-1), _cms_end(-1), _cms_start_sh(-1), _cms_end_sh(-1),
@ -205,7 +220,7 @@ TDocumento_mask::TDocumento_mask(const char* td)
disable(F_CAMBIO);
}
const bool geslin = cfg.get_bool("GESLIN");
const bool geslin = cfg.get_bool("GESLIN");
enable(F_CODLIN, geslin);
enable(F_DESLIN, geslin);
@ -223,6 +238,7 @@ TDocumento_mask::TDocumento_mask(const char* td)
disable(F_CODLIST);
hide(F_CODLIST1);
}
kill_double_fields(F_CODLIST, F_CODLIST1);
const bool gescontr = cfg.get_bool("GES", "ve", 2);
const bool gescontrcli = cfg.get_bool("GESCONCC");
@ -237,6 +253,7 @@ TDocumento_mask::TDocumento_mask(const char* td)
hide(F_CODCONT);
hide(F_CODCONT1);
}
kill_double_fields(F_CODCONT, F_CODCONT1);
const bool gesoff = cfg.get_bool("GES", "ve", 3);
enable(F_CODCAMP, gesoff);
@ -801,7 +818,7 @@ void TDocumento_mask::cli2mask(bool force_load)
set(F_ADDBOLLI, ven_rec.get(CFV_ADDBOLLI));
set(F_CATVEN, ven_rec.get(CFV_CATVEN));
pos = id2pos(F_CODLIST);
const TString16 codlist = ven_rec.get(CFV_CODLIST);
const TString4 codlist = ven_rec.get(CFV_CODLIST);
if (pos >= 0 && fld(pos).active())
{
TEdit_field & f = (TEdit_field&) fld(pos);