|
@@ -738,7 +738,7 @@ class Sale extends Base
|
|
|
->where(['spuCode' => $etid['good_code'], 'wsm_code' => $cgdinfo['wsm_code']])
|
|
|
->find();
|
|
|
//非库存品 导入地址生成发货单时占用库存 可用库存进入待出库
|
|
|
- if ($temp == false) {
|
|
|
+ if ($temp == false || ($temp['usable_stock'] - $num) < 0) {
|
|
|
$status = 0;
|
|
|
} else {
|
|
|
if (($temp['usable_stock'] - $num) < 0) {
|
|
@@ -1557,7 +1557,7 @@ class Sale extends Base
|
|
|
$goodinfo['gold_price'] = $gold["price"];
|
|
|
$saleprice = $goodinfo['demo_fee'] /$data['good_num'] + $goodinfo['open_fee'] / $data['good_num'] +
|
|
|
$goodinfo['good_weight'] * $gold["price"] + $goodinfo['cost_fee'] * $goodinfo['good_weight'] +
|
|
|
- $goodinfo['package_fee'] + $goodinfo['mark_fee'] + $goodinfo['cert_fee'] + $goodinfo['nake_fee'] + $goodinfo['delivery_fee'];
|
|
|
+ $goodinfo['pakge_fee'] + $goodinfo['mark_fee'] + $goodinfo['cert_fee'] + $goodinfo['nake_fee'] + $goodinfo['delivery_fee'];
|
|
|
}
|
|
|
|
|
|
if($data['sale_price']< $saleprice){
|