feature/contract-export-import #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/contract-export-import"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
- Added GET /exports/contrat/{booking_id} endpoint for contract generation - Fixed tax calculation: uses tax_per_day * adults * nights fallback logic - Uses property.tax_per_day and booking.adults_count when tax fields not set - Contract template at /backend/templates/contrat_template.docx - Filename format: YYYY.MM.DD NOM PRENOM PROPERTY.docx - All tests pass- Hide 'type' select when creating new entry (pre-filled based on button clicked) - Show type as read-only tag when editing - Pass data_type to openNewDialog from button clicks ('tax_per_day' or 'deposit_percentage') - InputNumber step now uses formData.data_type (supports 0.01 step for tax) - All 46 backend tests pass, frontend builds successfully- Added mode='decimal' and allowEmpty to InputNumber for float keyboard input - Fixed getOfficialData return type (array directly, not {data:[]}) - Updated loadData to use response directly - Frontend builds, backend tests passBackend: - Added has_dog column to Booking model (0/1) - Excel import reads 'Chien' column and sets has_dog - Contract generation includes email, has_dog, dog_deposit_amount placeholders - Dog deposit fixed at 50€ if has_dog, otherwise hidden in template - Fixed € symbols on deposit_amount, deposit_paid, amount_due_at_checkin Frontend: - Added has_dog field to Booking types and form - Checkbox in BookingsView for dog flag - Included in create/update booking API calls Template updates: - Added {{tenant_email}} placeholder - Added {{has_dog}} with conditional display (Oui/Non) - Added {{dog_deposit_amount}} (50€ if dog, 0€ otherwise) - Fixed € symbols on all monetary placeholders - Removed hardcoded '63000' from tenant address All 46 backend tests pass, frontend builds successfully- Added {{dog_deposit_paragraph}} placeholder in backend - Only shown when has_dog = true (booking.has_dog == 1) - Paragraph text: 'Un chèque de [dog_deposit_amount] € sera demandé au locataire à son entrée dans les lieux. Il lui sera restitué en fin de séjour et ne sera encaissé que dans le cas où le ménage n'aurait pas été fait correctement.' - Empty string when no dog (nothing displayed) - All 46 tests pass, frontend builds successfully