Tech Test: Interactive R&D Claim Pre-Notification Flow
Objective
Develop an interactive R&D Claim Pre-Notification (PNF) Tool similar to the tools available
on Queen’s Lane Consultants, such as:
- R&D Tax Credit Calculator -
[Link]
- Enquiry Risk Calculator - [Link]
This tool will guide users through a series of questions and determine whether they need to
prenotify HMRC (PNF) for their R&D claim.
Requirements
1. Use vanilla JavaScript, HTML, and CSS.
2. Must be interactive and user-friendly, dynamically showing/hiding questions based on
responses.
3. Date-based logic must be implemented correctly.
4. Outputs must be either "PNF Required" or "No PNF Required."
5. Must be designed to fit seamlessly within a webpage, with a style and layout similar
to tools on the Queen’s Lane website.
Question Flow
The logic follows the decision tree outlined in the provided diagram.
Step 1: Have you claimed for R&D relief before?
- Yes → Move to Step 2.
- No → PNF Required.
Step 2: On what date did you file the last claim?
- User inputs a date (DD/MM/YYYY).
- Move to Step 3.
Step 3: Enter the start and end dates of the accounting period for the last claim.
- User inputs Start Date and End Date.
- The script checks:
- If the Claim Period (CP) started before April 1, 2023 → Move to Step 4.
- If the Claim Period (CP) started after April 1, 2023 → No PNF Required.
Step 4: Was the claim filed as an amended tax return or with the original submission?
- Amended Submission → Move to Step 5.
- Original Submission → No PNF Required.
Step 5: Have you ever claimed before this?
- Yes → Move back to Step 3 to input previous claim data.
- No → PNF Required.
Claim Notification Period Calculation
The Claim Notification Period is defined as:
1. Starts on the first day of the Period of Account.
2. Ends 6 months after the Period of Account ends.
*Assume all accounting periods are 1 year.
Example, for a company with a March 2024 year-end, the claim notification period is 1st April
2023 to 30th September 2024. The relevant period for Step 2 in the diagram is 3 years
before the CNP end date, so applies to claims made from 1st October 2021 to 30th
September 2024.
Implementation Guide
1. HTML Structure
- Create a structured form with dynamic fields that appear/disappear based on user
responses.
2. JavaScript Logic
- Capture user responses.
- Implement date-based conditions using JavaScript Date objects.
- Dynamically show or hide relevant questions.
- Calculate and display PNF Required or No PNF Required.
3. CSS Styling
- Apply simple and clean styling to maintain consistency with Queen’s Lane
Consultants’s existing tools.
- Ensure a responsive layout that works on desktop and mobile.
Expected Deliverable
Develop a functional HTML, CSS, and JavaScript tool that:
- Follows the logic outlined above.
- Looks and functions similarly to existing calculators.
- Provides clear results: "PNF Required" or "No PNF Required."
- Is self-contained and embeddable in a webpage.