修正优惠金额问题
This commit is contained in:
parent
afcd9bc9b2
commit
1f3b87e6ef
@ -647,11 +647,8 @@ class PatientOrderService extends BaseService
|
||||
}
|
||||
|
||||
// 处理优惠金额
|
||||
$order_product['discount_amount'] = bcsub(
|
||||
(string)$order_product['amount_total'],
|
||||
(string)$order_product['payment_amount_total'],
|
||||
2
|
||||
);
|
||||
$order_product['discount_amount'] = $order_product['amount_total'] - $order_product['coupon_amount_total'] - $order_product['payment_amount_total'] - $order_product['logistics_fee']; // 优惠金额
|
||||
|
||||
|
||||
$result = array();
|
||||
$result['user_doctor'] = $user_doctor ?? [];
|
||||
@ -801,7 +798,6 @@ class PatientOrderService extends BaseService
|
||||
$result['pay_config'] = []; // 小程序支付配置
|
||||
$result['cannot_use_coupon_reason'] = ""; // 不可使用优惠卷原因
|
||||
|
||||
|
||||
// 问诊订单
|
||||
if ($order_type == 1) {
|
||||
$params = array();
|
||||
@ -923,7 +919,7 @@ class PatientOrderService extends BaseService
|
||||
$result['amount_total'] = $order_product['amount_total']; // 订单金额
|
||||
$result['payment_amount_total'] = $order_product['payment_amount_total']; // 实际订单金额
|
||||
$result['coupon_amount_total'] = $order_product['coupon_amount_total']; // 优惠金额
|
||||
$result['discount_amount'] = $order_product['amount_total'] - $order_product['coupon_amount_total'] - $order_product['payment_amount_total']; // 优惠金额
|
||||
$result['discount_amount'] = $order_product['amount_total'] - $order_product['coupon_amount_total'] - $order_product['payment_amount_total'] - $order_product['logistics_fee']; // 优惠金额
|
||||
|
||||
// 获取优惠卷不可用原因。存在优惠卷,但是未使用-暂时废弃
|
||||
/*if ($order_product['coupon_amount_total'] == 0){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user