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); } } }