wesmiler 1 mesiac pred
rodič
commit
e082f8f9be
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      app/Services/Common/OrderService.php

+ 2 - 2
app/Services/Common/OrderService.php

@@ -132,8 +132,8 @@ class OrderService extends BaseService
         $query4 = clone $query;
         $counts = [
             'total' => $query1->count('id'),
-            'totalAmount' => $query2->where(['status'=>4])->sum('id'),
-            'pending' =>  $query3->whereIn('status',[1,2])->sum('id'),
+            'totalAmount' => $query2->where(['status'=>4])->sum('pay_total'),
+            'pending' =>  $query3->whereIn('status',[1,2])->count('id'),
             'complete' =>  $query4->where(['status'=>4])->count('id'),
         ];