October queue
One card per return, built live from the check results. Tax due is the total on the prepared return.
Loading…
Checks by return
Which check fired on which return. One block-level hit is enough to stop a return; review-level hits send it to full review.
Loading…
What each check found
Line comparisons allow $1 for rounding; collected_vs_due uses $25 and swing uses 30% and $2,000. Open a check to see its SQL.
Try your own query
Tables: transactions, return_lines, returns, rates, exemption_certificates, registrations, merchants, jurisdictions. Views: txn_rated (each sale with its rates and treatment), expected_lines (each return line recomputed from the sales), reported_lines.
Planted errors
Six errors were planted in the October returns:
- A local rate rose on October 1 and one return kept the old rate.
- A sale was treated as exempt under a certificate that expired the day before the month started.
- Marketplace sales (where the marketplace collects the tax) were taxed again instead of deducted.
- A merchant's first sales into a new local district were left off the return.
- A merchant had sales in a registered state but no return was prepared.
- One day of sales in one local district never reached the return.
Plus one real event that is not an error: a promotion pushed one merchant's taxable sales up 47%. That return should go to review, not be blocked. The tests assert that each error is caught by the right check, that the clean merchant raises nothing, and that the spike lands in review rather than blocked.
Two rules in the operating plan are not in the demo: a customer's first return in a state always gets full review, and 10% of the sampled pool is drawn for a full read each cycle.