From bccde86c0c39592100895b9607b7748d474e938e Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 11 Mar 2020 05:45:37 +0100 Subject: [PATCH] Do some extra validation, fixes #3182 --- app/Factory/TransactionFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Factory/TransactionFactory.php b/app/Factory/TransactionFactory.php index 89ba3f0203..cc69367581 100644 --- a/app/Factory/TransactionFactory.php +++ b/app/Factory/TransactionFactory.php @@ -185,7 +185,7 @@ class TransactionFactory ); // do foreign currency thing: add foreign currency info to $one and $two if necessary. - if (null !== $this->foreignCurrency && null !== $foreignAmount && $this->foreignCurrency->id !== $this->currency->id) { + if (null !== $this->foreignCurrency && null !== $foreignAmount && $this->foreignCurrency->id !== $this->currency->id && '' !== $foreignAmount) { $result->foreign_currency_id = $this->foreignCurrency->id; $result->foreign_amount = $foreignAmount;