544782275@qq.com il y a 3 ans
Parent
commit
99ee83ac7c
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      application/store/controller/Order.php

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

@@ -61,7 +61,11 @@ class Order extends Controller
         $array['all_order'] = $this->byWhere(2)->count();
         $array['all_price'] = $this->byWhere(2)->where('a.status', '>',0)->sum('a.price_total');
         $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'];
         $array['zfb_all_price'] = $this->byWhere(2)->where('a.status', '>',0)->where('a.pay_type', '2')->sum('a.price_total');
+        $array['zfb_refund_all_price'] = $this->byWhere(2)->where('a.refund_price', '>',0)->where('a.pay_type', '2')->sum('a.price_total');
+        $array['zfb_all_price'] = $array['zfb_all_price'] - $array['zfb_refund_all_price'];
         $array['engineer_id'] = session('user.engineer_id');
         return $array;
     }