1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

set contact on invitation for payment emails

This commit is contained in:
David Bomba 2023-10-24 15:16:48 +11:00
parent e69869e06c
commit 867ad809aa
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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();
}