Take in accountt debit for virtual operations (and forgot them on check mode)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user