Aggiunta gestione dei magazzini standard

git-svn-id: svn://10.65.10.50/trunk@5149 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1997-09-02 09:55:40 +00:00
parent 1feecbc7c5
commit 4ab6a5be42
2 changed files with 29 additions and 2 deletions

View File

@ -185,8 +185,17 @@ bool TMotore_application::ss_handler( TSheet_field& ss, int r, KEY key )
TRiga_documento & riga = (*(app()._doc))[r + 1];
TRectype & ven_rec = app().doc().clifor().vendite();
TString16 s(ven_rec.get(CFV_CODMAG));
s << ven_rec.get(CFV_CODDEP);
if (s.not_empty())
{
s.left_just(3);
s << ven_rec.get(CFV_CODDEP);
}
else
{
s = app()._std_mag;
s.left_just(3);
s << app()._std_dep;
}
riga.put("CODMAG", s);
riga.autoload(ss);
ss.check_row(r);
@ -446,6 +455,10 @@ void TMotore_application::configura_sheet( TSheet_field& sheet, TConfig& config
}
to_delete.reset(0);
to_delete.reset(1);
if (!to_delete[sheet.cid2index(FR_CODDEP)])
sheet.enable_column(FR_CODDEP, _ges_dep && _ges_mag);
if (!to_delete[sheet.cid2index(FR_CODMAG)])
sheet.enable_column(FR_CODMAG, _ges_mag);
to_delete.set(sheet.cid2index(FR_CODARTMAG));
to_delete.set(sheet.cid2index(FR_CHECKED));
@ -760,6 +773,14 @@ bool TMotore_application::user_create( )
// La maschera di inserimento/modifica per ora non la so!
// Viene letta dal profilo non appena trovato il record
TMagazzini m;
_ges_mag = m.gestmag();
_ges_dep = m.gestdep();
_std_mag = m.standardmag();
_std_dep = m.standarddep();
return TRUE;
}

View File

@ -100,6 +100,12 @@ class TMotore_application : public TRelation_application
char _tipocf;
TString16 _codnum;
TString16 _tipodoc;
bool _ges_mag;
bool _ges_dep;
TString16 _std_mag;
TString16 _std_dep;
// Array di maschere documento