Currently, the discount for OPD bills is calculated only based on the hospital fees of the added items. However, it does not include staff fees in the calculation, which results in an incorrect discount value.
Expected Behavior:
The discount should be calculated based on the full total amount, including both:
Hospital fees
Staff fees
Current Behavior:
Discount is applied only to hospital fees.
Staff fees are ignored in the discount calculation.
Example:
From the attached bill:
Total Amount: 2,900.00
Current Discount: 257.00 (calculated incorrectly)
Expected Discount: 290.00 (based on total amount)
Steps to Reproduce:
Add multiple procedures to an OPD bill (with both hospital and staff fees).
Apply a discount (e.g., Agrahara discount).
Observe the calculated discount value.
Impact:
Incorrect billing totals
Financial discrepancies
Potential customer dissatisfaction
Suggested Fix:
Update the discount calculation logic to include both hospital and staff fees when computing the total amount eligible for discount.
Currently, the discount for OPD bills is calculated only based on the hospital fees of the added items. However, it does not include staff fees in the calculation, which results in an incorrect discount value.
Expected Behavior:
The discount should be calculated based on the full total amount, including both:
Hospital fees
Staff fees
Current Behavior:
Discount is applied only to hospital fees.
Staff fees are ignored in the discount calculation.
Example:
From the attached bill:
Total Amount: 2,900.00
Current Discount: 257.00 (calculated incorrectly)
Expected Discount: 290.00 (based on total amount)
Steps to Reproduce:
Add multiple procedures to an OPD bill (with both hospital and staff fees).
Apply a discount (e.g., Agrahara discount).
Observe the calculated discount value.
Impact:
Incorrect billing totals
Financial discrepancies
Potential customer dissatisfaction
Suggested Fix:
Update the discount calculation logic to include both hospital and staff fees when computing the total amount eligible for discount.