Support emailing locked invoices

This commit is contained in:
Hillel Coren 2017-11-05 12:39:35 +02:00
parent 61b27b6acb
commit 5a58d6e650

View File

@ -536,7 +536,10 @@
@if ($invoice->isClientTrashed()) @if ($invoice->isClientTrashed())
<!-- do nothing --> <!-- do nothing -->
@elseif ($invoice->isSent() && config('ninja.lock_sent_invoices')) @elseif ($invoice->isSent() && config('ninja.lock_sent_invoices'))
<!-- do nothing --> @if (! $invoice->trashed())
{!! Button::info(trans("texts.email_{$entityType}"))->withAttributes(array('id' => 'emailButton', 'onclick' => 'onEmailClick()'))->appendIcon(Icon::create('send')) !!}
@endif
@else @else
@if (!$invoice->is_deleted) @if (!$invoice->is_deleted)
@if ($invoice->isSent()) @if ($invoice->isSent())
@ -1421,10 +1424,6 @@
return false; return false;
} }
@if ($invoice->isSent() && config('ninja.lock_sent_invoices'))
return false;
@endif
@if ($invoice->is_deleted || $invoice->isClientTrashed()) @if ($invoice->is_deleted || $invoice->isClientTrashed())
if ($('#bulk_action').val() != 'restore') { if ($('#bulk_action').val() != 'restore') {
return false; return false;
@ -1569,7 +1568,6 @@
submitBulkAction('delete'); submitBulkAction('delete');
}); });
} }
function formEnterClick(event) { function formEnterClick(event) {
if (event.keyCode === 13){ if (event.keyCode === 13){
if (event.target.type == 'textarea') { if (event.target.type == 'textarea') {