From e3093768cb43b6e2dc4c69b74c10f256c9c17e1c Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 16 Apr 1996 15:41:45 +0000 Subject: [PATCH] Corretto messaggio di errore importo su riga di saldaconto git-svn-id: svn://10.65.10.50/trunk@2735 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2102.cpp | 6 ++++-- cg/cg2104.cpp | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index 3a3163802..03043098c 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -594,8 +594,10 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k) if (errato) { TString msg(128); - msg << "L'importo sulla riga " << currig << " deve essere " - << speso.valore().string(".") << ' ' << speso.sezione(); + msg << "L'importo sul saldaconto della riga " << currig << " e' " + << speso.valore().string("."); + if (!speso.is_zero()) + msg << (speso.sezione() == 'A' ? " Avere" : " Dare"); bool ok = FALSE; if (m.edit_mode() && speso.is_zero()) diff --git a/cg/cg2104.cpp b/cg/cg2104.cpp index 49cc30c73..d031b718e 100755 --- a/cg/cg2104.cpp +++ b/cg/cg2104.cpp @@ -1011,8 +1011,12 @@ bool TPrimanota_application::showpartite_handler(TMask_field& f, KEY k) if (importo != speso) { - const char* ss = speso.valore().string("."); - return f.error_box("L'importo deve essere %s %c", ss, speso.sezione()); + TString msg(128); + msg << "L'importo sul saldaconto della riga " << (riga+1) << " e' " + << speso.valore().string("."); + if (!speso.is_zero()) + msg << (speso.sezione() == 'A' ? " Avere" : " Dare"); + return f.error_box(msg); } } }