From a5b316a7866908340acb836b133017b9ca920639 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 1 Feb 2011 23:36:11 +0000 Subject: [PATCH] Patch level : 10.0 912 Files correlati : tc0.exe Ricompilazione Demo : [ ] Commento : Pr i movimenti provenitanti da AS400 prassi nei corrispettivi vengono passati ora come conti di ricavo i conti delle righe iva e non vengono piu' passati i degli eventuali giroconti che non sono identificabili git-svn-id: svn://10.65.10.50/branches/R_10_00@21565 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- tc/tc0701.cpp | 53 +++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/tc/tc0701.cpp b/tc/tc0701.cpp index f560d8e02..541b3e488 100755 --- a/tc/tc0701.cpp +++ b/tc/tc0701.cpp @@ -219,8 +219,8 @@ bool TTS_textset::set(const char* field, const TVariant& var) ok = set_field(*info, NULL_VARIANT); else { - real v = var.as_real(); v *= CENTO; - ok = set_field(*info, TVariant(v.integer())); + real v = var.as_real();; + ok = set_field(*info, v); } break; default: @@ -748,36 +748,23 @@ void TTS_sender::add_diversi(const TRecordset& mov, const bool moviva) } else { - const char sez = rmov.get(RMV_SEZIONE).as_string()[0]; - if (as400 && corrispettivo && sez == 'D') + if (!corrispettivo) { - field.format("TRF-CONTO_%d", j); - set(field, contoricl); - field.format("TRF-IMPORTO_%d", j); - set(field, rmov.get(RMV_IMPORTO)); - field.format("TRF-DA_%d", j); - set(field, rmov.get(RMV_SEZIONE)); - field.format("TRF-CAU-AGGIUNT_%d", j); - set(field, descr2agg(rmov.get(RMV_DESCR).as_string())); - j++; - } - else - { - if (k < 8) - { - const real importo = rmov.get(RMV_IMPORTO).as_real(); - const char sez = rmov.get(RMV_SEZIONE).as_string()[0]; - TImporto i(sez, importo); + if (k < 8) + { + const real importo = rmov.get(RMV_IMPORTO).as_real(); + const char sez = rmov.get(RMV_SEZIONE).as_string()[0]; + TImporto i(sez, importo); - i.normalize(seznor); - field.format("TRF-CONTORIC_%d", k); - set(field, contoricl); - field.format("TRF-IMP-RIC_%d", k); - set(field, i.valore()); - k++; - } - else - log(2, TR("Registrazione con pił di 8 conti di costo/ricavo")); + i.normalize(seznor); + field.format("TRF-CONTORIC_%d", k); + set(field, contoricl); + field.format("TRF-IMP-RIC_%d", k); + set(field, i.valore()); + k++; + } + else + log(2, TR("Registrazione con pił di 8 conti di costo/ricavo")); } continue; } @@ -871,12 +858,12 @@ void TTS_sender::add_conti_ricavo_costo(const TRecordset& mov) rmov.move_first(); const char tiporiga = rmov.get(RMV_ROWTYPE).as_string()[0]; - if (tiporiga <= ' ') + TString16 codice = scod2ricl("TSREG", mov.get(MOV_REG)); + const bool corrispettivo = codice[0] == 'C'; + if (tiporiga <= ' ' && ! corrispettivo) return; TRecordset & riva = rivarecset(mov); - TString16 codice = scod2ricl("TSREG", mov.get(MOV_REG)); - const bool corrispettivo = codice[0] == 'C'; const bool acquisto = mov.get(MOV_TIPO).as_string()[0] == 'F'; int i = 0, j = 0; real fattore = UNO;