From 8b9b30ff6390393495496306f5b209f755faf869 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 21 Jun 2021 06:55:48 +1000 Subject: [PATCH] Set payment exchange rate --- app/Repositories/PaymentRepository.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Repositories/PaymentRepository.php b/app/Repositories/PaymentRepository.php index 3b456ae1e2..e0d8816823 100644 --- a/app/Repositories/PaymentRepository.php +++ b/app/Repositories/PaymentRepository.php @@ -90,6 +90,7 @@ class PaymentRepository extends BaseRepository { $client->service()->updatePaidToDate($_credit_totals)->save(); } } + } /*Fill the payment*/ @@ -184,6 +185,10 @@ class PaymentRepository extends BaseRepository { */ private function processExchangeRates($data, $payment) { + + if(array_key_exists('exchange_rate', $data) && isset($data['exchange_rate'])) + return $payment; + $client = Client::find($data['client_id']); $client_currency = $client->getSetting('currency_id');