mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Make it possible to round up shopping list and recipe ingredient amounts (closes #902, closes #2644)
This commit is contained in:
@@ -103,6 +103,14 @@ class DatabaseService
|
||||
return $usersService->GetUserSetting(GROCY_USER_ID, $value);
|
||||
});
|
||||
|
||||
|
||||
// Unfortunately not included by default
|
||||
// https://www.sqlite.org/lang_mathfunc.html#ceil
|
||||
$pdo->sqliteCreateFunction('ceil', function ($value)
|
||||
{
|
||||
return ceil($value);
|
||||
});
|
||||
|
||||
self::$DbConnectionRaw = $pdo;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user