The cases are due out at 4 p.m. For the crew packing them, the hour that matters is 3 p.m. By then the Live kit needs four wireless mics, a mixer and four lights. In the RentalStage example, only two of the mics can come off the shelf.
RentalStage is a reference prototype for a custom rental application. The kits, rates and warehouse checks in this walkthrough are examples. For a commissioned implementation, the rental team would set those rules and specify which scanners and management software to connect.
Why the stock check returns two serial numbers
The Forum has booked the first six mics. MIC009 and MIC010 are in repair. That leaves MIC007 and MIC008 for the Lumen job. The warehouse catalogue still has ten entries.
The planned return for the Forum is noon on 13 November, so those six mics stay booked through the inspection hour. If a later job starts packing at exactly 1 p.m., the two buffered windows touch. The overlap check uses requestedStart < occupiedEnd && occupiedStart < requestedEnd on the buffered times. A serial is also filtered out if it appears on the maintenance list.
The rate only matters if the stock is ready in time
Sound Depot has enough mics at €20 a day each. They are ready at 6 p.m. Stage Partner has two ready at noon, before packing, at €25 per mic per day. The two mics add €100 to the job’s costs because the demo bills the booking as two days.
The right-hand panel shows €834 in expected revenue, €420 in direct costs and €414 left as direct contribution. Amounts in the calculation use integer cents. Accepting the sample quote copies those figures into its history. An edit later on gives the team a fresh draft to compare with the version already accepted.
Assign the serials in the same request that checks them
A booking can sit in draft while the warehouse stock is still available for other jobs. Confirmation checks that the browser sent the current revision, runs the availability rules again and saves the assigned serial numbers. PHP does that work in a SQLite BEGIN IMMEDIATE transaction. If an older tab sends a stale revision, it gets HTTP 409 and the reservation stays as it was. The prototype stores its state per demo session.
At the packing bench, the two subrental mics are labelled EXT-MIC-1 and EXT-MIC-2 in the manifest. A repeat scan of either label keeps the counter where it was. A serial from another list is rejected too. Once the count reaches nine out of nine, dispatch can be recorded.
Follow MIC007 after dispatch
The first return is at 8 p.m. and contains just MIC007. The warehouse records the time and a fault against that serial. The manifest still shows eight items out. As they arrive, each receives its own return time, which is where the inspection hour starts.
MIC007 also goes onto the maintenance list. To clear the case, the prototype requires a confirmed functional test and a written result. The test suite covers a partial return followed by the rest of the kit, including an attempt to return the same serial twice.
See the three outcomes online
The online walkthrough has three precomputed examples. It starts with the shortage, then lets you inspect a subrental and a damaged return. The separate read-only PHP build was checked for 192 combinations of dates, quantities, supplier choices, return conditions and discounts. All names and prices are sample data.
The RentalStage project article follows the same job from the warehouse team’s side. The screenshots show the Italian interface.
This article was generated with AI using the project source and verification results.




Top comments (1)
The serial-level detail is what makes this land for me. Checking availability against buffered times with requestedStart < occupiedEnd, and filtering out anything on the maintenance list, is the kind of rule that only shows up after a real packing-day problem. The part I would steal is assigning the serials in the same request that checks them — BEGIN IMMEDIATE plus a 409 on a stale revision is a clean way to stop two tabs booking the same mic. And the partial return, with MIC007 going straight to maintenance, is a nice touch; it keeps the case from looking clear when it is not.