更新
This commit is contained in:
parent
fb2f2c6a86
commit
76f8ec8202
@ -639,13 +639,13 @@ class ProductRepository extends BaseRepository
|
|||||||
$ot_price = !$ot_price ? $ot_price_ : (($ot_price > $ot_price_) ? $ot_price : $ot_price_);
|
$ot_price = !$ot_price ? $ot_price_ : (($ot_price > $ot_price_) ? $ot_price : $ot_price_);
|
||||||
|
|
||||||
$unique = $this->setUnique($productId, $sku, $productType);
|
$unique = $this->setUnique($productId, $sku, $productType);
|
||||||
$single_number=$value['single_number']??0;
|
// $single_number=$value['single_number']??0;
|
||||||
$single_procure_price=0;
|
// $single_procure_price=0;
|
||||||
$single_price=0;
|
// $single_price=0;
|
||||||
if(isset($value['single_number']) && $value['single_number']>1){
|
// if(isset($value['single_number']) && $value['single_number']>1){
|
||||||
$single_procure_price= bcdiv($procure_price,$value['single_number'],2);
|
// $single_procure_price= bcdiv($procure_price,$value['single_number'],2);
|
||||||
$single_price= bcdiv($price,$value['single_number'],2);
|
// $single_price= bcdiv($price,$value['single_number'],2);
|
||||||
}
|
// }
|
||||||
$result['attrValue'][] = [
|
$result['attrValue'][] = [
|
||||||
'detail' => json_encode($value['detail'] ?? ''),
|
'detail' => json_encode($value['detail'] ?? ''),
|
||||||
"bar_code" => $value["bar_code"] ?? '',
|
"bar_code" => $value["bar_code"] ?? '',
|
||||||
@ -666,9 +666,9 @@ class ProductRepository extends BaseRepository
|
|||||||
'svip_price' => $_svip_price,
|
'svip_price' => $_svip_price,
|
||||||
'mer_id' => $merId,
|
'mer_id' => $merId,
|
||||||
'procure_price' => $procure_price,
|
'procure_price' => $procure_price,
|
||||||
'single_number'=>$single_number,
|
'single_number'=>$value['single_number']??0,
|
||||||
'single_procure_price'=>$single_procure_price,
|
'single_procure_price'=>$value['single_procure_price']??0,
|
||||||
'single_price'=>$single_price
|
'single_price'=>$value['single_price']??0
|
||||||
];
|
];
|
||||||
$stock = $stock + intval($value['stock']);
|
$stock = $stock + intval($value['stock']);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,6 @@ class Product extends BaseController
|
|||||||
$type = $this->request->merchant()['type_id'];
|
$type = $this->request->merchant()['type_id'];
|
||||||
$typeCode = Db::name('merchant_type')->where('mer_type_id', $type)->value('type_code');
|
$typeCode = Db::name('merchant_type')->where('mer_type_id', $type)->value('type_code');
|
||||||
$product_type = 0;
|
$product_type = 0;
|
||||||
|
|
||||||
// if ($type==12){
|
// if ($type==12){
|
||||||
if ($typeCode == Merchant::TypeCode['TypeSupplyChain']) {
|
if ($typeCode == Merchant::TypeCode['TypeSupplyChain']) {
|
||||||
$where['product_type'] = 98; //供应链
|
$where['product_type'] = 98; //供应链
|
||||||
|
Loading…
x
Reference in New Issue
Block a user