From b7f3c53688f39de59cccf3fcaf384897ec76785f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 10 Aug 2019 11:17:23 +0200 Subject: [PATCH] Fix #2388 --- app/Services/Internal/Support/AccountServiceTrait.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index 2318b84f7e..5c759ad55b 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -225,6 +225,11 @@ trait AccountServiceTrait $destName = trans('firefly.initial_balance_account', ['account' => $account->name], $language); $sourceId = $account->id; } + if (0 === bccomp($amount, '0')) { + Log::debug('Amount is zero, so will not make an OB group.'); + + return null; + } $amount = app('steam')->positive($amount); $submission = [ 'group_title' => null,