From 4f35c6f894c768f016b3fb4d69d6e4343c45bc85 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 24 Nov 2020 21:14:06 +1100 Subject: [PATCH] explicit where for client in payment repo --- 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 38f816c4e340..673d701b96b2 100644 --- a/app/Repositories/PaymentRepository.php +++ b/app/Repositories/PaymentRepository.php @@ -72,7 +72,7 @@ class PaymentRepository extends BaseRepository $this->processExchangeRates($data, $payment); $is_existing_payment = false; - $client = Client::find($data['client_id'])->withTrashed(); + $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) {