|
@@ -1544,6 +1544,24 @@ class Sale extends Base
|
|
|
if ($goodinfo == false) {
|
|
|
return false;
|
|
|
}
|
|
|
+ $cat_top_list = made($goodinfo['cat_id']);
|
|
|
+ $cat_top_id = isset($cat_top_list[0]['id']) ? $cat_top_list[0]['id'] : 0;
|
|
|
+ $saleprice = $goodinfo['sale_price'];
|
|
|
+ if ($goodinfo['is_gold_price'] == 1 && $cat_top_id == 6) {
|
|
|
+ $gold = Db::name("gold_price1")
|
|
|
+ ->field('id,price')
|
|
|
+ ->where(["type" => $goodinfo['metal_id'], "is_del" => 0, "status" => 1])
|
|
|
+ ->order("addtime desc")
|
|
|
+ ->find();
|
|
|
+ $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'];
|
|
|
+ }
|
|
|
+
|
|
|
+ if($data['sale_price']< $saleprice){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$orderCode = makeNo("QR");
|
|
|
$supplier_temp_info = Db::name('supplier')
|
|
|
->field('id,person,personid')
|