更新价格
This commit is contained in:
parent
e4233b502d
commit
3f7aab4175
@ -639,6 +639,13 @@ class ProductRepository extends BaseRepository
|
||||
$ot_price = !$ot_price ? $ot_price_ : (($ot_price > $ot_price_) ? $ot_price : $ot_price_);
|
||||
|
||||
$unique = $this->setUnique($productId, $sku, $productType);
|
||||
$single_number=0;
|
||||
$single_procure_price=0;
|
||||
$single_price=0;
|
||||
if(isset($data['single_number']) && $data['single_number']>1){
|
||||
$single_procure_price= bcdiv($procure_price,$data['single_number'],2);
|
||||
$single_price= bcdiv($price,$data['single_number'],2);
|
||||
}
|
||||
$result['attrValue'][] = [
|
||||
'detail' => json_encode($value['detail'] ?? ''),
|
||||
"bar_code" => $value["bar_code"] ?? '',
|
||||
@ -658,7 +665,10 @@ class ProductRepository extends BaseRepository
|
||||
'sales' => $isUpdate ? ($oldSku[$sku]['sales'] ?? 0) : 0,
|
||||
'svip_price' => $_svip_price,
|
||||
'mer_id' => $merId,
|
||||
'procure_price' => $procure_price
|
||||
'procure_price' => $procure_price,
|
||||
'single_number'=>$single_number,
|
||||
'single_procure_price'=>$single_procure_price,
|
||||
'single_price'=>$single_price
|
||||
];
|
||||
$stock = $stock + intval($value['stock']);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user