|
Download CONTRACT.md from RegalFire/GCC-InvoiceMath-Verified: direct link, hf CLI and curl.
- Browser
- Download file 2.98 kB
-
https://huggingface.co/datasets/RegalFire/GCC-InvoiceMath-Verified/resolve/main/CONTRACT.md
- Command line
-
hf download hf://datasets/RegalFire/GCC-InvoiceMath-Verified/CONTRACT.md
-
curl -L -o CONTRACT.md https://huggingface.co/datasets/RegalFire/GCC-InvoiceMath-Verified/resolve/main/CONTRACT.md
2.98 kB
Invoice math contract v1.0
This is an explicit software-testing contract, not a national tax rulebook.
The input is only invoice plus this contract. Do not feed expected labels, family, mutation or provenance to a model being evaluated. A challenge file strips these fields. country is research metadata; currency precision determines calculation.
- Currency precision: SAR/AED/QAR two decimals; KWD/BHD/OMR three. Precision facts checked against SIX on 2026-09-30. These are the benchmark's arithmetic precision, not a statement that every e-invoice standard permits that precision in every field.
- All quantities/prices/allowances/charges/rates are nonnegative; quantity > 0. Rate is an explicitly supplied fraction from 0 to 1; no jurisdiction-specific tax rate is inferred. Negative line net is forbidden.
- Line net = round-half-up(quantity × unit_price − allowance + charge, currency precision).
- Line tax = round-half-up(line net × rate, currency precision). Tax is rounded per line, NOT on an invoice group or subtotal. This choice is part of the synthetic contract and may differ from a real tax standard.
- Net = sum(line net). Tax = sum(line tax). Gross = net + tax. Due = gross − prepaid. Prepaid must be an exact nonnegative currency amount no greater than gross.
- Credit notes contain positive line magnitudes and zero prepaid. Negate the final net/tax/gross/due for credit notes. This sign convention is explicitly synthetic.
- Output all four canonical ASCII decimal strings with exactly currency precision.
validmeans all claimed totals exactly equal these strings numerically.error_fieldslists mismatched claimed fields in net,tax,gross,due order. A wrong net claim does not cascade into the expected gross: recompute each from original lines. - Numeric styles are ASCII with dot decimal, Arabic-Indic digits with U+066B decimal, and either with three-digit grouping (comma or U+066C). In grouped style the leading group is one to three digits and later groups exactly three. Minus is ASCII U+002D. No mixed digit alphabets, whitespace, bidi controls, exponent notation, currency symbols, or NaN/Infinity. These excluded parser cases are tested by controls, not claimed as coverage families in the dataset.
- Ten designed families cover ties, per-line rounding, allowance, charge, prepayment, credit note, large precision stress, zero rate, mixed rates and zero due. Large-value stress is intentionally unrealistic to reveal binary floating-point errors. It is not an estimate of GCC invoice values.
- Every positive/negative pair differs in one claimed total by one minor unit. Keep pairs together in splits. There are five parameter variations per currency/family, not 600 independent business processes. No dialect or natural-language authenticity claim.
The benchmark excludes XML/UBL schemas, signing, QR codes, identification, real tax semantics, regulatory certification, OCR, exchange rates, and payment reconciliation.