diff --git a/app/Http/Controllers/ClientApiController.php b/app/Http/Controllers/ClientApiController.php index 9c7f54505177..2b5152020ccd 100644 --- a/app/Http/Controllers/ClientApiController.php +++ b/app/Http/Controllers/ClientApiController.php @@ -136,12 +136,12 @@ class ClientApiController extends BaseAPIController { if ($request->action == ACTION_ARCHIVE) { + $client = Client::scope($publicId)->withTrashed()->first(); if(!$client) return $this->errorResponse(['message'=>'Client not found.']); - $this->clientRepo->archive($client); $transformer = new ClientTransformer(Auth::user()->account, Input::get('serializer')); diff --git a/app/Http/routes.php b/app/Http/routes.php index 97002c05b14c..848d22bcdd05 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -510,7 +510,7 @@ if (!defined('CONTACT_EMAIL')) { define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG'); define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com'); - define('NINJA_VERSION', '2.5.0.1'); + define('NINJA_VERSION', '2.5.0.2'); define('NINJA_DATE', '2000-01-01'); define('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'); diff --git a/resources/views/invoices/knockout.blade.php b/resources/views/invoices/knockout.blade.php index 7edc741cf81a..1f1d210b8716 100644 --- a/resources/views/invoices/knockout.blade.php +++ b/resources/views/invoices/knockout.blade.php @@ -787,14 +787,7 @@ function ItemModel(data) { this.totals.total = ko.computed(function() { var total = self.totals.rawTotal(); - return total ? model.invoice().formatMoney(total) : ''; - /* - if (window.hasOwnProperty('model') && model.invoice && model.invoice() && model.invoice().client()) { - return total ? model.invoice().formatMoney(total) : ''; - } else { - return total ? model.invoice().formatMoney(total, 1) : ''; - } - */ + return window.hasOwnProperty('model') && total ? model.invoice().formatMoney(total) : ''; }); this.hideActions = function() {