Patch level : 10.0 498

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

Separatore pre le  descrizioni nella generazione avanzata codici articolo
\s significa spazio


git-svn-id: svn://10.65.10.50/trunk@19560 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-11-03 15:52:58 +00:00
parent a04e66c9d0
commit 60042a2a76
2 changed files with 11 additions and 18 deletions

View File

@ -210,7 +210,7 @@ void create_browse1(TEdit_field& kfld, int level, short key_id, short des_id, co
while (scan.pop() != "EN")
kfld.parse_item(scan);
xvt_fsys_removefile(tmp);
xvt_fsys_remove_file(tmp);
}
void create_browse2(TEdit_field& kfld, int level, short key_id, short des_id, const TCodart_livelli &cal, const bool chktyp)
@ -241,7 +241,7 @@ void create_browse2(TEdit_field& kfld, int level, short key_id, short des_id, co
while (scan.pop() != "EN")
kfld.parse_item(scan);
xvt_fsys_removefile(tmp);
xvt_fsys_remove_file(tmp);
}
int create_fields(TMask& msk, int x, int y, short key_id, short des_id, const TCodart_livelli &cal, const bool chktyp)

View File

@ -5,6 +5,7 @@
#include <automask.h>
#include <diction.h>
#include <recset.h>
#include <utility.h>
///////////////////////////////////////////////////////////
// Utility per gestione struttura codice avanzato
@ -38,6 +39,7 @@ class TCodart_mask : public TAutomask
{
static TCodice_articolo _restart;
TString80 _children;
TString80 _separators;
protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
@ -112,19 +114,9 @@ const TString & TCodart_mask::get_descr_separator(const int level)
if (level > 0)
{
const TString4 subcode = _children.mid(level*3, 3);
if (subcode.full())
{
const TRectype& fsa = get_sublevel_info(subcode);
if (!fsa.empty())
{
sep = fsa.get("S11");
if (sep.full())
sep.replace('_', ' ');
}
}
sep = _separators.mid((level - 1)*6, 6);
sep.trim();
sep = esc(sep);
}
return (const TString & )sep;
}
@ -166,7 +158,7 @@ void TCodart_mask::create_level(int level, const TString& subcode)
while (scan.pop() != "EN")
kfld.parse_item(scan);
xvt_fsys_removefile(tmp);
xvt_fsys_remove_file(tmp);
set_handlers();
}
}
@ -178,6 +170,7 @@ bool TCodart_mask::build_children()
// Non usare qui un TString& children, altrimenti cambia sul piu' bello!
_children = cache().get("GSA", code, "S1");
_separators = cache().get("GSA", code, "S2");
// Affetto la stringona S1 in sottocodici da 3 caratteri l'uno
for (int i = 0; i < 9; i++)
@ -219,8 +212,8 @@ bool advanced_codart_ask(TString& code, TString& desc)
{
code << m.get(id);
if (id > 101)
desc << m.get_descr_separator(id - 102);
desc << m.get(id+100);
desc << m.get_descr_separator(id - 101);
desc << esc(m.get(id+100));
}
running = false;
}