|
|
@@ -996,12 +996,13 @@ class StoreOrder extends BaseModel
|
|
|
$product = $product->toArray();
|
|
|
$product_radio = $product['rebate_ratio'];
|
|
|
}
|
|
|
-// @file_put_contents('quanju.txt', json_encode($product_info) . "-购物车信息\r\n", 8);
|
|
|
+ @file_put_contents('quanju.txt', $product_radio . "-返利比例\r\n", 8);
|
|
|
|
|
|
|
|
|
if ($product_radio > 0) {
|
|
|
// if ($user_radio>0){
|
|
|
$product_price = StoreProduct::where('id', $product_info['product_id'])->value('price');
|
|
|
+ $product_price = bcmul($product_price,$product_info['cart_num'],2);
|
|
|
$rebate = bcmul($product_price, bcdiv($product_radio, 100, 2), 2); //商品返现金额
|
|
|
$brokerage = bcadd($brokerage, $rebate, 2);
|
|
|
// }
|
|
|
@@ -1043,6 +1044,7 @@ class StoreOrder extends BaseModel
|
|
|
if ($product_radio > 0) {
|
|
|
// if ($user_radio>0){
|
|
|
$product_price = StoreProduct::where('id', $product_info['product_id'])->value('price');
|
|
|
+ $product_price = bcmul($product_price,$product_info['cart_num'],2);
|
|
|
$rebate = bcmul($product_price, bcdiv($product_radio, 100, 2), 2); //商品返现金额
|
|
|
$brokerage = bcadd($brokerage, $rebate, 2);
|
|
|
// }
|