rentease/internal/view
Ruidy cf1620592a
create invoice (#39)
### TL;DR

Enhanced invoice generation with improved formatting and Euro symbol display

### What changed?

- Added Euro symbol (€) to monetary values in the invoice template
- Implemented new invoice data structure with dedicated types for lines and payments
- Created ToInvoice method to properly format booking data for invoice generation
- Added HTML template parsing and rendering functionality
- Improved date formatting for consistency
- Added new API endpoint for booking creation

### How to test?

1. Create a new booking through the API
2. Navigate to the PDF generation endpoint
3. Verify that monetary values display with Euro symbol
4. Check that dates are properly formatted
5. Confirm that payment history and totals are correctly calculated
6. Validate that the generated HTML maintains proper formatting

### Why make this change?

To improve invoice readability and consistency by standardizing monetary value display and providing better data structure for invoice generation. This change also makes the system more maintainable by separating concerns between data transformation and presentation.
2025-02-04 11:34:14 +01:00
..
layout improve header layout 2025-01-08 13:52:35 +01:00
booking_by_id.templ create invoice (#39) 2025-02-04 11:34:14 +01:00
booking_by_id_templ.go create invoice (#39) 2025-02-04 11:34:14 +01:00
booking_form.templ improve layout 2024-11-25 14:58:18 +01:00
booking_form_templ.go improve header layout 2025-01-08 13:52:35 +01:00
booking_lines.templ use daisyUI (#25) 2024-11-16 19:24:26 +01:00
booking_lines_templ.go improve header layout 2025-01-08 13:52:35 +01:00
booking_list_viewmodel.go split view models 2024-07-15 16:59:23 +02:00
booking_viewmodel.go Raw 34 enable payments (#35) 2025-01-24 17:30:35 +01:00
bookings_list.templ improve layout 2024-11-25 14:58:18 +01:00
bookings_list_templ.go improve header layout 2025-01-08 13:52:35 +01:00
bookings_new.templ improve layout 2024-11-25 14:58:18 +01:00
bookings_new_templ.go improve header layout 2025-01-08 13:52:35 +01:00
item_list.templ fix: only update the payments on payment creation 2025-01-25 00:21:30 +01:00
item_list_templ.go fix: only update the payments on payment creation 2025-01-25 00:21:30 +01:00
item_list_viewmodel.go Raw 34 enable payments (#35) 2025-01-24 17:30:35 +01:00
item_viewmodel.go Raw 34 enable payments (#35) 2025-01-24 17:30:35 +01:00
line_item.templ Raw 34 enable payments (#35) 2025-01-24 17:30:35 +01:00
line_item_templ.go Raw 34 enable payments (#35) 2025-01-24 17:30:35 +01:00
login.templ use daisyUI (#25) 2024-11-16 19:24:26 +01:00
login_form.templ use daisyUI (#25) 2024-11-16 19:24:26 +01:00
login_form_templ.go improve header layout 2025-01-08 13:52:35 +01:00
login_form_viewmodel.go split view models 2024-07-15 16:59:23 +02:00
login_templ.go improve header layout 2025-01-08 13:52:35 +01:00
payment.templ fix: only update the payments on payment creation 2025-01-25 00:21:30 +01:00
payment_templ.go fix: only update the payments on payment creation 2025-01-25 00:21:30 +01:00
report_line_viewmodel.go split view models 2024-07-15 16:59:23 +02:00
report_section.templ use daisyUI (#25) 2024-11-16 19:24:26 +01:00
report_section_templ.go improve header layout 2025-01-08 13:52:35 +01:00
report_viewmodel.go split view models 2024-07-15 16:59:23 +02:00
reports.templ style: Improve page layout with wider container and added margin 2024-12-24 18:03:04 +01:00
reports_templ.go improve header layout 2025-01-08 13:52:35 +01:00
success.templ success page 2024-03-15 10:47:09 +01:00
success_templ.go improve header layout 2025-01-08 13:52:35 +01:00