diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php
index 836d223162e3..4fc57c4d3233 100644
--- a/app/Libraries/Utils.php
+++ b/app/Libraries/Utils.php
@@ -127,6 +127,19 @@ class Utils
return $response;
}
+ public static function getLastURL()
+ {
+ if (!count(Session::get(RECENTLY_VIEWED))) {
+ return '#';
+ }
+
+ $history = Session::get(RECENTLY_VIEWED);
+ $last = $history[0];
+ $penultimate = count($history) > 1 ? $history[1] : $last;
+
+ return Request::url() == $last->url ? $penultimate->url : $last->url;
+ }
+
public static function getProLabel($feature)
{
if (Auth::check()
@@ -394,12 +407,8 @@ class Utils
continue;
}
- // temporary fix to check for new property in session
- if (!property_exists($item, 'accountId')) {
- continue;
- }
+ array_push($data, $item);
- array_unshift($data, $item);
if (isset($counts[$item->accountId])) {
$counts[$item->accountId]++;
} else {
diff --git a/app/Models/Account.php b/app/Models/Account.php
index 478057883956..46ef59d71ffe 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -336,7 +336,7 @@ class Account extends Eloquent
if (strstr($pattern, '{$userId}')) {
$search[] = '{$userId}';
- $replace[] = str_pad($invoice->user->public_id, 2, '0', STR_PAD_LEFT);
+ $replace[] = str_pad(($invoice->user->public_id + 1), 2, '0', STR_PAD_LEFT);
}
$matches = false;
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index 93c720f2834a..72de3e1d2362 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -33,7 +33,7 @@ class AppServiceProvider extends ServiceProvider {
$types = $type.'s';
$Type = ucfirst($type);
$Types = ucfirst($types);
- $class = ( Request::is($types) || Request::is('*'.$type.'*')) && !Request::is('*advanced_settings*') ? ' active' : '';
+ $class = ( Request::is($types) || Request::is('*'.$type.'*')) && !Request::is('*settings*') ? ' active' : '';
$str = '
'.trans("texts.$types").'
diff --git a/public/css/built.css b/public/css/built.css
index 10af8e73e106..b17274f6ea32 100644
--- a/public/css/built.css
+++ b/public/css/built.css
@@ -3269,7 +3269,7 @@ div.dataTables_length label {
a .glyphicon,
button .glyphicon {
- padding-left: 8px;
+ padding-left: 12px;
}
.pro-plan-modal {
diff --git a/public/css/style.css b/public/css/style.css
index 7f0aca5307d5..843c10a18d41 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -918,7 +918,7 @@ div.dataTables_length label {
a .glyphicon,
button .glyphicon {
- padding-left: 8px;
+ padding-left: 12px;
}
.pro-plan-modal {
diff --git a/public/js/built.js b/public/js/built.js
index b3f4c7aa23fa..46de4c96d734 100644
--- a/public/js/built.js
+++ b/public/js/built.js
@@ -31572,6 +31572,7 @@ function truncate(string, length){
}
};
+// Show/hide the 'Select' option in the datalists
function actionListHandler() {
$('tbody tr').mouseover(function() {
$(this).closest('tr').find('.tr-action').css('display', 'inline-block');
diff --git a/public/js/script.js b/public/js/script.js
index d125232b8a84..291d1fd5ad03 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -1694,6 +1694,7 @@ function truncate(string, length){
}
};
+// Show/hide the 'Select' option in the datalists
function actionListHandler() {
$('tbody tr').mouseover(function() {
$(this).closest('tr').find('.tr-action').css('display', 'inline-block');
diff --git a/resources/views/clients/show.blade.php b/resources/views/clients/show.blade.php
index bed5942c14c7..d8918f9d638b 100644
--- a/resources/views/clients/show.blade.php
+++ b/resources/views/clients/show.blade.php
@@ -304,6 +304,15 @@
$('.primaryDropDown:not(.dropdown-toggle)').click(function() {
window.location = '{{ URL::to('invoices/create/' . $client->public_id ) }}';
});
+
+ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
+ var target = $(e.target).attr("href") // activated tab
+ localStorage.setItem('client_tab', target);
+ });
+ var tab = localStorage.getItem('client_tab');
+ if (tab) {
+ $('.nav-tabs a[href="' + tab + '"]').tab('show');
+ }
});
function onArchiveClick() {
diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php
index ee8d24f569f8..f7d3a3aa8e95 100644
--- a/resources/views/header.blade.php
+++ b/resources/views/header.blade.php
@@ -462,7 +462,7 @@