diff --git a/ChangeLog b/ChangeLog index 5c06f43..6210ec6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ v0.2_dev (15/02/2011) Update Copyright New database version (2) : fix_cost for categories - virtual account + virtual field for account and operation Database checking & upgrading ** Bugs ** diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index abe6a24..7c3003d 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -486,17 +486,17 @@ void AccountPanel::UpdateStats() if (op.amount >= 0) { - if (!op.transfert.Length()) + if (!op.transfert.Length() || (op._virtual && checkMode)) totalCredit += op.amount; if (day >= op.day) { - if (!op.transfert.Length()) + if (!op.transfert.Length() || (op._virtual && checkMode)) curCredit += op.amount; - if (!checkMode || (checkMode && op.checked)) + if ((!checkMode || (checkMode && op.checked)) && !op._virtual) curAccountAmount[op.account] += op.amount; } - if (!checkMode || (checkMode && op.checked)) + if ((!checkMode || (checkMode && op.checked)) && !op._virtual) finalAccountAmount[op.account] += op.amount; } else @@ -504,7 +504,7 @@ void AccountPanel::UpdateStats() if (!op.transfert.Length()) _categoriesValues[_categoriesIndexes[user->GetCategoryName(op.category)]] += -op.amount ; - if (!op.transfert.Length()) + if (!op.transfert.Length() || op._virtual) totalDebit += -op.amount; if (blocked_account) @@ -512,12 +512,12 @@ void AccountPanel::UpdateStats() if (day >= op.day) { - if (!op.transfert.Length()) + if (!op.transfert.Length() || op._virtual) curDebit += -op.amount; - if (!checkMode || (checkMode && op.checked)) + if (!checkMode || (checkMode && op.checked && !op._virtual)) curAccountAmount[op.account] += op.amount; } - if (!checkMode || (checkMode && op.checked)) + if (!checkMode || (checkMode && op.checked && !op._virtual)) finalAccountAmount[op.account] += op.amount; } }