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

@@ -42,6 +42,7 @@ class BillUpdateService
*/
public function update(Bill $bill, array $data): Bill
{
$oldName = $bill->name;
$bill->name = $data['name'];
$bill->amount_min = $data['amount_min'];
$bill->amount_max = $data['amount_max'];
@@ -58,6 +59,9 @@ class BillUpdateService
$this->updateNote($bill, (string)$data['notes']);
}
// update rule actions.
$this->updateBillActions($bill, $oldName, $data['name']);
return $bill;
}