diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index c7a75d356dd5..1475cbb5cb09 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -1,5 +1,6 @@ where('invoices.is_quote', '=', false)->orderBy('created_at', 'desc')->get(); - $invoices = Utils::remapPublicIds($invoices->toArray()); + $invoices = Invoice::scope()->with('invitations')->where('invoices.is_quote', '=', false)->orderBy('created_at', 'desc')->get(); + // Add the first invitation link to the data + foreach ($invoices as $key => $invoice) { + foreach ($invoice->invitations as $subKey => $invitation) { + $invoices[$key]['link'] = $invitation->getLink(); + } + unset($invoice['invitations']); + } + + $invoices = Utils::remapPublicIds($invoices->toArray()); + $response = json_encode($invoices, JSON_PRETTY_PRINT); $headers = Utils::getApiHeaders(count($invoices)); diff --git a/app/Http/Controllers/TokenController.php b/app/Http/Controllers/TokenController.php index f84411a60243..3b9d546849ab 100644 --- a/app/Http/Controllers/TokenController.php +++ b/app/Http/Controllers/TokenController.php @@ -93,11 +93,6 @@ class TokenController extends BaseController */ public function create() { - if (!Auth::user()->confirmed) { - Session::flash('error', trans('texts.register_to_add_user')); - return Redirect::to('company/advanced_settings/user_management'); - } - $data = [ 'showBreadcrumbs' => false, 'token' => null, diff --git a/app/Http/routes.php b/app/Http/routes.php index d090b43ec94a..eb5656b0880d 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -321,7 +321,7 @@ define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET); define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com'); -define('NINJA_VERSION', '2.0'); +define('NINJA_VERSION', '1.7.2'); define('NINJA_DATE', '2000-01-01'); define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'); define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/'); diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 33d799e4acb7..08a4e5d50a63 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -165,6 +165,7 @@ class Utils 'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '', 'ip' => Request::getClientIp(), 'count' => Session::get('error_count', 0), + 'input' => Input::all() ]; Log::error($error."\n", $data); diff --git a/config/app.php b/config/app.php index 4568f97c6fdd..a8dd21bff24c 100644 --- a/config/app.php +++ b/config/app.php @@ -13,7 +13,7 @@ return [ | */ - 'debug' => true, + 'debug' => env('APP_DEBUG', ''), /* |-------------------------------------------------------------------------- diff --git a/readme.md b/readme.md index 19c0729c75de..37236a85d6c3 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,7 @@ ### [https://www.invoiceninja.com](https://www.invoiceninja.com) -#### Please [click here](https://bitnami.com/stack/invoice-ninja) to vote for us to be added to Bitnami's one-click install library +##### Please [click here](https://bitnami.com/stack/invoice-ninja) to vote for us to be added to Bitnami's one-click install library If you'd like to use our code to sell your own invoicing app we have an affiliate program. Get in touch for more details. diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index f8198e2504ae..abc37c633b15 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -164,7 +164,7 @@ @elseif (Session::has('news_feed_message'))