Modificate la stampa estratti conti e stampa solleciti:

corretto il caricamento dei forms.
aggiunto il settaggio per la fincatura anche in modo testo.
sostituiti i metodi x() con set_x().


git-svn-id: svn://10.65.10.50/trunk@2418 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1996-01-09 18:12:13 +00:00
parent ae1ab9ecfd
commit 7ec4316d35
5 changed files with 37 additions and 36 deletions

View File

@ -778,11 +778,11 @@ void TEC_form::print_total(int riga, const THash_object& o)
TPrint_section& body = section('B');
if (dare.x() <= 0 || avere.x() <= 0)
{
const TForm_item& bdare = body.find_field(PEC_DARE);
dare.x() = bdare.x();
TForm_item& bdare = body.find_field(PEC_DARE);
dare.set_x(bdare.x());
const TForm_item& bavere = body.find_field(PEC_AVERE);
avere.x() = bavere.x();
TForm_item& bavere = body.find_field(PEC_AVERE);
avere.set_x(bavere.x());
}
if (imp.sezione() == 'D')
@ -799,24 +799,24 @@ void TEC_form::print_total(int riga, const THash_object& o)
TForm_item& scaduto = foot.find_field(PEC_SCADUTO);
if (scaduto.x() <= 0)
{
const TForm_item& bscaduto = body.find_field(PEC_SCADUTO);
scaduto.x() = bscaduto.x();
TForm_item& bscaduto = body.find_field(PEC_SCADUTO);
scaduto.set_x(bscaduto.x());
}
scaduto.set(t.scaduto().string());
TForm_item& esposto = foot.find_field(PEC_ESPOSTO);
if (esposto.x() <= 0)
{
const TForm_item& besposto = body.find_field(PEC_ESPOSTO);
esposto.x() = besposto.x();
TForm_item& besposto = body.find_field(PEC_ESPOSTO);
esposto.set_x(besposto.x());
}
esposto.set(t.esposto().string());
TForm_item& implire = foot.find_field(PEC_IMPLIRE);
if (implire.x() <= 0)
{
const TForm_item& bimplire = body.find_field(PEC_IMPLIRE);
implire.x() = bimplire.x();
TForm_item& bimplire = body.find_field(PEC_IMPLIRE);
implire.set_x(bimplire.x());
}
implire.set(t.importo_lire().string());
@ -973,7 +973,7 @@ void TEC_form::init_header(const TMask& m)
TLocalisamfile f(LF_RFORM);
f.put("TIPOPROF", name());
f.put("CODPROF", code());
f.put("SEZ", "H");
f.put("SEZ", "H0");
f.put("ID", PEC_MEMO);
const int err = f.read();
if (err == NOERR)
@ -1025,6 +1025,7 @@ TEC_form::TEC_form(const TEC_mask& m, bool gesval)
const int first = head.height()-2;
const int last = pr.formlen();
const int horiz[] = { first+2, last-foot.height()+1, 0 };
set_mode((bkg_mode)_fincatura);
genera_fincatura(odd_page, first, last, horiz);
}

View File

@ -51,9 +51,9 @@ const TString& TEC_mask::get_prof_lang() const
const char* TEC_mask::get_prof_name() const
{
TFixed_string tmp(__tmp_string, 16);
tmp = get_prof_code();
tmp << get_prof_lang();
return __tmp_string;
TString& tmp=(TString&)_tmp;
tmp = get(F_CODPROF);
tmp << get(F_LINPROF);
return _tmp;
}

View File

@ -8,7 +8,7 @@
class TEC_mask : public TSelection_mask
{
TRelation _ditta;
TString _tmp;
protected: // TMask
virtual void on_firm_change();
virtual void start_run();

View File

@ -43,10 +43,10 @@ const TString &TESSL_mask::get_prof_code() const {
const char *TESSL_mask::get_prof_name() const
{
TFixed_string tmp(__tmp_string, 16);
tmp = get_prof_code();
tmp << get_prof_lang();
return __tmp_string;
TString& tmp=(TString&)_tmp;
tmp = get(F_CODPROF);
tmp << get(F_LINPROF);
return _tmp;
}
const TString &TESSL_mask::get_prof_lang() const {
@ -643,7 +643,7 @@ void TESSL_form::print_total(int riga, const THash_object& o)
TPrint_section& foot = section('F');
TPrint_section& body = section('B');
const TForm_item& bdesc = body.find_field(PEC_DESCR);
TForm_item& bdesc = body.find_field(PEC_DESCR);
// Sostituisce magic-names nei prompt
TString s(80);
@ -657,7 +657,7 @@ void TESSL_form::print_total(int riga, const THash_object& o)
change_magic_footer(o, s);
desc_field.set_prompt(s);
if (desc_field.x() <= 0)
desc_field.x() = bdesc.x();
desc_field.set_x(bdesc.x());
}
}
@ -668,11 +668,11 @@ void TESSL_form::print_total(int riga, const THash_object& o)
if (dare.x() <= 0 || avere.x() <= 0)
{
const TForm_item& bdare = body.find_field(PEC_DARE);
dare.x() = bdare.x();
TForm_item& bdare = body.find_field(PEC_DARE);
dare.set_x(bdare.x());
const TForm_item& bavere = body.find_field(PEC_AVERE);
avere.x() = bavere.x();
TForm_item& bavere = body.find_field(PEC_AVERE);
avere.set_x(bavere.x());
}
if (imp.sezione() == 'D')
@ -689,24 +689,24 @@ void TESSL_form::print_total(int riga, const THash_object& o)
TForm_item& scaduto = foot.find_field(PEC_SCADUTO);
if (scaduto.x() <= 0)
{
const TForm_item& bscaduto = body.find_field(PEC_SCADUTO);
scaduto.x() = bscaduto.x();
TForm_item& bscaduto = body.find_field(PEC_SCADUTO);
scaduto.set_x(bscaduto.x());
}
scaduto.set(t.scaduto().string());
TForm_item& esposto = foot.find_field(PEC_ESPOSTO);
if (esposto.x() <= 0)
{
const TForm_item& besposto = body.find_field(PEC_ESPOSTO);
esposto.x() = besposto.x();
TForm_item& besposto = body.find_field(PEC_ESPOSTO);
esposto.set_x(besposto.x());
}
esposto.set(t.esposto().string());
TForm_item& implire = foot.find_field(PEC_IMPLIRE);
if (implire.x() <= 0)
{
const TForm_item& bimplire = body.find_field(PEC_IMPLIRE);
implire.x() = bimplire.x();
TForm_item& bimplire = body.find_field(PEC_IMPLIRE);
implire.set_x(bimplire.x());
}
implire.set(t.importo_lire().string());
@ -869,7 +869,7 @@ void TESSL_form::init_header(const TMask& m)
TLocalisamfile f(LF_RFORM);
f.put("TIPOPROF", name());
f.put("CODPROF", code());
f.put("SEZ", "H");
f.put("SEZ", "H0");
f.put("ID", PEC_MEMO);
const int err = f.read();
if (err == NOERR)
@ -941,7 +941,7 @@ TESSL_form::TESSL_form(const TESSL_mask& m, bool gesval, short id_datalim, short
if (_fincatura)
{
TPrint_section& fink = section('G');
set_mode((bkg_mode)_fincatura);
genera_fincatura(odd_page, rows[0] - 2, rows[1] + (_maxtot * _total_rows) + 2, rows);
if (fink.fields() > 0)
{

View File

@ -23,7 +23,7 @@ class TESSL_mask: public TSelection_mask
{
TRelation _ditta;
TString _tmp;
protected:
virtual void on_firm_change();
virtual void start_run();