This commit is contained in:
wucongxing8150 2024-05-07 19:32:35 +08:00
parent 8530afb5ff
commit 73a23b8edb

View File

@ -2192,6 +2192,9 @@ class PatientOrderService extends BaseService
// 实际药品数量 = 处方数量 - 健康包可使用的赠送药品数量
$product_data['actual_quantity'] = $product_data['product_num'] - $remaining_quantity;
// 药品优惠金额
$product_data['discount_amount'] = 35 * $product_data['used_quantity'];
// 实际药品价格= 35 * 剩余免费药品数量 + 原价 * 实际药品数量
$actual_product_price = bcadd(
bcmul(
@ -2229,11 +2232,7 @@ class PatientOrderService extends BaseService
// 此处重新计算药品优惠金额
$discount_amount = bcadd(
$discount_amount,
bcmul(
$product_data['discount_amount'],
$product_data['used_quantity'],
2
),
2
);