Patch level : 2.0 586

Files correlati     : ve0.exe
Ricompilazione Demo : [ ]
Commento            :

GF20103
Sui documenti interattivi di vendita non legge il .ini nel direttorio CUSTOM


git-svn-id: svn://10.65.10.50/trunk@11458 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-10-01 14:31:28 +00:00
parent e6f0d3a92d
commit df77178ce1
5 changed files with 18 additions and 18 deletions

View File

@ -80,7 +80,7 @@ bool TScoperto_msk::fill_sheet()
{ {
const TString8 td = codnum.tipo_doc(t); const TString8 td = codnum.tipo_doc(t);
const TTipo_documento& tpd = TDocumento::tipo(td); const TTipo_documento& tpd = TDocumento::tipo(td);
TFilename prof = tpd.profile_name(); prof.ext("ini"); TFilename prof; tpd.profile_name(prof);
TConfig ini(prof, "MAIN"); TConfig ini(prof, "MAIN");
if (ini.get("TIPOCF") == "F") if (ini.get("TIPOCF") == "F")
tipi.add(td); tipi.add(td);

View File

@ -256,7 +256,8 @@ public:
TObject* dup() const { return new TTipo_documento(codice()); } TObject* dup() const { return new TTipo_documento(codice()); }
public: public:
const TString& profile_name() const { return get("S4"); } // const TString& profile_name() const { return get("S4"); }
const TFilename& profile_name(TFilename& name) const;
// Funzioni che effettuano la cache di importanti valori contenuti nel profilo // Funzioni che effettuano la cache di importanti valori contenuti nel profilo
const char tipocf(); const char tipocf();

View File

@ -104,7 +104,7 @@ void TTipo_riga_documento::read_formule()
_formule = profile.get("CAMPICALC"); _formule = profile.get("CAMPICALC");
const TString & calcoli = profile.get("CALCOLI"); const TString& calcoli = profile.get("CALCOLI");
if (calcoli == "*") if (calcoli == "*")
{ {
TTable frr("%FRR"); TTable frr("%FRR");
@ -714,7 +714,6 @@ void TRiga_documento::dirty_fields(bool dirty_document)
} }
bool TRiga_documento::doc_dependent() const bool TRiga_documento::doc_dependent() const
{ {
if (tipo_valido()) if (tipo_valido())
{ {

View File

@ -41,12 +41,18 @@ int TTipo_documento::read(const char* tipodoc)
return err; return err;
} }
const TFilename& TTipo_documento::profile_name(TFilename& profile) const
{
profile = get("S4");
profile.ext("ini");
return profile;
}
const char TTipo_documento::tipocf() const char TTipo_documento::tipocf()
{ {
if (_tipocf == '\0') if (_tipocf == '\0')
{ {
TFilename pn = profile_name(); TFilename pn; profile_name(pn);
pn.ext("ini");
TConfig prof(pn); TConfig prof(pn);
_tipocf = prof.get_char("TIPOCF", "MAIN"); _tipocf = prof.get_char("TIPOCF", "MAIN");
} }
@ -93,8 +99,7 @@ const TString_array& TTipo_documento::keys_descrs()
if (_keys_descrs.items() == 0) if (_keys_descrs.items() == 0)
{ {
TString16 var, tiporiga; TString16 var, tiporiga;
TFilename pn(profile_name()); TFilename pn; profile_name(pn);
pn.ext("ini");
TConfig prof(pn); TConfig prof(pn);
const int numtr = prof.get_int( "NTIPIRIGA", "RIGHE" ); const int numtr = prof.get_int( "NTIPIRIGA", "RIGHE" );
TTipo_riga_documento tr; TTipo_riga_documento tr;
@ -134,8 +139,7 @@ const TString_array& TTipo_documento::sheet_columns()
if (_sheet_columns.items() == 0) if (_sheet_columns.items() == 0)
{ {
TString16 col; TString16 col;
TFilename pn(profile_name()); TFilename pn; profile_name(pn);
pn.ext("ini");
TConfig prof(pn, "SHEET"); TConfig prof(pn, "SHEET");
int ncols = prof.get_int( "NCOLS", "SHEET" ); int ncols = prof.get_int( "NCOLS", "SHEET" );
for (int i = 1; i <= ncols; i++) for (int i = 1; i <= ncols; i++)
@ -153,8 +157,7 @@ const TString_array& TTipo_documento::handlers()
if (_handlers.items() == 0) if (_handlers.items() == 0)
{ {
TString16 chiave; TString16 chiave;
TFilename pn = profile_name(); TFilename pn; profile_name(pn);
pn.ext("ini");
TConfig prof(pn); TConfig prof(pn);
int numhandler = prof.get_int( "NHANDLER", "HANDLERS" ); // prof int numhandler = prof.get_int( "NHANDLER", "HANDLERS" ); // prof
@ -175,8 +178,7 @@ void TTipo_documento::set_defaults(TMask& m)
if (items == 0) // Carica lo string_array con i defaults if (items == 0) // Carica lo string_array con i defaults
{ {
TString16 chiave; TString16 chiave;
TFilename pn(profile_name()); TFilename pn; profile_name(pn);
pn.ext("ini");
TConfig prof(pn, "DEFAULT"); TConfig prof(pn, "DEFAULT");
const int ndefaults = prof.get_int("NDEFAULTS"); const int ndefaults = prof.get_int("NDEFAULTS");
for(int i = 1; i <= ndefaults; i++) for(int i = 1; i <= ndefaults; i++)
@ -209,8 +211,7 @@ void TTipo_documento::add_formula_if_needed(TConfig& profile, TString& variable,
void TTipo_documento::read_formule() void TTipo_documento::read_formule()
{ {
TFilename profile(profile_name()); TFilename profile; profile_name(profile);
profile.ext("ini");
TConfig prof(profile, "MAIN"); TConfig prof(profile, "MAIN");
prof.write_protect(); // Altrimenti non si distrugge!!! prof.write_protect(); // Altrimenti non si distrugge!!!

View File

@ -1142,8 +1142,7 @@ bool causmag_handler( TMask_field& f, KEY key )
static int copy_defmagc = -883; static int copy_defmagc = -883;
if (copy_defmagc < 0) if (copy_defmagc < 0)
{ {
TFilename fname = mask.doc().tipo().profile_name(); TFilename fname; mask.doc().tipo().profile_name(fname);
fname.ext("ini");
TConfig c_tipo_documento(fname,"MAIN"); TConfig c_tipo_documento(fname,"MAIN");
copy_defmagc = c_tipo_documento.get_bool("DEFMAGXCOLL"); copy_defmagc = c_tipo_documento.get_bool("DEFMAGXCOLL");
} }