pms
pms copied to clipboard
[IMP]pms: includes board services in cancelation penalty
This pull request introduces enhancements to the penalty calculation logic in the pms_reservation model, specifically targeting board services. The changes ensure penalties account for board services consumed before or after the reservation dates, improving accuracy in penalty computations.
Enhancements to penalty calculation:
pms/models/pms_reservation.py: Added a new helper method_get_board_services_penalty_amountto calculate the penalty amount for board services based on their consumption dates relative to the reservation dates. Only services consumed "before" or "after" the reservation dates are considered, excluding those consumed on the first or last day.pms/models/pms_reservation.py: Updated the_check_cancel_penaltymethod to include the penalty amount from board services by invoking the_get_board_services_penalty_amountmethod whenservice_idsare present.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.