From f3f572c47c6187d054e4cbf41354a27db005381c Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 18 Jan 1996 09:23:11 +0000 Subject: [PATCH] Corretta generazione rate differenziate in valuta e messaggio di errore sugli importi git-svn-id: svn://10.65.10.50/trunk@2464 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/pagament.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cg/pagament.cpp b/cg/pagament.cpp index 9ac222ebc..30a6862c0 100755 --- a/cg/pagament.cpp +++ b/cg/pagament.cpp @@ -747,7 +747,8 @@ void TPagamento::strerr(word err, TString& s) real imp; for (int i = 0; i < n_rate(); i++) imp += tpay_rata(i); - const char pic[3] = { '.', _round, '\0' }; + char pic[3] = ".0"; + pic[1] += _round; s << "- la somma degli importi (" << imp.string(pic); s << ") e' diversa dal\ntotale del pagamento (" << tot.string(pic) << ")\n"; } @@ -1607,6 +1608,7 @@ void TPagamento::set_total(const real& imponibile, const real& imposta, const re const real toslice = _tpr > 1 ? _secndr : _firstr; _slicer.init(toslice, TRUE); + _slicer.set_dec(_round); const int first = _tpr > 3 ? 1 : 0; for (int i = first; i < _rate.items(); i++)