mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
Squashed commit
Fixed number input min/max amount handling Only (auto) save valid user inputs More filters on the stock journal pages Save the last price per used barcode and preselect that as a total price on purchase if not empty (closes #1131) Don't apply conversions for only_check_single_unit_in_stock ingredients (fixes #1120) Render shopping list userfields (closes #1052) Fixed Focus when adding included recipes (closes #1019) Order all base objects with NOCASE (closes #1086)
This commit is contained in:
@@ -21,7 +21,7 @@ class UserfieldsService extends BaseService
|
||||
|
||||
public function GetAllFields()
|
||||
{
|
||||
return $this->getDatabase()->userfields()->orderBy('name')->fetchAll();
|
||||
return $this->getDatabase()->userfields()->orderBy('name', 'COLLATE NOCASE')->fetchAll();
|
||||
}
|
||||
|
||||
public function GetAllValues($entity)
|
||||
@@ -31,7 +31,7 @@ class UserfieldsService extends BaseService
|
||||
throw new \Exception('Entity does not exist or is not exposed');
|
||||
}
|
||||
|
||||
return $this->getDatabase()->userfield_values_resolved()->where('entity', $entity)->orderBy('name')->fetchAll();
|
||||
return $this->getDatabase()->userfield_values_resolved()->where('entity', $entity)->orderBy('name', 'COLLATE NOCASE')->fetchAll();
|
||||
}
|
||||
|
||||
public function GetEntities()
|
||||
@@ -40,7 +40,7 @@ class UserfieldsService extends BaseService
|
||||
|
||||
$userentities = [];
|
||||
|
||||
foreach ($this->getDatabase()->userentities()->orderBy('name') as $userentity)
|
||||
foreach ($this->getDatabase()->userentities()->orderBy('name', 'COLLATE NOCASE') as $userentity)
|
||||
{
|
||||
$userentities[] = 'userentity-' . $userentity->name;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class UserfieldsService extends BaseService
|
||||
throw new \Exception('Entity does not exist or is not exposed');
|
||||
}
|
||||
|
||||
return $this->getDatabase()->userfields()->where('entity', $entity)->orderBy('name')->fetchAll();
|
||||
return $this->getDatabase()->userfields()->where('entity', $entity)->orderBy('name', 'COLLATE NOCASE')->fetchAll();
|
||||
}
|
||||
|
||||
public function GetValues($entity, $objectId)
|
||||
@@ -75,7 +75,7 @@ class UserfieldsService extends BaseService
|
||||
throw new \Exception('Entity does not exist or is not exposed');
|
||||
}
|
||||
|
||||
$userfields = $this->getDatabase()->userfield_values_resolved()->where('entity = :1 AND object_id = :2', $entity, $objectId)->orderBy('name')->fetchAll();
|
||||
$userfields = $this->getDatabase()->userfield_values_resolved()->where('entity = :1 AND object_id = :2', $entity, $objectId)->orderBy('name', 'COLLATE NOCASE')->fetchAll();
|
||||
$userfieldKeyValuePairs = [];
|
||||
|
||||
foreach ($userfields as $userfield)
|
||||
|
Reference in New Issue
Block a user