From 73776e786900af53c62b430adba7bc903473f3ec Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 22 Feb 2025 10:05:44 +0100 Subject: [PATCH] Fix #9887 --- app/Services/Internal/Support/AccountServiceTrait.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index b87cbaaec7..c43478a64e 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -239,7 +239,8 @@ trait AccountServiceTrait // submit to factory: $submission = [ 'group_title' => null, - 'user' => $account->user_id, + 'user' => $account->user, + 'user_group' => $account->user->userGroup, 'transactions' => [ [ 'type' => 'Opening balance', @@ -460,11 +461,11 @@ trait AccountServiceTrait if (null === $currency) { $currency = app('amount')->getNativeCurrencyByUserGroup($account->user->userGroup); } - // submit to factory: $submission = [ 'group_title' => null, - 'user' => $account->user_id, + 'user' => $account->user, + 'user_group' => $account->user->userGroup, 'transactions' => [ [ 'type' => 'Liability credit',