mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Support bulk emailing
This commit is contained in:
parent
457dcf67bc
commit
318b189bc0
@ -521,6 +521,8 @@ class InvoiceController extends BaseController
|
||||
if ($count > 0) {
|
||||
if ($action == 'markSent') {
|
||||
$key = 'marked_sent_invoice';
|
||||
} elseif ($action == 'emailInvoice') {
|
||||
$key = 'emailed_' . $entityType;
|
||||
} elseif ($action == 'markPaid') {
|
||||
$key = 'created_payment';
|
||||
} else {
|
||||
|
@ -180,6 +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")',
|
||||
|
@ -12,6 +12,7 @@ use App\Models\Task;
|
||||
use App\Models\Document;
|
||||
use App\Models\Expense;
|
||||
use App\Services\PaymentService;
|
||||
use App\Jobs\SendInvoiceEmail;
|
||||
|
||||
class InvoiceRepository extends BaseRepository
|
||||
{
|
||||
@ -746,6 +747,15 @@ class InvoiceRepository extends BaseRepository
|
||||
return $clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Invoice $invoice
|
||||
*/
|
||||
public function emailInvoice(Invoice $invoice)
|
||||
{
|
||||
dispatch(new SendInvoiceEmail($invoice));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Invoice $invoice
|
||||
*/
|
||||
|
@ -2310,7 +2310,8 @@ $LANG = array(
|
||||
'bcc_email_help' => 'All emails sent to your clients will also be sent to this address.',
|
||||
'tax_quote' => 'Tax Quote',
|
||||
'tax_invoice' => 'Tax Invoice',
|
||||
|
||||
'emailed_invoices' => 'Successfully emailed invoices',
|
||||
'emailed_quotes' => 'Successfully emailed quotes',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
Loading…
x
Reference in New Issue
Block a user