|
@@ -300,6 +300,9 @@ class Cron
|
|
$end = Dever::input('end', date('Y-m-d'));
|
|
$end = Dever::input('end', date('Y-m-d'));
|
|
|
|
|
|
$where['status'] = '2,3,4,5,6';
|
|
$where['status'] = '2,3,4,5,6';
|
|
|
|
+ //$where['state_2'] = 1;
|
|
|
|
+ //$where['state_1'] = 1;
|
|
|
|
+ $where['status_1'] = 1;
|
|
$start = Dever::maketime($start . ' 00:00:00');
|
|
$start = Dever::maketime($start . ' 00:00:00');
|
|
$end = Dever::maketime($end . ' 23:59:59');
|
|
$end = Dever::maketime($end . ' 23:59:59');
|
|
$day = intval(($end - $start)/86400);
|
|
$day = intval(($end - $start)/86400);
|
|
@@ -317,6 +320,7 @@ class Cron
|
|
$data['day'] = $where['start'];
|
|
$data['day'] = $where['start'];
|
|
$info = Dever::db('shop/buy_stat')->find($data);
|
|
$info = Dever::db('shop/buy_stat')->find($data);
|
|
$cash = Dever::db('shop/buy_order_goods')->getCashNum($where);
|
|
$cash = Dever::db('shop/buy_order_goods')->getCashNum($where);
|
|
|
|
+ return $cash;
|
|
$data['cash'] = round($cash['total'], 2);
|
|
$data['cash'] = round($cash['total'], 2);
|
|
$cash = Dever::db('shop/buy_order_goods')->getPCashNum($where);
|
|
$cash = Dever::db('shop/buy_order_goods')->getPCashNum($where);
|
|
$data['p_cash'] = round($cash['total'], 2);
|
|
$data['p_cash'] = round($cash['total'], 2);
|
|
@@ -437,9 +441,12 @@ class Cron
|
|
$data['goods_id'] = $v1['goods_id'];
|
|
$data['goods_id'] = $v1['goods_id'];
|
|
$data['day'] = $where['start'];
|
|
$data['day'] = $where['start'];
|
|
$info = Dever::db('shop/goods_stat')->find($data);
|
|
$info = Dever::db('shop/goods_stat')->find($data);
|
|
- $cash = Dever::db('shop/sell_order_goods')->getCashNum($where);
|
|
|
|
- $data['cash'] = round($cash['total'], 2);
|
|
|
|
- $data['num'] = Dever::db('shop/sell_order_goods')->getOrderNum($where);
|
|
|
|
|
|
+ $num = Dever::db('shop/sell_order_goods')->getNum($where);
|
|
|
|
+ $data['cash'] = $data['num'] = 0;
|
|
|
|
+ if ($num) {
|
|
|
|
+ $data['cash'] = round($num['cash'], 2);
|
|
|
|
+ $data['num'] = round($num['num'], 2);
|
|
|
|
+ }
|
|
if ($data['num'] > 0) {
|
|
if ($data['num'] > 0) {
|
|
$data['area'] = $v['area'];
|
|
$data['area'] = $v['area'];
|
|
$data['category'] = $goods_info['category'];
|
|
$data['category'] = $goods_info['category'];
|