From 867ad809aaa4712480f5c183cfc03b23009d02e9 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 24 Oct 2023 15:16:48 +1100 Subject: [PATCH] set contact on invitation for payment emails --- app/Jobs/Payment/EmailPayment.php | 2 +- app/Jobs/Payment/EmailRefundPayment.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Payment/EmailPayment.php b/app/Jobs/Payment/EmailPayment.php index 46d4c3bad46f..dd6a7f129a17 100644 --- a/app/Jobs/Payment/EmailPayment.php +++ b/app/Jobs/Payment/EmailPayment.php @@ -88,7 +88,7 @@ class EmailPayment implements ShouldQueue if ($this->payment->invoices && $this->payment->invoices->count() >= 1) { if($this->contact){ - $invitation = $this->payment->invoices->first()->invitations()->where('contact_id', $this->contact->id)->first(); + $invitation = $this->payment->invoices->first()->invitations()->where('client_contact_id', $this->contact->id)->first(); } else $invitation = $this->payment->invoices->first()->invitations()->first(); diff --git a/app/Jobs/Payment/EmailRefundPayment.php b/app/Jobs/Payment/EmailRefundPayment.php index 0da81a92533b..bbc062f79169 100644 --- a/app/Jobs/Payment/EmailRefundPayment.php +++ b/app/Jobs/Payment/EmailRefundPayment.php @@ -93,7 +93,7 @@ class EmailRefundPayment implements ShouldQueue if ($this->payment->invoices && $this->payment->invoices->count() >= 1) { if($this->contact) { - $invitation = $this->payment->invoices->first()->invitations()->where('contact_id', $this->contact->id)->first(); + $invitation = $this->payment->invoices->first()->invitations()->where('client_contact_id', $this->contact->id)->first(); } else { $invitation = $this->payment->invoices->first()->invitations()->first(); }