dever 3 years ago
parent
commit
9b09de0d52
2 changed files with 9 additions and 1 deletions
  1. 1 1
      app/shop/lib/Refund.php
  2. 8 0
      app/shop/lib/Sell.php

+ 1 - 1
app/shop/lib/Refund.php

@@ -173,7 +173,7 @@ class Refund
                 }
             }
 
-            if ($cash > 0) {
+            if ($cash >= 0) {
                 $log = $this->up($data['id'], $order_goods_id, $status, $cash, $p_cash, $num, $desc, $pic, $process);
 
                 if (!$log) {

+ 8 - 0
app/shop/lib/Sell.php

@@ -174,10 +174,14 @@ class Sell
 
         if (!$info['wallet_cash']) {
             $info['wallet_cash'] = 0;
+        } else {
+            $info['wallet_cash'] = round($info['wallet_cash'], 2);
         }
 
         if (!$info['card_code_cash']) {
             $info['card_code_cash'] = 0;
+        } else {
+            $info['card_code_cash'] = round($info['card_code_cash'], 2);
         }
 
         $info['card_name'] = '';
@@ -516,6 +520,8 @@ class Sell
                             $data['card']['cash'] = $card_cash;
                             $data['price'] -= $data['card']['cash'];
                         }
+
+                        $data['card']['cash'] = round($data['card']['cash'], 2);
                     }
                 }
             } elseif ($wallet && $wallet > 0) {
@@ -527,6 +533,8 @@ class Sell
             $data['price'] = 0;
         }
 
+        $data['price'] = round($data['price'], 2);
+
         return $data;
     }