Browse Source

修改同步订单脚本计算成本方式

shensong 5 years ago
parent
commit
0275161bf7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Console/Commands/SyncMjOrderStatus.php

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

@@ -48,7 +48,7 @@ class SyncMjOrderStatus extends Command {
48 48
                         $sku_id = $code_arr[1];
49 49
                         $cost = GoodsSkus::select('referenceCost', 'is_weigh')->where('id', $sku_id)->first(); //获取规格成本/是否称重
50 50
                         $quantity = $cost->is_weigh == 1 ? $sku['quantity']/2 : $sku['quantity']; //对应规格数量
51
-                        $data['cost'] += $result['cost']; //对应规格总成本
51
+                        $data['cost'] += $sku['cost']; //对应规格总成本
52 52
 //                        $data['cost'] += $cost->referenceCost * $quantity; //对应规格总成本
53 53
                         #更新order_sku
54 54
                         OrderGoodsSkus::where('order_id', $order['id'])->where('sku_id', $sku_id)->update(['send_num'=>$quantity]);