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 TTipo_documento& tpd = TDocumento::tipo(td);
TFilename prof = tpd.profile_name(); prof.ext("ini");
TFilename prof; tpd.profile_name(prof);
TConfig ini(prof, "MAIN");
if (ini.get("TIPOCF") == "F")
tipi.add(td);

View File

@ -256,7 +256,8 @@ public:
TObject* dup() const { return new TTipo_documento(codice()); }
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
const char tipocf();

View File

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

View File

@ -41,12 +41,18 @@ int TTipo_documento::read(const char* tipodoc)
return err;
}
const TFilename& TTipo_documento::profile_name(TFilename& profile) const
{
profile = get("S4");
profile.ext("ini");
return profile;
}
const char TTipo_documento::tipocf()
{
if (_tipocf == '\0')
{
TFilename pn = profile_name();
pn.ext("ini");
TFilename pn; profile_name(pn);
TConfig prof(pn);
_tipocf = prof.get_char("TIPOCF", "MAIN");
}
@ -93,8 +99,7 @@ const TString_array& TTipo_documento::keys_descrs()
if (_keys_descrs.items() == 0)
{
TString16 var, tiporiga;
TFilename pn(profile_name());
pn.ext("ini");
TFilename pn; profile_name(pn);
TConfig prof(pn);
const int numtr = prof.get_int( "NTIPIRIGA", "RIGHE" );
TTipo_riga_documento tr;
@ -134,8 +139,7 @@ const TString_array& TTipo_documento::sheet_columns()
if (_sheet_columns.items() == 0)
{
TString16 col;
TFilename pn(profile_name());
pn.ext("ini");
TFilename pn; profile_name(pn);
TConfig prof(pn, "SHEET");
int ncols = prof.get_int( "NCOLS", "SHEET" );
for (int i = 1; i <= ncols; i++)
@ -153,8 +157,7 @@ const TString_array& TTipo_documento::handlers()
if (_handlers.items() == 0)
{
TString16 chiave;
TFilename pn = profile_name();
pn.ext("ini");
TFilename pn; profile_name(pn);
TConfig prof(pn);
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
{
TString16 chiave;
TFilename pn(profile_name());
pn.ext("ini");
TFilename pn; profile_name(pn);
TConfig prof(pn, "DEFAULT");
const int ndefaults = prof.get_int("NDEFAULTS");
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()
{
TFilename profile(profile_name());
profile.ext("ini");
TFilename profile; profile_name(profile);
TConfig prof(profile, "MAIN");
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;
if (copy_defmagc < 0)
{
TFilename fname = mask.doc().tipo().profile_name();
fname.ext("ini");
TFilename fname; mask.doc().tipo().profile_name(fname);
TConfig c_tipo_documento(fname,"MAIN");
copy_defmagc = c_tipo_documento.get_bool("DEFMAGXCOLL");
}