Skip to content

Conversation

@braisab
Copy link

@braisab braisab commented Jun 17, 2025

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_amount to 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_penalty method to include the penalty amount from board services by invoking the _get_board_services_penalty_amount method when service_ids are present.

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 19, 2025
@DarioLodeiros DarioLodeiros added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no stale Use this label to prevent the automated stale action from closing this PR/Issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants