Aggiunta possibilita' di specificare il profilo utente sulla
command line. Corretta la stampa del MESSAGE _UFFCSERVoUFFIIDD, specificando il campo sul quale stampare. git-svn-id: svn://10.65.10.50/trunk@2129 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7e2210bf5e
commit
6785364819
@ -19,10 +19,10 @@ protected:
|
|||||||
virtual word set_body(word p, bool u);
|
virtual word set_body(word p, bool u);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TTab_form(const char* name);
|
TTab_form(const char* name, const char * code);
|
||||||
};
|
};
|
||||||
|
|
||||||
TTab_form::TTab_form(const char* name) : TForm(name)
|
TTab_form::TTab_form(const char* name, const char * code) : TForm(name, code)
|
||||||
{
|
{
|
||||||
TCursor* c = cursor();
|
TCursor* c = cursor();
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
@ -53,9 +53,11 @@ bool TTab_form::validate(TForm_item& fld, TToken_string& s)
|
|||||||
|
|
||||||
if (code == "_CENSERoUFFIMP")
|
if (code == "_CENSERoUFFIMP")
|
||||||
{
|
{
|
||||||
const int a_comres = s.get_int(); // Alias del comune di residenza (fiscale)
|
const int a_comres = s.get_int();
|
||||||
|
// Alias del comune di residenza (fiscale)
|
||||||
const int a_anagr = s.get_int(); // Alias dell'anagrafica della persona
|
const int a_anagr = s.get_int(); // Alias dell'anagrafica della persona
|
||||||
TString i_cod(s.get()); // Eventuale Id del campo codice (solo se != 0)
|
TString16 i_des(s.get()); // Id del campo descrizione Centro Servizio (obbligatorio)
|
||||||
|
TString16 i_cod(s.get()); // Eventuale Id del campo codice (solo se != 0)
|
||||||
TString16 cod_us_uid; // Codice del Centro servizio o ufficio imposte dirette (NON E' IL CODICE DEL COMUNE)
|
TString16 cod_us_uid; // Codice del Centro servizio o ufficio imposte dirette (NON E' IL CODICE DEL COMUNE)
|
||||||
|
|
||||||
TString80 desc; // Denominzazione centro servizi o ufficio imposte
|
TString80 desc; // Denominzazione centro servizi o ufficio imposte
|
||||||
@ -106,12 +108,17 @@ bool TTab_form::validate(TForm_item& fld, TToken_string& s)
|
|||||||
_result = " ";
|
_result = " ";
|
||||||
_result << " " << desc;
|
_result << " " << desc;
|
||||||
|
|
||||||
|
|
||||||
|
if (i_des.not_empty())
|
||||||
|
{
|
||||||
|
TForm_item& fi = fld.find_field(i_des);
|
||||||
|
fi.set(_result);
|
||||||
|
}
|
||||||
if (i_cod.not_empty())
|
if (i_cod.not_empty())
|
||||||
{
|
{
|
||||||
TForm_item& fi = fld.find_field(i_cod);
|
TForm_item& fi = fld.find_field(i_cod);
|
||||||
fi.set(cod_us_uid);
|
fi.set(cod_us_uid);
|
||||||
}
|
}
|
||||||
fld.set(_result);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return TForm::validate(fld, s);
|
return TForm::validate(fld, s);
|
||||||
@ -143,10 +150,14 @@ bool TForm_printer::create()
|
|||||||
return error_box("Specificare il nome del profilo di stampa");
|
return error_box("Specificare il nome del profilo di stampa");
|
||||||
|
|
||||||
TFilename form(argv(2)); form.ext("frm");
|
TFilename form(argv(2)); form.ext("frm");
|
||||||
|
long code=0;
|
||||||
|
if (argc() == 4)
|
||||||
|
code = atol(argv(3));
|
||||||
if (!fexist(form))
|
if (!fexist(form))
|
||||||
return error_box("Il profilo %s non esiste", (const char*)form);
|
return error_box("Il profilo %s non esiste", (const char*)form);
|
||||||
|
form.ext("");
|
||||||
_tabcom = new TLocalisamfile(LF_TABCOM);
|
_tabcom = new TLocalisamfile(LF_TABCOM);
|
||||||
TTab_form f(form);
|
TTab_form f(form, (code != 0) ? format("%05ld",code) : "");
|
||||||
f.print();
|
f.print();
|
||||||
stop_run();
|
stop_run();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user