From f8426f594498d28c3a8d906c71b7eb20ac687fd6 Mon Sep 17 00:00:00 2001 From: luca Date: Thu, 6 Oct 2011 12:27:44 +0000 Subject: [PATCH] Patch level : 1094 Files correlati : tp0.exe Ricompilazione Demo : [ ] Commento : Corretto trasferimento IBAN git-svn-id: svn://10.65.10.50/branches/R_10_00@22445 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- tp/tp0100.h | 1 + tp/tp0101.cpp | 9 +++++---- tp/tp0102.cpp | 16 +++++++++++++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/tp/tp0100.h b/tp/tp0100.h index 25a5e5c32..7a963b81c 100755 --- a/tp/tp0100.h +++ b/tp/tp0100.h @@ -225,6 +225,7 @@ protected: const TString& get_codice_iva(const TDate & datadoc); const TString& get_customer_reference() const; bool get_paper_from_order(TString& desc) const; + const TString& get_iban(const TRectype& clifo) const; const TString & custrif() { return _rif; } const TString & ordrif() { return _ord; } bool order_date() { return _order_date; } diff --git a/tp/tp0101.cpp b/tp/tp0101.cpp index bf6db8712..bc1bf2c98 100755 --- a/tp/tp0101.cpp +++ b/tp/tp0101.cpp @@ -380,10 +380,11 @@ bool TPack_clifo::trasferisci() rec_cfven.put(CFV_TIPOCF, tipocf); rec_cfven.put(CFV_CODCF, codcf); // dati standard solo se sono in inserimento - rec_cfven.put(CFV_RAGGDOC, config().get("RAGGDOC","STANDARD")); - rec_cfven.put(CFV_RAGGEFF, config().get("RAGGEFF","STANDARD")); - rec_cfven.put(CFV_ADDBOLLI, config().get("ADDBOLLI","STANDARD")); - rec_cfven.put(CFV_PERCSPINC, config().get("PERCSPINC","STANDARD")); + ini.set_paragraph("STANDARD"); + rec_cfven.put(CFV_RAGGDOC, ini.get(CFV_RAGGDOC)); + rec_cfven.put(CFV_RAGGEFF, ini.get(CFV_RAGGEFF)); + rec_cfven.put(CFV_ADDBOLLI, ini.get(CFV_ADDBOLLI)); + rec_cfven.put(CFV_PERCSPINC, ini.get(CFV_PERCSPINC)); // scrivo good = test_write(cfven); rec_clifo.zero(); diff --git a/tp/tp0102.cpp b/tp/tp0102.cpp index 867b148a9..7c07fe47c 100755 --- a/tp/tp0102.cpp +++ b/tp/tp0102.cpp @@ -1,6 +1,6 @@ #include "tp0100.h" - +#include "../cg/cfban.h" #include "../mg/codcorr.h" // Assegna sottocategoria e peso di una classe CONAI solo se non vuoti @@ -60,7 +60,7 @@ bool TCache_art::update_paper_composition(const char* key, TArticolo_pack& art) bool done = paperset.move_first(); if (done) { - const TString pc = paperset.get(0u).as_string(); // Paper composition + const TString& pc = paperset.get(0u).as_string(); // Paper composition art.set_paper_composition(pc); } return done; @@ -517,6 +517,16 @@ bool TPack_ddt::get_paper_from_order(TString& desc) const return desc.full(); } +const TString& TPack_ddt::get_iban(const TRectype& clifo) const +{ + TString16 key; + key.format("%c|%ld|V|1", clifo.get_char(CLI_TIPOCF), clifo.get_char(CLI_CODCF)); + const TString& iban = cache().get(LF_CFBAN, key, CFBAN_IBAN); + if (iban.len() > 20) + return iban; + return clifo.get(CLI_IBAN); +} + bool TPack_ddt::trasferisci() { TString query = @@ -666,7 +676,7 @@ bool TPack_ddt::trasferisci() const TRectype& clifo = cache().get(LF_CLIFO, tok); doc->put(DOC_CODABIA, clifo.get(CLI_CODABI)); doc->put(DOC_CODCABA, clifo.get(CLI_CODCAB)); - doc->put(DOC_IBAN, clifo.get(CLI_IBAN)); + doc->put(DOC_IBAN, get_iban(clifo)); } } doc->put(DOC_ZONA, decode_field("ZON", "ZoneCode")); // Crea anche la zona se necessario