WIP PreorderBilling 2025-03-22

This commit is contained in:
Frank Schubert
2025-03-22 14:50:08 +01:00
parent aebb463b74
commit 217b19026e
17 changed files with 2113 additions and 28 deletions

View File

@@ -555,7 +555,7 @@ class PreorderProduct extends mfBaseModel {
return $types;
}
public static function getAll() {
public static function getAll($withKeyIsId = false) {
$items = [];
$db = FronkDB::singleton();
@@ -563,7 +563,11 @@ class PreorderProduct extends mfBaseModel {
$res = $db->select("PreorderProduct", "*", "1 = 1 ORDER BY type");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
$items[] = new PreorderProduct($data);
if($withKeyIsId) {
$items[$data->id] = new PreorderProduct($data);
} else {
$items[] = new PreorderProduct($data);
}
}
}
return $items;