Patch level : 12.0 1118
Files correlati : lv2 Commento : i campi della testata come la condizione di pagamento percentuale spese di incasso adebito bolli e codice agente non venivano aggiornati se erano vuoti sulla bolla.
This commit is contained in:
parent
d8995358f0
commit
fbf109cb88
@ -2284,21 +2284,22 @@ void TFatturazione_lav_app::main_loop()
|
||||
recset.cursor()->relation()->lfile().set_curr(new TDocumento);
|
||||
for (bool ok = recset.move_first(); ok && pi->add_status(); ok = recset.move_next())
|
||||
{
|
||||
TDocumento & doc =(TDocumento &) recset.cursor()->curr();
|
||||
const TCli_for &cli = cached_clifor('C', doc.get_long(DOC_CODCF));
|
||||
TDocumento & doc =(TDocumento &) recset.cursor()->curr();
|
||||
const TCli_for &cli = doc.clifor();
|
||||
const long codcli = cli.codice();
|
||||
//preparo la chiave e recupero da CFVEN i dati di quel cliente
|
||||
|
||||
if (cli.codice() != last_clifo)
|
||||
if (codcli != last_clifo)
|
||||
{
|
||||
key.format("C|%ld", cli.codice());
|
||||
key.format("C|%ld", cli.codice());
|
||||
TString str;
|
||||
str << TR("Cliente") << ' ' << cli.codice() << ' ' << cache().get(LF_CLIFO, key, CLI_RAGSOC);
|
||||
pi->set_text(str);
|
||||
last_clifo = cli.codice();
|
||||
last_clifo = codcli;
|
||||
}
|
||||
|
||||
//se non è l'ultimo cliente, allora:
|
||||
if (cli.codice() != lastcli)
|
||||
if (codcli != lastcli)
|
||||
{
|
||||
//se effettivamente devo elaborare delle bolle per questo cliente, allora:
|
||||
if (docsin.items() > 0)
|
||||
@ -2344,7 +2345,7 @@ void TFatturazione_lav_app::main_loop()
|
||||
docsin.rewrite();
|
||||
docsin.destroy(-1);
|
||||
}
|
||||
lastcli = cli.codice();
|
||||
lastcli = codcli;
|
||||
}
|
||||
|
||||
//se il documento che sto analizzando è corretto, allora:
|
||||
@ -2463,10 +2464,10 @@ void TFatturazione_lav_app::main_loop()
|
||||
doc.update(DOC_CODCABP, cab);
|
||||
doc.update(DOC_PROGBNP, progbnp);
|
||||
}
|
||||
doc_updated |= doc.update_if_full(DOC_CODPAG, cli.get(CLI_CODPAG));
|
||||
doc_updated |= doc.update_if_full(DOC_PERCSPINC, cli.vendite().get(CFV_PERCSPINC));
|
||||
doc_updated |= doc.update_if_full(DOC_ADDBOLLI, cli.vendite().get_bool(CFV_ADDBOLLI));
|
||||
doc_updated |= doc.update_if_full(DOC_CODAGVIS, cli.vendite().get(CFV_CODAG1));
|
||||
doc_updated |= doc.update(DOC_CODPAG, cli.get(CLI_CODPAG)); // was update_if_full
|
||||
doc_updated |= doc.update(DOC_PERCSPINC, cli.vendite().get(CFV_PERCSPINC)); // was update_if_full
|
||||
doc_updated |= doc.update(DOC_ADDBOLLI, cli.vendite().get_bool(CFV_ADDBOLLI)); // was update_if_full
|
||||
doc_updated |= doc.update(DOC_CODAGVIS, cli.vendite().get(CFV_CODAG1)); // was update_if_full
|
||||
if (doc_updated)
|
||||
{
|
||||
TString msg(" Cli.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user