mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Invoice Locking Feature #173
This commit is contained in:
parent
f34cc7ef4e
commit
85cf468d97
@ -402,6 +402,8 @@ class InvoiceRepository extends BaseRepository
|
|||||||
|
|
||||||
if ($invoice->is_deleted) {
|
if ($invoice->is_deleted) {
|
||||||
return $invoice;
|
return $invoice;
|
||||||
|
} elseif ($invoice->isSent() && config('ninja.lock_sent_invoices')) {
|
||||||
|
return $invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($data['has_tasks']) && filter_var($data['has_tasks'], FILTER_VALIDATE_BOOLEAN)) {
|
if (isset($data['has_tasks']) && filter_var($data['has_tasks'], FILTER_VALIDATE_BOOLEAN)) {
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
// invoice locking feature
|
||||||
|
'lock_sent_invoices' => env('LOCK_SENT_INVOICES'),
|
||||||
|
|
||||||
// Marketing links
|
// Marketing links
|
||||||
'time_tracker_web_url' => env('TIME_TRACKER_WEB_URL', 'https://www.invoiceninja.com/time-tracker'),
|
'time_tracker_web_url' => env('TIME_TRACKER_WEB_URL', 'https://www.invoiceninja.com/time-tracker'),
|
||||||
|
|
||||||
|
@ -123,6 +123,11 @@ You'll also need to set the following values in the .env file.
|
|||||||
MSBOT_LUIS_APP_ID=...
|
MSBOT_LUIS_APP_ID=...
|
||||||
MSBOT_LUIS_SUBSCRIPTION_KEY=...
|
MSBOT_LUIS_SUBSCRIPTION_KEY=...
|
||||||
|
|
||||||
|
Lock Invoices
|
||||||
|
"""""""""""""
|
||||||
|
|
||||||
|
Adding ``LOCK_SENT_INVOICES=true`` to the .env file will prevent changing an invoice once it has been sent.
|
||||||
|
|
||||||
Using a Proxy
|
Using a Proxy
|
||||||
"""""""""""""
|
"""""""""""""
|
||||||
|
|
||||||
|
@ -522,6 +522,8 @@
|
|||||||
@if (Auth::user()->canCreateOrEdit(ENTITY_INVOICE, $invoice))
|
@if (Auth::user()->canCreateOrEdit(ENTITY_INVOICE, $invoice))
|
||||||
@if ($invoice->isClientTrashed())
|
@if ($invoice->isClientTrashed())
|
||||||
<!-- do nothing -->
|
<!-- do nothing -->
|
||||||
|
@elseif ($invoice->isSent() && config('ninja.lock_sent_invoices'))
|
||||||
|
<!-- do nothing -->
|
||||||
@else
|
@else
|
||||||
@if (!$invoice->is_deleted)
|
@if (!$invoice->is_deleted)
|
||||||
@if ($invoice->isSent())
|
@if ($invoice->isSent())
|
||||||
@ -1375,6 +1377,10 @@
|
|||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user