|
@@ -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 {
|