create multiple invoices at once (#2465)
This commit is contained in:
@@ -30,15 +30,13 @@ class InvoiceSubscriber extends AbstractActionsSubscriber
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->isGranted('history_invoice')) {
|
||||
if ($invoice->isNew()) {
|
||||
$event->addAction('invoice.pending', ['url' => $this->path('admin_invoice_status', ['id' => $invoice->getId(), 'status' => 'pending'])]);
|
||||
} elseif ($invoice->isPending()) {
|
||||
$event->addAction('invoice.paid', ['url' => $this->path('admin_invoice_status', ['id' => $invoice->getId(), 'status' => 'paid'])]);
|
||||
}
|
||||
|
||||
$event->addAction('download', ['url' => $this->path('admin_invoice_download', ['id' => $invoice->getId()]), 'target' => '_blank']);
|
||||
$event->addDelete($this->path('admin_invoice_delete', ['id' => $invoice->getId()]), false);
|
||||
if ($invoice->isNew()) {
|
||||
$event->addAction('invoice.pending', ['url' => $this->path('admin_invoice_status', ['id' => $invoice->getId(), 'status' => 'pending'])]);
|
||||
} elseif ($invoice->isPending()) {
|
||||
$event->addAction('invoice.paid', ['url' => $this->path('admin_invoice_status', ['id' => $invoice->getId(), 'status' => 'paid'])]);
|
||||
}
|
||||
|
||||
$event->addAction('download', ['url' => $this->path('admin_invoice_download', ['id' => $invoice->getId()]), 'target' => '_blank']);
|
||||
$event->addDelete($this->path('admin_invoice_delete', ['id' => $invoice->getId()]), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,7 @@ class InvoicesSubscriber extends AbstractActionsSubscriber
|
||||
{
|
||||
$event->addColumnToggle('#modal_invoice');
|
||||
|
||||
if ($this->isGranted('history_invoice')) {
|
||||
$event->addAction('list', ['url' => $this->path('admin_invoice_list')]);
|
||||
}
|
||||
$event->addAction('list', ['url' => $this->path('admin_invoice_list')]);
|
||||
|
||||
if ($this->isGranted('manage_invoice_template')) {
|
||||
$event->addAction('invoice-template', ['url' => $this->path('admin_invoice_template')]);
|
||||
|
||||
Reference in New Issue
Block a user