diff --git a/lv/lv2400.cpp b/lv/lv2400.cpp index 0d92c87a6..0fc251196 100755 --- a/lv/lv2400.cpp +++ b/lv/lv2400.cpp @@ -84,7 +84,7 @@ public: //CREATE: metodo costruttore bool TGenera_documenti_app::create() { - open_files(LF_DOC, 34, 0); + open_files(LF_DOC, LF_RIGHEDOC, 0); _msk = new TGenera_documenti_mask("lv2400a"); _ndoc = 0; @@ -503,8 +503,9 @@ bool TGenera_documenti_app::numerazione_ddt(TString& codnum, TString& tpdoc, TSt //instanzio una cache sulla tabella dei tipi documento (cerco lo stato iniziale) - statoi = cache().get("%TIP",tpdoc,"S2").left(1); - statof = cache().get("%TIP",tpdoc,"S2").mid(1,1); + const TString& s2 = cache().get("%TIP",tpdoc,"S2"); + statoi = s2.left(1); + statof = s2.mid(1,1); return codnum.full() && tpdoc.full(); } @@ -512,16 +513,12 @@ bool TGenera_documenti_app::numerazione_ddt(TString& codnum, TString& tpdoc, TSt //NUMERAZIONE_DRIT: questa funzione cerca quali sono i codnum e i tpdoc dei documenti di ritiro bool TGenera_documenti_app::numerazione_drit(const int cod, TString& codnum, TString& tpdoc, TString& statoi, TString& statof) const { - TString16 tmp; - tmp << "NUM_RIT(" << cod << ")"; - codnum = _configlv->get(tmp); - - tmp.cut(0); - tmp << "TIPODOC_RIT(" << cod << ")"; - tpdoc = _configlv->get(tmp); + codnum = _configlv->get("NUM_RIT", NULL, cod); + tpdoc = _configlv->get("TIPODOC_RIT", NULL, cod); //instanzio una cache sulla tabella tipi documento (cerco lo stato iniziale) - statoi = cache().get("%TIP",tpdoc,"S2").left(1); - statof = cache().get("%TIP",tpdoc,"S2").mid(1,1); + const TString& s2 = cache().get("%TIP",tpdoc,"S2"); + statoi = s2.left(1); + statof = s2.mid(1,1); return codnum.full() && tpdoc.full(); } @@ -532,8 +529,9 @@ bool TGenera_documenti_app::numerazione_dant(const int cod, TString& codnum, TSt codnum = _configlv->get("NUM_ANT",NULL,cod); tpdoc = _configlv->get("TIPODOC_ANT",NULL,cod); //instanzio una cache sulla tabella delle righe contratti (cerco lo stato iniziale) - statoi = cache().get("%TIP",tpdoc,"S2").left(1); - statof = cache().get("%TIP",tpdoc,"S2").mid(1,1); + const TString& s2 = cache().get("%TIP",tpdoc,"S2"); + statoi = s2.left(1); + statof = s2.mid(1,1); return codnum.full() && tpdoc.full(); } diff --git a/lv/lv2600.cpp b/lv/lv2600.cpp index 53b3f599c..0e11c024e 100755 --- a/lv/lv2600.cpp +++ b/lv/lv2600.cpp @@ -172,8 +172,6 @@ TAcquisizione_cache::TAcquisizione_cache() : TCache(17) class TAcquisizione_lavanderie_app : public TSkeleton_application { TAcquisizione_msk* _msk; - - protected: virtual bool create(); @@ -181,7 +179,6 @@ protected: void elabora_file(const TString& file, TLog_report &rep); - public: bool transfer(); virtual void main_loop();