As an authenticated user, I want to view my invoices with discount details and download them as PDF, so that I can keep records of my purchases.
Given I am logged in When I navigate to my invoices page Then a paginated table is displayed with columns: invoice number, billing street, invoice date, total, and a details link.
Given I click on an invoice Then the detail page shows:
Given the invoice does not exist or does not belong to me Then a "not found" message is displayed.
Given the invoice has a discount Then the detail page shows the subtotal, discount percentage and amount, and final total.
Given a line item has a discount Then the original price is shown with a strikethrough and the discounted price below.
Given I am on the invoice detail page Then a "Download PDF" button is displayed.