Simplified some code.

This commit is contained in:
James Cole
2016-04-29 08:56:56 +02:00
parent ea014a6504
commit 14b94a5bd2
13 changed files with 104 additions and 83 deletions

View File

@@ -51,9 +51,11 @@ class BillController extends Controller
// expenses are negative (bill not yet paid),
$creditCardDue = bcmul($creditCardDue, '-1');
$unpaid = bcadd($unpaid, $creditCardDue);
} else {
// if more than zero, the bill has been paid: (transfer = positive).
// amount must be negative to be added to $paid:
}
// if $creditCardDue more than zero, the bill has been paid: (transfer = positive).
// amount must be negative to be added to $paid:
if ($creditCardDue >= 0) {
$paid = bcadd($paid, $creditCardDue);
}