1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

Fixes for payment emails

This commit is contained in:
David Bomba 2024-01-30 13:27:19 +11:00
parent fbed726ed6
commit 995c7dbd3e
3 changed files with 3 additions and 6 deletions

View File

@ -520,7 +520,7 @@ class PaymentController extends BaseController
if($action == 'template' && $user->can('view', $payments->first())) {
$hash_or_response = request()->boolean('send_email') ? 'email sent' : \Illuminate\Support\Str::uuid();
nlog($payments->pluck('hashed_id')->toArray());
TemplateAction::dispatch(
$payments->pluck('hashed_id')->toArray(),
$request->template_id,

View File

@ -58,7 +58,7 @@ class EmailPayment implements ShouldQueue
*/
public function handle()
{
if ($this->company->is_disabled || ($this->contact->email ?? false)) {
if ($this->company->is_disabled || (!$this->contact->email ?? false)) {
return;
}

View File

@ -21,11 +21,8 @@ class PaymentService
{
use MakesHash;
private $payment;
public function __construct($payment)
public function __construct(public Payment $payment)
{
$this->payment = $payment;
}
public function manualPayment($invoice): ?Payment