mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Make it possible to hide locations/stores/QUs/product_groups/task_categories (closes #2222)
This commit is contained in:
@@ -1772,7 +1772,7 @@ class StockService extends BaseService
|
||||
if (file_exists($path))
|
||||
{
|
||||
require_once $path;
|
||||
return new $pluginName($this->getDatabase()->locations()->fetchAll(), $this->getDatabase()->quantity_units()->fetchAll());
|
||||
return new $pluginName($this->getDatabase()->locations()->where('active = 1')->fetchAll(), $this->getDatabase()->quantity_units()->fetchAll());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1782,7 +1782,7 @@ class StockService extends BaseService
|
||||
|
||||
private function LocationExists($locationId)
|
||||
{
|
||||
$locationRow = $this->getDatabase()->locations()->where('id = :1', $locationId)->fetch();
|
||||
$locationRow = $this->getDatabase()->locations()->where('id = :1', $locationId)->where('active = 1')->fetch();
|
||||
return $locationRow !== null;
|
||||
}
|
||||
|
||||
|
@@ -7,7 +7,7 @@ class TasksService extends BaseService
|
||||
public function GetCurrent(): \LessQL\Result
|
||||
{
|
||||
$users = $this->getUsersService()->GetUsersAsDto();
|
||||
$categories = $this->getDatabase()->task_categories();
|
||||
$categories = $this->getDatabase()->task_categories()->where('active = 1');
|
||||
|
||||
$tasks = $this->getDatabase()->tasks_current();
|
||||
foreach ($tasks as $task)
|
||||
|
Reference in New Issue
Block a user