dashboard update
This commit is contained in:
@@ -382,10 +382,6 @@ $chartColors = [
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
var status = [];
|
||||
<?php foreach(PreorderstatusModel::getAll() as $status):?>
|
||||
status[<?=$status->id?>] = {"code": "<?=$status->code?>", "name": "<?=$status->name?>"};
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -187,10 +187,10 @@ class DashboardController extends mfBaseController {
|
||||
$orders[$name] = [];
|
||||
$orders[$name]["total"] = 0;
|
||||
}
|
||||
if(!array_key_exists($preorder->status->id, $orders[$name])) {
|
||||
$orders[$name][$preorder->status->id] = 0;
|
||||
if(!array_key_exists($preorder->status_id, $orders[$name])) {
|
||||
$orders[$name][$preorder->status_id] = 0;
|
||||
}
|
||||
$orders[$name][$preorder->status->id]++;
|
||||
$orders[$name][$preorder->status_id]++;
|
||||
$orders[$name]["total"]++;
|
||||
}
|
||||
//var_dump($orders);exit;
|
||||
|
||||
Reference in New Issue
Block a user