Tag and accumulate qualifying R&D project costs against HMRC categories for the year-end claim.

  • Current version: v0.1.1.0
  • AL prefix: RDTAX
  • Object range: 80500-80599
  • Business Central: 26.0.0.0
  • Publisher: Amplio Solutions

R&D Tax Credit & Patent Box Cost Tracking

Publisher: Amplio Solutions App version: 0.1.0.0 (MVP scaffold) Target: Microsoft Dynamics 365 Business Central 26.x (Cloud + OnPrem sandbox), GB localisation AL prefix: AMP ID range: 80500–80599

Tag and accumulate qualifying R&D project costs against HMRC categories so that finance can assemble the year-end claim from Business Central rather than from a sprawling Excel workbook.


What's complete (v0.1 MVP)

  • Master-data classification. R&D Qualifying flag and HMRC Category (Staff / EPW / Subcontractor / Consumables / Software / Cloud) on Project (Job), Resource, Vendor and Item — with fields surfaced on each card.
  • Singleton Setup card. Searchable from Tell Me as "R&D Setup". Holds the default accounting period and the toggle for auto-classification on posting.
  • Posted-entry tagging. Job Ledger Entry carries the same two fields, populated automatically by the classifier codeunit at insert time. Finance can override the values on individual entries when needed.
  • Classifier codeunit (AMP R&D Classifier).
    • Resolves the qualifying flag and category for any Job Ledger Entry from Job → Source (Resource / Item / Vendor) → Job default.
    • Subscribes to Job Ledger Entry::OnBeforeInsertEvent so newly-posted time entries and purchase invoice lines are classified at posting time.
    • ReclassifyRange(StartDate, EndDate) for retroactive tagging after master data is corrected.
  • R&D Claim Workpaper report (80540). Three layouts:
    • Excel (default rendering) — pivot-friendly workbook with Data and Summary by Category sheets.
    • Word — narrative version for the adviser report pack.
    • RDLC — fallback for printing / older runtimes.
  • Permission sets. AMP R&D Tax (full) and AMP R&D Tax (Read) — assignable AL permission sets, no XML.

How to use it

  1. Publish the extension to a BC 26 sandbox.
  2. Assign the AMP R&D Tax permission set to the finance team.
  3. Open R&D Setup and choose the company's accounting period.
  4. On each technical resource set R&D Qualifying = yes and pick the HMRC category (Staff for in-house, EPW for agency time billed through payroll).
  5. Repeat for subcontractor vendors, cloud-service vendors, software vendors and any consumable items.
  6. Mark each Project that contains qualifying work as R&D Qualifying on the Project Card.
  7. Post journals and purchase invoices as usual. The classifier auto-tags Job Ledger Entries at posting time.
  8. At year-end, run R&D Claim Workpaper, choose your accounting period and export to Excel for the adviser.

Project structure

11-RD-Tax-Credit-Tracking/
├── app.json
├── .editorconfig
├── .gitignore
├── README.md
├── .vscode/
│   └── launch.json                 # local sandbox + cloud sandbox
└── src/
    ├── Codeunits/
    │   └── AMPRDClassifier.Codeunit.al
    ├── Enums/
    │   └── AMPHMRCRDCategory.Enum.al
    ├── PageExtensions/
    │   ├── AMPItemCard.PageExt.al
    │   ├── AMPJobCard.PageExt.al
    │   ├── AMPResourceCard.PageExt.al
    │   └── AMPVendorCard.PageExt.al
    ├── Pages/
    │   └── AMPRDSetupCard.Page.al
    ├── Permissions/
    │   └── AMPRDTax.PermissionSet.al
    ├── Reports/
    │   ├── AMPRDClaimWorkpaper.Report.al
    │   └── Layouts/
    │       ├── AMPRDClaimWorkpaper.docx
    │       ├── AMPRDClaimWorkpaper.rdlc
    │       └── AMPRDClaimWorkpaper.xlsx
    ├── TableExtensions/
    │   ├── AMPItem.TableExt.al
    │   ├── AMPJob.TableExt.al
    │   ├── AMPJobLedgerEntry.TableExt.al
    │   ├── AMPResource.TableExt.al
    │   └── AMPVendor.TableExt.al
    └── Tables/
        └── AMPRDSetup.Table.al

Object IDs

ID Type Name
80500 Enum AMP HMRC R&D Category
80501 Table AMP R&D Setup
80502 Page AMP R&D Setup
80510 TableExtension AMP Job (extends Job)
80511 TableExtension AMP Resource
80512 TableExtension AMP Vendor
80513 TableExtension AMP Item
80514 TableExtension AMP Job Ledger Entry
80520 PageExtension AMP Job Card
80521 PageExtension AMP Resource Card
80522 PageExtension AMP Vendor Card
80523 PageExtension AMP Item Card
80530 Codeunit AMP R&D Classifier
80540 Report AMP R&D Claim Workpaper
80550 PermissionSet AMP R&D Tax
80551 PermissionSet AMP R&D Tax (Read)

What Lee needs to ship before this is customer-ready

The scaffold is intentionally biased toward setup-driven working code, but there is real domain work between v0.1 and a billable product. Pick this up in roughly this order:

  1. HMRC category mapping with the customer's accounts. The classifier resolves category from master data, but real finance teams expect a defaulting layer at the G/L account / Resource Group / Item Category level. Add table extensions on G/L Account, Resource Group, Item Category with the same two fields, and chain them into the classifier resolution order. The "Default Staff Account Filter" / "Default Subcontractor Filter" fields on the Setup card are placeholders for that conversation.
  2. Customer-specific edge cases — grant-funded staff. Staff time funded by an Innovate UK grant or similar must be excluded from the SME claim (or moved to RDEC). Two things to add: a Grant Funded flag on Job Task (or a new "AMP R&D Funding Source" enum), and a classifier rule that downgrades or excludes entries on grant-funded tasks. Talk to the adviser before writing code — the rules differ by scheme.
  3. Connected Persons / non-arms-length subcontractor cap. HMRC restricts subcontractor relief where the subcontractor is a connected person. Add a Connected Person flag on Vendor and a workpaper note when any subcontractor cost in the period is from a connected vendor.
  4. SME vs RDEC scheme split. Currently a single category set is used. v2 needs the scheme decision per-claim (driven by company size / subsidy rules) and then category lines split between SME and RDEC sub-totals on the Workpaper.
  5. Patent Box cost tracking. Out of scope for v0.1. Patent Box needs IP-asset master data, qualifying income tracking, and a separate streaming calculation — that is a sibling extension, not an addition to this one.
  6. Direct HMRC submission. The CT600L is filed by the company's tax adviser via their own gateway software, so the Workpaper export is the real handover point. If a customer asks for direct submission, that's a substantial integration project (HMRC MTD-style API + agent authorisation) — quote it separately.
  7. Polish on the Word and Excel layouts. The shipped layouts are starter templates with «field» placeholders. Open each in its native app with the BC layout add-in (Word) or named-range bindings (Excel) and replace placeholders with the live BC content controls / named cells. The RDLC is fully wired — use it as the reference for which dataset fields exist.
  8. Tests. No automated test app is included. Add a sibling test extension covering: (a) classifier resolution for each Type permutation, (b) the Job-not-flagged guard, (c) reclassify-range correctness, (d) Workpaper request-page defaulting from Setup.
  9. Translation. App is configured for en-GB only. Add other locales if a customer needs them.

Known limitations of v0.1

  • The classifier subscribes to OnBeforeInsertEvent on Job Ledger Entry. Entries created outside the standard posting routines (manual Insert calls, direct API writes that bypass triggers) are not auto-tagged — run Reclassify Range after any bulk import.
  • The Workpaper filters on Entry Type = Usage so sales/billing entries are excluded. If a customer's chart of accounts books cost-of-sale to Jobs differently, this filter will need adjusting.
  • No UI yet for batch reclassify — the codeunit procedure exists but is not wired to a page action. Add it on the Job Ledger Entries page when you wire #1.

Licence

Internal Amplio Solutions IP. Distributed to customers under the standard Amplio EULA at https://www.ampliosolutions.co.uk/eula.