DODIL BLOG
DocsLog inSign up

Modules / Tax

Tax (VAT)

The right VAT on every quote, order and invoice without anyone choosing a rate: standard, reduced, zero, exempt and reverse charge worked out from what you sell and who you sell it to, rounded the way HMRC allows, and frozen on the invoice so a rate change never rewrites what a customer received.

People ask for it as: “VAT”, “the right tax on invoices”, “reverse charge”, “zero-rated exports”, “we're not VAT registered yet”, “the VAT rate changed”, “file our VAT return”, “Making Tax Digital”, “check a customer's VAT number”, “CIS deductions”, “bad debt relief”, “flat rate scheme”, “cash accounting”, “postponed import VAT”, “EC sales list”

Who uses it

RoleDoesSees
Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)records the VAT registration, keeps tax codes, rates, categories, treatments and the rules that join themeverything
The owner or a finance controllersets the controls on whoever keeps VAT (whether a rate, rule or registration change waits for a second person, who approves an override that lowers tax, the business time zone)everything
Whoever raises orders and invoicessees the tax worked out on a document, records a customer's VAT number, overrides a line's code with a reasontax codes, a document's tax
The systemloads the country's codes, determines and computes tax for a document in its direction (sale or purchase), suggests a code where no rule covers a line, checks its contents, freezes it at issue, runs the one-off Odoo migration; v4 - reads HMRC obligations, liabilities and payments, checks VAT numbers, answers whether a tax point is filed, computes a CIS deduction and records one suffered, records import entries, finds bad debts eligible for reliefeverything, through its own service account (one service client per calling brick, each with only its exact grants)

What it has to do

Reference user stories. Each has a test written into it — the given / when / then — which becomes an automated check once it is built. Expect to keep some, change some and drop some.

Things people do

  • TAX-01As the person responsible for VAT, I want to record whether and from when we are VAT registered, so that we charge VAT exactly when we must and never before.

    Given a business not registered for VAT · when I record registration number GB123456789 from 2027-01-01 · then documents with a tax point before 2027-01-01 charge no VAT and are not titled "VAT invoice"; from that date the rules apply and the number prints on every VAT invoice; registration with no number is refused, and so is one from today or earlier (documents already used "not registered" for those days): the readiness answers {gate: starts_after_today, met: false, reason: "a registration starts tomorrow at the earliest", fix: "Tax settings > Registration"}

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Tax settings · reference: not built

  • TAX-02As the tax admin, I want the UK codes ready on day one, so that I am correcting a list rather than building one.

    Given a new installation for a UK business · when I open the tax codes · then the UK pack is there: S standard 20%, R reduced 5%, Z zero 0%, E exempt, OS outside the scope, RC domestic reverse charge (VAT due 20%, charged 0%), NV no VAT (not registered); each with its treatment and its wording on the document; I can add, rename or retire a code, never delete one a document used

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Tax codes · reference: not built

  • TAX-03As the tax admin, I want to schedule a rate change from a date, so that the change happens at midnight without anyone editing invoices.

    Given code S at 20% from 2011-01-04 · when I add 21% from 2027-04-01 · then a tax point on 2027-03-31 charges 20%, on 2027-04-01 21%; documents already issued are unchanged; a second rate for the same code and date is refused, and so is a rate from today or earlier; the 21% row may be withdrawn until 2027-04-01, after which a correction is a new row from tomorrow, never an edit; where the owner's control asks for it, the change waits for a second person's approval

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Tax codes · reference: not built

  • TAX-04As the tax admin, I want rules that pick the code from what is sold and who buys it, so that nobody chooses a rate on an invoice.

    Given rules: (standard, uk_business) -> S; (standard, overseas_business, services) -> OS; (construction_service, uk_cis_contractor) -> RC; (reduced, any) -> R · when a line of category standard is added for a UK business, and the same line for an overseas business buying services · then S at 20% for the first, OS with no VAT for the second, each line naming the rule that chose it; a pair no rule covers is refused with "no tax rule for (category, treatment)" rather than defaulting to 0%; a rule is a dated row: a new rule for a pair no rule covers yet may start today, a change to a covered pair starts after today

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Tax rules · reference: not built

    Usually different per customer: which categories and treatments exist; most UK service businesses need four rules

  • TAX-05As the biller, I want to record a customer's VAT treatment and number once, so that every document for them is taxed the same way.

    Given a customer with bp_id 7311 and no treatment · when I set treatment uk_business with VAT number GB987654321 · then their documents are determined from the treatment valid on each tax point; the first treatment of a customer holds from the start (no document could issue without one); a change is a new row from tomorrow and applies to documents not yet issued with a tax point from then; treatments that need a VAT number (reverse charge, overseas business) refuse to save without one

    Whoever raises orders and invoices · screen: Customer tax · reference: not built

  • TAX-06As the biller, I want to override a line's tax code with a reason, so that an unusual supply is handled without a new rule, and the override is visible.

    Given a draft invoice line determined as S · when I change it to Z with the reason "export of goods, proof of export held" · then the line shows Z, the reason and who changed it; where the override lowers the tax, it waits for approval by a holder of tax:document_tax:approve_override who is not me (unless the owner's control allows self-approval with a reason) before the document can issue

    Whoever raises orders and invoices · screen: Document tax · reference: not built

  • TAX-07As the tax admin, I want to choose how VAT is rounded, from the methods HMRC allows, so that our invoices match what we file.

    Given three lines of 10.03 at 20% (VAT 2.006 each, 6.018 in all) · when the invoice is computed under each method · then per_invoice_round_down: VAT 6.01 (para 17.5); per_line_nearest: 2.01 x 3 = 6.03 (17.5.1); per_line_down_0_1p: 2.006 x 3 = 6.018, total rounded down to 6.01 (17.5.1); a retail setting refuses both round-down methods (17.6); net + VAT = total every time (30.09 + 6.01 = 36.10, or 30.09 + 6.03 = 36.12)

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Tax settings · reference: not built

  • TAX-08As the tax admin, I want prices that include VAT to be handled, so that a consumer price of 12.00 is 10.00 plus 2.00 on the invoice.

    Given a price list with prices including VAT and a line at 12.00 under S · when the document's tax is computed · then net 10.00, VAT 2.00, total 12.00; the gross stays the price the customer was shown

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Document tax · reference: not built

  • TAX-09As the biller, I want to accept or reject the code the AI suggests for a line no rule covers, so that an unusual line is taxed by a person's decision with the reason kept.

    Given a draft invoice line "on-site training, Dublin office" with no product, and ai_suggest_code in suggest mode · when the AI suggests OS with "services to an overseas business are outside the scope (VAT Notice 741A)" and I accept it · then the line takes OS, recorded as an override with the reason, the suggestion, its confidence, the model and me as the person who accepted; rejecting leaves the line refused until I choose a code; an accepted code that lowers tax below the category's standard code waits for approval as in TAX-06; nothing is applied without a person

    Whoever raises orders and invoices · screen: Document tax · reference: not built

  • TAX-14As the owner, I want to set the controls on whoever keeps VAT, so that the person who changes a rate or lowers a line's tax cannot also waive the check on it.

    Given a tax admin who is also the biller · when I set tax_changes_need_second_person true and the business time zone Europe/London · then a rate, rule or registration change waits for a second holder of tax:code:approve; "today" is the date in Europe/London; a tax admin holding tax:settings:write is refused on these controls

    The owner or a finance controller · screen: Tax settings · reference: not built

  • TAX-26As the owner, I want to connect our VAT registration to HMRC once, so that obligations are read and returns are filed from here without bridging software.

    Given registration GB123456789 recorded and no HMRC connection · when I choose Connect to HMRC and sign in to HMRC's Government Gateway as our business, granting read:vat and write:vat · then the connection is recorded (vrn, scopes, authorised_by, authorised_at, expires_at: HMRC's grant lasts 18 months); the tokens are kept in the platform's secret store, never in a row or a log; until it exists every return transition answers {gate: hmrc_connected, met: false, reason: "this business is not connected to HMRC", fix: "Tax settings > HMRC connection (the owner)"}; 30 days before expiry the owner is told to reconnect; hmrc_environment (sandbox | production, an owner's control) decides which HMRC base URL is called

    The owner or a finance controller · screen: Tax settings · reference: not built

  • TAX-28As the tax admin, I want the VAT return for an open period prepared from what we invoiced and were billed, so that every box is a sum of frozen document tax I can drill into.

    Given obligation 26AD (2026-10-01 to 2026-12-31); frozen sale documents with output VAT 41,200.00 on net 206,000.00 (of which RC construction sales net 12,000.00 with no VAT); purchase documents with reclaimable input VAT 9,850.00 on net 49,250.00, non-reclaimable 140.00; one supplier bill dated 2026-09-28 received late and not in any return; NI dispatches to the EU net 3,000.00 · when I prepare the return · then box 1 = 41,200.00 output VAT plus reverse-charge and postponed-import output VAT; box 2 = VAT on NI acquisitions of goods from the EU; box 3 = 1 + 2; box 4 = reclaimable input VAT (incl. reverse-charge and postponed-import input, bad debt relief claimed); box 5 = |3 - 4|; boxes 6-9 the net values in whole pounds (pence dropped, HMRC's rule): 6 sales incl. RC net and zero-rated, 7 purchases, 8 NI goods to the EU, 9 NI goods from the EU; each document's tax enters ONE return only (a vat_return_entry row keyed [document_ref, tax_code], claimed with a plain INSERT, so two concurrent preparations never count it twice); the late bill dated 2026-09-28 enters this return (input VAT is claimed in the period the VAT invoice is held); every box drills to its entries; preparing again replaces only this draft's entries; the return is draft until locked

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-29As the tax admin, I want to correct an error from an earlier period on this return when HMRC allows it, and be stopped when it must be notified instead, so that corrections follow VAT Notice 700/45.

    Given a draft return with box 6 of 400,000; an under-declared output VAT of 3,200.00 found for period 26AB · when I record the adjustment with the reason and the period it corrects, and then try one of 12,000.00 · then the 3,200.00 adds to box 1 with its reason and period (net errors within 10,000.00, or within 50,000.00 and 1% of box 6, are corrected on the next return; the thresholds are dated tax_statutory rows); the 12,000.00 exceeds both (1% of 400,000 is 4,000) and is refused with {gate: within_error_threshold, met: false, reason: "net errors of 12,000.00 exceed what may be corrected on a return (Notice 700/45)", fix: "notify HMRC on form VAT652 and record the notice"}; a notice records the reference, the date sent and the periods; an error older than four years is refused (the four-year cap)

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-30As the person who signs off VAT, I want to submit the locked return to HMRC with the legal declaration, so that it is filed digitally and the receipt is kept.

    Given return 26AD locked by the tax admin; vat_return_needs_second_person true; the HMRC connection valid · when I read the boxes, tick "When you submit this VAT information you are making a legal declaration that the information is true and complete. A false declaration can result in prosecution." and submit · then POST /organisations/vat/123456789/returns with {periodKey, vatDueSales, vatDueAcquisitions, totalVatDue, vatReclaimedCurrPeriod, netVatDue, totalValueSalesExVAT, totalValuePurchasesExVAT, totalValueGoodsSuppliedExVAT, totalAcquisitionsExVAT, finalised: true} and the fraud-prevention headers (TAX-31); HMRC's receipt (processingDate, formBundleNumber, paymentIndicator, chargeRefNumber) is stored and the return is submitted and immutable; the person who locked it may not submit it while the control is on (the same identity by email OR sub is refused); submitting a return whose obligation HMRC already shows F is refused (HMRC's DUPLICATE_SUBMISSION is recorded, never retried); a timeout leaves it submitting, and a re-read of GET /returns/{periodKey} settles whether HMRC has it before any retry

    The owner or a finance controller · screen: VAT returns · reference: not built

  • TAX-32As the tax admin, I want to see what we owe HMRC per period and what HMRC says we have paid, and the books to agree, so that a VAT payment is never missed or posted twice.

    Given return 26AD submitted with box 5 = 31,350.00 to pay, due 2027-02-07 · when I open the liability view after HMRC has taken the direct debit · then per period: the return's net VAT, HMRC's liabilities (GET /liabilities) and payments (GET /payments) as HMRC holds them, the outstanding amount and the due date (one month and seven days after the period end); on submission the settle journal posts to the ledger (each tax code's VAT against vat_control, journal id derived from the return), once; the HMRC payment itself is the bank line payments reconciles to vat_control (PAY-21); a difference between our box 5 and HMRC's liability is shown, never hidden

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-34As the tax admin, I want to claim back the VAT on invoices a customer never paid, once the law allows, so that we do not pay HMRC VAT we never received.

    Given invoice INV-2026-0107 (net 1,000.00, VAT 200.00, total 1,200.00), supplied 2026-03-10, due 2026-04-09, VAT accounted in submitted return 26AA; 480.00 received; written off by invoicing on 2026-10-30 (AR-09); today 2026-11-02 · when the system lists it as eligible and I claim it on return 26AD · then relief = the VAT fraction of the unpaid consideration: (1,200.00 - 480.00) x 200/1,200 = 120.00, added to box 4 with the invoice named (bad_debt_claim keyed invoice_id, one claim per invoice); eligibility is each gate {gate, met, reason, fix}: six_months_passed (six months from the later of the due date and the supply date: 2026-10-09 here), written_off (an approved ar write-off or the receivable written off in the books), vat_accounted (the invoice's tax is in a submitted return), within_time_limit (four years and six months from that date), not_claimed; a claim for an invoice still inside six months is refused with its date

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-36As the tax admin of a small business on cash accounting, I want the return to tax what we were paid and what we paid, so that we never pay VAT before the customer pays us.

    Given registration with accounting_basis cash from 2027-01-01 (expected taxable turnover 900,000, within the 1,350,000 joining limit); invoice INV-2027-0012 (VAT 200.00) issued 2027-01-15 and paid 2027-04-03; a supplier bill (input VAT 50.00) paid 2027-03-20 · when return 27AA (Jan-Mar) and 27AB (Apr-Jun) are prepared · then the invoice's VAT is in 27AB (the receipt date is the tax point for the return), the bill's input VAT in 27AA (the payment date); a part payment taxes the VAT fraction of what was received; read from payments' cash-basis route (receipts allocated in the period, by invoice) and purchasing's supplier payments; documents excluded from the scheme (an invoice payable more than six months ahead, an import) stay on the invoice basis; leaving the scheme (turnover above 1,600,000) brings every outstanding VAT into the return for the leaving period; the basis changes only from the start of a VAT period after today

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-37As the tax admin of a business on the flat rate scheme, I want the VAT due computed as our flat rate of gross turnover, so that I file the right figure without a side spreadsheet.

    Given flat_rate from 2027-01-01 at 14.5% (sector "computer and IT consultancy"), first year of VAT registration (1% discount until 2027-12-31); quarter turnover including VAT 60,000.00; goods costs 300.00 (below 2% of turnover, so the limited cost trader test is applied); a laptop bought for 2,400.00 including VAT · when return 27AA is prepared · then the limited cost trader test is a gate answered first: goods 300.00 are below 2% of 60,000.00 (1,200.00), so the limited cost trader rate 16.5% replaces the sector's 14.5%, less the first-year 1%: box 1 = 60,000.00 x 15.5% = 9,300.00; box 6 = the flat-rate turnover including VAT; box 4 holds only capital goods costing 2,000.00 or more including VAT (the laptop's 400.00); the sector, its rate and the thresholds are dated rows (tax_statutory, registration); joining needs expected taxable turnover at most 150,000 excluding VAT; turnover above 230,000 including VAT in a year answers {gate: flat_rate_eligible, met: false} on the next return

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-48As the tax admin of a partly exempt business, I want residual input VAT recovered at our provisional percentage each return and adjusted at the year end, so that we reclaim exactly what VAT Notice 706 allows.

    Given purchase input VAT attributed to taxable supplies 6,000.00, to exempt supplies 900.00, residual 3,000.00; last year's recovery 71%; partial exemption year ending 31 March · when each return is prepared, and the annual adjustment is run after the year ends · then each return reclaims 6,000.00 + 71% of 3,000.00 = 8,130.00; the 900.00 exempt input VAT is reclaimed in full while the de minimis test holds (exempt input tax at most 625.00 a month on average and at most half of all input tax: test 1/2/3 of Notice 706 answered as gates); the annual adjustment recomputes the year's percentage (taxable supplies / all supplies, rounded UP to a whole percent while residual input tax averages at most 400,000 a month) and puts the difference on the first return after the year end; attribution (taxable | exempt | residual) is a property of the purchase tax code, so purchasing's lines carry it without a new field

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-49As the tax admin of a partly exempt business, I want input VAT on a building or a large computer system adjusted each year as our taxable use changes, so that the Capital Goods Scheme is applied without a spreadsheet.

    Given a building bought 2026-06-01 with input VAT 100,000.00 (an item of 250,000.00 or more: ten intervals), first-year recovery 80%; year-two recovery 70% · when the annual adjustment for year two is run · then the item is recorded once (capital_goods_item keyed item_ref) with its VAT, intervals (10 for land and buildings, 5 for computers of 50,000.00 or more, both tax_statutory rows) and first-interval percentage; year two adjusts (100,000.00 / 10) x (70% - 80%) = -1,000.00 onto the first return after the year end, as an adjustment entry naming the item and interval; each interval is adjusted once; a sale of the item in its adjustment period answers a gate asking for the disposal adjustment

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: VAT returns · reference: not built

  • TAX-38As the contractor's tax admin, I want each subcontractor verified with HMRC before we pay them, so that the deduction rate is HMRC's, not a guess.

    Given a new subcontractor bp_id 8801, Bright Sparks Ltd, UTR 1234567890, company number 01234567, not paid in this or the last two tax years · when I verify them · then the verification (HMRC CIS online verification through the HMRC connection, or the result a person read from HMRC's CIS service, entered with the verification number) stores status gross | net | unmatched, the rate 0 | 20 | 30 (dated tax_statutory rows), the verification number (V1234567890 and a suffix for unmatched) and the date; a payment to a subcontractor with no verification answers {gate: cis_verified, met: false, reason: "Bright Sparks Ltd has not been verified with HMRC", fix: "CIS > Subcontractors > Verify"}; one already paid in this or the previous two tax years needs none; a re-verification is a new dated row, never an edit

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: CIS · reference: not built

  • TAX-40As the contractor's tax admin, I want the monthly CIS return prepared from the deductions and the statements sent to each subcontractor, so that the CIS300 is filed by the 19th.

    Given tax month 6 October to 5 November 2026 with three payments to two subcontractors · when I prepare the return, a person confirms the declarations (employment status, verification) and submits it · then a CIS300 per tax month with each subcontractor's name, UTR, verification number, gross paid (excl. VAT), materials and deduction; a nil month is a nil return unless a person records inactivity; submission goes through HMRC's CIS online filing over the HMRC connection, the submission receipt kept, by the 19th (overdue answers a gate with the penalty warning); a payment and deduction statement per subcontractor is produced and sent (due by the 19th); the deductions total is what the business pays HMRC by the 22nd with its PAYE, shown in the liability view

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: CIS · reference: not built

  • TAX-42As the tax admin of a business moving goods from Northern Ireland to EU customers, I want the EC sales list prepared from our invoices, so that it matches box 8.

    Given registration with ni_goods true (XI prefix); in November, invoices of goods to two EU VAT-registered customers: IE1234567T net 12,000.00 and FR12345678901 net 3,000.00, one credit note of 500.00 · when I prepare the November EC sales list and record it submitted · then one line per customer VAT number with the net value in whole pounds (IE 12,000; FR 2,500 after the credit) and indicator 0 (goods) or 2 (triangulation); the total ties to box 8 of the return for the months it covers (a difference is a gate, never silent); monthly, or quarterly while goods stay below 35,000 a quarter for the current and four previous quarters (dated tax_statutory row); the file is HMRC's bulk-upload CSV for the person to upload, and the person records the submission reference and date (HMRC offers no API for it); an amendment is a new version of the declaration

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Trade declarations · reference: not built

  • TAX-43As the tax admin of a Northern Ireland business above the Intrastat threshold, I want the monthly supplementary declaration built from our goods movements with the EU, so that it is filed without retyping.

    Given NI dispatches to the EU above 250,000 a year (dispatches threshold) and arrivals below 500,000 (arrivals threshold), both dated tax_statutory rows · when I prepare November's dispatches declaration · then one line per (commodity code, partner country, nature of transaction, country of origin) with value in whole pounds, net mass in kg and supplementary units where the commodity needs them, partner VAT number; read from ar's issued invoice lines to EU customers with goods (net value, unit_code) and product's commodity code and net weight; a line whose product has no commodity code is a gate {gate: commodity_code, met: false, fix: "Product > the product > Trade"}; arrivals are only declared once the arrivals threshold is passed; the file is HMRC's upload format and the person records the submission

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Trade declarations · reference: not built

  • TAX-45As the tax admin, I want each month's postponed import VAT statement reconciled to our import entries, so that box 1 and box 4 carry exactly HMRC's figures.

    Given the November statement downloaded from the Customs Declaration Service with three entries (MRN, import VAT); our import entries hold two of them, one with a different amount · when I upload the statement · then each statement line is matched by MRN: one matches, one differs (the difference shown with both amounts), one has no import entry; the statement is reconciled only when every line is matched or explained by a person with a reason; the return uses HMRC's figure for a line explained as HMRC's (an adjustment row naming the MRN); the statement file is kept as an object, read-only

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Import VAT · reference: not built

  • TAX-46As the tax admin of a construction business, I want the reverse charge applied only where the customer is VAT- and CIS-registered and not an end user, and self-accounted when we buy such services, so that we never charge or omit VAT wrongly.

    Given customer 7400 (treatment uk_cis_contractor) gives written notice it is an end user; supplier 8801 (VAT- and CIS-registered) bills us specified construction services of 4,000.00 · when I record the end-user notice on 7400 from tomorrow, and the supplier bill is computed with direction purchase · then from that date 7400's construction lines take S at 20% (an end user or intermediary is outside the reverse charge), the notice kept with its date and reference; the purchase is self-accounted with code RC_PURCHASE: VAT 800.00 output (box 1) and input (box 4), net in box 7 and never in box 6; a supply whose reverse-charge services are 5% or less of its value may be taxed normally (the 5% disregard, a gate on the rule the tax admin confirms)

    Whoever is responsible for VAT (the owner, the bookkeeper, the accountant) · screen: Customer tax · reference: not built

Things that happen on their own

  • TAX-10when a document's lines, customer or tax point change (in the same request)The system determines each line's code and computes the document's tax, so that the tax is never typed.

    Given an order with lines in S and Z for a UK business, tax point 2026-11-20 · when it is computed · then per line code, rate and VAT; a per-rate summary (one row per code, net and VAT, zero and exempt as separate totals, para 16.5); the total; computing twice gives the same answer

    · reference: not built

  • TAX-11when the document issuesThe system freezes the tax on the document at issue, so that it is the tax the customer received forever.

    Given an invoice computed at 20%, and a rate change to 21% scheduled for the day after its tax point · when it issues, and is read after the rate change · then it still shows 20%; recomputing an issued document is refused ("issued: credit it instead")

    · reference: not built

  • TAX-12before a document issuesThe system checks the document carries everything a VAT invoice must show, so that an incomplete invoice never leaves.

    Given a VAT-registered business and a draft with no customer address · when issue is asked · then refused with the unmet readiness gates, each {gate, met, reason, fix}, one per absent item from para 16.3.1 (here {gate: customer_address, met: false, reason: "a VAT invoice shows the customer's address (VAT Notice 700 para 16.3.1)", fix: "the customer's address on the business partner"}); a business that is not registered is checked for the opposite (no VAT number, not titled "VAT invoice")

    · reference: not built

  • TAX-13when a reverse-charge or overseas-business treatment is saved, and before such a document issues (v4; was deferred to M2)The system checks the customer's VAT number with HMRC, so that a reverse charge is not applied to someone who is not registered.

    Given treatment uk_cis_contractor with VAT number GB987654321, our own VRN 123456789 · when the number is checked (HMRC Check a UK VAT number API v2.0, GET /organisations/vat/check-vat-number/lookup/987654321/123456789) · then the result (valid, invalid, could_not_check), the name and address HMRC holds, HMRC's consultation number and the date are stored on the treatment row (checked_on, check_result, check_ref); "invalid" refuses the reverse charge with {gate: vat_number_valid, met: false, reason: "HMRC has no registration for GB987654321", fix: "Customer tax: correct the number, or a consumer treatment"}; "could not check" (HMRC down, a non-GB number) answers {gate: vat_number_valid, met: false} with fix "a person confirms the number" and a tax admin may confirm it with a reason; a check older than vat_number_check_days (default 90) is re-run before the next reverse-charge document issues; the AI name comparison (check_vat_number) flags a name that differs from the partner's, as a suggestion only

    · reference: not built

  • TAX-15once, at cutover from Odoo, after the customer has answered migration.odoo.doorThe system loads the customer's Odoo taxes, fiscal positions and customer VAT data as this module's first rows, so that the first invoice after cutover is taxed exactly as Odoo would have taxed it.

    Given an Odoo company with sale taxes 20% S, 0% Z, Exempt, a reverse-charge tax and the fiscal positions "UK", "EU B2B" and "Rest of world" · when the migration runs, and runs again · then tax codes, rates, treatments, rules and customer treatments exist as first rows with the dates the customer gave at the door, the purchase taxes (type_tax_use = purchase) as purchase codes and rules (v3); every row in migration.odoo.reconcile is equal or explained; the second run changes nothing; no issued document's tax is recomputed

    · reference: not built

  • TAX-27daily, and when the VAT returns screen opensThe system reads our VAT obligations from HMRC, so that the periods to file and their deadlines are HMRC's, never typed.

    Given a connection for VRN 123456789, quarterly stagger ending March, June, September, December · when GET /organisations/vat/123456789/obligations?from=2026-01-01&to=2027-12-31 runs, twice · then one vat_obligation row per periodKey (e.g. "26AD": 2026-10-01 to 2026-12-31, due 2027-02-07, status O); a period HMRC reports as F (filed, even if filed elsewhere) is marked filed with its received date; the second run changes nothing; dates are HMRC's, never computed here; an HMRC error is recorded with its code and retried next day

    · reference: not built

  • TAX-31on every call to an HMRC API made for a person (submit, view a return, liabilities, payments)The system sends HMRC's fraud-prevention headers from the person's own session, so that the submission meets HMRC's terms of use.

    Given a submission from a browser session of the owner · when the call is built · then connection method WEB_APP_VIA_SERVER with Gov-Client-Connection-Method, Gov-Client-Browser-JS-User-Agent, Gov-Client-Device-ID, Gov-Client-Multi-Factor, Gov-Client-Public-IP, Gov-Client-Public-IP-Timestamp, Gov-Client-Public-Port, Gov-Client-Screens, Gov-Client-Timezone, Gov-Client-User-IDs, Gov-Client-Window-Size, Gov-Vendor-Forwarded, Gov-Vendor-License-IDs, Gov-Vendor-Product-Name, Gov-Vendor-Public-IP, Gov-Vendor-Version; a header the session cannot supply refuses the submission with {gate: fraud_headers_complete, met: false, reason: "HMRC requires <header>", fix: "submit from the web screen, not a script"}; the headers sent are kept with the submission for audit; the set is validated against HMRC's Test Fraud Prevention Headers API in sandbox before production is switched on

    · reference: not built

  • TAX-35when a return is preparedThe system repays bad debt relief when the customer pays after all, so that the relief and the receipt never both stand.

    Given the claim of 120.00 on INV-2026-0107 in return 26AD; a receipt of 360.00 allocated to it on 2027-02-20 (payments) · when return 27AA is prepared · then the repayment 360.00 x 200/1,200 = 60.00 adds to box 1, naming the claim and the allocation; it is derived from payments' allocations dated after the claim (GET /allocations?invoice_ids=&from=), never typed; the same allocation is repaid once (an entry keyed [claim, allocation]); an undo of that allocation (PAY-06) reverses the repayment on the next return

    · reference: not built

Things that cross into other modules

  • TAX-23when purchasing records or changes a supplier bill or credit (v3)Purchasing asks this module for the input VAT on a bill, with the supplier's treatment and the purchase rules, so that VAT reclaimed is never typed.

    Given a UK VAT-registered supplier (treatment uk_business, its tax_party row); a bill dated 2026-11-20 with a standard-rated goods line of 1,000.00 and a business-entertainment line of 100.00 · when purchasing calls POST /documents/compute with direction: purchase · then the rules are read for (category, the SUPPLIER's treatment, supply, direction purchase): the goods line takes the input code at 20% with VAT 200.00 reclaimable; the entertainment line takes the blocked input code with VAT 20.00 non-reclaimable (it is a cost, not a reclaim); totals carry vat, vat_reclaimable 200.00 and vat_non_reclaimable 20.00; a sale-direction rule is never used for a purchase, and a pair with no purchase rule is refused (never 0%)

    · owned by tax · reference: not built

  • TAX-24when a supplier bill is about to be approved (v3)Purchasing asks this module whether a bill is a valid VAT invoice from the supplier, so that input VAT is reclaimed only on one.

    Given a bill from Acme Supplies Ltd with no VAT number on it, and our own name as the customer · when purchasing calls POST /documents/{document_ref}/check-contents with direction: purchase · then the content gates check the SUPPLIER's name, address and VAT number (and the supplier's invoice number and date, contents.invoice_number and contents.issue_date) and our name as the customer (contents.customer_name; v6: the request carries all of them, purchasing PUR-28): supplier_vat_number is unmet ("the bill shows no VAT number for Acme Supplies Ltd: input VAT cannot be reclaimed on it"); with direction sale the gates still check OUR name and VAT number as v2

    · owned by tax · reference: not built

  • TAX-25when a purchase from an overseas supplier of services is computed (v3)A reverse-charged purchase is self-accounted both sides, so that the return shows the output and the input VAT and the business pays nothing net where it may reclaim.

    Given an overseas supplier (treatment overseas_business) billing consultancy services of 500.00 · when it is computed with direction: purchase · then the line takes the purchase reverse-charge code: charged 0.00, VAT due 100.00 accounted as output (its output reporting box) and 100.00 as input VAT reclaimable (its input box), so the net cost of VAT is 0.00; non-reclaimable where the code's reclaimable_pct is 0

    · owned by tax · reference: not built

  • TAX-20when a quote, order, invoice or credit note is pricedEvery selling document asks this module for its tax rather than computing its own.

    Given a sales order with three lines · when sales-order calls compute(lines, bp_id, tax_point, currency) · then it receives per line code, rate and VAT, the per-rate summary and the total, with the method that rounded them; it stores the answer as its own copy

    · owned by tax · reference: not built

  • TAX-21when an invoice or credit note posts to the ledgerThe ledger finds the VAT account for each code from its account map, so that the VAT liability per code is in the books.

    Given an invoice with S 200.00 and RC 0.00 (VAT due 100.00 by the customer) · when invoicing posts · then output VAT 200.00 credits the S account; RC posts no VAT and is recorded for the return with its net; journal ids derived as the ledger requires

    · owned by gl · reference: not built

  • TAX-22when an invoice is in a foreign currencyThe VAT total is also shown in sterling at the rate the business uses, as the VAT guide requires.

    Given an invoice in EUR with VAT 200.00 EUR and the ledger's rate for the tax point · when tax is computed · then the VAT total in GBP is computed at that rate and frozen with the document (para 16.4); without the ledger, the rate is entered on the document

    · owned by gl · reference: not built

  • TAX-33when ar issues or voids a document, or approves a credit note (the gates tax_point_open and void_policy)Invoicing asks this module whether a tax point falls in a VAT return already locked or filed, so that an issued invoice in a filed period is never voided or back-dated into it.

    Given return 26AC (2026-07-01 to 2026-09-30) submitted, 26AD draft · when ar calls GET /vat-returns/tax-point-status?date=2026-09-15, then ?date=2026-11-20 · then {date: 2026-09-15, period_key: 26AC, status: submitted, filed: true, gate: {gate: tax_point_open, met: false, reason: "2026-09-15 is in VAT return 26AC, submitted 2026-11-04", fix: "credit it instead, or issue with today's tax point"}}; for 2026-11-20 {period_key: 26AD, status: draft, filed: false, gate: {met: true}}; a locked (not yet submitted) return answers filed false with met false (reason "return 26AD is locked for submission"); a date in no obligation answers period_key null, met true (the answer is the L2C leftover's missing callee)

    · owned by tax · reference: not built

  • TAX-39when purchasing approves a payment to a subcontractor (a run or a manual payment)Purchasing asks this module for the CIS deduction on a subcontractor's payment, so that the deduction is HMRC's rate on the labour only.

    Given subcontractor 8801 verified net (20%); a bill of labour 4,000.00, materials 1,000.00, VAT reverse-charged (0.00 charged) · when purchasing calls POST /cis/deductions with the payment · then deduction = 20% x (4,000.00 + 1,000.00 - 1,000.00 materials) = 800.00; purchasing pays 4,200.00 and books the 800.00 to the CIS liability; the deduction row is keyed [payment_ref, bp_id] in the tax month (6th to 5th) of the payment date, so a retry adds nothing; materials above the bill's own figure are refused; an unmatched subcontractor is deducted at 30%; a gross one at 0% with the row still recorded for the return

    · owned by tax · reference: not built

  • TAX-41when payments records a receipt from a contractor customer that deducted CIS (PAY-45)Payments tells this module what a contractor deducted from our invoice under CIS, so that the deduction suffered is claimed back and never lost.

    Given our invoice of labour 2,000.00 to contractor bp_id 7311 (reverse charge, no VAT charged); they pay 1,600.00 and send a payment and deduction statement showing 400.00 deducted for tax month ending 2026-12-05 · when payments calls POST /cis/suffered · then a cis_suffered row keyed [contractor bp_id, statement_ref] with the tax month, gross, materials and deduction; the CIS view sums what was suffered per tax month and year, for the PAYE offset (a limited company's employer payment summary) or self assessment; a deduction above 30% of the labour named is refused; the same statement recorded twice adds nothing

    · owned by tax · reference: not built

  • TAX-44when purchasing records an import (a customs entry on a supplier bill or a freight agent's invoice)Purchasing records each import entry here with how its import VAT was accounted, so that postponed import VAT is self-accounted on the return and import VAT paid is reclaimed only with evidence.

    Given an import from China, customs value 10,000.00, MRN 26GB12345678901234, postponed VAT accounting chosen; a second import where the freight agent paid 2,000.00 import VAT · when purchasing calls POST /imports · then the first is an import_entry with code PVA (rate 20%, charged 0): output 2,000.00 in box 1, input 2,000.00 in box 4 (by the code's reclaimable_pct), value 10,000 in box 7; the second carries code IMPORT_PAID with its 2,000.00 reclaimable only once the monthly import VAT certificate (C79, or its CDS successor) lists the entry; an entry keyed by MRN is recorded once

    · owned by tax · reference: not built

  • TAX-47when ar or sales-order computes a line that reverses or deducts an earlier document (a deposit deduction, a credit-note correction, a settlement discount)A line pinned to an earlier frozen document takes that document's code and rate, so that a deduction or a correction carries the tax it reverses and tax accepts it.

    Given deposit invoice DEP-2026-0003 frozen with S 20% on 5,000.00; a final invoice deducting 2,000.00 of it on 2027-04-15, after S became 21% · when ar calls POST /documents/compute with a line {line_no 4, amount "-2000.00", pinned_from "<deposit invoice_id>", tax_code "S"} · then the line takes S at the deposit's frozen 20% (VAT -400.00), named "pinned to <invoice_id>"; it is never re-determined from category and treatment, so a deduction carries the deposit's category without the source sending one; a pinned code the earlier document does not carry is refused (gate pinned_code); the pinned amount may not exceed the earlier document's net for that code less what earlier pinned lines on issued documents already took (gate pinned_within_original, read from tax's own frozen rows)

    · owned by tax · reference: not built

  • TAX-50when expenses checks a till receipt (EXP-18) or purchasing a small supplier invoice, before VAT is reclaimed on itA less detailed VAT invoice is accepted for what it is, so that VAT on a 9.60 GBP train-station coffee receipt is reclaimed without our company's name on it, and a receipt over the limit still needs a full invoice.

    Given a till receipt from a UK retailer for 9.60 GBP including VAT 1.60 at 20%, showing the retailer's name, address and VAT number, its receipt number, the date and a description; the setting simplified_invoice_threshold 250 · when expenses calls POST /documents/exp:UK01-EXP-2026-00042:3/check-contents with direction purchase and no customer_name, then one with a 312.00 GBP receipt in the same form · then the first is a less detailed invoice (VAT Notice 700 para 16.6.1; VAT Regulations 1995 reg. 16): the gates for the supplier's name, address and VAT number, the invoice number, the tax point, a description, the total including VAT and the rate per line are checked, customer_name and customer_address are not required, and ready is true with title less_detailed_invoice; the second (gross above 250.00) needs our name as the customer (gate customer_name unmet: "a VAT invoice over 250.00 must show your company's name: ask the supplier for a full invoice"); a sale-direction document is unchanged (its own simplified invoice rule); the threshold is in GBP and compared with the gross including VAT, in the document's currency converted at gl's rate on the tax point

    · owned by tax · reference: not built

  • TAX-51when a till or an order computes food and drink that is taxed by where it is consumedA line says whether it is eaten in or taken away, so that the rate is the one the law sets for that consumption and not a guess per product.

    Given rules for DE: category food_hot with consumption eat_in 19% (DE-S) and takeaway 7% (DE-R) from 2026-01-01; category coffee with consumption any 19%; UK: hot food standard either way · when pos computes receipt pos:R-7001 in Berlin with a currywurst eat_in, a currywurst takeaway and a coffee, sending each line's consumption · then the eat-in line takes DE-S at 19%, the takeaway line DE-R at 7% and the coffee DE-S (a rule of consumption any covers both); a line of a category whose rules distinguish consumption and that sends none is refused (gate consumption_given: "say whether it is eaten in or taken away"), never defaulted; a line of a category with only any rules may omit it; consumption is part of the rule's key and of the frozen line

    · owned by tax · reference: not built

  • TAX-52when a register takes its offline snapshot (pos POS-30)A register reads the rates in force for the categories it sells, so that it can sell with the right VAT while offline and know when its snapshot goes stale.

    Given UK categories standard, zero, food_hot, food_cold; a rate change for food_hot scheduled for 2027-04-01 · when pos calls GET /rates?country=GB&categories=standard,zero,food_hot,food_cold&on=2026-11-20 · then one row per (category, consumption) with the tax_code, rate_pct and the rule's and the rate's validity in force on 2026-11-20 for the treatment of an anonymous buyer (walk_in_treatment_code, default uk_consumer); valid_until 2027-03-31 (the day before the next change of any answered row, or null), so the register refreshes before it; a category with no rule for the treatment is answered in missing and the register must not sell it offline; the receipt is still recomputed by POST /documents/compute at sync and the computed answer is the one kept

    · owned by tax · reference: not built

  • TAX-53when the party on a document is not a business partner (a merchant on an expense receipt, an anonymous till sale)A document can be computed without a business partner when its treatment is named, so that a receipt from a merchant we will never buy from again is taxed by the same rules without creating a supplier.

    Given an expense line: a hotel receipt from a UK VAT-registered merchant, treatment_code uk_business, no bp_id; a till sale with treatment_code uk_consumer, no bp_id · when expenses and pos call POST /documents/compute without bp_id · then the rules are read for the named treatment exactly as for a party's (determine); the document records party null and the treatment used; without bp_id AND without treatment_code the call is refused (gate party_or_treatment, 422); with both, bp_id's treatment row wins and a different treatment_code is refused (gate treatment_matches_party)

    · owned by tax · reference: not built

How things move

registration

not_registered → registered → deregistered

  • none → not_registered by tax_admin · when the first registration row (it may carry any date: nothing has used it) · documents charge no VAT and are not titled VAT invoice
  • not_registered → registered by tax_admin · when a VAT number in the GB format; effective_from after today; a second person's approval where tax_changes_need_second_person · needs vat_number · tax points from that date charge VAT
  • none → registered by tax_admin · when the first registration row (a new installation or the migration): it carries the date HMRC registered us · needs vat_number
  • registered → registered by tax_admin · when from the first day of a VAT period after today; eligibility from the dated tax_statutory limits (cash accounting: expected taxable turnover at most the joining limit; flat rate: at most its joining limit, a sector and its rate); a second person's approval where tax_changes_need_second_person · needs scheme · a new registration row: accounting_basis invoice | cash, flat_rate with sector, rate and first_year_until; returns of later periods compute under it (TAX-36, TAX-37)
  • registered → deregistered by tax_admin · when effective_date after today; the approver is not the author · needs effective_date · tax points from that date charge no VAT

tax_code

draft → active → retired

  • none → draft by system · when a new installation with no codes, and no migration planned · the UK pack: S, R, Z, E, OS, RC, NV, with their rates from their real dates
  • none → draft by tax_admin · when the code is not in use
  • draft → active by tax_admin · when a treatment, a first rate (any date: no document has used the code), and the document wording where the treatment needs one (reverse charge)
  • active → active by tax_admin · when valid_from after today; no other rate for the code on that date; a second person's approval where tax_changes_need_second_person · a dated rate row; issued documents unchanged
  • active → active by tax_admin · when its valid_from is after today · the row is marked withdrawn, with who and when; it never takes effect
  • active → retired by tax_admin · when no rule in effect today or later points at it · no new determinations; documents keep it

document_tax

computed → frozen

  • none → computed by system · when a rule of the document's direction (sale | purchase) valid on the tax point covers every (category, treatment) pair, except a line pinned to an earlier frozen document (v4, TAX-47), which takes that document's code and rate; the party has a treatment: the customer's for a sale, the SUPPLIER's for a purchase (v6, TAX-53: or, with no bp_id, the treatment_code the document names; neither refuses with gate party_or_treatment); v6, TAX-51: a line's consumption (eat_in | takeaway) selects among rules that distinguish it · code, rate, VAT per line; the per-rate summary; the total; for a purchase, VAT split into reclaimable and non-reclaimable by each code's reclaimable_pct
  • computed → computed by system · when a line has no rule, or no product, and the step is on · a proposed code with its reason; nothing is applied
  • computed → computed by biller · when a suggestion is open on the line · accepted: recorded as an override with the suggestion, the model and who accepted; rejected: the line stays refused until a person chooses
  • computed → computed by biller · when the biller disagrees with the rule's code · needs reason
  • computed → computed by tax_admin · when an override lowers the tax; the approver is not the person who overrode, unless override_approval is self_with_reason
  • computed → computed by system · when the document is about to issue (a sale) or be approved (a purchase) · every para 16.3.1 gate as {gate, met, reason, fix}; for a purchase the supplier is the SUPPLIER (its name, address and VAT number on the bill) and we are the customer; v6, TAX-50: a purchase at or under simplified_invoice_threshold (gross including VAT) is a less detailed invoice (VAT Notice 700 para 16.6.1, VAT Regulations 1995 reg. 16): our name and address are not required and the title says so
  • computed → frozen by system · when every readiness gate met: contents complete, no open suggestion, no override waiting for approval · never recomputed

party_tax

recorded

  • none → recorded by biller · when a treatment that needs a VAT number has one; the first row of a party holds from the start · the party's first tax row (TAX-05)
  • recorded → recorded by biller · when valid_from after today; a construction end-user or intermediary notice carries its reference and date · a new dated row; documents not yet issued with a tax point from then use it (TAX-05, TAX-46)
  • recorded → recorded by system · when a treatment that needs a VAT number was saved, or its last check is older than vat_number_check_days before a reverse-charge document issues · check_result valid | invalid | could_not_check, HMRC's name and address and consultation number stored on the row (TAX-13)
  • recorded → recorded by tax_admin · when the last check is could_not_check (a non-GB number, or HMRC unavailable) · needs reason · recorded as confirmed by a person, with the reason

vat_return

open → draft → locked → submitted

  • none → open by system · when an HMRC connection for the VRN · one vat_obligation per periodKey with HMRC's dates; a period HMRC shows filed is marked so (TAX-27)
  • open → draft by tax_admin · when the obligation is open at HMRC · boxes 1-9 from frozen document tax not yet in a return (claimed per [document_ref, tax_code]), under the period's scheme: invoice or cash basis, flat rate, partial exemption, bad debt claims and repayments, PVA entries, adjustments (TAX-28, TAX-35..TAX-37, TAX-48)
  • draft → draft by tax_admin · this draft's entries replaced; entries of other returns untouched
  • draft → draft by tax_admin · when net errors within the error-correction threshold and the error within four years · needs reason · an adjustment row naming the period it corrects, in box 1 or 4 (TAX-29)
  • draft → draft by tax_admin · when an error above the threshold · needs reference · the notice kept with its date, periods and amount; it is not on the return
  • draft → draft by system · when the step is on · findings (a box moving far from the last four periods, a document with an unusual code) listed for the tax admin; nothing changes
  • draft → locked by tax_admin · when the period has ended (its end before today in business_timezone); the period's postponed-import statements reconciled; flat-rate eligibility answered; no adjustment above the threshold · boxes and entries frozen; a new document with a tax point in the period is refused (tax_point_open)
  • locked → draft by tax_admin · when not submitted · needs reason
  • locked → submitted by owner · when the HMRC connection is valid; the person ticked the legal declaration; a second person where vat_return_needs_second_person (not the identity that locked it, by email or sub); every fraud-prevention header present; HMRC still shows the obligation open · needs declaration · HMRC's receipt stored; the return immutable; its tax points filed (TAX-30, TAX-31)
  • submitted → submitted by system · when the ledger is installed · each tax code's VAT against vat_control, journal id derived from the return; once (TAX-32)
  • submitted → submitted by system · when an HMRC connection · liability, paid and outstanding per period as HMRC holds them (TAX-32)

bad_debt_claim

eligible → claimed → dismissed

  • none → eligible by system · when an invoice six months past the later of its due and supply dates, written off, its VAT in a submitted return · one eligible row per invoice
  • eligible → claimed by tax_admin · when every eligibility gate met; within four years and six months · the VAT fraction of the unpaid amount in box 4 (TAX-34)
  • eligible → dismissed by tax_admin · needs reason
  • claimed → claimed by system · when a receipt allocated to the invoice after the claim · its VAT fraction in box 1 of the next return, once per allocation (TAX-35)

cis_subcontractor

unverified → verified

  • none → unverified by tax_admin · when a business partner with a UTR (and a company number or NI number) · needs utr
  • unverified → verified by tax_admin · when an HMRC connection, or a verification number a person read from HMRC · status gross | net | unmatched, rate and verification number from today (TAX-38)
  • verified → verified by tax_admin · a new dated row; deductions from then use it

cis_return

open → prepared → submitted

  • open → open by system · when the subcontractor is verified, or was paid in this or the last two tax years · a deduction row keyed [payment_ref, bp_id] in the payment's tax month (TAX-39)
  • open → open by system · when the deduction's tax month is not submitted (cis_return_open); a repeat answers the same · a reversing deduction row keyed [payment_ref, bp_id]; the month's return and the subcontractor's statement no longer count it
  • open → prepared by tax_admin · when the tax month (6th to 5th) has ended · the CIS300 lines per subcontractor, or a nil return
  • prepared → submitted by tax_admin · when the employment-status and verification declarations confirmed by a person; an HMRC connection · needs declaration · HMRC's receipt kept (TAX-40)
  • submitted → submitted by tax_admin · a payment and deduction statement per subcontractor, the send recorded

trade_declaration

draft → filed

  • none → draft by tax_admin · when ni_goods registered; for Intrastat, the flow's threshold passed · lines from ar's (and purchasing's) goods documents with EU partners; the upload file (TAX-42, TAX-43)
  • draft → filed by tax_admin · when the EC sales list ties to box 8 for its months; every Intrastat line has a commodity code · needs submission_ref · filed with the reference and date; an amendment is a new version

pva_statement

imported → reconciled

  • none → imported by tax_admin · when one statement per month · statement lines kept, the file kept as an object
  • imported → imported by system · each line matched by MRN, with any difference
  • imported → imported by tax_admin · needs reason
  • imported → reconciled by tax_admin · when every line matched or explained · the return uses the reconciled figures (TAX-45)

What it keeps

ThingMeaningIdentified byShared?
registrationwhether, and from when, this business is registered for VATjurisdictioneffective_frommodule-owned (configuration)
tax codea jurisdiction's code for one tax treatment (S standard, Z zero, RC reverse charge)tax_code: VARCHAR, the code the customer recognises (shared.yaml keys.tax_code)SHARED: sole writer tax (moves from gl / invoicing, see shared.yaml)
tax ratea code's percentage from a datetax_codevalid_frommodule-owned (configuration)
tax categoryhow a product is taxed, in the abstract (standard, reduced, zero, exempt, construction_service)category_code (shared.yaml keys.tax_category)SHARED: sole writer tax; product stores it on each product
treatmenthow a customer, or a supplier on a purchase (v3), is taxed (UK business, UK consumer, overseas business, overseas consumer, CIS contractor)treatment_codemodule-owned (configuration)
party taxone customer's treatment and VAT numberbp_idvalid_frommodule-owned
tax rulewhich code a (category, treatment, supply) combination gets, from a datecategory_codetreatment_codesupplydirectionconsumptionvalid_frommodule-owned (configuration)
statutory valuea figure the law sets and changes (v4): the cash-accounting and flat-rate limits, the flat rate per sector, the error-correction threshold, CIS rates, partial-exemption de minimis, Intrastat and EC-sales-list thresholdskeyvalid_frommodule-owned (configuration; seeded by the UK pack)
hmrc connectionthis business's grant to call HMRC's APIs for its VRN (v4)vrnmodule-owned (state)
vat obligationa VAT period HMRC expects a return for (v4)vrnperiod_keymodule-owned (a copy of HMRC's, refreshed)
vat returnone VAT return: its nine boxes, how they were prepared and HMRC's receipt (v4)vrnperiod_keymodule-owned
vat return entryone document's tax by code in one return: the claim that it is counted once (v4)document_reftax_codeentry_kindmodule-owned
vat adjustmentan earlier period's error corrected on this return (v4)vrnperiod_keyadjustment_nomodule-owned
vat error noticean error above the threshold notified to HMRC on VAT652 (v4)vrnnotice_refmodule-owned
vat liabilitywhat HMRC says we owe and have paid per period (v4), a refreshed copyvrnperiod_keycharge_typemodule-owned (a copy of HMRC's)
bad debt claimrelief claimed on one unpaid invoice, and repayments when it is paid after all (v4)invoice_idmodule-owned
cis subcontractora subcontractor's CIS verification, from a date (v4)bp_idvalid_frommodule-owned
cis deductionthe CIS deducted from one payment to a subcontractor (v4)payment_refbp_idmodule-owned
cis returnthe monthly CIS300 (v4)cis_return_id = "<contractor_utr>:<tax_month>"module-owned
cis sufferedCIS a contractor customer deducted from what it paid us (v4)contractor_bp_idstatement_refmodule-owned
trade declarationan EC sales list or an Intrastat declaration for a period (NI goods, v4)kind (esl | intrastat_dispatches | intrastat_arrivals)periodversionmodule-owned
trade declaration lineone line of a trade declaration (v4)kindperiodversionline_nomodule-owned
import entryone customs import entry and how its import VAT is accounted (v4)mrnmodule-owned
pva statementthe monthly postponed import VAT statement from CDS, and its lines (v4)vrnstatement_monthmodule-owned
capital goods iteman asset under the Capital Goods Scheme and its yearly adjustments (v4)item_refmodule-owned
partial exemption yearone partial-exemption year: its provisional and final recovery and the de minimis tests (v4)vrnyear_endmodule-owned
settingshow this business computes VAT, and the owner's controlskeyvalid_frommodule-owned (configuration)

Tax codes kept in invoicing AND in the ledger AND in purchasing is how the VAT return stops matching the invoices. One writer: this module. The ledger maps each code to an account; it does not own the code.

What runs on its own

StoryWhenWhat
TAX-10in the same requestdetermine + compute
TAX-11when the document issuesfreeze
TAX-12before issuethe content check
TAX-15once, at cutoverthe Odoo migration (migration.odoo)
TAX-27daily, and on opening VAT returnssync_vat_obligations (GET obligations from HMRC)
TAX-13when a treatment that needs a VAT number is saved, and before a reverse-charge document issues when the check is stalecheck_party_vat_number (HMRC Check a UK VAT number)
TAX-32daily while a submitted return has an outstanding liabilityrefresh_vat_liability (GET liabilities and payments)
TAX-34when a return is preparedsuggest_bad_debt_relief
TAX-35when a return is preparedrepay_bad_debt_relief
TAX-39when purchasing approves a subcontractor paymentcompute_cis_deduction

Questions that shape your version

Read these out and let the customer correct one — people rarely recall a policy on demand and can always react to one. Standard is a named authority you can look up and hold us to. Commonly seen is exactly that: arrangements we have met, with no survey behind them. A customer doing none of them is not doing it wrong.

  1. v6: Do you sell food or drink that is eaten in or taken away, in a country whose rate depends on it (DE, FR, AT)?
  2. v6: Do you reclaim VAT on small receipts without your company's name on them?
  3. Are you VAT registered, and from when?

    Standard HMRC VAT Notice 700 para 16.3.1 (what a VAT invoice shows) applies only once registered

  4. What do you sell, and to whom (UK businesses, consumers, overseas)?
    uk b2b services
    four rules (standard to UK, outside the scope to overseas businesses, standard to overseas consumers, exempt where it applies)
    construction subcontractor
    the domestic reverse charge for CIS-registered contractors who are not end users
    exporter of goods
    zero-rated exports with proof of export held
  5. How do you want VAT rounded on invoices?

    Standard HMRC VAT Notice 700 para 17.5: total VAT may be rounded down to a whole penny; 17.5.1 per line, down to 0.1p or to the nearest 1p / 0.5p, consistently; 17.6 retailers must not round down

    reference default
    per line, to the nearest penny (17.5.1), decided 2026-10-18
    invoice traders
    per invoice, rounded down (the 17.5 concession), by setting
    retailers
    per line, to the nearest penny
    warning
    changing the method mid-year makes invoices disagree with earlier ones; change it at a period start
  6. Do your prices include VAT?
  7. Do you use the flat rate scheme or cash accounting?

    Standard VAT Notice 731 (cash accounting), 733 (flat rate scheme); limits in tax_statutory

  8. Who prepares the VAT return, and who submits it to HMRC?
    firm with a bookkeeper
    the bookkeeper prepares and locks, the owner submits
    firm of one
    one person, vat_return_needs_second_person false
    with an agent
    the accountant submits as the owner's nominee (the HMRC grant is the business's)
  9. Are you a contractor or a subcontractor under CIS?

    Standard HMRC CIS 340

  10. Do you move goods between Northern Ireland and the EU, or import goods?
  11. Do you make exempt supplies as well as taxable ones?

    Standard VAT Notice 706

What you can change yourself

These are settings, not code: someone in your team changes them on a screen, without a developer and without a release.

For builders

Code

Public repositories, anonymous clone, one release tag each. Read README.md and AGENTS.md first.

Known gaps in the reference

© 2026 DODILHomeDocsConsole