mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Can't mark paid/enter payment on locked invoices #1801
This commit is contained in:
parent
da500c496b
commit
62c4275660
@ -372,10 +372,14 @@ class InvoiceController extends BaseController
|
|||||||
$action = Input::get('action');
|
$action = Input::get('action');
|
||||||
$entityType = Input::get('entityType');
|
$entityType = Input::get('entityType');
|
||||||
|
|
||||||
|
if (config('ninja.lock_sent_invoices')) {
|
||||||
|
$invoice = $request->entity();
|
||||||
|
} else {
|
||||||
$invoice = $this->invoiceService->save($data, $request->entity());
|
$invoice = $this->invoiceService->save($data, $request->entity());
|
||||||
$entityType = $invoice->getEntityType();
|
$entityType = $invoice->getEntityType();
|
||||||
$message = trans("texts.updated_{$entityType}");
|
$message = trans("texts.updated_{$entityType}");
|
||||||
Session::flash('message', $message);
|
Session::flash('message', $message);
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'clone_invoice') {
|
if ($action == 'clone_invoice') {
|
||||||
return url(sprintf('invoices/%s/clone', $invoice->public_id));
|
return url(sprintf('invoices/%s/clone', $invoice->public_id));
|
||||||
|
@ -536,8 +536,8 @@
|
|||||||
@elseif ($invoice->isSent() && config('ninja.lock_sent_invoices'))
|
@elseif ($invoice->isSent() && config('ninja.lock_sent_invoices'))
|
||||||
@if (! $invoice->trashed())
|
@if (! $invoice->trashed())
|
||||||
{!! Button::info(trans("texts.email_{$entityType}"))->withAttributes(array('id' => 'emailButton', 'onclick' => 'onEmailClick()'))->appendIcon(Icon::create('send')) !!}
|
{!! Button::info(trans("texts.email_{$entityType}"))->withAttributes(array('id' => 'emailButton', 'onclick' => 'onEmailClick()'))->appendIcon(Icon::create('send')) !!}
|
||||||
|
{!! DropdownButton::normal(trans('texts.more_actions'))->withContents($invoice->present()->moreActions())->dropup() !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@else
|
@else
|
||||||
@if (!$invoice->is_deleted)
|
@if (!$invoice->is_deleted)
|
||||||
@if ($invoice->isSent())
|
@if ($invoice->isSent())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user