2 Комити 070e5c629c ... 043c8411d4

Аутор SHA1 Порука Датум
  gorden 043c8411d4 Merge branch 'master' of http://39.98.194.76:3000/txct/wanyue_app пре 1 дан
  gorden 6c4dcd9961 退款统计金额异常 пре 1 дан
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      app/admin/controller/order/RefundController.php

+ 5 - 0
app/admin/controller/order/RefundController.php

@@ -172,26 +172,31 @@ class RefundController extends Curd
         $total = $totalModel->selectRaw("SUM(JSON_UNQUOTE(JSON_EXTRACT(order_return_apply_json,'$.amount'))) as amount,count(orders_return_id) as total")
             ->first()
             ->toArray();
+        $total['amount'] = round($total['amount'],2);
         $pendingTotalModel = clone $returnModel;
         $pendingTotal = $pendingTotalModel->where('order_return_status', 'PENDING')
             ->selectRaw("SUM(JSON_UNQUOTE(JSON_EXTRACT(order_return_apply_json,'$.amount'))) as amount,count(orders_return_id) as total")
             ->first()
             ->toArray();
+        $pendingTotal['amount'] = round($pendingTotal['amount'],2);
         $doingTotalModel = clone $returnModel;
         $doingTotal = $doingTotalModel->where('order_return_status', 'DOING')
             ->selectRaw("SUM(JSON_UNQUOTE(JSON_EXTRACT(order_return_apply_json,'$.amount'))) as amount,count(orders_return_id) as total")
             ->first()
             ->toArray();
+        $doingTotal['amount'] = round($doingTotal['amount'],2);
         $disagreeTotalModel = clone $returnModel;
         $disagreeTotal = $disagreeTotalModel->where('order_return_status', 'DISAGREE')
             ->selectRaw("SUM(JSON_UNQUOTE(JSON_EXTRACT(order_return_apply_json,'$.amount'))) as amount,count(orders_return_id) as total")
             ->first()
             ->toArray();
+        $disagreeTotal['amount'] = round($disagreeTotal['amount'],2);
         $doneTotalModel = clone $returnModel;
         $doneTotal = $doneTotalModel->where('order_return_status', 'DONE')
             ->selectRaw("SUM(JSON_UNQUOTE(JSON_EXTRACT(order_return_apply_json,'$.amount'))) as amount,count(orders_return_id) as total")
             ->first()
             ->toArray();
+        $doneTotal['amount'] = round($doneTotal['amount'],2);
 
         return json_success('success', [
             'total' => $total,