Make it possible to round up shopping list and recipe ingredient amounts (closes #902, closes #2644)

This commit is contained in:
Bernd Bestel
2025-01-19 20:16:37 +01:00
parent e3965ed82c
commit 1946ff870e
10 changed files with 196 additions and 2 deletions

View File

@@ -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;
}