diff --git a/cg/cg2104.cpp b/cg/cg2104.cpp index bead16917..d5fced43b 100755 --- a/cg/cg2104.cpp +++ b/cg/cg2104.cpp @@ -5,6 +5,7 @@ #include "pagament.h" #include "saldacon.h" +#include "utility.h" #include "cg2102.h" #include "cg2100.h" @@ -252,6 +253,7 @@ bool TPrimanota_application::pag_sheet_handler(TMask_field& f, KEY key) imp = ZERO; for (int r = pag.n_rate()-1; r >= 0; r--) imp += pag.tlit_rata(r); + imp.round(0); if (imp != totlit) { const TString is(imp.string(".")); @@ -495,7 +497,8 @@ bool TPrimanota_application::nrate_handler(TMask_field& f, KEY key) TSheet_field& ps = (TSheet_field&)m.field(FS_RATESHEET); pag.set_sheet(ps); app().pag_rows() = ps.rows_array(); - } + } + f.set(format("%d", pag.n_rate())); } return TRUE; } diff --git a/cg/pagament.cpp b/cg/pagament.cpp index 025cc8244..6ef2c1719 100755 --- a/cg/pagament.cpp +++ b/cg/pagament.cpp @@ -680,6 +680,8 @@ word TPagamento::validate() const res |= P_ZERO; tot += tpay; } + + tot.round(_round); if (tot != _firstr+_secndr) res |= P_TOTNC;