From 4b24f487c7933d3f15533a68c3e121051da2d2c5 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 6 Mar 2012 16:47:39 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : ef0 Ricompilazione Demo : [ ] Commento : Corretto salvataggio distinte in disposizione incassi/pagamenti git-svn-id: svn://10.65.10.50/branches/R_10_00@22601 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ef/ef0301.cpp | 2 +- ef/ef0a00.cpp | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ef/ef0301.cpp b/ef/ef0301.cpp index ce2ee0d3f..5ce5bd7d6 100755 --- a/ef/ef0301.cpp +++ b/ef/ef0301.cpp @@ -111,7 +111,7 @@ int TDistinta::write(bool force, TToken_string* dati_dist) else nriga = effetto.get_int(EFF_NRIGADIST); //riscrivo l'effetto con i dati della distinta a cui appartiene - err = effetto.rewrite_write(f); + err = effetto.rewrite(f); if (err != NOERR) break; } diff --git a/ef/ef0a00.cpp b/ef/ef0a00.cpp index ae0d987d4..69b8b9440 100755 --- a/ef/ef0a00.cpp +++ b/ef/ef0a00.cpp @@ -501,7 +501,6 @@ bool TPE_mask::fill_distinta(bool clear_all) TToken_string& row = sheet.row(rows++); if (fill_row(rs, row, partially_unassigned, dist_cont, clear_all)) { - row.add(eff.get(EFF_CUP), sheet.cid2index(F_CUP)); row.add(eff.get(EFF_CIG), sheet.cid2index(F_CIG)); row.add(eff.get(EFF_CODABI), sheet.cid2index(F_ABIAPP)); @@ -572,13 +571,11 @@ TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf, co if (main_app().has_module(CUAUT)) { const TString & eff_cup = eff.get(EFF_CUP); - found = (cup == eff_cup) && (cig == eff.get(EFF_CIG)); } if (found && main_app().has_module(NPAUT)) { const TString & eff_contsep = eff.get(EFF_CONTSEP); - found &= (contsep == eff_contsep); } if (found) @@ -676,14 +673,14 @@ void TPE_mask::save_rate() f.put(EFF_TIPODIST, tipodist); f.put(EFF_NDIST, numdist); f.put(EFF_NRIGADIST, 1); - if (f.read() != NOERR) + if (f.read(_isgteq) != NOERR || f.get_char(EFF_TIPODIST) != tipodist || f.get_long(EFF_NDIST) != numdist) break; const long nd = get_free_num(); TString msg; msg.format(FR("La distinta %ld č giā presente: verrā rinumerata in %ld"), numdist, nd); log.log(1, msg); numdist = nd; } - _is_new = FALSE; + _is_new = false; } TDistinta distinta(tipodist, numdist, _lock); @@ -908,9 +905,9 @@ bool TPE_mask::on_sheet_event(TOperable_field& o, TField_event e, long jolly) long TPE_mask::get_free_num() const { + const TString& tipodist = get(F_TIPODIST); TLocalisamfile eff(LF_EFFETTI); eff.setkey(4); TRectype& curr = eff.curr(); - const TString& tipodist = get(F_TIPODIST); curr.put(EFF_TIPODIST, tipodist); curr.put(EFF_NDIST, 99999L); const int err = eff.read(_isgreat); @@ -1204,7 +1201,6 @@ bool TPagamento_effetti::create() int ef0A00(int argc, char* argv[]) { - int n = 0; TPagamento_effetti pe; pe.run(argc, argv, TR("Disposizioni incassi/pagamenti")); return 0;