PreorderBilling
This commit is contained in:
@@ -52,7 +52,7 @@ class PreorderHistoryModel {
|
||||
} else {
|
||||
$sql .= " ORDER BY `create` DESC LIMIT 1";
|
||||
}
|
||||
//mfLoghandler::singleton()->debug($sql);
|
||||
mfLoghandler::singleton()->debug($sql);
|
||||
$res = FronkDB::singleton()->query($sql);
|
||||
if(FronkDB::singleton()->num_rows($res)) {
|
||||
$data = FronkDB::singleton()->fetch_object($res);
|
||||
@@ -72,7 +72,7 @@ class PreorderHistoryModel {
|
||||
foreach(PreorderstatusModel::getAll() as $status) {
|
||||
if($status->code < $status_code) continue;
|
||||
|
||||
$change = self::getStatusChange("first", $preorder_id, $status_code);
|
||||
$change = self::getStatusChange("first", $preorder_id, $status->code);
|
||||
if($change) return $change;
|
||||
}
|
||||
|
||||
@@ -80,10 +80,11 @@ class PreorderHistoryModel {
|
||||
}
|
||||
|
||||
public static function getLastStatusChangeToOrHigher($preorder_id, $status_code) {
|
||||
foreach(PreorderstatusModel::getAll() as $status) {
|
||||
$codes = PreorderstatusModel::getAll();
|
||||
foreach($codes as $status) {
|
||||
if($status->code < $status_code) continue;
|
||||
|
||||
$change = self::getStatusChange("last", $preorder_id, $status_code);
|
||||
$change = self::getStatusChange("last", $preorder_id, $status->code);
|
||||
if($change) return $change;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user