修改科学计算字符类型
This commit is contained in:
@@ -1593,12 +1593,12 @@ class PatientOrderService extends BaseService
|
||||
$actual_product_price = bcadd(
|
||||
bcmul(
|
||||
35,
|
||||
$product_datas[$key]['used_quantity'],
|
||||
(string)$product_datas[$key]['used_quantity'],
|
||||
2
|
||||
),
|
||||
bcmul(
|
||||
$product_datas[$key]['product_price'],
|
||||
$product_datas[$key]['actual_quantity'],
|
||||
(string)$product_datas[$key]['product_price'],
|
||||
(string)$product_datas[$key]['actual_quantity'],
|
||||
2
|
||||
),
|
||||
2
|
||||
@@ -1608,8 +1608,8 @@ class PatientOrderService extends BaseService
|
||||
$payment_amount_total = bcadd(
|
||||
$payment_amount_total,
|
||||
bcmul(
|
||||
$product_datas[$key]['product_price'],
|
||||
$product_datas[$key]['actual_quantity'],
|
||||
(string)$product_datas[$key]['product_price'],
|
||||
(string)$product_datas[$key]['actual_quantity'],
|
||||
2
|
||||
),
|
||||
2
|
||||
@@ -1618,8 +1618,8 @@ class PatientOrderService extends BaseService
|
||||
|
||||
// 此处重新计算药品总金额
|
||||
$amount_total = bcadd(
|
||||
$amount_total,
|
||||
$actual_product_price,
|
||||
(string)$amount_total,
|
||||
(string)$actual_product_price,
|
||||
2
|
||||
);
|
||||
|
||||
@@ -1627,8 +1627,8 @@ class PatientOrderService extends BaseService
|
||||
$discount_amount = bcadd(
|
||||
$discount_amount,
|
||||
bcmul(
|
||||
$product_datas[$key]['discount_amount'],
|
||||
$product_datas[$key]['used_quantity'],
|
||||
(string)$product_datas[$key]['discount_amount'],
|
||||
(string)$product_datas[$key]['used_quantity'],
|
||||
2
|
||||
),
|
||||
2
|
||||
@@ -1638,8 +1638,8 @@ class PatientOrderService extends BaseService
|
||||
$freight_calculation_amount = bcadd(
|
||||
$freight_calculation_amount,
|
||||
bcmul(
|
||||
$product_datas[$key]['product_price'],
|
||||
$product_datas[$key]['product_num'],
|
||||
(string)$product_datas[$key]['product_price'],
|
||||
(string)$product_datas[$key]['product_num'],
|
||||
2
|
||||
),
|
||||
2
|
||||
@@ -1673,8 +1673,8 @@ class PatientOrderService extends BaseService
|
||||
// 实际支付金额=商品总金额-优惠卷金额+运费金额
|
||||
$payment_amount_total = bcadd(
|
||||
bcsub(
|
||||
$payment_amount_total,
|
||||
$coupon_amount_total,
|
||||
(string)$payment_amount_total,
|
||||
(string)$coupon_amount_total,
|
||||
2
|
||||
),
|
||||
$logistics_fee,
|
||||
@@ -1773,7 +1773,7 @@ class PatientOrderService extends BaseService
|
||||
$data['order_prescription_id'] = $order_prescription['order_prescription_id'];
|
||||
$data['product_id'] = $product_data['product_id'];
|
||||
$data['product_name'] = $product_data['product_name'];
|
||||
$data['product_price'] = bcmul($product_data['product_price'], $product_data['actual_quantity'], 3);
|
||||
$data['product_price'] = bcmul((string)$product_data['product_price'], (string)$product_data['actual_quantity'], 3);
|
||||
$data['product_platform_code'] = $product_data['product_platform_code'];
|
||||
$data['amount'] = $product_data['product_num'];
|
||||
$data['manufacturer'] = $product_data['manufacturer'];
|
||||
@@ -2206,12 +2206,12 @@ class PatientOrderService extends BaseService
|
||||
$actual_product_price = bcadd(
|
||||
bcmul(
|
||||
35,
|
||||
$product_data['used_quantity'],
|
||||
(string)$product_data['used_quantity'],
|
||||
2
|
||||
),
|
||||
bcmul(
|
||||
$product_data['product_price'],
|
||||
$product_data['actual_quantity'],
|
||||
(string)$product_data['product_price'],
|
||||
(string)$product_data['actual_quantity'],
|
||||
2
|
||||
),
|
||||
2
|
||||
@@ -2219,10 +2219,10 @@ class PatientOrderService extends BaseService
|
||||
|
||||
// 此处重新计算药品支付金额
|
||||
$payment_amount_total = bcadd(
|
||||
$payment_amount_total,
|
||||
(string)$payment_amount_total,
|
||||
bcmul(
|
||||
$product_data['product_price'],
|
||||
$product_data['actual_quantity'],
|
||||
(string)$product_data['product_price'],
|
||||
(string)$product_data['actual_quantity'],
|
||||
2
|
||||
),
|
||||
2
|
||||
@@ -2231,24 +2231,24 @@ class PatientOrderService extends BaseService
|
||||
|
||||
// 此处重新计算药品总金额
|
||||
$amount_total = bcadd(
|
||||
$amount_total,
|
||||
$actual_product_price,
|
||||
(string)$amount_total,
|
||||
(string)$actual_product_price,
|
||||
2
|
||||
);
|
||||
|
||||
// 此处重新计算药品优惠金额
|
||||
$discount_amount = bcadd(
|
||||
$discount_amount,
|
||||
$product_data['discount_amount'],
|
||||
(string)$discount_amount,
|
||||
(string)$product_data['discount_amount'],
|
||||
2
|
||||
);
|
||||
|
||||
// 此处计算药品总金额-计算运费使用
|
||||
$freight_calculation_amount = bcadd(
|
||||
$freight_calculation_amount,
|
||||
(string)$freight_calculation_amount,
|
||||
bcmul(
|
||||
$product_data['product_price'],
|
||||
$product_data['product_num'],
|
||||
(string)$product_data['product_price'],
|
||||
(string)$product_data['product_num'],
|
||||
2
|
||||
),
|
||||
2
|
||||
@@ -2274,7 +2274,7 @@ class PatientOrderService extends BaseService
|
||||
}
|
||||
|
||||
// 实际支付金额=商品总金额-优惠卷金额+运费金额
|
||||
$payment_amount_total = bcadd(bcsub($payment_amount_total, $coupon_amount_total, 2), $logistics_fee, 2);
|
||||
$payment_amount_total = bcadd(bcsub((string)$payment_amount_total, (string)$coupon_amount_total, 2), (string)$logistics_fee, 2);
|
||||
|
||||
// 药品优惠金额
|
||||
$discount_amount = $discount_amount + $coupon_amount_total;
|
||||
|
||||
Reference in New Issue
Block a user