HALOWERK: Recompute an invoice from its line items: totals, tax per rate, discounts and ro
invoice_auditRecomputes invoice totals from line items, compares net, tax, and gross against stated values, and reports every discrepancy with exact amounts.
Instructions
Recompute an invoice from its line items: totals, tax per rate, discounts and rounding, and report every deviation with the exact amount.
Kostenpflichtig: 0.002 USDC je Aufruf. Bezahlt per x402 auf Base, ohne Konto. Hoechstens 0.002 USDC je Aufruf.
Rebuilds an invoice from its lines and compares the result with the stated totals. Line by line it checks quantity times unit price against the line total, applies line and document discounts in the right order, groups the net amounts by tax rate and computes the tax per group, then compares net, tax and gross with what the document claims. All arithmetic runs in whole cents, because adding decimal amounts as floating point produces cent-level noise that reads like an error by the issuer when it is an error by the checker. Rounding differences up to one cent per tax group are reported separately from real discrepancies. It also checks the formal side: a due date before the invoice date, a tax rate that is not one of the country standard rates, a negative line without a credit-note marker, and a missing VAT number where the reverse charge is claimed. Preis 0.002 USDC je Aufruf, Abrechnung über x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | The invoice lines. | |
| country | No | Country whose standard rates the tax rates are checked against. | |
| currency | No | ||
| due_date | No | Due date as YYYY-MM-DD. | |
| stated_net | No | Net total as stated on the invoice. | |
| stated_tax | No | Tax total as stated. | |
| invoice_date | No | Invoice date as YYYY-MM-DD. | |
| stated_gross | No | Gross total as stated. | |
| reverse_charge | No | Whether the invoice claims the reverse charge. | |
| default_tax_rate | No | Tax rate for lines that do not carry one. | |
| customer_vat_number | No | Customer VAT number, required for the reverse charge. | |
| document_discount_pct | No | Discount on the whole document, applied after line discounts. |