From 0eae4329f450c1c3d4fcc21745809c02e7e52050 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 23 Sep 2019 16:33:27 +0200 Subject: [PATCH] Fix #2584 --- app/Repositories/Category/OperationsRepository.php | 2 +- app/Validation/TransactionValidation.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Repositories/Category/OperationsRepository.php b/app/Repositories/Category/OperationsRepository.php index 0853ce6fcc..dcff7cb69d 100644 --- a/app/Repositories/Category/OperationsRepository.php +++ b/app/Repositories/Category/OperationsRepository.php @@ -254,7 +254,7 @@ class OperationsRepository implements OperationsRepositoryInterface 'currency_name' => $journal['currency_name'], 'currency_symbol' => $journal['currency_symbol'], 'currency_code' => $journal['currency_code'], - 'currency_decimal_places' => $journal['currency_decimal_places'], + 'currency_decimal_places' => (int)$journal['currency_decimal_places'], ]; $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->negative($journal['amount'])); } diff --git a/app/Validation/TransactionValidation.php b/app/Validation/TransactionValidation.php index 233ada5a3c..ed6c66b7d1 100644 --- a/app/Validation/TransactionValidation.php +++ b/app/Validation/TransactionValidation.php @@ -96,7 +96,7 @@ trait TransactionValidation foreach ($transactions as $index => $transaction) { $originalType = $this->getOriginalType((int)($transaction['transaction_journal_id'] ?? 0)); - $originalData = $this->getOriginalData($transaction['transaction_journal_id'] ?? 0); + $originalData = $this->getOriginalData((int)($transaction['transaction_journal_id'] ?? 0)); $transactionType = $transaction['type'] ?? $originalType; $accountValidator->setTransactionType($transactionType);