sunhao 5 years ago
parent
commit
30c5a020f6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Console/Commands/SyncMjOrderStatus.php

+ 2 - 2
app/Console/Commands/SyncMjOrderStatus.php

@@ -51,7 +51,7 @@ class SyncMjOrderStatus extends Command {
51 51
                         $sku_id = $code_arr[1];
52 52
                         $cost = GoodsSkus::select('referenceCost', 'is_weigh')->where('id', $sku_id)->first(); //获取规格成本/是否称重
53 53
                         $quantity = $cost->is_weigh == 1 ? $sku['quantity']/2 : $sku['quantity']; //对应规格数量
54
-                        if(isset($sku['cost'])) {  
54
+                        if(isset($sku['cost'])  && $sku['cost']>0) {  
55 55
                             $order_sku_cost = $cost->is_weigh == 1 ? $sku['cost'] * 2 : $sku['cost'];                          
56 56
                             $data['cost'] += $order_sku_cost * $quantity; //对应规格总成本
57 57
                         } else {
@@ -99,7 +99,7 @@ class SyncMjOrderStatus extends Command {
99 99
                         $sku_id = $code_arr[1];
100 100
                         $cost = GoodsSkus::select('referenceCost', 'is_weigh')->where('id', $sku_id)->first(); //获取规格成本/是否称重
101 101
                         $quantity = $cost->is_weigh == 1 ? $sku['quantity']/2 : $sku['quantity']; //对应规格数量
102
-                        if(isset($sku['cost'])) {  
102
+                        if(isset($sku['cost'])  && $sku['cost']>0) {  
103 103
                             $order_sku_cost = $cost->is_weigh == 1 ? ceil($sku['cost'] * 2 * 115)/100 : ceil($sku['cost'] * 115)/100 ;                          
104 104
                             $data['cost'] += $order_sku_cost * $quantity; //对应规格总成本
105 105
                         } else {