Arrotondamenti valuta / set n. rate dopo modifica
git-svn-id: svn://10.65.10.50/trunk@2460 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a3d9cbad9c
commit
3538c1072f
@ -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;
|
||||
}
|
||||
|
@ -680,6 +680,8 @@ word TPagamento::validate() const
|
||||
res |= P_ZERO;
|
||||
tot += tpay;
|
||||
}
|
||||
|
||||
tot.round(_round);
|
||||
|
||||
if (tot != _firstr+_secndr)
|
||||
res |= P_TOTNC;
|
||||
|
Loading…
x
Reference in New Issue
Block a user