修正了药品订单详情页,优惠金额错误问题

This commit is contained in:
wucongxing8150 2025-02-18 13:15:15 +08:00
parent 5ad82a4864
commit defa12d98f

View File

@ -647,7 +647,19 @@ class PatientOrderService extends BaseService
}
// 处理优惠金额
$order_product['discount_amount'] = $order_product['amount_total'] + $order_product['logistics_fee'] - $order_product['coupon_amount_total'] - $order_product['payment_amount_total']; // 优惠金额
$order_product['discount_amount'] = bcsub(
bcsub(
bcadd(
$order_product['amount_total'],
$order_product['logistics_fee']
,2
),
$order_product['coupon_amount_total'],
2
),
$order_product['payment_amount_total'],
2
); // 优惠金额
$result = array();