544782275@qq.com 3 年之前
父节点
当前提交
da3d060a54
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      application/store/controller/Order.php

+ 2 - 0
application/store/controller/Order.php

@@ -60,6 +60,8 @@ class Order extends Controller
         $array = array();
         $array['all_order'] = $this->byWhere(2)->count();
         $array['all_price'] = $this->byWhere(2)->where('a.status', '>',0)->sum('a.price_total');
+        $array['all_refund_price'] = $this->byWhere(2)->where('a.refund_price', '>',0)->sum('a.price_total');
+        $array['all_price'] = $array['all_price'] - $array['all_refund_price'];
         $array['weixin_all_price'] = $this->byWhere(2)->where('a.status', '>',0)->where('a.pay_type', '1')->sum('a.price_total');
         $array['weixin_refund_all_price'] = $this->byWhere(2)->where('a.refund_price', '>',0)->where('a.pay_type', '1')->sum('a.refund_price');
         $array['weixin_all_price'] = $array['weixin_all_price'] - $array['weixin_refund_all_price'];