KissCount

KissCount Commit Details

Date:2018-08-26 18:10:46 (1 year 1 month ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:f1de45d08acfabb69babf88d64f1ee9dd1f2de80
Parents: 38770639bedc2ef9f8f9a91b5f40d77642d87f73
Message:Fix a bug: current account value is badly computed if operations are not in date order

Changes:
Msrc/view/AccountPanel.cpp (3 diffs)

File differences

src/view/AccountPanel.cpp
623623
624624
625625
626
627
628
629626
630
627
628
631629
632630
633631
......
637635
638636
639637
640
641
642
643638
644
639
640
645641
646642
647643
......
649645
650646
651647
652
653
654
648
649
655650
656651
657652
if (op.amount >= 0)
{
if (!op.transfert && !account.blocked)
totalCredit += op.amount;
if (day >= op.day)
{
if (!op.transfert && !account.blocked)
totalCredit += op.amount;
if (day >= op.day)
curCredit += op.amount;
}
}
_categoriesValues[_categoriesIndexes[user->GetCategoryName(op.category)]] += -op.amount ;
if (!op.transfert || force_debit)
totalDebit += -op.amount;
if (day >= op.day)
{
if (!op.transfert || force_debit)
totalDebit += -op.amount;
if (day >= op.day)
curDebit += -op.amount;
}
op.amount = -op.amount;
}
finalAccountAmount[op.account] += op.amount;
curAccountAmounts[op.day][op.account] += op.amount;
for(i=op.day+1; i<nbDays; i++)
curAccountAmounts[i][op.account] = curAccountAmounts[op.day][op.account];
for(i=op.day; i<nbDays; i++)
curAccountAmounts[i][op.account] += op.amount;
}
if (mode != CHECK_MODE)

Archive Download the corresponding diff file