diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index bcb39a0..724b65c 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -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 - ), + $product_data['discount_amount'], 2 );