Charges should be able to span more than one month of period #5

Closed
opened 2026-04-24 16:00:49 +02:00 by jodzsi · 2 comments
Owner

Background:

There could be charges that span multiple months, instead of one

Done criteria:

  1. Charges can span more than 1 months
  2. Charges with the same type for the same lease contract cannot overlap
# Background: There could be charges that span multiple months, instead of one # Done criteria: 1. Charges can span more than 1 months 2. Charges with the same type for the same lease contract cannot overlap
jodzsi added the domain:billingpriority:p0release:v1.1type:feature labels 2026-04-24 16:01:03 +02:00
jodzsi added this to the v1.1 milestone 2026-04-24 16:01:10 +02:00
jodzsi added this to the RentalApp project 2026-04-24 16:01:44 +02:00
jodzsi self-assigned this 2026-04-24 16:01:48 +02:00
Author
Owner

BE implementation steps

  • Add period_months column to charge table
  • Add periodMonths field to Charge entity
  • Extend create, update and details use cases with periodMonths field
  • Extend create and update use cases with charge validation for overlapping charges
    • Lock table lock (leaseContractId + type) (missing lock error handling)
    • Fetch charges by lease contract id and type, validate for overlaps
  • Extend create lease contract use case with lock table populating logic
  • Update lease contract report to handle periodMonths
  • Extend lease contract create, update and details use cases with rent charge months
  • Update rent charge creating job to skip creation, if period hasn't passed

FE implementation steps

  • Extend create, update and details charge pages with periodMonths field
  • Extend create, update and details lease contract pages with rentPeriodMonths field
# BE implementation steps - [x] Add period_months column to charge table - [x] Add periodMonths field to Charge entity - [x] Extend create, update and details use cases with periodMonths field - [x] Extend create and update use cases with charge validation for overlapping charges - [x] Lock table lock (leaseContractId + type) (missing lock error handling) - [x] Fetch charges by lease contract id and type, validate for overlaps - [x] Extend create lease contract use case with lock table populating logic - [x] Update lease contract report to handle periodMonths - [x] Extend lease contract create, update and details use cases with rent charge months - [x] Update rent charge creating job to skip creation, if period hasn't passed # FE implementation steps - [x] Extend create, update and details charge pages with periodMonths field - [x] Extend create, update and details lease contract pages with rentPeriodMonths field
Author
Owner
BE PR: https://bitbucket.org/jodzsistuff/rentalappbe/pull-requests/2 FE PR: https://bitbucket.org/jodzsistuff/rentalappfe/pull-requests/3
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jodzsi/rentalapp-issues#5