M41: harden trust boundaries and delivery
This commit is contained in:
@@ -27,7 +27,8 @@ created, and next-booking risk. `register_vehicle_return` (below) calls the same
|
||||
1. Authorize Rental Employee or Operations Manager.
|
||||
2. Lock booking and vehicle rows.
|
||||
3. Reject cancelled/already-returned booking unless idempotency replay matches.
|
||||
4. Validate required fields and submitted reading against booking start reading.
|
||||
4. Validate required fields; compare the submitted reading only with the vehicle's
|
||||
canonical odometer so a lower reading is recorded as evidence instead of rejected.
|
||||
5. Create a return inspection.
|
||||
6. Set booking to returned and store submitted end reading.
|
||||
7. If submitted reading >= canonical odometer, update canonical odometer.
|
||||
|
||||
Reference in New Issue
Block a user