From 7ec4316d3550cc919f4efbef95e1430ea0c69b23 Mon Sep 17 00:00:00 2001 From: angelo Date: Tue, 9 Jan 1996 18:12:13 +0000 Subject: [PATCH] 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 --- sc/sc2100.cpp | 23 ++++++++++++----------- sc/sc2101.cpp | 8 ++++---- sc/sc2101.h | 2 +- sc/sc2401.cpp | 38 +++++++++++++++++++------------------- sc/sc2401.h | 2 +- 5 files changed, 37 insertions(+), 36 deletions(-) diff --git a/sc/sc2100.cpp b/sc/sc2100.cpp index 63c0fc1c0..699b702d3 100755 --- a/sc/sc2100.cpp +++ b/sc/sc2100.cpp @@ -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); } diff --git a/sc/sc2101.cpp b/sc/sc2101.cpp index f42f651da..6e9085c4a 100755 --- a/sc/sc2101.cpp +++ b/sc/sc2101.cpp @@ -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; } diff --git a/sc/sc2101.h b/sc/sc2101.h index eeb4c499e..1a7dba353 100755 --- a/sc/sc2101.h +++ b/sc/sc2101.h @@ -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(); diff --git a/sc/sc2401.cpp b/sc/sc2401.cpp index 73b3dfc40..6c059d6f0 100755 --- a/sc/sc2401.cpp +++ b/sc/sc2401.cpp @@ -41,12 +41,12 @@ const TString &TESSL_mask::get_prof_code() const { return get(F_CODPROF); } -const char *TESSL_mask::get_prof_name() 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) { diff --git a/sc/sc2401.h b/sc/sc2401.h index cfd0e6ea2..cac19fe2d 100755 --- a/sc/sc2401.h +++ b/sc/sc2401.h @@ -23,7 +23,7 @@ class TESSL_mask: public TSelection_mask { TRelation _ditta; - + TString _tmp; protected: virtual void on_firm_change(); virtual void start_run();