Updates to budgets.

This commit is contained in:
James Cole
2016-04-28 10:59:36 +02:00
parent 19d7e27fa9
commit b47a140c2f
20 changed files with 510 additions and 182 deletions

View File

@@ -74,7 +74,7 @@ class ReportHelper implements ReportHelperInterface
foreach ($bills as $bill) {
$billLine = new BillLine;
$billLine->setBill($bill);
$billLine->setActive(intval($bill->active) == 1);
$billLine->setActive(intval($bill->active) === 1);
$billLine->setMin($bill->amount_min);
$billLine->setMax($bill->amount_max);
$billLine->setHit(false);
@@ -91,10 +91,10 @@ class ReportHelper implements ReportHelperInterface
$billLine->setAmount($first->journalAmount);
$billLine->setHit(true);
}
if (!(!$billLine->isHit() && !$billLine->isActive())) {
if ($billLine->isHitAndActive()) {
$collection->addBill($billLine);
}
}
return $collection;