Bookings and contract PDFs
Bookings and contract PDFs
Bookings requires view:rentals. Search/filter by status; 20 rows initially. Form create/edit/delete fields: start/end dates, asset, customer name/email/phone, daily rate, total amount, status and notes. Save requires customer name, valid dates and asset. Before dates are valid, maintenance/retired assets are excluded; once start < end, options come from the availability query.
For a new booking, an unavailable selection is cleared; editing keeps the existing selection. Daily rate falls back to asset rate; invalid total parses as zero. AI Fill extracts a draft from text; inspect dates, asset and amounts before save. UI controls are present under view:rentals, but server writes may be rejected.
Verify saved status/amount and check for a committed record before retrying an error. Delete confirms. Download contract opens a locale-selectable PDF dialog; check file/toast. PDF does not prove signature, payment or deposit.
Related: Assets and calendar · Reports
Write permissions and completion effects
Creating needs create:rentals, editing edit:rentals, deleting delete:rentals. The edit form sends an asset selection, but the update service retains the original asset: reload to verify the actual assignment. Daily rate and total are stored separately, not recalculated from dates. Changing an existing booking to completed with positive total and no linked invoice automatically creates a locally issued invoice, treating the saved total as net and adding 22% VAT.
It records bank transfer and zero paid; it does not collect payment or transmit a fiscal document. Creating a booking directly as completed does not run that update-only invoicing branch. Booking state and asset availability may save before invoice creation/linking fails: inspect both booking and invoice registers before retrying. Deleting an active booking is blocked; deleting another booking does not cancel its invoice. Asset deletion is blocked by confirmed/active bookings.