PreorderBilling WIP & Api changed

This commit is contained in:
Frank Schubert
2025-03-20 16:02:05 +01:00
parent 2a7e7f1724
commit 9353591421
13 changed files with 335 additions and 54 deletions
@@ -6,6 +6,7 @@ class PreorderHistoryModel {
public $key;
public $old_value;
public $new_value;
public $changed;
public $create_by;
public $edit_by;
public $create;
@@ -47,9 +48,9 @@ class PreorderHistoryModel {
$status_id = $status->id;
$sql = "SELECT * FROM PreorderHistory WHERE preorder_id = $preorder_id AND `key` = 'status_id' AND new_value = $status_id";
if($type == "first") {
$sql .= " ORDER BY id ASC LIMIT 1";
$sql .= " ORDER BY `create` ASC LIMIT 1";
} else {
$sql .= " ORDER BY id DESC LIMIT 1";
$sql .= " ORDER BY `create` DESC LIMIT 1";
}
//mfLoghandler::singleton()->debug($sql);
$res = FronkDB::singleton()->query($sql);