mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Show ‘Mark Paid’ in list/more actions for draft invoices
This commit is contained in:
parent
cfdc8a3104
commit
e71d254a09
@ -141,9 +141,11 @@ class InvoiceController extends BaseController
|
|||||||
$actions[] = ['url' => URL::to("quotes/{$invoice->quote_id}/edit"), 'label' => trans('texts.view_quote')];
|
$actions[] = ['url' => URL::to("quotes/{$invoice->quote_id}/edit"), 'label' => trans('texts.view_quote')];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$invoice->is_recurring && $invoice->balance > 0 && $invoice->is_public) {
|
if (!$invoice->is_recurring && $invoice->balance > 0) {
|
||||||
$actions[] = ['url' => 'javascript:submitBulkAction("markPaid")', 'label' => trans('texts.mark_paid')];
|
$actions[] = ['url' => 'javascript:submitBulkAction("markPaid")', 'label' => trans('texts.mark_paid')];
|
||||||
$actions[] = ['url' => 'javascript:onPaymentClick()', 'label' => trans('texts.enter_payment')];
|
if ($invoice->is_public) {
|
||||||
|
$actions[] = ['url' => 'javascript:onPaymentClick()', 'label' => trans('texts.enter_payment')];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($invoice->payments as $payment) {
|
foreach ($invoice->payments as $payment) {
|
||||||
|
@ -124,7 +124,7 @@ class InvoiceDatatable extends EntityDatatable
|
|||||||
return "javascript:submitForm_{$entityType}('markPaid', {$model->public_id})";
|
return "javascript:submitForm_{$entityType}('markPaid', {$model->public_id})";
|
||||||
},
|
},
|
||||||
function ($model) {
|
function ($model) {
|
||||||
return $model->is_public && $model->balance > 0 && Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]);
|
return $model->balance > 0 && Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user