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
This commit is contained in:
luca 2011-10-06 12:27:44 +00:00
parent 13e1897449
commit f8426f5944
3 changed files with 19 additions and 7 deletions

View File

@ -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; }

View File

@ -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();

View File

@ -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