WIP PreorderBilling 2025-03-22
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user