added comment field to invoice (#3045)

This commit is contained in:
Kevin Papst
2021-12-30 21:49:30 +01:00
committed by GitHub
parent f7b3f4ed76
commit cc809183ae
13 changed files with 190 additions and 52 deletions

View File

@@ -30,6 +30,11 @@ class InvoiceSubscriber extends AbstractActionsSubscriber
return;
}
$event->addAction('edit', ['url' => $this->path('admin_invoice_edit', ['id' => $invoice->getId()]), 'class' => 'modal-ajax-form']);
$event->addAction('download', ['url' => $this->path('admin_invoice_download', ['id' => $invoice->getId()]), 'target' => '_blank']);
$event->addDivider();
if (!$invoice->isPending()) {
$event->addAction('invoice.pending', ['url' => $this->path('admin_invoice_status', ['id' => $invoice->getId(), 'status' => 'pending', 'token' => $payload['token']])]);
} else {
@@ -42,11 +47,8 @@ class InvoiceSubscriber extends AbstractActionsSubscriber
$event->addAction($id, ['url' => $this->path('admin_invoice_status', ['id' => $invoice->getId(), 'status' => 'canceled', 'token' => $payload['token']]), 'title' => 'invoice.cancel', 'translation_domain' => 'actions']);
}
$event->addDivider();
$event->addAction('download', ['url' => $this->path('admin_invoice_download', ['id' => $invoice->getId()]), 'target' => '_blank']);
if ($this->isGranted('delete_invoice')) {
$event->addDivider();
$event->addDelete($this->path('admin_invoice_delete', ['id' => $invoice->getId(), 'token' => $payload['token']]), false);
}
}