AllMarkets Trading

Inspect the arithmetic and keep control of the record.

Supported currency and precision

USD, EUR, GBP, CAD and AUD are supported as two-decimal currencies. Quantity accepts up to three decimal places. Unit prices and percentages accept two. Plain non-negative decimals are required; credit notes, negative lines, multi-currency invoices, zero-/three-decimal currencies and automated exchange rates are outside this model.

Order of calculation

  1. Multiply scaled quantity by unit price, then round each extended line half up to currency cents.
  2. Calculate a document percentage discount from that rounded subtotal, or use a fixed entered discount.
  3. Allocate discount proportionally to line cents. Distribute leftover cents by largest remainder, with earlier line order breaking a tie.
  4. Calculate each line’s tax after discount. Exclusive tax adds rounded base×rate. Inclusive tax extracts rounded gross×rate/(1+rate).
  5. Sum the rounded line net and tax amounts. Recorded payment reduces balance due; any excess is shown separately as overpayment.

The implementation uses scaled integer arithmetic. This is a stated generic arithmetic convention, not a determination of jurisdiction-specific tax rounding or invoice compliance. Shipping or other charges must be entered as explicit lines with their own chosen rate.

Limits and dates

Use 1–50 lines and quantity greater than zero up to 10,000. A document amount is capped at 1,000,000,000,000 currency units. Due date cannot precede issue date. Supported years are 1900–2200. Receipt mode requires a positive amount recorded paid, a payment date and payment method/reference. These inputs do not establish that a transaction occurred.

Privacy and drafts

Invoice code processes inputs locally and does not send them to a calculation, email or payment API. No draft is saved until you choose Save. Load replaces current inputs; Delete removes the one shared invoice draft for this site in this browser. Storage is not encrypted by this tool or synchronized. Clearing browser storage removes it. Normal hosting and the site’s existing infrastructure can log page requests.

JSON, CSV and HTML may contain addresses and payment notes; keep exports private. Imported JSON is bounded, checked against the versioned field schema and recalculated. Unknown fields and invalid amounts are rejected. Uploaded content is not executed as HTML.

File definitions and verification

Editable Word templates contain a blank page and a distinct invented example; they do not contain automatic accounting formulas. Their PDFs are printable renditions. The generator’s JSON is the reusable input record; CSV is an audit breakdown; HTML is a standalone printable result. Save PDF uses the browser print dialog.

References and scope

GOV.UK invoice guidance is jurisdiction-specific context; this generic tool does not claim UK VAT compliance. The IRS supporting-record overview explains recordkeeping context for US businesses. Sources checked 17 October 2026. AI-assisted implementation; no professional legal or tax certification claimed.