Patch level : 10.0
Files correlati : pi0002 Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@20514 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7e34655ce0
commit
7aa71d3767
@ -56,6 +56,7 @@ bool TPF_mask::on_sheet_event(TOperable_field& o, TField_event e, long jolly)
|
||||
case F_SHEET:
|
||||
switch(e)
|
||||
{
|
||||
case se_query_del:
|
||||
case se_query_add:
|
||||
return false;
|
||||
case se_notify_modify:
|
||||
@ -193,18 +194,26 @@ bool TPF_mask::calc_residual(const TRiga_scadenze& scad, real& impres,
|
||||
|
||||
void TPF_mask::update_total()
|
||||
{
|
||||
TSheet_field& s = sfield(F_SHEET);
|
||||
const int postoa = s.cid2index(F_IMPORTOANT);
|
||||
const TSheet_field& s = sfield(F_SHEET);
|
||||
const int postop = s.cid2index(F_PAGATO);
|
||||
real tota;
|
||||
real totp;
|
||||
const int postoa = s.cid2index(F_IMPORTOANT);
|
||||
real tota, totp;
|
||||
FOR_EACH_SHEET_ROW_BACK(s, r, row)
|
||||
{
|
||||
tota += real(row->get(postoa));
|
||||
totp += real(row->get(postop));
|
||||
if (r == s.selected())
|
||||
{
|
||||
const TMask& rm = s.sheet_row_mask(r);
|
||||
totp += rm.get_real(F_PAGATO);
|
||||
tota += rm.get_real(F_IMPORTOANT);
|
||||
}
|
||||
else
|
||||
{
|
||||
totp += real(row->get(postop));
|
||||
tota += real(row->get(postoa));
|
||||
}
|
||||
}
|
||||
set(F_TOTALEANT, tota);
|
||||
set(F_TOTALEPAG, totp);
|
||||
set(F_TOTALEANT, tota);
|
||||
enable(DLG_SAVEREC, !tota.is_zero()||!totp.is_zero());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user