mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 19:37:12 +00:00
Removed type conversions where no longer needed
PHP 8.1 PDO SQLite now returns native data types
This commit is contained in:
@@ -165,7 +165,7 @@ class BaseController
|
||||
{
|
||||
$this->View->set('permissions', User::PermissionList());
|
||||
|
||||
$decimalPlacesAmounts = intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_decimal_places_amounts'));
|
||||
$decimalPlacesAmounts = $this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_decimal_places_amounts');
|
||||
if ($decimalPlacesAmounts <= 0)
|
||||
{
|
||||
$defaultMinAmount = 1;
|
||||
|
@@ -53,7 +53,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
// TODO: This should be better done somehow in StockService
|
||||
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
|
||||
{
|
||||
$this->getStockService()->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id')));
|
||||
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
|
||||
}
|
||||
|
||||
return $this->ApiResponse($response, [
|
||||
@@ -167,7 +167,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
// TODO: This should be better done somehow in StockService
|
||||
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
|
||||
{
|
||||
$this->getStockService()->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id')));
|
||||
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
|
||||
}
|
||||
|
||||
return $this->EmptyApiResponse($response);
|
||||
|
Reference in New Issue
Block a user