- Shipped
- 8 листопада 2026 р. о 00:55 UTC
- Author
- Kamo
- Commit
- f9a3c1d
- createRentalRequest refuses a missing or foreign customer account, records the market (the asset's, else the chosen one) on the engagement, and validates dates and the rate type. Confirm refuses a request with no account. - setRentalRequestAccount / setBookingAccount move the renter to another account and never clear it; both answer the updated record. - Requests: cancel/decoder (IntentStatus.CANCELLED, reason kept) and new dates (with the availability check). Bookings: check out (the booking's FulfillmentOrder IN_PROGRESS), return or end (COMPLETED; CommitmentStatus.FULFILLED; late and damage fees added to the total; condition notes), cancel (VOIDED, before it goes out), and new dates (only the end while out), each checking the asset's other bookings under a row lock on the asset so two confirms cannot double-book. - EngagementLifecycle: a VOIDED commitment commits nothing; all voided and no order is CANCELLED. - A returned booking no longer holds its dates. The asset's held dates are readable (findRentalAssetBookings) for date pickers. - DTOs: marketId/marketTitle on requests, bookings and assets; booking -> rentalRequestUid, rateType, checkedOutAt, returnedAt, fees, notes, cancel reason; request -> cancelReason, bookingStatus. Lists filter by market and load assets, bookings and hand-overs in one query each instead of per row. - Rental assets: description column; market validated as the org's Rental market and movable on update; negative rates refused; duplicate codes refused on update; an asset with rentals on record cannot be deleted (switch it off instead). - Indexes: **************** by engagement, commitments by rental asset, fulfillments by commitment, rental assets by org and market (applied by hand).
