diff --git a/src/cg/cglib.h b/src/cg/cglib.h index 327ee3484..c7a89d368 100644 --- a/src/cg/cglib.h +++ b/src/cg/cglib.h @@ -1013,6 +1013,8 @@ public: virtual int read(word op = _isequal, word lockop = _nolock); virtual int TMovimento_contabile::remove(); + // Funzioni per costruttore di copia + virtual TMovimento_contabile & copy(const TMovimento_contabile & mov); virtual TObject* dup() const { return new TMovimento_contabile(*this); } virtual TMovimento_contabile& operator =(const TMovimento_contabile& mov) { return copy(mov); } @@ -1540,7 +1542,6 @@ public: virtual int read(const TRectype& rec, word op = _isequal, word lockop = _nolock); int read(char tipo, long codice, word op = _isequal, word lockop = _nolock); virtual int remove(TBaseisamfile& f) const; - // void cli2doc(TDocumento& doc); in velib03 const TString& find_listino_al(const TDate& datadoc) const; const TString & get_iban(); diff --git a/src/cg/cglib07.cpp b/src/cg/cglib07.cpp index dd4ad84bf..e753f9aa0 100644 --- a/src/cg/cglib07.cpp +++ b/src/cg/cglib07.cpp @@ -838,6 +838,48 @@ const TString& TCli_for::find_listino_al(const TDate& datadoc) const return get_tmp_string() = listino; } +const TString& TCli_for::get_iban() +{ + TString & iban = get_tmp_string(30); + TToken_string key; + + key.add(tipo()); + key.add(codice()); + key.add("V"); + key.add(1); + + const TRectype& cfban = cache().get(LF_CFBAN, key); + + if (!cfban.empty()) + { + const TString& abi_cf = cfban.get(CFBAN_ABI); + const TString& cab_cf = cfban.get(CFBAN_CAB); + iban = cfban.get(CFBAN_IBAN); + } + return iban; +} + +TToken_string& TCli_for::get_ban_pres(int nprog) +{ + TToken_string & ban = get_tmp_string(30); + TToken_string key; + + key.add(tipo()); + key.add(codice()); + key.add("N"); + key.add(nprog); + + const TRectype& cfban = cache().get(LF_CFBAN, key); + + if (!cfban.empty()) + { + ban.add(cfban.get(CFBAN_ABI)); + ban.add(cfban.get(CFBAN_CAB)); + ban.add(cfban.get(CFBAN_PROGPR)); + } + return ban; +} + TCli_for::TCli_for(char tipo, long codice) : TMultiple_rectype( LF_CLIFO ), _ven_rec(LF_CFVEN), _letint(LF_LETINT), _use_lettere(false), _lettera_found(false), _extended(false) { @@ -847,6 +889,7 @@ TCli_for::TCli_for(char tipo, long codice) : TMultiple_rectype( LF_CLIFO ), _ven read(tipo, codice); } + TCli_for::TCli_for(const TRectype & rec) : TMultiple_rectype(rec), _ven_rec(LF_CFVEN), _letint(LF_LETINT), _use_lettere(false), _lettera_found(false), _extended(false) {