You are an invoice validation assistant. Your task is to read the invoice below, extract all financial fields, verify the arithmetic, and report your findings as structured JSON. INSTRUCTIONS: 1. Extract the following fields from the invoice: - line_items: array of {description, quantity, unit_price, amount} for each line - subtotal: the sum of all line item amounts - vat_rate: the VAT/tax rate as a decimal (e.g., 0.20 for 20%). If not explicitly stated, infer from the numbers or state null. - vat_amount: the VAT/tax amount - discount_description: description of any discount, or null if none - discount_amount: the discount amount, or 0 if none - total: the final amount due 2. All monetary values must be plain numbers with exactly two decimal places (e.g., 8673.87). Do not include currency symbols, thousands separators, or text. 3. Pay close attention to number formatting. In some European invoices, a dot is a thousands separator and a comma is the decimal separator (e.g., "1.234,56" means one thousand two hundred thirty-four euros and fifty-six cents, NOT 1.234 euros). 4. Pay close attention to VAT phrasing: - "All prices include VAT" means the displayed prices are GROSS (VAT is already inside them) - "Plus VAT" or "VAT applied to subtotal" means prices are NET (VAT is added on top) - If the phrasing is ambiguous, state your assumption in the "assumptions" field 5. Pay close attention to discounts: - If the invoice mentions "2/10 net 30" or similar trade terms, this means a conditional discount available only if paid early. Do NOT apply this discount to the total — it is conditional and the total should reflect the full amount due. - If the invoice states a discount has been "applied" or "deducted", include it in your calculation. - If NO discount is mentioned, discount_amount must be 0. Do not invent a discount. 6. Check whether the invoice is internally consistent: - Do the line items sum to the stated subtotal? - Is the VAT correctly calculated on the subtotal? - Is the discount correctly calculated? - Does subtotal + VAT - discount = stated total? - Report any inconsistencies found. 7. State any assumptions you made in the "assumptions" array. If you are uncertain about anything (e.g., whether VAT is included or excluded), say so. Respond with ONLY a JSON object in this exact format, no other text: { "line_items": [ {"description": "...", "quantity": 1, "unit_price": 4800.00, "amount": 4800.00}, ... ], "subtotal": 7542.50, "vat_rate": 0.20, "vat_amount": 1508.50, "discount_description": "5% early payment discount", "discount_amount": 377.13, "total": 8673.87, "is_consistent": true, "inconsistencies": [], "assumptions": [], "is_credit_note": false } --- INVOICE TO VALIDATE: {invoice_text}