rabin 3 years ago
parent
commit
8fc9367936
1 changed files with 19 additions and 1 deletions
  1. 19 1
      app/shop/src/Excel.php

+ 19 - 1
app/shop/src/Excel.php

@@ -49,6 +49,16 @@ class Excel
                     $card_name = $card['name'];
                 }
             }
+
+            if (!$v['card_code_cash']) {
+                $v['card_code_cash'] = 0;
+            }
+            if (!$v['coupon_cash']) {
+                $v['coupon_cash'] = 0;
+            }
+            if (!$v['refund_cash']) {
+                $v['refund_cash'] = 0;
+            }
             
             foreach ($goods as $k1 => $v1) {
 
@@ -202,7 +212,15 @@ class Excel
             $total_cash = Dever::load("shop/lib/manage.getTotalCash", $v['id']);
             $v['refund_cash'] = $v['refund_cash'] ? $v['refund_cash'] : 0;
             $address = Dever::load('passport/address')->getOne($v['uid'], $v['address_id']);
-
+            if (!$v['card_code_cash']) {
+                $v['card_code_cash'] = 0;
+            }
+            if (!$v['coupon_cash']) {
+                $v['coupon_cash'] = 0;
+            }
+            if (!$v['refund_cash']) {
+                $v['refund_cash'] = 0;
+            }
             foreach ($goods as $k1 => $v1) {
 
                 $goods_info = Dever::load('goods/lib/info')->getInfoBySku($v1['goods_id'], $v1['sku_id']);