hide cancel button for drafts
This commit is contained in:
@ -67,7 +67,7 @@ class Invoices extends BulkAction
|
||||
$invoices = $this->getSelectedRecords($request);
|
||||
|
||||
foreach ($invoices as $invoice) {
|
||||
if ($invoice->status == 'cancelled') {
|
||||
if ($invoice->status == 'cancelled' || $invoice->status == 'draft') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ class Document extends Model
|
||||
'type' => 'divider',
|
||||
];
|
||||
|
||||
if ($this->status != 'cancelled') {
|
||||
if ($this->status != 'cancelled' && $this->status != 'draft') {
|
||||
try {
|
||||
$actions[] = [
|
||||
'title' => trans('general.cancel'),
|
||||
|
Reference in New Issue
Block a user