diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 05b9ee944f6a..b5aa38a104b9 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -463,7 +463,7 @@ class CompanySettings extends BaseSettings public $accept_client_input_quote_approval = false; - public $allow_billable_task_items = false; + public $allow_billable_task_items = true; public $show_task_item_description = false; diff --git a/app/Filters/UserFilters.php b/app/Filters/UserFilters.php index ec3c0a08fd9a..b0079e339189 100644 --- a/app/Filters/UserFilters.php +++ b/app/Filters/UserFilters.php @@ -88,4 +88,25 @@ class UserFilters extends QueryFilters ->orderByRaw("{$this->with_property} = ? DESC", [$value]) ->where('account_id', auth()->user()->account_id); } + + /** + * Exclude a list of user_ids, can pass multiple + * user IDs by separating them with a comma. + * + * @param string $user_id + * @return Builder + */ + public function without(string $user_id = ''): Builder + { + if (strlen($user_id) == 0) { + return $this->builder; + } + + $user_array = $this->transformKeys(explode(',', $user_id)); + + return $this->builder->where(function ($query) use ($user_array) { + $query->whereNotIn('id', $user_array) + ->where('account_id', auth()->user()->account_id); + }); + } } diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 39190ee809fc..9afcc12c7155 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -555,7 +555,8 @@ class BaseController extends Controller private function resolveQueryLimit(): int { if (request()->has('per_page')) { - return abs((int)request()->input('per_page', 20)); + return min(abs((int)request()->input('per_page', 20)), 5000); + // return abs((int)request()->input('per_page', 20)); } return 20; diff --git a/lang/en/texts.php b/lang/en/texts.php index fa4ff6933e1e..fad5214c85cc 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -5000,7 +5000,8 @@ $LANG = array( 'sync_from' => 'Sync From', 'gateway_payment_text' => 'Invoices: :invoices for :amount for client :client', 'gateway_payment_text_no_invoice' => 'Payment with no invoice for amount :amount for client :client', - + 'click_to_variables' => 'Client here to see all variables.', + 'ship_to' => 'Ship to', );