mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 12:24:35 -04:00
Fixes for payment emails
This commit is contained in:
parent
fbed726ed6
commit
995c7dbd3e
@ -520,7 +520,7 @@ class PaymentController extends BaseController
|
|||||||
if($action == 'template' && $user->can('view', $payments->first())) {
|
if($action == 'template' && $user->can('view', $payments->first())) {
|
||||||
|
|
||||||
$hash_or_response = request()->boolean('send_email') ? 'email sent' : \Illuminate\Support\Str::uuid();
|
$hash_or_response = request()->boolean('send_email') ? 'email sent' : \Illuminate\Support\Str::uuid();
|
||||||
nlog($payments->pluck('hashed_id')->toArray());
|
|
||||||
TemplateAction::dispatch(
|
TemplateAction::dispatch(
|
||||||
$payments->pluck('hashed_id')->toArray(),
|
$payments->pluck('hashed_id')->toArray(),
|
||||||
$request->template_id,
|
$request->template_id,
|
||||||
|
@ -58,7 +58,7 @@ class EmailPayment implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
if ($this->company->is_disabled || ($this->contact->email ?? false)) {
|
if ($this->company->is_disabled || (!$this->contact->email ?? false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,11 +21,8 @@ class PaymentService
|
|||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
|
||||||
private $payment;
|
public function __construct(public Payment $payment)
|
||||||
|
|
||||||
public function __construct($payment)
|
|
||||||
{
|
{
|
||||||
$this->payment = $payment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function manualPayment($invoice): ?Payment
|
public function manualPayment($invoice): ?Payment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user