diff --git a/app/Listeners/Email/SendInvalidEmailNotification.php b/app/Listeners/Email/SendInvalidEmailNotification.php index 2ad5e82fe..46e897c10 100644 --- a/app/Listeners/Email/SendInvalidEmailNotification.php +++ b/app/Listeners/Email/SendInvalidEmailNotification.php @@ -10,7 +10,11 @@ class SendInvalidEmailNotification { public function handle(Event $event): void { - $users = company()->users; + $users = company()?->users; + + if (empty($users)) { + return; + } $this->notifyAdminsAboutInvalidContactEmail($event, $users); diff --git a/app/Models/Common/Item.php b/app/Models/Common/Item.php index 64e5dbf9a..915583c5e 100644 --- a/app/Models/Common/Item.php +++ b/app/Models/Common/Item.php @@ -107,7 +107,7 @@ class Item extends Model return $query; } - return $query->whereIn('type', $type); + return $query->whereIn($this->qualifyColumn('type'), $type); } /** diff --git a/app/Traits/Import.php b/app/Traits/Import.php index 129baf2d7..da1719998 100644 --- a/app/Traits/Import.php +++ b/app/Traits/Import.php @@ -323,7 +323,7 @@ trait Import return $contact->id; } - public function getItemIdFromName($row, $type) + public function getItemIdFromName($row, $type = 'product') { $item_id = Item::type($type)->where('name', $row['item_name'])->pluck('id')->first(); diff --git a/config/version.php b/config/version.php index 864a13997..0d7416c3c 100644 --- a/config/version.php +++ b/config/version.php @@ -10,13 +10,13 @@ return [ 'minor' => '0', - 'patch' => '14', + 'patch' => '15', 'build' => '', 'status' => 'Stable', - 'date' => '25-April-2023', + 'date' => '31-May-2023', 'time' => '17:00', diff --git a/resources/assets/js/mixins/global.js b/resources/assets/js/mixins/global.js index 37721aeb3..d2d111dbe 100644 --- a/resources/assets/js/mixins/global.js +++ b/resources/assets/js/mixins/global.js @@ -469,6 +469,9 @@ export default { onChangePaginationLimit(event) { let path = ''; + let split_href = window.location.href.split('#'); + let href = split_href[0]; + if (window.location.search.length) { if (window.location.search.includes('limit')) { let queries = []; @@ -496,10 +499,14 @@ export default { }); } else { - path = window.location.href + '&limit=' + event.target.getAttribute("value"); + path = href + '&limit=' + event.target.getAttribute("value"); } } else { - path = window.location.href + '?limit=' + event.target.getAttribute("value"); + path = href + '?limit=' + event.target.getAttribute("value"); + } + + if (split_href[1]) { + path += '#' + split_href[1]; } window.location.href = path;