Expand rules and bills.

This commit is contained in:
James Cole
2018-04-14 20:31:31 +02:00
parent 926c03986c
commit 15a22f0bfc
13 changed files with 90 additions and 36 deletions

View File

@@ -119,9 +119,9 @@ class UpgradeDatabase extends Command
}
// loop bills.
$order = 1;
$order = 1;
/** @var Collection $collection */
$collection = $user->bills()->where('active', 1)->get();
$collection = $user->bills()->get();
/** @var Bill $bill */
foreach ($collection as $bill) {
if ($bill->match !== 'MIGRATED_TO_RULES') {
@@ -132,7 +132,7 @@ class UpgradeDatabase extends Command
'title' => (string)trans('firefly.rule_for_bill_title', ['name' => $bill->name], $lang->data),
'description' => (string)trans('firefly.rule_for_bill_description', ['name' => $bill->name], $lang->data),
'order' => $order,
'active' => 1,
'active' => $bill->active,
'stop_processing' => 1,
]
);