diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php index a370bbd00f..78f9e7179c 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -129,7 +129,6 @@ class IndexController extends Controller $spent = $spentArr[$this->primaryCurrency->id]['sum'] ?? '0'; unset($spentArr); } - // number of days for consistent budgeting. $activeDaysPassed = $this->activeDaysPassed($start, $end); // see method description. $activeDaysLeft = $this->activeDaysLeft($start, $end); // see method description. diff --git a/app/Repositories/Webhook/WebhookRepository.php b/app/Repositories/Webhook/WebhookRepository.php index 7a54e0fd7c..943ab278ad 100644 --- a/app/Repositories/Webhook/WebhookRepository.php +++ b/app/Repositories/Webhook/WebhookRepository.php @@ -55,6 +55,9 @@ class WebhookRepository implements WebhookRepositoryInterface, UserGroupInterfac public function destroy(Webhook $webhook): void { + // force delete all messages and attempts: + $webhook->webhookMessages()->delete(); + $webhook->delete(); } diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig index d773948874..73b8814968 100644 --- a/resources/views/budgets/index.twig +++ b/resources/views/budgets/index.twig @@ -356,16 +356,17 @@
{% endif %} + {% if spentInfo.currency_id == budgetLimit.currency_id and not budgetLimit.in_range %} + + {{ formatAmountBySymbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }} + + ({{ 'unknown'|_ }}) + {% endif %} {% endfor %} {% if countLimit == 0 %} - - {# this code is used for budget limits OUTSIDE the current view range. #} - - {{ formatAmountBySymbol(spentInfo.spent, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }} - -
+ {# display nothing #} {% endif %} {% endfor %} {% for budgetLimit in budget.budgeted %}