更新
This commit is contained in:
parent
b9298d45c0
commit
8c716b11e2
@ -2338,14 +2338,6 @@ class ProductRepository extends BaseRepository
|
||||
$model = new PurchaseRecord();
|
||||
$stockIn = $params['number'] ?? 0;
|
||||
$price = $params['price'] ?? 0;
|
||||
if ($stockIn == 0) {
|
||||
$number=$model->where('order_id',$params['order_id'])
|
||||
->where('order_product_id',$params['order_product_id'])->where('order_unique',$params['order_unique'])->value('number');
|
||||
if($number<=0){
|
||||
throw new ValidateException('数量不能为空');
|
||||
}
|
||||
$stockIn = $number;
|
||||
}
|
||||
if (empty($params['product_id']) && !empty($params['order_product_id'])) {
|
||||
//有商品无规格或者无商品无规格,导入商品和规格
|
||||
$product = $this->getWhere(['source_product_id' => $params['order_product_id'], 'mer_id' => $merId]);
|
||||
@ -2362,6 +2354,8 @@ class ProductRepository extends BaseRepository
|
||||
}
|
||||
}
|
||||
if ($orderProduct->is_imported == 0) {
|
||||
|
||||
$stockIn=$orderProduct['product_num'];
|
||||
|
||||
ProductAttrValue::where('mer_id', $merId)
|
||||
->where('product_id', $product['product_id'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user