From d58a79c73de1c3cb1b9182e00048d59acd63e009 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 25 Feb 2022 13:15:10 +1100 Subject: [PATCH] Fixes for payments --- app/Repositories/PaymentRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Repositories/PaymentRepository.php b/app/Repositories/PaymentRepository.php index 1fa1180be67c..3fcbb95fb819 100644 --- a/app/Repositories/PaymentRepository.php +++ b/app/Repositories/PaymentRepository.php @@ -68,13 +68,13 @@ class PaymentRepository extends BaseRepository { { $is_existing_payment = true; + $client = Client::where('id', $data['client_id'])->withTrashed()->first(); //check currencies here and fill the exchange rate data if necessary if (! $payment->id) { $this->processExchangeRates($data, $payment); $is_existing_payment = false; - $client = Client::where('id', $data['client_id'])->withTrashed()->first(); /*We only update the paid to date ONCE per payment*/ if (array_key_exists('invoices', $data) && is_array($data['invoices']) && count($data['invoices']) > 0) {