mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Re-enable support for queues
This commit is contained in:
parent
ef46bb0050
commit
6e18841cea
@ -415,10 +415,13 @@ class InvoiceController extends BaseController
|
||||
if ($invoice->is_recurring) {
|
||||
$response = $this->emailRecurringInvoice($invoice);
|
||||
} else {
|
||||
app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice, false, $pdfUpload);
|
||||
// TODO remove this with Laravel 5.3 (https://github.com/invoiceninja/invoiceninja/issues/1303)
|
||||
if (config('queue.default') === 'sync') {
|
||||
$response = app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice, false, $pdfUpload);
|
||||
} else {
|
||||
$this->dispatch(new SendInvoiceEmail($invoice, false, $pdfUpload));
|
||||
$response = true;
|
||||
//$this->dispatch(new SendInvoiceEmail($invoice, false, $pdfUpload));
|
||||
//return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($response === true) {
|
||||
@ -448,9 +451,13 @@ class InvoiceController extends BaseController
|
||||
if ($invoice->isPaid()) {
|
||||
return true;
|
||||
} else {
|
||||
// TODO remove this with Laravel 5.3 (https://github.com/invoiceninja/invoiceninja/issues/1303)
|
||||
if (config('queue.default') === 'sync') {
|
||||
return app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||
//$this->dispatch(new SendInvoiceEmail($invoice));
|
||||
//return true;
|
||||
} else {
|
||||
$this->dispatch(new SendInvoiceEmail($invoice));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,12 +180,10 @@ class InvoiceDatatable extends EntityDatatable
|
||||
|
||||
if ($this->entityType == ENTITY_INVOICE || $this->entityType == ENTITY_QUOTE) {
|
||||
$actions[] = \DropdownButton::DIVIDER;
|
||||
/*
|
||||
$actions[] = [
|
||||
'label' => mtrans($this->entityType, 'email_' . $this->entityType),
|
||||
'url' => 'javascript:submitForm_'.$this->entityType.'("emailInvoice")',
|
||||
];
|
||||
*/
|
||||
$actions[] = [
|
||||
'label' => mtrans($this->entityType, 'mark_sent'),
|
||||
'url' => 'javascript:submitForm_'.$this->entityType.'("markSent")',
|
||||
|
@ -757,8 +757,12 @@ class InvoiceRepository extends BaseRepository
|
||||
*/
|
||||
public function emailInvoice(Invoice $invoice)
|
||||
{
|
||||
// TODO remove this with Laravel 5.3 (https://github.com/invoiceninja/invoiceninja/issues/1303)
|
||||
if (config('queue.default') === 'sync') {
|
||||
app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||
//dispatch(new SendInvoiceEmail($invoice));
|
||||
} else {
|
||||
dispatch(new SendInvoiceEmail($invoice));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user