diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index a9c1e38be2..670f984f53 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -393,11 +393,11 @@ class BillRepository implements BillRepositoryInterface $rules = $this->user->rules() ->leftJoin('rule_actions', 'rule_actions.rule_id', '=', 'rules.id') ->where('rule_actions.action_type', 'link_to_bill') - ->get(['rules.id', 'rules.title', 'rule_actions.action_value']); + ->get(['rules.id', 'rules.title', 'rule_actions.action_value','rules.active']); $array = []; foreach ($rules as $rule) { $array[$rule->action_value] = $array[$rule->action_value] ?? []; - $array[$rule->action_value][] = ['id' => $rule->id, 'title' => $rule->title]; + $array[$rule->action_value][] = ['id' => $rule->id, 'title' => $rule->title,'active' => $rule->active]; } $return = []; foreach ($collection as $bill) { diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 2aa4894347..cb1a2848f4 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -667,6 +667,7 @@ return [ 'bill_will_automatch' => 'Bill will automatically linked to matching transactions', 'skips_over' => 'skips over', 'bill_store_error' => 'An unexpected error occurred while storing your new bill. Please check the log files', + 'list_inactive_rule' => 'inactive rule', // accounts: 'details_for_asset' => 'Details for asset account ":name"', diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 7f61c3d402..96603a4171 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -73,7 +73,9 @@ {% if rules.count > 0 %}