This commit is contained in:
James Cole
2023-05-13 06:17:22 +02:00
parent dd7aba0b51
commit c530961546
2 changed files with 14 additions and 10 deletions

View File

@@ -52,6 +52,8 @@ class BudgetDestroyService
DB::table('budget_transaction')->where('budget_id', (int)$budget->id)->delete();
// also delete all budget limits
$budget->budgetlimits()->delete();
foreach($budget->budgetlimits()->get() as $limit) {
$limit->delete();
}
}
}