MMOframework
Why AI Playground Libraries Documentation Search Agency
FR EN
Index
# Invoices, with a PDF export Give this text, as is, to the agent. It names no class of any framework: the same text for every stack. --- Add invoices to this application. An invoice has a number (unique, like `2026-0001`), a customer name, an issue date, and lines; a line has a label, a quantity and a unit price. Its total is the sum of its lines' quantity times unit price, in euros, with two decimals. 1. Store invoices in the application's database (SQLite is fine), with a few sample invoices to start from. 2. A page lists the invoices: number, customer, date, total, newest first. 3. Each invoice has a page showing everything about it, lines included, and a button that downloads it as a PDF (the number, the customer, the date, the lines and the total). 4. A form creates an invoice with its lines. It refuses an empty customer, a line without a label, a quantity or a price that is not a positive number, and a number that already exists, saying what is wrong. 5. Add tests: the total, the refusals of the form, and the PDF being produced. Done means: the list, an invoice's page, its PDF and the form work in a browser; the application's own test suite passes, the new tests included; nothing else was broken.