From a282ec6012979cf91445ca94e1dd1f6e7b2acfd4 Mon Sep 17 00:00:00 2001 From: pirro Date: Thu, 20 Apr 1995 13:24:24 +0000 Subject: [PATCH] Corretto errore di generazione contropartita con importo non desiderato git-svn-id: svn://10.65.10.50/trunk@1279 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2102.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index cc8229bae..655127b1f 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -583,7 +583,7 @@ void TPrimanota_application::generazione_righe_cg(int r) TBill conto(row, 2, 0x3); if (first_not_empty == r) // Sono la prima riga con importo ? { - int last = r; + int last = -1; for (i = r+1; i < cg.items(); i++) // Aggiorna tutte le altre contropartite { TToken_string& rowi = cg.row(i); @@ -601,7 +601,7 @@ void TPrimanota_application::generazione_righe_cg(int r) { conto.add_to(rowi, 9, 0x3); cg.force_update(i); - if (last == r) last = i; + if (last < 0) last = i; else last = 0; } } @@ -660,8 +660,8 @@ bool TPrimanota_application::cg_notify(int r, KEY k) case K_DEL: if (tipo > ' ') return error_box("La riga %d non puo' essere cancellata", r+1); - if (app().is_saldaconto() && app().iva() == nessuna_iva) - app().notify_cgline_deletion(r+1); + // if (app().is_saldaconto() && app().iva() == nessuna_iva) + // app().notify_cgline_deletion(r+1); break; default: break;