Lead #2280
Best Contact
Sotiris Christophi — Owner
Email
info@taxpolicy.org.uk (person)
Override
Captured Pages
https://greenjellyfish.co.uk/contact
Status: 200
Emails:
View text
Toggle navigation All reports Policy Analysis Investigations About Contact × Home › Contact {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://taxpolicy.org.uk/"},{"@type":"ListItem","position":2,"name":"Contact"}]} We welcome media enquiries and tips, suggestions, criticisms and comments by tax and legal professionals or members of the public. You can contact us in three ways: by email ([email protected]), using this contact form, or via direct message on Twitter or LinkedIn. All messages are received in strict confidence (unless you are threatening to sue us, in which case you should expect us to publish everything you write). Please note our Solicitors Regulation Authority status means we cannot provide tax or legal advice to individuals or companies. We are not currently hiring, and we are not able to take on trainees or interns. Name Email address Message Website Send Legal and privacy © Tax Policy Associates Ltd, a non-profit company limited by guarantee, no. 14053878 RSS feed {"prefetch":[{"source":"document","where":{"and":[{"href_matches":"\/*"},{"not":{"href_matches":["\/wp-*.php","\/wp-admin\/*","\/wp-content\/uploads\/*","\/wp-content\/*","\/wp-content\/plugins\/*","\/wp-content\/themes\/twentytwentyfive-child\/*","\/wp-content\/themes\/twentytwentyfive\/*","\/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]} document.addEventListener('DOMContentLoaded', function() { document.body.addEventListener('click', function(event) { // Find the closest 'a' tag ancestor of the clicked element. const link = event.target.closest('a'); // If no link was clicked, or it has no href, do nothing. if ( !link || !link.href ) { return; } const homeHost = window.location.hostname; const excludedDomain = 'taxpolicy.org.uk'; // Don't process links that are meant to open in a new tab already, // mailto links, or links that are just hashes for the current page. if ( link.target === '_blank' || link.protocol === 'mailto:' || link.hash !== '' ) { return; } try { const linkHost = new URL(link.href).hostname; // Check if the link is external and not the excluded domain or a subdomain if ( linkHost && linkHost.toLowerCase() !== homeHost.toLowerCase() && linkHost.toLowerCase() !== excludedDomain.toLowerCase() && !linkHost.toLowerCase().endsWith('.' + excludedDomain.toLowerCase()) ) { // It's an external link we should handle. // Prevent the default action (opening in the same tab). event.preventDefault(); // Open the link in a new tab, and add noopener for security. window.open(link.href, '_blank', 'noopener,noreferrer'); } } catch (e) { // Invalid URL, do nothing (e.g., tel:). // The browser will handle these with its default action. } }); }); var TPAL_CF = {"ajaxUrl":"https:\/\/taxpolicy.org.uk\/wp-admin\/admin-ajax.php","nonce":"5eae936d10","primary":"#1133AF"}; ( function() { var skipLinkTarget = document.querySelector( 'main' ), sibling, skipLinkTargetID, skipLink; // Early exit if a skip-link target can't be located. if ( ! skipLinkTarget ) { return; } /* * Get the site wrapper. * The skip-link will be injected in the beginning of it. */ sibling = document.querySelector( '.wp-site-blocks' ); // Early exit if the root element was not found. if ( ! sibling ) { return; } // Get the skip-link target's ID, and generate one if it doesn't exist. skipLinkTargetID = skipLinkTarget.id; if ( ! skipLinkTargetID ) { skipLinkTargetID = 'wp--skip-link--target'; skipLinkTarget.id = skipLinkTargetID; } // Create the skip link. skipLink = document.createElement( 'a' ); skipLink.classList.add( 'skip-link', 'screen-reader-text' ); skipLink.id = 'wp-skip-link'; skipLink.href = '#' + skipLinkTargetID; skipLink.innerText = 'Skip to content'; // Inject the skip link. sibling.parentElement.insertBefore( skipLink, sibling ); }() );
https://greenjellyfish.co.uk/about
Status: 200
Emails:
View text
Toggle navigation All reports Policy Analysis Investigations About Contact × Home › About {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://taxpolicy.org.uk/"},{"@type":"ListItem","position":2,"name":"About"}]} Tax Policy Associates Tax Policy Associates is a not-for-profit company, founded to improve tax and legal policy, and the public understanding of tax. We’re a team of experienced tax experts of all kinds: accountants, solicitors, barristers and retired HMRC officials, as well as senior lawyers and other experts such as auditors and forensic accountants. Tax Policy Associates has three key activities: Providing policymakers and politicians of all parties with expert and non-partisan tax policy advice, in the UK and worldwide. Analysing and investigating legal and tax policies and stories that have been under-reported. Partnering with journalists, academics and others researching and investigating tax and tax policy. If you’d like to involve us in a project then please contact us. For media enquiries, please use the link below or contact us via Twitter or LinkedIn. If you are a senior professional who would like to join us, then please get in contact in complete confidence. Who funds us? All our contributors provide their time pro bono,so we require almost no funding. We therefore accept no donations, charge no fees, and undertake no commercial work. This enables us to remain entirely independent. Support our work If you want to support our wider aims, you can support these charities that do amazing work providing free professional tax help for vulnerable people in crisis: Our founder: Dan Neidle Dan Neidle spent 25 years as a tax lawyer, and was head of tax at the London office of one of the largest law firms in the world. During his career, Dan advised corporates, governments, regulators, central banks and NGOs on tax and tax policy. Dan is now bringing the depth of his experience and specialist expertise to improving tax and legal policy, and shaping and informing the debate around tax and the law. To avoid potential conflicts, he undertakes no commercial work, and all his fees for writing and speaking are donated to charity. In 2023, Dan was listed by The Lawyer as one of the 100 most influential lawyers in the UK, and by International Tax Review as one of the 50 most noteworthy tax figures worldwide. Dan’s work with Tax Policy Associates in 2023 won the Tolley’s award for the “Outstanding Contribution to Taxation”, and “investigation of the year” at the British Journalism Awards. In 2024, Dan won the John Stokdyk Outstanding Contribution to Accounting award. Dan is a member of the IFS Tax Law Review Committee, the Scottish Government’s advisory group on tax strategy, and the Africa-Europe Foundation‘s Illicit Financial Flow working group. Legal and privacy © Tax Policy Associates Ltd, a non-profit company limited by guarantee, no. 14053878 RSS feed {"prefetch":[{"source":"document","where":{"and":[{"href_matches":"\/*"},{"not":{"href_matches":["\/wp-*.php","\/wp-admin\/*","\/wp-content\/uploads\/*","\/wp-content\/*","\/wp-content\/plugins\/*","\/wp-content\/themes\/twentytwentyfive-child\/*","\/wp-content\/themes\/twentytwentyfive\/*","\/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]} document.addEventListener('DOMContentLoaded', function() { document.body.addEventListener('click', function(event) { // Find the closest 'a' tag ancestor of the clicked element. const link = event.target.closest('a'); // If no link was clicked, or it has no href, do nothing. if ( !link || !link.href ) { return; } const homeHost = window.location.hostname; const excludedDomain = 'taxpolicy.org.uk'; // Don't process links that are meant to open in a new tab already, // mailto links, or links that are just hashes for the current page. if ( link.target === '_blank' || link.protocol === 'mailto:' || link.hash !== '' ) { return; } try { const linkHost = new URL(link.href).hostname; // Check if the link is external and not the excluded domain or a subdomain if ( linkHost && linkHost.toLowerCase() !== homeHost.toLowerCase() && linkHost.toLowerCase() !== excludedDomain.toLowerCase() && !linkHost.toLowerCase().endsWith('.' + excludedDomain.toLowerCase()) ) { // It's an external link we should handle. // Prevent the default action (opening in the same tab). event.preventDefault(); // Open the link in a new tab, and add noopener for security. window.open(link.href, '_blank', 'noopener,noreferrer'); } } catch (e) { // Invalid URL, do nothing (e.g., tel:). // The browser will handle these with its default action. } }); }); ( function() { var skipLinkTarget = document.querySelector( 'main' ), sibling, skipLinkTargetID, skipLink; // Early exit if a skip-link target can't be located. if ( ! skipLinkTarget ) { return; } /* * Get the site wrapper. * The skip-link will be injected in the beginning of it. */ sibling = document.querySelector( '.wp-site-blocks' ); // Early exit if the root element was not found. if ( ! sibling ) { return; } // Get the skip-link target's ID, and generate one if it doesn't exist. skipLinkTargetID = skipLinkTarget.id; if ( ! skipLinkTargetID ) { skipLinkTargetID = 'wp--skip-link--target'; skipLinkTarget.id = skipLinkTargetID; } // Create the skip link. skipLink = document.createElement( 'a' ); skipLink.classList.add( 'skip-link', 'screen-reader-text' ); skipLink.id = 'wp-skip-link'; skipLink.href = '#' + skipLinkTargetID; skipLink.innerText = 'Skip to content'; // Inject the skip link. sibling.parentElement.insertBefore( skipLink, sibling ); }() );
https://greenjellyfish.co.uk/
Status: 200
Emails: rd.incentivesreliefs@hmrc.gov.uk, info@taxpolicy.org.uk
View text
Toggle navigation All reports Policy Analysis Investigations About Contact × Home › Posts › Investigations › “Green Jellyfish”: we reveal one of the firms responsible for the £1bn cost of fraudulent R&D tax relief claims. {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://taxpolicy.org.uk/"},{"@type":"ListItem","position":2,"name":"Posts","item":"https://taxpolicy.org.uk/all-posts/"},{"@type":"ListItem","position":3,"name":"Investigations","item":"https://taxpolicy.org.uk/category/investigations/"},{"@type":"ListItem","position":4,"name":"“Green Jellyfish”: we reveal one of the firms responsible for the £1bn cost of fraudulent R&D tax relief claims."}]} “Green Jellyfish”: we reveal one of the firms responsible for the £1bn cost of fraudulent R&D tax relief claims. green jellyfishr&d relieftax fraud August 19, 2024 Download as PDF The UK loses £1bn each year to fraudulent claims for research and development (R&D) tax relief. We can reveal that one of the firms responsible is Green Jellyfish – one of the largest firms in the market. Green Jellyfish says it’s a specialist in research and development tax relief, and that they help companies claim an average of £32,000 in tax refunds from HMRC. But they claim tax relief that doesn’t exist, and then cover it up with the help of an affiliate, Kirby & Haslam. They’re making £3m a year in profits from ripping off the taxpayer and their own clients. Update: there have now been arrests. Comments on this post are closed. R&D tax relief costs the UK about £8bn each year, of which more than £1bn has been identified by HMRC as fraudulent1. This has all been widely reported, but, until now, nobody has publicly named the people responsible for the false claims. We can identify that one of the largest R&D firms in the market has submitted a series of fake and potentially fraudulent R&D tax relief claims: Green Jellyfish. We have a dossier of clearly fake2 R&D tax relief claims made by Green Jellyfish and its associates. This article focuses on one – where Green Jellyfish’s client/ victim was Sophie3, who runs a small therapy business. Green Jellyfish promised Sophie a “no win no fee” R&D tax relief claim, but there was never any basis for it, and when HMRC challenged it, Sophie was left with large bills. We believe she was defrauded. In other cases, where HMRC didn’t spot Green Jellyfish’s false claims, it will be the taxpayer who was defrauded. We believe there is enough evidence for HMRC and the police to commence a criminal investigation, shut down Green Jellyfish’s business, and protect both their clients and the wider public interest. R&D tax relief R&D tax relief was created to encourage small companies to invest in research and development. It gives profit making companies a tax deduction which reduces their corporation tax bill, or in the case of loss-making companies the ability to surrender their losses for a cash payment from HMRC. The term “research and development” is defined in guidance published by BEIS and given statutory force by the Corporation Tax Act 2010. HMRC summarise the rules as follows:4 The Times reported in 2022 about highly questionable R&D tax relief claims, with restaurants being encouraged to claim R&D relief for vegan menus. In our view, claims like this have no legal basis and may be fraudulent. HMRC has been proactively investigating historic R&D tax relief fraud and making it harder for new fraudulent claims to be submitted. Sadly this has had knock-on effects on bona fide claimants. Sophie’s story Sophie runs a small therapy business. In 2021 she had £46k of revenue. She paid herself a salary of £12k, and had a profit of £18k (after other costs and corporation tax). In 2022, Sophie was cold-called by Green Jellyfish, who said they thought her business could claim R&D tax relief. As Sophie puts it: “GJF from the start were persistent but very friendly and approachable, they seemed to know exactly what R and D was about, whereas I had never heard of it before. They were confident that my business could claim and after initial doubts I naively put my trust and faith in them.” After the call, Green Jellyfish sent a follow-up email to Sophie saying this: There is and was nothing on Sophie’s website that suggested any R&D activity. Green Jellyfish was at no point FCA-regulated. 5 And they explained their process: We don’t believe anyone who’d even casually perused the HMRC website could “safely say that [Sophie would] easily fall within the parameters of the scheme”. Sophie had no financial or tax background, and trusted that Green Jellyfish knew what they were talking about. She took up the offer of a telephone consultation. During the call, Green Jellyfish asked Sophie about her business and whether she thought it was “innovative”. Sophie said it was6, but didn’t provide much detail about what she did Green Jellyfish didn’t ask about whether there were any specific R&D projects – it’s pretty obvious there weren’t, and couldn’t be, when Sophie’s business had one employee/director who was a therapist, not a researcher or engineer. The evidence of fraud Green Jellyfish then asked for Sophie’s accounts and corporation tax return: And off the back of that, with no information about any R&D activity, Green Jellyfish submitted an R&D tax relief claim. We believe this was likely fraudulent for two reasons. First, Green Jellyfish had no basis for making a claim, because Sophie gave them no basis. They never provided her with any statement of what precisely the claim would be for, much less the kind of report you’d expect from an R&D firm. As Sophie put it to us: “I remember chatting to Andrew about my business on the phone but I still don’t know what he was claiming for!“ This therefore isn’t a case of Green Jellyfish staff misunderstanding the legislation or guidance. There’s no evidence they paid any attention to the rules at all. Second, Green Jellyfish claimed Sophie’s entire staff costs as qualifying R&D expenditure. Here’s Sophie’s accounts for 2021 – we’ve blanked out the last three digits to preserve her anonymity: Note the staff costs of £12k – the only staff member was Sophie herself. And Green Jellyfish claimed all of that as qualifying R&D expenditure: This doesn’t survive five second’s scrutiny. Nobody in the business of filing R&D tax credit claims could seriously think Sophie spent absolutely all of her time on qualifying research and development activity. So why did they claim the entire £12k? We expect that’s because the only way an R&D relief claim for a company of this size would make sense, and justify Green Jellyfish’s fee, is if they claimed 100% of staff costs. We should add that we can be certain from this evidence that a false R&D tax relief claim was made, but we cannot be certain that a fraud was committed. That depends on whether those involved were dishonest to the criminal standard, which ultimately would be decided by a jury. We set out the criminal standard for fraud by false representation here, and for tax evasion (“cheating the revenue”) here. But the evidence is in our view sufficient to merit a criminal investigation. HMRC’s response Green Jellyfish filed false R&D tax credit claims for Sophie for 2021 and 2022. HMRC immediately paid the refund, and Green Jellyfish took their fee. A year later, HMRC told Sophie they were opening “compliance checks” into her R&D tax relief claims. That would mean Sophie would have to refund HMRC – and she’d remain out of pocket for Green Jellyfish’s fees. Why does it work like this? Why couldn’t HMRC have checked the claim before paying the refund? Because HMRC generally operate a “refund now, check later” policy. It’s a rational approach in a world of normal taxpayers and normal advisers. If HMRC checked first then refunds would take months. And who would put in a fake refund claim knowing that the consequence of getting it wrong would mean paying back the refund, plus interest and penalties? But, unfortunately, “refund now, check later” creates a loophole for bad actors to exploit. Rogue R&D tax relief firms can file hopeless claims knowing that they keep their fees whatever happens, and that the risk sits with their poor clients like Sophie. Kirby & Haslam Sophie told Green Jellyfish she’d received a compliance check, and they passed her to an associated firm7, Kirby & Haslam. At this point Sophie realised there was something very strange going on. Andrew had left Green Jellyfish, and the firm had no documentation for her claim. There was no report identifying the qualifying R&D expenditure, and not even a summary of her business activity. So Kirby & Haslam wrote to her asking the kind of questions that Green Jellyfish should have asked right at the start (but didn’t): At this point an honest and competent firm would have realised that Sophie had no qualifying R&D expenditure. Kirby & Haslam took a different approach. They used Sophie’s responses to construct a response to HMRC which tried to claim that running remote therapy sessions during the Covid-19 lockdown was an “advance in science and technology” qualifying for R&D relief: The idea this was an “advance in the field” is ridiculous, particularly at a time when almost every service business was finding ways to work remotely. We don’t believe any R&D tax expert would believe this claim had any prospect of success. But the more serious problem is that it was entirely created after-the-event by Kirby & Haslam. The consequence for Sophie HMRC unsurprisingly rejected the Kirby & Haslam justification for her R&D tax relief claim (and another made subsequently for 2022). They sent Sophie a letter which explained why in some detail. For example: This left Sophie with an unexpected bill of over £7,500 to repay to HMRC. That stung – because she’d only received a £4,500 refund… the rest had been taken by Green Jellyfish as their fee. Sophie says: “Just before Christmas I received a notice from HMRC that not only was I going to have to pay back the full amount of the first claim made by GJF, they had also found the second claim to be non-compliant, and I would also need to pay this back. I had no idea that HMRC were evaluating both claims so this came as a huge shock. I remember rushing over to my friend’s house in a state of distress, crying at the injustice of the situation and terrified about how I could pay the money back when it had already been absorbed into my business. At this stage my anxiety sky rocketed, and I spent a few days over Christmas feeling sick and stressed. I tried to put on a brave face around my children over Christmas as I did not want them to worry. The situation impacted on my mental health and triggered many negative emotions of fear, anxiety, isolation, anger, hopelessness and despair.” The lies to escape penalties At this point it looked likely Sophie would be hit with penalties for submitting a tax return that was “careless”. Kirby & Haslam wrote representations to HMRC on Sophie’s behalf. A normal firm in Kirby & Haslam’s position would have been appalled at Green Jellyfish’s original claim, and the representations would have described how Sophie had in essence been defrauded. Instead, Kirby & Haslam wrote representations to HMRC which lied about the background. Here’s an email from them “correcting” Sophie’s initial answers to HMRC: None of this was true. Sophie had relied entirely on the claim submission company. Andrew at Green Jellyfish (to whom Sophie had been speaking) was a “Business Development Manager”, not a tax specialist. She didn’t have a “thorough discussion” regarding her project, because she never discussed a project. Sophie had made no effort to understand the R&D tax relief claim criteria because they were never mentioned to her; she didn’t know what they were, or that they even existed. Sophie was very uncomfortable with Kirby & Haslam’s proposed responses. She told us: “Kirby and Haslem were pushing to avoid penalties from HMRC, and in my state of fear, I allowed them to talk me out of telling HMRC what I really wanted to say about GJF and their unscrupulous process. I was constantly told that as a company director I was expected to know about R and D and to have paid due diligence to the claim. I am a clinical professional, working in therapy. I am not a tax specialist and I’m rubbish at maths, so of course I couldn’t know the ins and outs of R and D. I had been led by the group of so called “specialists”. But apparently this was not good enough. Kirby and Haslem made me take responsibility for the claim without blaming GJF. I was so angry but felt alone with the problem, so saw no option but to take their guidance.“ Sophie escaped penalties. We think that’s a fair outcome under the circumstances – but it’s deeply unjust that Green Jellyfish and Kirby & Haslam aren’t subject to penalties themselves. Could it just have been a mistake? Not according to Green Jellyfish. When Sophie complained to them, they told her their “approach in preparing and submitting claims is always meticulous, based on the information provided to us and to the highest standards of care and skill”. They refunded their fees for the 2021 claim, but not the 2022 claim (despite their “no win no fee” promise). And it wasn’t a one-off either. We have a dossier of similar cases, often for much more money: R&D tax relief claims being made by Green Jellyfish on the basis of absolutely nothing, by businesses who realistically could never qualify. And then in these cases we again see Kirby & Haslam coming in after the event, and inventing rationales for the original claim. But at least in Sophie’s case the Kirby & Haslam document described her actual activity; we’ve seen other Kirby & Haslam letters which invent entirely fictitious R&D projects. Green Jellyfish is not a small operation. Its accounts show that in 2022 it had 38 employees and made a profit of at least £3m.8 How much of Green Jellyfish’s business consists of genuine R&D claims, and how much fake claims? We can’t know. The size of our dossier convinces us there are many fake claims – but we can’t know if it’s 10% of their business or 100%. We would, however, speculate that what we’ve seen is Green Jellyfish’s standard approach. We say that for several reasons: Green Jellyfish’s advertising consistently9 says that all you need for a claim is your corporation tax return and accounts. Sophie’s experience, and the other businesses we’ve spoken to, was consistent with that. No analysis of any projects, just the numbers in the accounts and tax return. Green Jellyfish doesn’t appear to employ any tax advisers. Only salespeople and business development officers. This isn’t how you build a legitimate R&D tax relief business – R&D tax relief is highly technical. Kirby & Haslam didn’t seem to think there was anything strange about the absence of any records from Green Jellyfish, or the fact that they were constructing entirely original arguments for R&D tax credit relief. Sophie’s complaint was the opportunity for a bona fide company to look at its processes and consider whether her tax relief claim had been properly handled. They instead just lied to her (“meticulous”). Even if most/all of Green Jellyfish’s R&D tax relief claims are false, we expect some of their clients will be very happy. HMRC are unlikely to be able to identify all the false claims, and some clients will inevitably keep their refunds (even if there’s a criminal investigation).10 In those cases, it’s HMRC and the wider body of taxpayers that lose out. Paul Rosser This report only exists because of years of work by Paul Rosser.11 Paul is an R&D tax specialist. He’s often asked by non-specialist accountants to check R&D claims, particularly when they’re prepared by outside firms who the accountants don’t know. In 2020 he started to see claims prepared by Green Jellyfish which he thought were clearly invalid. Paul had been writing about the dubious end of the claims industry. Paul now wrote specifically about Green Jellyfish on LinkedIn, and named the firm. On the evening of 25 April 2024, Sotiris Christophi arrived unannounced at Paul’s home and threatened him. He said Green Jellyfish had been through Paul and his wife’s social media accounts, and was preparing to release some unfavourable information about Paul to the public. Paul immediately told him to leave. Christophi then made a series of calls to Paul’s wife’s personal mobile phone. We asked Christophi about this back in April: he responded saying he regretted his actions, and asking to speak to us in person. We said we would prefer if Christophi could put his position in writing;12 we never heard back. The tip of the iceberg There is a large network of companies associated with Green Jellyfish:13 Notable companies in the network are: GJ2020 Limited – the Green Jellyfish business; it was called Green Jellyfish Ltd but changed its name in September 2023.14 Purple Panda Services Ltd, which runs the Purple Panda business. This appears to have a similar business and branding to Green Jellyfish. Kirby & Haslam – a more seriously-branded R&D firm Aston Shaw, an accounting firm. The precise links between the companies aren’t clear but there is clearly a close relationship between Green Jellyfish and Kirby & Haslam. An adviser acting at arm’s length would have advised Sophie to tell HMRC she was misled by Green Jellyfish. A normal adviser would not accept repeated referrals of improper claims. The letter from Green Jellyfish responding to Sophie’s complaint was (according to the metadata) written by a paralegal working for Kirby & Haslam. Kirby & Haslam and Aston Shaw are owned by Sotiris/Steve Christophi, an accountant regulated by the Association of Chartered Certified Accountants (ACCA).15 Christophi denies a connection to Green Jellyfish, but he certainly seemed to be speaking for Green Jellyfish when he visited Paul Rosser’s home to threaten him. We have a dossier of other apparently fraudulent tax relief claims made by these companies, and will be writing more about them soon. Green Jellyfish’s response Last week we wrote to Fladgate LLP, who act for both Christophi and Green Jellyfish. We put to Fladgate that Green Jellyfish submits R&D claims with no technical basis, and all it does is review a company’s corporation tax returns and accounts. We also put to them that Kirby & Haslam invent justifications for Green Jellyfish’s claims after the fact. There were several curious features to Fladgate’s response: The Fladgate letter was labelled as “confidential”. It wasn’t. Solicitors are not permitted to falsely label letters as confidential, and one solicitor is currently appearing before the Solicitors Disciplinary Tribunal as a result of such a mislabelling.16 Most of Fladgate’s letter to us is taken up with allegations of an “unlawful means conspiracy” against Green Jellyfish by former employees, rival R&D advisers, and an individual who Christophi is currently suing. We have no interest or understanding of any of this (we’re confident that Sophie’s story is real). It is, however, most unusual for a solicitor to put in correspondence what amounts to a conspiracy theory. Fladgate deny that Green Jellyfish or Kirby & Haslam is behaving improperly, but the denial is very non-specific. Specific denials are then included in a separate email from Christophi (on behalf of Kirby & Haslam) and an unknown individual representing Green Jellyfish, which Fladgate forwarded to us. The evidence above (and other evidence we have collated) shows these denials to be false. The Christophi/Green Jellyfish email rather deceptively ducks our allegation that it’s improper for Green Jellyfish to claim that care homes, restaurants and childcare companies can often claim R&D relief. (“The legislation is very clear and does not exclude a company from making an R&D claim based solely on the sector.“)17 We responded to Fladgate saying that we had evidence of actual fraud; we have not heard back. Fladgate is a fine firm with a good reputation. We think there will be widespread disquiet amongst its partners that it’s acting for a business that is widely suspected of fraud, denying that fraud in the face of public evidence, and repeating their client’s wild conspiracy theories. Everyone, guilty or innocent, deserves a criminal defence, and no criminal lawyer should be criticised for acting for any defendant, no matter how repugnant their crimes. However, defamation is very different. There is no professional or moral duty for a solicitor to write defamation threats on behalf of a business when there is good reason to believe it is carrying on a fraud. Particularly when the consequence of acting is that the solicitor will be facilitating the fraud. HMRC’s response HMRC is prohibited from commenting on individual taxpayers, but told us: “With R&D claims, public money is at stake and taxpayers rightly expect us to scrutinise them, which is why we have increased compliance activity. We do that thoroughly and fairly, and the overwhelming majority of valid claims are paid on time. Any customers who have a concern about an R&D claim they have made, or may have been made on their behalf, should email: [email protected] They should title the email as ‘For the attention of the R&D Anti Abuse Unit’“ What should happen to Green Jellyfish? Sophie has been deeply affected by what happened to her: “I contemplated closing my business, as it does not make a huge turnover and I wondered if all this pressure was worth it. I used most of my savings paying back the requested amount and I am still trying to build my savings back up. I always follow the rules and trust others to do the right thing, and it felt like I had been taken for an idiot. I don’t understand the mentality of people who act like this and I feel let down by what I’ve experienced.“ We don’t think Sophie should blame herself. She was the victim of what looks like a fraud. Those responsible should pay the price. We will be referring Christophi to the ACCA, although we don’t have much hope – the ACCA unaccountably is refusing to investigate Christophi’s threat to Paul Rosser. We will also be reporting Green Jellyfish’s false claim of FCA regulation to the FCA. And the evidence presented in this article suggests that Green Jellyfish and the individuals who run it have defrauded both their own clients and HMRC. We believe there should be an immediate criminal investigation. We hope the authorities can move quickly; past experience is that Green Jellyfish and those behind it may not stick around to face the consequences of their actions. How to stop the tax cowboys Green Jellyfish are not the only tax firm defrauding their clients and HMRC. The previous Government thought the answer was regulation – they ran a consultation on “raising standards in the tax advice market“.18 We don’t agree. Green Jellyfish weren’t regulated, but acted with total disregard for the law – they’d disregard regulation too. And Kirby & Haslam was regulated. So it’s not at all clear that regulation is the answer. It would, however, come with a cost – a new regulatory edifice to be created for currently unregulated advisers, most of whom do a good job. That means cost for them, cost for their clients, and cost for the taxpayer. The better answer is a simpler and more powerful one: change the incentives. Right now, the reward of churning out fake tax claims is large, and the risk of serious sanctions, or criminal prosecution, is perceived to be low. That needs to change. Our suggestion: create a new criminal offence of promoting tax schemes, or technical tax positions, that are so unreasonable that no reasonable adviser would think they were correct.19 The offence would be accompanied by civil tax penalties equal to 100% of the tax in question, chargeable on the companies involved and the people behind them. The challenge is to shape the new rules so that the cowboys are pushed out of the business, but legitimate advisers have nothing to be concerned about. That’s hard, but not impossible. And it’s been achieved before. When the General Anti-Abuse Rule was introduced in 2013, some feared it could apply to “normal” tax planning – in practice it hasn’t. That’s what we’re proposing – a GAAR-style rule that’s carefully aimed at the cowboys, and with very serious consequences when it applies. Many people’s instinctive response is that we should “make tax avoidance illegal”. That can’t, and shouldn’t be done, because we can’t rigorously define “tax avoidance”. But we can rigorously define “trying to avoid tax by taking a position that isn’t in fact legally correct, and is so unreasonable that no reasonable adviser would have taken it”. And then make that a criminal offence. It would be more effective than a new regulatory framework, and an awful lot simpler. Full credit to Paul Rosser of R&D Consulting for discovering and pursuing this story over the last couple of years. It’s an extraordinary story of a tax professional doing the right thing despite considerable professional, legal and even physical risk. This article wouldn’t exist without Paul.20 Thanks above all to Sophie (and other clients/victims of Green Jellyfish) for telling us their stories. We’ve anonymised Sophie’s details but she’s aware that Green Jellyfish and K&H may identify her; in the unlikely event they’re stupid enough to threaten her, we will take full responsibility for her defence. Many thanks to K and T for their R&D tax relief expertise, to P for additional research, and as ever to S for his invaluable review and insights. Thanks to J for picking up an accounting error in the original draft. Some images and text © GJ2020 Limited, and used here in the public interest and for purposes of criticism. Corporate structure diagram © Paul Rosser. FootnotesHopefully the figure will be much smaller going forward, following new rules requiring much more detail in applications from 1 August 2023 ↩︎ By which we mean not just technically wrong, but indefensible ↩︎ Sophie is not her real name. For the reasons we set out below, we will not be identifying any of our sources for our Green Jellyfish investigation, except Paul Rosser. We have hidden Sophie’s name, and the details of her business, but not changed anything material to her story. ↩︎ The guidance in 2021 on this point is the same – you can see the 2021 version via the Internet Archive here. The main link is to the current HMRC website because we know some people cannot easily access the Internet Archive. ↩︎ Prior to 2 July 2021, Green Jellyfish was owned by Glide Business Solutions, which was FCA-regulated. However that is irrelevant to the status of Green Jellyfish and its staff, and in any event Glide wasn’t the shareholder when the email was sent to Sophie in 2022 ↩︎ We agree; the way Sophie carried on her therapy business during lockdown was “innovative” in the normal business meaning of the term; but that’s very different from having qualifying R&D expenditure. ↩︎ The precise nature of the association isn’t clear; more on that below ↩︎ The accounts show £558k of corporation tax owing to HMRC; the corporation tax rate at the time was 19% – this implies taxable profit of £558k/19% = £3m. The P&L reserve increased by £2.6m from 2021 to 2022, implying that taxable profits were lower then accounting profits by at least £150k. Some of this was likely due to capital allowances, as there was a c£200k addition to plant and machinery. Dividends may also have been paid. And we would not be surprised if the company artificially depressed its taxable profit, given how cavalier Green Jellyfish was with its clients’ tax position. Note that there was an accounting error in the original version of this footnote; many thanks to J for picking this up. ↩︎ Click “What documentation do I need to prepare my claim” ↩︎ Although, given this appears to be a case of deliberate false claims, HMRC will have 20 years to investigate such clients. ↩︎ It is important to add, however, that the contents of this report were written by Tax Policy Associates independently, and the only element which relies solely on evidence from Paul Rosser is the tale of Christophi’s unexpected visit. Christophi has, however, admitted that the event took place. ↩︎ The subjects of our investigation often ask to speak in person; standard journalistic practice is that responses should be in writing, and we believe there are numerous reasons why that is the only sensible approach. ↩︎ Many thanks to Paul Rosser for the diagram, which is a product of considerable research by him. The group structure has since changed slightly. ↩︎ There is something odd going on with its directors, who keep resigning and being reappointed. We don’t understand why that would happen. ↩︎ Christophi is also sometimes known as Sotos Christophi, and you can find him under that name on the ACCA website. He is referenced in this rather curious press report from 2019 about a council being “hindered” (in an unspecified way) from collecting business rates. ↩︎ Fladgate subsequently told us that they labelled the letter as “confidential” because they mention a police investigation. They have no first hand knowledge of that investigation and don’t appear certain it exists. We have no idea why they thought the repetition of what is little more than a rumour would be “confidential”. ↩︎ Technically it is highly unlikely for businesses of this type to be eligible for R&D relief, but there is little point in debating the law when there is evidence of fraud. We don’t intend to go into this point any further with Christophi/Green Jellyfish. ↩︎ It closed shortly before the election, and so we haven’t had a response or any follow-up, but we believe officials are still proceeding on the assumption this will be the way forward. ↩︎ There would have to be a fair defence for cases where a mistake was made by genuine accident, or where a rogue employee acted despite compliance measures being put in place. ↩︎ But, as ever, Tax Policy Associates Limited takes sole responsibility for the content of this article. ↩︎ Comments are now closed for legal reasons. Our apologies. 39 responses to ““Green Jellyfish”: we reveal one of the firms responsible for the £1bn cost of fraudulent R&D tax relief claims.” Paul August 28, 2024 5:34 pm It should be quite obvious to those using Green Jellyfish that they probably weren’t entitled to free money for R&D Credits if they weren’t actually doing any R&D. I’m struggling to be sympathetic towards their plight as they’ve allowed Green Jellyfish to help them make fraudulent claims and then suffered the consequences. This has happened time and time again and will no doubt continue to until the system is robust enough to stop it. Dan August 29, 2024 11:57 am GJ were/are brilliant salespeople. The businesses were usually very small, and had never heard of R&D tax relief at all. So when they have someone telling them that their innovative business qualifies for the relief, and that’s the intention, I understand they they believed it. Keith Wright August 28, 2024 9:23 am where do we go from here? Complete Care Advisory ltd is part of the cabal fradulantly claiming R&D payments from HMRC. Mark Daniel Robinson, Also of Green Jellyfish one of the main protaganists. Michael Phillips August 23, 2024 5:11 pm This is superb – great investigation as well. Trying to help companies is great but doing it properly, sensibly and more responsibly needs to the way forward. Thanks to Dan and Paul for their monstrous work. Those of us trying to do it properly often get overlooked as the big firms promise the earth and deliver nothing. Martin Haynes August 22, 2024 11:21 am Amazing investigation and reporting. Sadly I am another victim of Green Jellyfish’s fraud. Similar to Sophie’s story, I have had to pay everything back to HMRC, including the huge commission that Green Jellyfish took, plus significant interest payments. I have tried to contact Green Jellyfish to complain and request some of their commission back, but they never respond to me. I run a small business and we cannot afford to lose the many, many thousands that Green Jellyfish took as part of this scam. I have documented evidence of what they sent to HMRC and it’s fraudulent, false and explicitly makes claims that I said are not true (such as plans to sell software to the market, which is total nonsense – there are other examples too). I never got to see the report or approve it before it was sent to HMRC, I just suddenly received an email from Green Jellyfish saying HMRC had approved the claim. I am tempted to take legal action as Green Jellyfish won’t respond to me, but we’ve lost so much money in this scam, it would be difficult to finance. Paul rosser August 24, 2024 6:01 pm Martin there is a class action being prepared by lots of their clients owed money. I believe it’s on a no win, no fee basis so if you want to look at joining the solicitor is Nick Ashcroft at Addleshaw Goddard [edited by TPAL to remove his email address for spam protection] Cheers Paul Alun August 21, 2024 9:45 am Great work Dan. The Great Train Robbery team stole £70million of public money in today’s prices. A serious police team went after the crooks and chased them to the ends of the planet. Just saying. Raheel Malhi August 21, 2024 8:48 am We are also defrauded by Complete care advisory group limited and director at that time now is a director of Green jelly fish limited. They submitted report on our behalf which was totally bogus. They took £17800 from HMRc . HMrC later removed the claim as a fraudulent claim and now asking for the money back . CCA not giving the money back and asking me to re-claim . I refused as they are liars, cheaters and Fraudsters . Problem is no one taking action against them . I have now hired a law firm to take action against them . I like to know if more people can also join as we must do whatever we can to expose these sham companies.My email is REDACTED Mel Stokes August 20, 2024 10:01 pm I had green jelly fish constantly badgering me about projects and how we were eligible because we were in social care to claim back money and how they would do all the work for us wouldn’t have to do anything, kept saying no thanks. Then we had I’m sure a different firm that had 4 “projects” you could pick from and they would claim the money back off the tax so nearly signed up to that one but got my accountant to check through the contract first there was info we felt was suspect luckily I never signed it Mike Rule August 20, 2024 9:39 pm Good work Dan and Paul. We have to stand up to these people. I had one trying sell a ludicrous scheme based on the GDPR regulations They seem to move around so perhaps keep tabs on them and publish their new companies Paul Rosser August 22, 2024 10:19 pm Thank you Mike. Ahh yes the old GDPR data breach tax scam, well know and called out by HMRC as totally fraudulent. Hamish August 20, 2024 8:55 pm I think that HMRC does what it can with the resources available to it – they were enormously helpful to myself, and my company, when I inadvertently got sold tax credits as a “government incentive scheme to assist companies post pandemic” – not a “bounce back scheme”, rather, a genuine “thanks for getting the country through this” type of scheme – as long as you had genuinely gone to extraordinary lengths not to be a burden, and displayed some innovation in the face of adversity. Yes, of course I was mugged off by these charlatans and now have a debt to pay but I’d rather pay for my stupidity and sleep easy. I didn’t get charged a penalty fortunately. The last I heard I was being threatened with legal action but I’ve heard nothing for a tear or so now. Bring it on I say because I have all the emails they sent – “I can confirm that you will be paid even if the claim is challenged because you have chosen option B”. Jeez how can I have been so stupid? Anyway, my claim went through Roger Hopkins Limited – essentially the same company. Alun Oliver August 20, 2024 8:41 pm Refreshing to see some sunlight shone on this merky area of tax. Sadly HMRC appear to have been asleep at the wheel and clearly have evidence in their records to spot trends and act far more promptly to close down these cowboys. I agree that regulation won’t achieve anything other than policies and bureaucracy for bona fide tax advisers… the cowboys will continue to ignore … unless they are in the cross-hairs. Like Money Laundering – massive amounts of bureaucracy for all regulated firms etc. But the crooks and ‘bent’ firms sidestep and disregard. I entirely agree the crooks need to be held accountable with penalties to match tax and fees and exceed such for repeat offenders… with some threshold (20 cases?) Sufficient to trigger immediate action to freeze accounts pending a prompt and timely investigation with confiscation of all proceeds of crime. Lastly much of this sector initially sought clients by significant referral fees (classic pyramid selling) from lawyers and accountants – PCRT requires full disclosure of such commissions and the various professional bodies need to consider if they have done enough to advise their members and protect them and public from these charlatan firms as well as policing compliance… should Sophie’s advisers been more curious? Carol August 20, 2024 3:27 pm We had similar with a client persuaded to made a claim for 2 years by RDI Solutions. HMRC paid out, to RDI Solutions, but then rejected the claim, just as RDI Solutions called in the administrators. This was back in March, client has not heard anything and no idea where £65K went. Below is all we know RDI Solutions has called in insolvency practitioners and told clients they will have to wait a month for any kind of update Clients of the research and development (R&D) claims firm have been left hanging as RDI Solutions called in Absolute Recovery Limited to review whether the business will have to go into administration or can be restructured. The licensed insolvency practitioner at Doncaster based Absolute Recovery is Stephen Richard Penn. This follows the closure of the R&D company earlier this week when the RDI Solutions’ website was taken down, leaving only a notice online that the business was ‘not in operation’, having effectively suspended all activity. A brief holding message on the RDI Solutions website has now been updated, stating that the company email has been disabled and is no longer available. Any existing customers have been told they will have to wait minimum 30 days before they are contacted by the insolvency practitioner. The company is run by owner and sole director Naim Mahmud through Mahmud Group Holdings and was set up in 2019; earlier this month the only four remaining directors resigned. When it was up and running, RDI claimed it handled monthly R&D claims worth around £20m in tax relief, representing a sizeable annual claim book of £240m, and had ‘3,000 clients’. Accounts at Companies House show extensive director loans and intergroup loans are outstanding. In a statement, RDI Solutions said: ‘The company is currently seeking advice from an insolvency practitioners to assess the company’s financial position and the best course of action moving forward for the business while it attempts to restructure. ‘There is currently no access to the company emails, for any enquiries, please contact Michael at Absolute Recovery Limited and he will assist with your query. ‘If your query can wait, Absolute Recovery Limited will be in touch in the next 30 days.’ Paul rosser August 21, 2024 6:08 am Unfortunately the statement of affairs for RDI contains some concerning news regarding it’s assets https://www.linkedin.com/posts/paul-rosser-3979514_since-the-sudden-closure-of-rdi-solutions-activity-7204394900161748992-S7gr Frustrated advisor August 20, 2024 11:00 am For the morally bankrupt, any chance to get ‘free money’ if HMRC adopt a pay now, ask later approach is just too tempting. More fool HMRC for thinking that leopards change spots, same with Covid loans, more free money. They never ever do. There should be a post office style enquiry about HMRC and the taxpayer funds they have handed over to these tax crooks, starting with Harra. From my personal knowledge of the accounting firm, who have a terrible reputation in Norfolk, I’d say it is highly probably that all of these ‘yellow brick (taxpayer funds) roads’ lead to them and their owner. albert wright August 20, 2024 10:58 am Fascinating story. Several “rogue” companies offering help to SMEs who want to claim R&D tax credits were set up because the original scheme was so generous and scrutiny of claims seemed so lax. Paying companies that were making losses was the icing on the cake. It seemed that Government wanted to be seen to be helping small firms invest. They even adjusted the national figures for investment to include the credits given under the scheme. Similar misuse of the Entrepreneurs Tax relief scheme took place when 10% tax relief was available for up to £10 million. Keep up the good work. Michael Richards August 20, 2024 10:50 am If you have a system which dangles a carrot to a wide boy, the wide boy is going to chase the carrot. One such system is HMRC cash repayments for R&D claims. To make matters worse, the client pool of the likes of Jellyfish includes not only the greedy man looking to get one over on HMRC, but the unsuspecting small business who don’t even know what R&D is. Jonathan Yeomans August 20, 2024 9:21 am An impressive piece of investigative journalism, Dan and Paul – well done. Another approach to tackling the rogue R&D tax advisers is to leverage the ‘Dishonest Tax Agent’ civil penalties introduced under Schedule 38 of the Finance Act 2012. These penalties can reach up to £50,000 and include the publication of the agent’s details. Operating under a civil standard and the balance of probabilities, HMRC only needs a ‘reason to believe’ to impose them, rather than the establishment of proof beyond reasonable doubt. Despite being woefully underutilised, these penalties would be ideally suited for situations like this, with the added bonus of granting HMRC access to the R&D adviser’s working papers and files, giving HMRC a deeper insight into any potential web of deceit. Greater use of these penalties is something we’ve advocated for with HMRC and HMT. We should also increase the upper-level amount now that the legislation is more than a decade old. I’ve put a link to the relevant guidance below: https://www.gov.uk/guidance/dishonest-conduct-by-tax-agents Paul Rosser August 29, 2024 7:51 am Thanks Jonathan. I totally agree, HMRC should be looking at penalties for those behind Green Jellyfish, as the amounts they have generated in fees alone is eyewatering and there should be some negative consequences to act as a deterrent for others considering defrauding the taxpayer. David August 20, 2024 7:59 am Good to see you having the bravery to out a firm like this and highlight the serious question of why HMRC haven’t taken steps to shut them down before now (by refusing to accept claims from them etc) given what they obviously know. Keep up the good work and hopefully HMRC will eventually step up and be much more proactive in this space. Adam August 20, 2024 7:43 am Thanks Dan, always producing amazing articles. I know you covered a lot on LessTax4Landlords and how they were corporate sponsors at the National Landlords Show. There’s also a company by the name of Comprehensive Tax Planning that still exhibits at the show they also seem to claim R&D as the “most generous corporate tax relief”. juliette thomas August 20, 2024 1:11 am Thank Dan and Paul for helping the victims of GJF to get the truth out but importantly publicising this huge scam at the cost of the tax payer and SME. Safia August 19, 2024 10:55 pm It’s funny how Dan Robinson (CEO of Impact) has taken dividends but refuses to pay the staff their redundancy wages. If you want a story on this – get in touch, I’ll happily provide proof. Dan August 20, 2024 12:11 am thanks – I’m aware there are various stories going round about Impact potentially being wound up, but I’ll leave that to others and focus on the tax. Shazia Karim August 19, 2024 10:40 pm I was one of those GJF put a claim in for and I had to pay it back like Sophie. Steve Hasson August 19, 2024 9:01 pm The scale of losses here is breathtaking. I agree with what you say about the desirability of paying valid claims quickly and the potential solution. That said in economic terms the relief was poorly designed, HMRC were slow to spot the truly incredible growth in claims by small businesses and traditionally one of HMRC’s tools was identifying and monitoring suspected “rogue” advisors to direct scrutiny toward claims from that source. Equally criminal sanctions applied to such professionals. These cowboy “advisors” are far from professional but bringing together a group of people and going out to make claims which look fraudulent seem to me to have the makings of conspiracy charges. EB Strobes August 19, 2024 8:47 pm I’m surprised this otherwise excellent article doesn’t appear to refer to the Claims Notification regime which was introduced last August to cut these cowboys off at the knees. Admittedly I’m not sure whether it is applicable to SMEs as well as those claiming the RDEC, but it seems to me to be an excellent way of making cowboy claims redundant, as it would no longer permit the making of last minute claims from those companies who had never made a prior claim. Paul August 20, 2024 6:20 am I believe this is just the first article in a series. Yes, the measures HMRC have put in recently such as pre-notification and the Additional Information Form (AIF) are helping reduce fraud, however historically billions of taxpayer funds have been lost before HMRC did very much to stop it. EB Strobes August 20, 2024 3:24 pm To be fair I can see that this is covered within one of Dan’s hyperlinks. Mr David Maxwell August 19, 2024 8:23 pm Lesson for every Taxpayer , don’t go on blind dates following call from supposedly reputable firms offering their services while claiming FCA regulated. Simple call to FCA verify their registration details. Do your research and request fee quotes in writing from several firms together with draft letter of engagement.Do they hold PI insurance. Finally my main reason for contacting you is the surprise Barclays Bank have Debenture and Cross Company Guarantee registered 26 March , given the adverse publicity and commentary from various professional individuals does Barclays ignore social media posts such as Linkedin . Banks claim they lend to people, well with the myriad of director resignations and reappointments then surely this another red flag or perhaps they are good at giving plausible stories to their senior lenders ! John Plumridge August 19, 2024 7:49 pm I think I talked to Green Jellyfish not long after they were established. From memory they were wanting us to refer our clients. Luckily for us we didn’t make any referrals because I wasn’t sufficiently satisfied with what they had told me.They also seemed to have an awful lot of staff for a start up. Looks like we dodged a bullet. Mark Ellis August 19, 2024 7:34 pm Did Sophie’s company not have accountants drawing up the accounts and initial CT600 return. Surely she could have asked then for advice about the claim? Michael H August 19, 2024 10:18 pm A client of mine had the same issue with G.Jellyfish. GF changed and resubmitted accounts and CT600s that I prepared as accountants without my knowledge or consent. Dan August 20, 2024 12:10 am they told her they weren’t specialists and don’t seem to have checked it at all. A shame. Peter Langton August 19, 2024 6:40 pm Great work keep it up. There must be an argument for HMRC to tell similar stories in real time. I know they can issue warnings in real time and report after prosecution but this so much more impactful. More legislation to pull back further the rules that enable these people to operate in the shadows. Oliver August 19, 2024 6:26 pm The email linked in the sentence “Specific denials are then included in a separate email from Christophi” (under the section Green Jellyfish’s response) appears to actually be TPA’s response to Fladgate, not their reply – just FYI. Dan August 20, 2024 12:08 am thanks – think this is now fixed! Mrs Rosemary Brocklehurst August 19, 2024 6:25 pm Brilliant work Dan. Hope you are as well regarded by Ms Reeves et alas you should be. Legal and privacy © Tax Policy Associates Ltd, a non-profit company limited by guarantee, no. 14053878 RSS feed {"prefetch":[{"source":"document","where":{"and":[{"href_matches":"\/*"},{"not":{"href_matches":["\/wp-*.php","\/wp-admin\/*","\/wp-content\/uploads\/*","\/wp-content\/*","\/wp-content\/plugins\/*","\/wp-content\/themes\/twentytwentyfive-child\/*","\/wp-content\/themes\/twentytwentyfive\/*","\/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]} document.addEventListener('DOMContentLoaded', function() { document.body.addEventListener('click', function(event) { // Find the closest 'a' tag ancestor of the clicked element. const link = event.target.closest('a'); // If no link was clicked, or it has no href, do nothing. if ( !link || !link.href ) { return; } const homeHost = window.location.hostname; const excludedDomain = 'taxpolicy.org.uk'; // Don't process links that are meant to open in a new tab already, // mailto links, or links that are just hashes for the current page. if ( link.target === '_blank' || link.protocol === 'mailto:' || link.hash !== '' ) { return; } try { const linkHost = new URL(link.href).hostname; // Check if the link is external and not the excluded domain or a subdomain if ( linkHost && linkHost.toLowerCase() !== homeHost.toLowerCase() && linkHost.toLowerCase() !== excludedDomain.toLowerCase() && !linkHost.toLowerCase().endsWith('.' + excludedDomain.toLowerCase()) ) { // It's an external link we should handle. // Prevent the default action (opening in the same tab). event.preventDefault(); // Open the link in a new tab, and add noopener for security. window.open(link.href, '_blank', 'noopener,noreferrer'); } } catch (e) { // Invalid URL, do nothing (e.g., tel:). // The browser will handle these with its default action. } }); }); /* 1. Footnote Reference Link Styling */ .tpal-footnote-ref { display: inline; text-decoration: none; color: #1133AF; font-weight: bold; cursor: pointer; margin-left: 0.1em; transition: color 0.2s ease, transform 0.2s ease; } .tpal-footnote-ref:hover, .tpal-footnote-ref:focus-visible { color: #0d2985; } .tpal-footnote-ref sup { line-height: 1; } @media (max-width: 768px) { .tpal-footnote-ref { margin-right: 0.4em; } } .tpal-footnote-ref.tpal-animate { animation: tpal-footnote-pop 0.22s ease; } @keyframes tpal-footnote-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } } /* 2. Expanded Footnote Container */ .tpal-footnote-content-wrapper { --tpal-footnote-max-height: 0px; position: relative; margin: 1em 0; padding: 0 20px; background-color: #f8f8f8; /* Light grey background */ border: 1px solid #1133AF; /* Subtle house color border */ border-radius: 4px; box-shadow: 0 12px 30px rgba(17, 51, 175, 0.12); overflow: hidden; max-height: var(--tpal-footnote-max-height); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease, transform 0.3s ease; } .tpal-footnote-content-wrapper.tpal-is-visible { padding: 20px; opacity: 1; transform: translateY(0); pointer-events: auto; } /* Remove top/bottom margins from paragraphs inside the footnote */ .tpal-footnote-content-wrapper > :first-child { margin-top: 0; } .tpal-footnote-content-wrapper > :last-child { margin-bottom: 0; } /* 3. Close Button (The 'x') */ .tpal-close-footnote { position: absolute; top: 5px; right: 10px; font-size: 22px; font-family: Arial, sans-serif; color: #888; cursor: pointer; line-height: 1; transition: color 0.2s; } .tpal-close-footnote:hover { color: #333; } /* 4. End-of-article Footnote List */ .tpal-footnotes-list-container { margin-top: 40px; padding: 20px 30px; background-color: #f9f9f9; border-radius: 5px; } .tpal-footnotes-list-container h3 { margin-top: 0; color: #1133AF; } .tpal-footnotes-list { padding-left: 20px; } .tpal-footnotes-list li::marker { color: #1133AF; font-weight: 600; } .tpal-footnote-item { margin-bottom: 1em; } .tpal-footnote-back-link { text-decoration: none; color: #1133AF; margin-left: 0.35em; white-space: nowrap; transition: color 0.2s ease; } .tpal-footnote-back-link:hover, .tpal-footnote-back-link:focus-visible { color: #0d2985; } @media (prefers-reduced-motion: reduce) { .tpal-footnote-ref { transition: none; } .tpal-footnote-ref.tpal-animate { animation: none; } .tpal-footnote-content-wrapper { transition: none; } .tpal-footnote-content-wrapper.tpal-is-visible { transform: none; } } document.addEventListener('DOMContentLoaded', function() { const prefersReducedMotion = window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : null; const createFootnoteElement = (id, content) => { const wrapper = document.createElement('div'); wrapper.className = 'tpal-footnote-content-wrapper'; wrapper.dataset.tpalSourceId = id; // Link back to the source const closeButton = document.createElement('span'); closeButton.className = 'tpal-close-footnote'; closeButton.setAttribute('aria-label', 'Close footnote'); closeButton.innerHTML = '×'; const contentDiv = document.createElement('div'); contentDiv.className = 'tpal-footnote-content'; contentDiv.innerHTML = content; wrapper.appendChild(closeButton); wrapper.appendChild(contentDiv); return wrapper; }; const triggerFootnoteMicrointeraction = (link) => { if (!link) { return; } const shouldReduceMotion = prefersReducedMotion && prefersReducedMotion.matches; if (!shouldReduceMotion) { link.classList.remove('tpal-animate'); // Force reflow so the animation can replay void link.offsetWidth; link.classList.add('tpal-animate'); link.addEventListener('animationend', () => { link.classList.remove('tpal-animate'); }, { once: true }); } if (!shouldReduceMotion && typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function') { navigator.vibrate(15); } }; const closeFootnote = (wrapperElement) => { if (!wrapperElement) return; const sourceId = wrapperElement.dataset.tpalSourceId; const sourceLink = document.querySelector(`.tpal-footnote-ref[data-tpal-footnote-id='${sourceId}']`); if (sourceLink) { sourceLink.classList.remove('tpal-is-active'); sourceLink.setAttribute('aria-expanded', 'false'); } const currentHeight = wrapperElement.scrollHeight; wrapperElement.style.setProperty('--tpal-footnote-max-height', `${currentHeight}px`); requestAnimationFrame(() => { wrapperElement.classList.remove('tpal-is-visible'); wrapperElement.style.setProperty('--tpal-footnote-max-height', '0px'); }); const handleTransitionEnd = (event) => { if (event.propertyName !== 'max-height') { return; } wrapperElement.removeEventListener('transitionend', handleTransitionEnd); wrapperElement.remove(); }; wrapperElement.addEventListener('transitionend', handleTransitionEnd); setTimeout(() => { wrapperElement.remove(); }, 420); }; document.body.addEventListener('click', function(event) { const refLink = event.target.closest('.tpal-footnote-ref'); const closeBtn = event.target.closest('.tpal-close-footnote'); // --- Handle clicking the 'x' button --- if (closeBtn) { const wrapper = closeBtn.closest('.tpal-footnote-content-wrapper'); closeFootnote(wrapper); return; } // --- Handle clicking the footnote reference link --- if (refLink) { event.preventDefault(); triggerFootnoteMicrointeraction(refLink); const footnoteId = refLink.dataset.tpalFootnoteId; // If it's already open, close it if (refLink.classList.contains('tpal-is-active')) { const existingWrapper = document.querySelector(`.tpal-footnote-content-wrapper[data-tpal-source-id='${footnoteId}']`); closeFootnote(existingWrapper); return; } // It's not open, so let's create and show it const sourceContentElement = document.getElementById('tpal-footnote-ref-' + footnoteId); if (!sourceContentElement) { console.warn('TPAL Footnotes: Content for footnote #' + footnoteId + ' not found.'); return; } // Clone the content, removing the back-link const contentClone = sourceContentElement.cloneNode(true); const backLink = contentClone.querySelector('.tpal-footnote-back-link'); if (backLink) { backLink.remove(); } const newFootnoteElement = createFootnoteElement(footnoteId, contentClone.innerHTML); newFootnoteElement.style.setProperty('--tpal-footnote-max-height', '0px'); refLink.insertAdjacentElement('afterend', newFootnoteElement); const settleHeight = (event) => { if (event.propertyName !== 'max-height') { return; } if (!newFootnoteElement.classList.contains('tpal-is-visible')) { return; } newFootnoteElement.removeEventListener('transitionend', settleHeight); newFootnoteElement.style.setProperty('--tpal-footnote-max-height', '9999px'); }; newFootnoteElement.addEventListener('transitionend', settleHeight); refLink.classList.add('tpal-is-active'); refLink.setAttribute('aria-expanded', 'true'); requestAnimationFrame(() => { newFootnoteElement.classList.add('tpal-is-visible'); const expandedHeight = newFootnoteElement.scrollHeight; newFootnoteElement.style.setProperty('--tpal-footnote-max-height', `${expandedHeight}px`); }); } }); }); // Wait for the document to be fully loaded document.addEventListener('DOMContentLoaded', function() { // 1. Create and append the progress bar elements to the body var wrap = document.createElement('div'); wrap.id = 'spb-progress-wrap'; var bar = document.createElement('div'); bar.id = 'spb-progress-bar'; wrap.appendChild(bar); document.body.appendChild(wrap); function positionProgressBar() { var progressWrap = document.getElementById('spb-progress-wrap'); if (!progressWrap) return; var topOffset = 0; // Find a sticky header first. var header = document.querySelector('.tpal-header'); if (header) { var headerStyle = window.getComputedStyle(header); if (headerStyle.position === 'fixed' || headerStyle.position === 'sticky') { topOffset = header.getBoundingClientRect().bottom; } } // If no sticky header found, check for the admin bar. if (topOffset === 0) { var adminBar = document.getElementById('wpadminbar'); if (adminBar) { var adminStyle = window.getComputedStyle(adminBar); if (adminStyle.position === 'fixed' || adminStyle.position === 'sticky') { topOffset = adminBar.getBoundingClientRect().bottom; } } } progressWrap.style.top = topOffset + 'px'; } // 2. The function that updates the bar width function updateProgressBar() { var progressBar = document.getElementById('spb-progress-bar'); if (!progressBar) { return; } // --- START OF MODIFICATION --- // Try to find the comments area var commentsArea = document.getElementById('comments'); var scrollHeight; if (commentsArea) { // If comments exist, the "total height" is the distance from the top // of the document to the top of the comments section. // getBoundingClientRect().top gives position relative to viewport // window.scrollY gives current scroll position // Adding them gives the element's top position relative to the document. scrollHeight = commentsArea.getBoundingClientRect().top + window.scrollY; } else { // Fallback: use the entire document height if #comments isn't found scrollHeight = document.documentElement.scrollHeight; } // Get the height of the browser viewport var innerHeight = window.innerHeight; // Get the current vertical scroll position var scrollY = window.scrollY || document.documentElement.scrollTop; // Calculate the maximum distance we can scroll *within the content* // This is the total content height minus one viewport height var maxScroll = scrollHeight - innerHeight; var progress = 0; if (maxScroll > 0) { // If we have room to scroll, calculate percentage progress = (scrollY / maxScroll) * 100; } else if (scrollY + innerHeight >= scrollHeight) { // If no room to scroll (content is shorter than viewport), // and we're at the end, show 100% progress = 100; } // Ensure progress doesn't go over 100% or below 0% progress = Math.max(0, Math.min(progress, 100)); // --- END OF MODIFICATION --- // Set the width of the progress bar progressBar.style.width = progress + '%'; } // 3. Add event listeners to update the bar on scroll and resize // 'passive: true' improves scroll performance window.addEventListener('scroll', function() { updateProgressBar(); positionProgressBar(); }, { passive: true }); window.addEventListener('resize', function() { updateProgressBar(); positionProgressBar(); }, { passive: true }); // 4. Run the function once on load to set the initial position updateProgressBar(); positionProgressBar(); }); ( function() { var skipLinkTarget = document.querySelector( 'main' ), sibling, skipLinkTargetID, skipLink; // Early exit if a skip-link target can't be located. if ( ! skipLinkTarget ) { return; } /* * Get the site wrapper. * The skip-link will be injected in the beginning of it. */ sibling = document.querySelector( '.wp-site-blocks' ); // Early exit if the root element was not found. if ( ! sibling ) { return; } // Get the skip-link target's ID, and generate one if it doesn't exist. skipLinkTargetID = skipLinkTarget.id; if ( ! skipLinkTargetID ) { skipLinkTargetID = 'wp--skip-link--target'; skipLinkTarget.id = skipLinkTargetID; } // Create the skip link. skipLink = document.createElement( 'a' ); skipLink.classList.add( 'skip-link', 'screen-reader-text' ); skipLink.id = 'wp-skip-link'; skipLink.href = '#' + skipLinkTargetID; skipLink.innerText = 'Skip to content'; // Inject the skip link. sibling.parentElement.insertBefore( skipLink, sibling ); }() ); var pdfPostData = {"title":"\u201cGreen Jellyfish\u201d: we reveal one of the firms responsible for the \u00a31bn cost of fraudulent R&D tax relief claims.","date":"August 19, 2024","slug":"green-jellyfish-r-and-d-fraud","catchwords":"Investigations","content":"\n<p><em><strong>The UK loses <a href=\"https:\/\/www.gov.uk\/government\/publications\/compliance-approach-to-research-and-development-tax-reliefs\/hmrcs-approach-to-research-and-development-tax-reliefs#:~:text=The%20updated%20estimate%20of%20the%20overall%20level%20of%20error%20and%20fraud%20for%20both%20reliefs%20for%202020%20to%202021%20is%2016.7.%25%20(%C2%A31.13%20billion)%2C%20which%20is%20significantly%20higher%20than%20the%20previously%20published%20estimate%20of%203.6%25%20(%C2%A3336%20million)%20for%202020%20to%202021.\">\u00a31bn each year<\/a> to fraudulent claims for research and development (R&D) tax relief. We can reveal that one of the firms responsible is <a href=\"https:\/\/www.greenjellyfish.co.uk\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Green Jellyfish<\/a> \u2013 one of the largest firms in the market. Green Jellyfish says it\u2019s a specialist in research and development tax relief, and that they help companies claim an average of \u00a332,000 in tax refunds from HMRC. But they claim tax relief that doesn\u2019t exist, and then cover it up with the help of an affiliate, Kirby & Haslam. They\u2019re making \u00a33m a year in profits from ripping off the taxpayer and their own clients<\/strong><\/em><strong>.<\/strong><\/p>\n\n\n\n<p><strong>Update: <a href=\"https:\/\/www.bbc.co.uk\/news\/articles\/c62djkxyrwwo\" target=\"_blank\" rel=\"noreferrer noopener\">there have now been arrests.<\/a> Comments on this post are closed.<\/strong><\/p>\n\n\n\n<p>R&D tax relief costs the UK about \u00a38bn each year, of which <a href=\"https:\/\/www.gov.uk\/government\/publications\/compliance-approach-to-research-and-development-tax-reliefs\/hmrcs-approach-to-research-and-development-tax-reliefs#:~:text=The%20updated%20estimate%20of%20the%20overall%20level%20of%20error%20and%20fraud%20for%20both%20reliefs%20for%202020%20to%202021%20is%2016.7.%25%20(%C2%A31.13%20billion)%2C%20which%20is%20significantly%20higher%20than%20the%20previously%20published%20estimate%20of%203.6%25%20(%C2%A3336%20million)%20for%202020%20to%202021.\">more than \u00a31bn has been identified by HMRC as fraudulent<\/a><a href=\"#tpal-footnote-ref-1\" id=\"tpal-footnote-source-1\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"1\" aria-label=\"Footnote 1\" aria-expanded=\"false\" title=\"Click to expand footnote 1\"><sup>1<\/sup><\/a>. This has all been <a href=\"https:\/\/www.bbc.co.uk\/news\/business-68435936\">widely<\/a> <a href=\"https:\/\/www.insurancetimes.co.uk\/analysis\/briefing-could-randd-tax-credit-error-and-fraud-be-the-next-ppi-scandal\/1445593.article\">reported<\/a>, but, until now, nobody has publicly named the people responsible for the false claims.<\/p>\n\n\n\n<p>We can identify that one of the largest R&D firms in the market has submitted a series of fake and potentially fraudulent R&D tax relief claims: Green Jellyfish. We have a dossier of clearly fake<a href=\"#tpal-footnote-ref-2\" id=\"tpal-footnote-source-2\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"2\" aria-label=\"Footnote 2\" aria-expanded=\"false\" title=\"Click to expand footnote 2\"><sup>2<\/sup><\/a> R&D tax relief claims made by Green Jellyfish and its associates. This article focuses on one \u2013 where Green Jellyfish\u2019s client\/ victim was Sophie<a href=\"#tpal-footnote-ref-3\" id=\"tpal-footnote-source-3\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"3\" aria-label=\"Footnote 3\" aria-expanded=\"false\" title=\"Click to expand footnote 3\"><sup>3<\/sup><\/a>, who runs a small therapy business.<\/p>\n\n\n\n<p>Green Jellyfish promised Sophie a \u201cno win no fee\u201d R&D tax relief claim, but there was never any basis for it, and when HMRC challenged it, Sophie was left with large bills. We believe she was defrauded. In other cases, where HMRC didn\u2019t spot Green Jellyfish\u2019s false claims, it will be the taxpayer who was defrauded.<\/p>\n\n\n\n<p>We believe there is enough evidence for HMRC and the police to commence a criminal investigation, shut down Green Jellyfish\u2019s business, and protect both their clients and the wider public interest.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"thelaw\">R&D tax relief<\/h2>\n\n\n\n<p>R&D tax relief was created to encourage small companies to invest in research and development. It gives profit making companies a tax deduction which reduces their corporation tax bill, or in the case of loss-making companies the ability to surrender their losses for a cash payment from HMRC.<\/p>\n\n\n\n<p>The term \u201cresearch and development\u201d is defined in <a href=\"https:\/\/assets.publishing.service.gov.uk\/media\/5a7952ce40f0b676f4a7d80c\/rd-tax-purposes.pdf\">guidance published by BEIS<\/a> and given statutory force by the <a href=\"https:\/\/www.legislation.gov.uk\/ukpga\/2010\/4\/section\/1138\">Corporation Tax Act 2010<\/a>. <a href=\"https:\/\/www.gov.uk\/guidance\/corporation-tax-research-and-development-rd-relief\">HMRC summarise the rules as follows:<\/a><a href=\"#tpal-footnote-ref-4\" id=\"tpal-footnote-source-4\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"4\" aria-label=\"Footnote 4\" aria-expanded=\"false\" title=\"Click to expand footnote 4\"><sup>4<\/sup><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1346\" height=\"1254\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-10.50.46.png\" alt=\"Projects that count as R&D\nThe work that qualifies for R&D relief must be part of a specific project to make an advance in science or technology. It cannot be an advance within a social science - like economics - or a theoretical field - such as pure maths.\n\nThe project must relate to your company\u2019s trade - either an existing one, or one that you intend to start up based on the results of the R&D.\n\nTo get R&D relief you need to explain how a project:\n\nlooked for an advance in science and technology\nhad to overcome uncertainty\ntried to overcome this uncertainty\ncould not be easily worked out by a professional in the field\nYour project may research or develop a new process, product or service or improve on an existing one.\n\nAdvances in the field\nYour project must aim to create an advance in the overall field, not just for your business. This means an advance cannot just be an existing technology that has been used for the first time in your sector.\" class=\"wp-image-17595\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-10.50.46.png 1346w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-10.50.46-768x716.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-10.50.46-640x596.png 640w\" sizes=\"auto, (max-width: 1346px) 100vw, 1346px\" \/><\/figure>\n\n\n\n<p>The Times <a href=\"https:\/\/www.thetimes.com\/business-money\/money\/article\/fraud-tax-credit-hmrc-government-scheme-hmrc-investigation-330bxbk8c\">reported in 2022<\/a> about highly questionable R&D tax relief claims, with restaurants being encouraged to claim R&D relief for vegan menus. In our view, claims like this have no legal basis and may be fraudulent.<\/p>\n\n\n\n<p>HMRC has been <a href=\"https:\/\/www.gov.uk\/government\/publications\/compliance-approach-to-research-and-development-tax-reliefs\/hmrcs-approach-to-research-and-development-tax-reliefs#:~:text=HMRC%20introduced%20a-,mandatory%20random%20enquiry%20programme,-(MREP)%20for\">proactively<\/a> investigating historic R&D tax relief fraud and <a href=\"https:\/\/www.gov.uk\/government\/publications\/compliance-approach-to-research-and-development-tax-reliefs\/hmrcs-approach-to-research-and-development-tax-reliefs#:~:text=Some%20are%20already%20in%20place%20with%20others%20coming%20into%20effect%20from%20August%202023%3A\">making it harder<\/a> for new fraudulent claims to be submitted. Sadly this has had <a href=\"https:\/\/www.thetimes.com\/business-money\/companies\/article\/tax-authority-abusing-its-power-by-cancelling-r-and-d-credit-claims-gxjnztj2l\">knock-on effects on bona fide claimants<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sophie\u2019s story<\/h2>\n\n\n\n<p>Sophie runs a small therapy business. In 2021 she had \u00a346k of revenue. She paid herself a salary of \u00a312k, and had a profit of \u00a318k (after other costs and corporation tax).<\/p>\n\n\n\n<p>In 2022, Sophie was cold-called by Green Jellyfish, who said they thought her business could claim R&D tax relief.<\/p>\n\n\n\n<p>As Sophie puts it:<\/p>\n\n\n<p style=\"padding-left: 40px;\">\u201c<em>GJF from the start were persistent but very friendly and approachable, they seemed to know exactly what R and D was about, whereas I had never heard of it before. They were confident that my business could claim and after initial doubts I naively put my trust and faith in them.<\/em>\u201d\u00a0<\/p>\n\n\n<p>After the call, Green Jellyfish sent a follow-up email to Sophie saying this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1248\" height=\"330\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-10.png\" alt=\"GREEN JELLYFISH\n\nWe are 'R&D specialists', meaning we are an FCA regulated team of experienced\nexperts in this field. Being a recognised specialist in the industry, the relationship we\nhave built with HMRC has given us a very good understanding of what can and can't\nbe claimed. I am therefore very confident, from viewing your website, that we can help\nyou with a worthwhile R&D Claim.\" class=\"wp-image-17601\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-10.png 1248w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-10-768x203.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-10-640x169.png 640w\" sizes=\"auto, (max-width: 1248px) 100vw, 1248px\" \/><\/figure>\n\n\n\n<p>There is and was nothing on Sophie\u2019s website that suggested any R&D activity. Green Jellyfish was at no point <a href=\"https:\/\/register.fca.org.uk\/s\/search?q=jellyfish&type=Companies\">FCA-regulated<\/a>. <a href=\"#tpal-footnote-ref-5\" id=\"tpal-footnote-source-5\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"5\" aria-label=\"Footnote 5\" aria-expanded=\"false\" title=\"Click to expand footnote 5\"><sup>5<\/sup><\/a><\/p>\n\n\n\n<p>And they explained their process:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1276\" height=\"762\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/d1.png\" alt=\"OUR PROCESS\n\n1. TELEPHONE CONSULTATION A free 10-minute telephone consultation with\none of our expert advisors. At this stage we are simply information gathering so that by\nthe end of this call we can confirm your eligibility.\n2. INFORMATION PREP If both parties decide it is worth pursuing then we\u2019ll\npull all of your information together. Being specialists in this area we know exactly\nwhat HMRC are looking for, ensuring a successful claim.\n3. SUBMIT CLAIM We deal with HMRC on your behalf and put in the claim.\n4. APPROVAL Claims are typically approved within 6 weeks.\n5. WE\u2019LL ONLY CHARGE YOU A FEE IF YOUR CLAIM IS SUCCESSFUL\n\nJust from viewing your website, I can safely say that you easily fall within the\nparameters of the scheme. I would just like to arrange a quick 10-minute phone call\nwith one of my specialists to confirm your eligibility and explain the scheme a little\nbetter. If you would like to reply to this email with a time suitable for yourself or call me\non the telephone number at the bottom of this email, I will be happy to set that up for\nyou.\n\" class=\"wp-image-17602\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/d1.png 1276w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/d1-768x459.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/d1-640x382.png 640w\" sizes=\"auto, (max-width: 1276px) 100vw, 1276px\" \/><\/figure>\n\n\n\n<p>We don\u2019t believe anyone who\u2019d <a href=\"https:\/\/www.gov.uk\/guidance\/corporation-tax-research-and-development-rd-relief\">even casually perused the HMRC website<\/a> could \u201csafely say that [Sophie would] easily fall within the parameters of the scheme\u201d.<\/p>\n\n\n\n<p>Sophie had no financial or tax background, and trusted that Green Jellyfish knew what they were talking about. She took up the offer of a telephone consultation. During the call, Green Jellyfish asked Sophie about her business and whether she thought it was \u201cinnovative\u201d. Sophie said it was<a href=\"#tpal-footnote-ref-6\" id=\"tpal-footnote-source-6\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"6\" aria-label=\"Footnote 6\" aria-expanded=\"false\" title=\"Click to expand footnote 6\"><sup>6<\/sup><\/a>, but didn\u2019t provide much detail about what she did<\/p>\n\n\n\n<p>Green Jellyfish didn\u2019t ask about whether there were any specific R&D projects \u2013 it\u2019s pretty obvious there weren\u2019t, and couldn\u2019t be, when Sophie\u2019s business had one employee\/director who was a therapist, not a researcher or engineer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The evidence of fraud<\/h2>\n\n\n\n<p>Green Jellyfish then asked for Sophie\u2019s accounts and corporation tax return:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1860\" height=\"662\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.30.05.png\" alt=\"\" class=\"wp-image-17610\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.30.05.png 1860w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.30.05-768x273.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.30.05-1536x547.png 1536w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.30.05-640x228.png 640w\" sizes=\"auto, (max-width: 1860px) 100vw, 1860px\" \/><\/figure>\n\n\n\n<p>And off the back of that, with no information about any R&D activity, Green Jellyfish submitted an R&D tax relief claim.<\/p>\n\n\n\n<p>We believe this was likely fraudulent for two reasons.<\/p>\n\n\n\n<p>First, Green Jellyfish had no basis for making a claim, because Sophie gave them no basis. They never provided her with any statement of what precisely the claim would be for, much less the kind of report you\u2019d expect from an R&D firm. As Sophie put it to us:<\/p>\n\n\n<p style=\"padding-left: 40px;\">\u201c<em>I remember chatting to Andrew about my business on the phone but I still don\u2019t know what he was claiming for!<\/em>\u201c<\/p>\n\n\n<p>This therefore isn\u2019t a case of Green Jellyfish staff misunderstanding the legislation or guidance. There\u2019s no evidence they paid any attention to the rules at all.<\/p>\n\n\n\n<p>Second, Green Jellyfish claimed Sophie\u2019s <strong>entire staff costs<\/strong> as qualifying R&D expenditure.<\/p>\n\n\n\n<p>Here\u2019s Sophie\u2019s accounts for 2021 \u2013 we\u2019ve blanked out the last three digits to preserve her anonymity:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1220\" height=\"1014\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-9.png\" alt=\"\" class=\"wp-image-17591\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-9.png 1220w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-9-768x638.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-9-640x532.png 640w\" sizes=\"auto, (max-width: 1220px) 100vw, 1220px\" \/><\/figure>\n\n\n\n<p>Note the staff costs of \u00a312k \u2013 the only staff member was Sophie herself. And Green Jellyfish claimed all of that as qualifying R&D expenditure:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1430\" height=\"1098\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-11.png\" alt=\"\" class=\"wp-image-17604\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-11.png 1430w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-11-768x590.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-11-640x491.png 640w\" sizes=\"auto, (max-width: 1430px) 100vw, 1430px\" \/><\/figure>\n\n\n\n<p>This doesn\u2019t survive five second\u2019s scrutiny. Nobody in the business of filing R&D tax credit claims could seriously think Sophie spent absolutely all of her time on qualifying research and development activity.<\/p>\n\n\n\n<p>So why did they claim the entire \u00a312k? We expect that\u2019s because the only way an R&D relief claim for a company of this size would make sense, and justify Green Jellyfish\u2019s fee, is if they claimed 100% of staff costs.<\/p>\n\n\n\n<p>We should add that we can be certain from this evidence that a false R&D tax relief claim was made, but we cannot be certain that a fraud was committed. That depends on whether those involved were dishonest to the criminal standard, which ultimately would be decided by a jury. We set out the criminal standard for <a href=\"https:\/\/taxpolicy.org.uk\/2024\/01\/18\/barrowman_fraud\/#:~:text=in%20either%20direction).-,Evidence%20for%20a%20prosecution,-We%20believe%20this\">fraud by false representation here<\/a>, and for <a href=\"https:\/\/taxpolicy.org.uk\/2024\/01\/18\/barrowman_fraud\/#:~:text=2.%20Did%20Vanquish%20defraud%20HMRC%3F\">tax evasion (\u201ccheating the revenue\u201d) here<\/a>.<\/p>\n\n\n\n<p>But the evidence is in our view sufficient to merit a criminal investigation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HMRC\u2019s response<\/h2>\n\n\n\n<p>Green Jellyfish filed false R&D tax credit claims for Sophie for 2021 and 2022. HMRC immediately paid the refund, and Green Jellyfish took their fee.<\/p>\n\n\n\n<p>A year later, HMRC told Sophie they were opening \u201ccompliance checks\u201d into her R&D tax relief claims. That would mean Sophie would have to refund HMRC \u2013 and she\u2019d remain out of pocket for Green Jellyfish\u2019s fees.<\/p>\n\n\n\n<p>Why does it work like this? Why couldn\u2019t HMRC have checked the claim before paying the refund?<\/p>\n\n\n\n<p>Because HMRC generally operate a \u201c<a href=\"https:\/\/www.litrg.org.uk\/news\/have-you-used-company-claim-refund-and-hmrc-are-now-asking-you-pay-it-back\">refund now, check later<\/a>\u201d policy. It\u2019s a rational approach in a world of normal taxpayers and normal advisers. If HMRC checked first then refunds would take months. And who would put in a fake refund claim knowing that the consequence of getting it wrong would mean paying back the refund, plus interest and penalties?<\/p>\n\n\n\n<p>But, unfortunately, \u201crefund now, check later\u201d creates a loophole for bad actors to exploit. Rogue R&D tax relief firms can file hopeless claims knowing that they keep their fees whatever happens, and that the risk sits with their poor clients like Sophie.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Kirby & Haslam<\/h2>\n\n\n\n<p>Sophie told Green Jellyfish she\u2019d received a compliance check, and they passed her to an associated firm<a href=\"#tpal-footnote-ref-7\" id=\"tpal-footnote-source-7\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"7\" aria-label=\"Footnote 7\" aria-expanded=\"false\" title=\"Click to expand footnote 7\"><sup>7<\/sup><\/a>, Kirby & Haslam.<\/p>\n\n\n\n<p>At this point Sophie realised there was something very strange going on. Andrew had left Green Jellyfish, and the firm had no documentation for her claim. There was no report identifying the qualifying R&D expenditure, and not even a summary of her business activity. So Kirby & Haslam wrote to her asking the kind of questions that Green Jellyfish should have asked right at the start (but didn\u2019t):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1270\" height=\"1342\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-12.png\" alt=\"From: Lisa @kirbyandhaslam.co.uk\nSubject: - Request for Information\nDate: 11 August 2023 at 12:36\nTo:\nCc: Amanda @kirbyandhaslam.co.uk\nGood afternoon\nIt was lovely to meet you today, as discussed please can you provide us with the\nfollowing information.\nCompetent Professional Information\nCould you please provide the education and experience of a competent\nprofessional that worked on the project? This will most likely be yourself.\nFinancial Information\nCould you please send over the annual wages report, which should have\nevery employee\u2019s name, job role, total wages, NIC and pension\ncontributions in together for the whole accounting period ending 30th April\n2021? The wages report should look like the template provided below:\nCould you please send the nominal activities of the subcontractor\n(consultant) costs (summary of your ledger account balances for a specific\nperiod) including their name, job role and amount paid which can be\ninvoices or bank statements for the whole accounting period ending 30th\nApril 2021?\nIf you require any assistance, please do not hesitate to give me a call.\" class=\"wp-image-17607\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-12.png 1270w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-12-768x812.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-12-640x676.png 640w\" sizes=\"auto, (max-width: 1270px) 100vw, 1270px\" \/><\/figure>\n\n\n\n<p>At this point an honest and competent firm would have realised that Sophie had no qualifying R&D expenditure. Kirby & Haslam took a different approach. They used Sophie\u2019s responses to construct a response to HMRC which tried to claim that running remote therapy sessions during the Covid-19 lockdown was an \u201cadvance in science and technology\u201d qualifying for R&D relief:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2000\" height=\"1222\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Untitled-1.jpg\" alt=\"\" class=\"wp-image-17618\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Untitled-1.jpg 2000w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Untitled-1-768x469.jpg 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Untitled-1-1536x938.jpg 1536w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/figure>\n\n\n\n<p>The idea this was an \u201cadvance in the field\u201d is ridiculous, particularly at a time when almost every service business was finding ways to work remotely. We don\u2019t believe any R&D tax expert would believe this claim had any prospect of success.<\/p>\n\n\n\n<p>But the more serious problem is that it was entirely created after-the-event by Kirby & Haslam.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The consequence for Sophie<\/h2>\n\n\n\n<p>HMRC unsurprisingly rejected the Kirby & Haslam justification for her R&D tax relief claim (and another made subsequently for 2022). They sent Sophie a letter which explained why in some detail. For example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1494\" height=\"1228\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/2Untitled.jpg\" alt=\"\" class=\"wp-image-17619\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/2Untitled.jpg 1494w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/2Untitled-768x631.jpg 768w\" sizes=\"auto, (max-width: 1494px) 100vw, 1494px\" \/><\/figure>\n\n\n\n<p>This left Sophie with an unexpected bill of over \u00a37,500 to repay to HMRC. That stung \u2013 because she\u2019d only received a \u00a34,500 refund\u2026 the rest had been taken by Green Jellyfish as their fee.<\/p>\n\n\n\n<p>Sophie says:<\/p>\n\n\n<p style=\"padding-left: 40px;\">\u201cJ<em>ust before Christmas I received a notice from HMRC that not only was I going to have to pay back the full amount of the first claim made by GJF, they had also found the second claim to be non-compliant, and I would also need to pay this back. I had no idea that HMRC were evaluating both claims so this came as a huge shock. I remember rushing over to my friend\u2019s house in a state of distress, crying at the injustice of the situation and terrified about how I could pay the money back when it had already been absorbed into my business. At this stage my anxiety sky rocketed, and I spent a few days over Christmas feeling sick and stressed. I tried to put on a brave face around my children over Christmas as I did not want them to worry. The situation impacted on my mental health and triggered many negative emotions of fear, anxiety, isolation, anger, hopelessness and despair<\/em>.\u201d<\/p>\n\n\n<h2 class=\"wp-block-heading\">The lies to escape penalties<\/h2>\n\n\n\n<p>At this point it looked likely Sophie would be hit with penalties for submitting a tax return that was \u201ccareless\u201d. <\/p>\n\n\n\n<p>Kirby & Haslam wrote representations to HMRC on Sophie\u2019s behalf.<\/p>\n\n\n\n<p>A normal firm in Kirby & Haslam\u2019s position would have been appalled at Green Jellyfish\u2019s original claim, and the representations would have described how Sophie had in essence been defrauded.<\/p>\n\n\n\n<p>Instead, Kirby & Haslam wrote representations to HMRC which lied about the background. Here\u2019s an email from them \u201ccorrecting\u201d Sophie\u2019s initial answers to HMRC:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1438\" height=\"1104\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.38.02.png\" alt=\"\" class=\"wp-image-17613\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.38.02.png 1438w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.38.02-768x590.png 768w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-18-at-17.38.02-640x491.png 640w\" sizes=\"auto, (max-width: 1438px) 100vw, 1438px\" \/><\/figure>\n\n\n\n<p>None of this was true. Sophie had relied entirely on the claim submission company. Andrew at Green Jellyfish (to whom Sophie had been speaking) was a \u201cBusiness Development Manager\u201d, not a tax specialist. She didn\u2019t have a \u201cthorough discussion\u201d regarding her project, because she never discussed a project. Sophie had made no effort to understand the R&D tax relief claim criteria because they were never mentioned to her; she didn\u2019t know what they were, or that they even existed.<\/p>\n\n\n\n<p>Sophie was very uncomfortable with Kirby & Haslam\u2019s proposed responses. She told us:<\/p>\n\n\n<p style=\"padding-left: 40px;\">\u201c<em>Kirby and Haslem were pushing to avoid penalties from HMRC, and in my state of fear, I allowed them to talk me out of telling HMRC what I really wanted to say about GJF and their unscrupulous process. I was constantly told that as a company director I was expected to know about R and D and to have paid due diligence to the claim. I am a clinical professional, working in therapy. I am not a tax specialist and I\u2019m rubbish at maths, so of course I couldn\u2019t know the ins and outs of R and D. I had been led by the group of so called \u201cspecialists\u201d. But apparently this was not good enough. Kirby and Haslem made me take responsibility for the claim without blaming GJF. I was so angry but felt alone with the problem, so saw no option but to take their guidance.<\/em>\u201c<\/p>\n\n\n<p>Sophie escaped penalties. We think that\u2019s a fair outcome under the circumstances \u2013 but it\u2019s deeply unjust that Green Jellyfish and Kirby & Haslam aren\u2019t subject to penalties themselves.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Could it just have been a mistake?<\/h2>\n\n\n\n<p>Not according to Green Jellyfish. When Sophie complained to them, they told her their \u201capproach in preparing and submitting claims is always meticulous, based on the information provided to us and to the highest standards of care and skill\u201d.<\/p>\n\n\n\n<p>They refunded their fees for the 2021 claim, but not the 2022 claim (despite their \u201cno win no fee\u201d promise).<\/p>\n\n\n\n<p>And it wasn\u2019t a one-off either. We have a dossier of similar cases, often for much more money: R&D tax relief claims being made by Green Jellyfish on the basis of absolutely nothing, by businesses who realistically could never qualify. And then in these cases we again see Kirby & Haslam coming in after the event, and inventing rationales for the original claim. But at least in Sophie\u2019s case the Kirby & Haslam document described her actual activity; we\u2019ve seen other Kirby & Haslam letters which invent entirely fictitious R&D projects.<\/p>\n\n\n\n<p>Green Jellyfish is not a small operation. Its <a href=\"https:\/\/find-and-update.company-information.service.gov.uk\/company\/12078297\/filing-history\">accounts<\/a> show that in 2022 it had 38 employees and made a profit of at least \u00a33m.<a href=\"#tpal-footnote-ref-8\" id=\"tpal-footnote-source-8\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"8\" aria-label=\"Footnote 8\" aria-expanded=\"false\" title=\"Click to expand footnote 8\"><sup>8<\/sup><\/a><\/p>\n\n\n\n<p>How much of Green Jellyfish\u2019s business consists of genuine R&D claims, and how much fake claims? We can\u2019t know. The size of our dossier convinces us there are many fake claims \u2013 but we can\u2019t know if it\u2019s 10% of their business or 100%.<\/p>\n\n\n\n<p>We would, however, speculate that what we\u2019ve seen is Green Jellyfish\u2019s standard approach. We say that for several reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Green Jellyfish\u2019s <a href=\"https:\/\/www.linkedin.com\/posts\/green-jellyfish_taxcredits-rnd-research-activity-7158391005258371072-xTFd\/?utm_source=share&utm_medium=member_desktop\">advertising<\/a> <a href=\"https:\/\/www.greenjellyfish.co.uk\/rnd-faqs\/\">consistently<\/a><a href=\"#tpal-footnote-ref-9\" id=\"tpal-footnote-source-9\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"9\" aria-label=\"Footnote 9\" aria-expanded=\"false\" title=\"Click to expand footnote 9\"><sup>9<\/sup><\/a> says that <a href=\"https:\/\/www.greenjellyfish.co.uk\/not-providing-my-information-on-time-cost-my-business\/#:~:text=I%20think%20the%20most%20frustrating%20thing%20about%20it%20all%20is%20that%20all%20Green%20Jellyfish%20were%20waiting%20on%20me%20for%20was%20a%20copy%20of%20our%20accounts%20and%20CT600%2C\">all you need<\/a> for a claim is your corporation tax return and accounts.<\/li>\n\n\n\n<li>Sophie\u2019s experience, and the other businesses we\u2019ve spoken to, was consistent with that. No analysis of any projects, just the numbers in the accounts and tax return.<\/li>\n\n\n\n<li>Green Jellyfish doesn\u2019t appear to employ any tax advisers. Only salespeople and business development officers. This isn\u2019t how you build a legitimate R&D tax relief business \u2013 R&D tax relief is highly technical.<\/li>\n\n\n\n<li>Kirby & Haslam didn\u2019t seem to think there was anything strange about the absence of any records from Green Jellyfish, or the fact that they were constructing entirely original arguments for R&D tax credit relief.<\/li>\n\n\n\n<li>Sophie\u2019s complaint was the opportunity for a bona fide company to look at its processes and consider whether her tax relief claim had been properly handled. They instead just lied to her (\u201cmeticulous\u201d).<\/li>\n<\/ul>\n\n\n\n<p>Even if most\/all of Green Jellyfish\u2019s R&D tax relief claims are false, we expect some of their clients will be very happy. HMRC are unlikely to be able to identify all the false claims, and some clients will inevitably keep their refunds (even if there\u2019s a criminal investigation).<a href=\"#tpal-footnote-ref-10\" id=\"tpal-footnote-source-10\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"10\" aria-label=\"Footnote 10\" aria-expanded=\"false\" title=\"Click to expand footnote 10\"><sup>10<\/sup><\/a> In those cases, it\u2019s HMRC and the wider body of taxpayers that lose out.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Paul Rosser<\/h2>\n\n\n\n<p>This report only exists because of years of work by Paul Rosser.<a href=\"#tpal-footnote-ref-11\" id=\"tpal-footnote-source-11\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"11\" aria-label=\"Footnote 11\" aria-expanded=\"false\" title=\"Click to expand footnote 11\"><sup>11<\/sup><\/a><\/p>\n\n\n\n<p>Paul is an R&D tax specialist. He\u2019s often asked by non-specialist accountants to check R&D claims, particularly when they\u2019re prepared by outside firms who the accountants don\u2019t know. In 2020 he started to see claims prepared by Green Jellyfish which he thought were clearly invalid. Paul <a href=\"https:\/\/taxinvestigation.co\/new\/rd-a-horror-story\/\">had been writing<\/a> about the dubious end of the claims industry. Paul now wrote specifically about Green Jellyfish on LinkedIn, and <a href=\"https:\/\/www.linkedin.com\/posts\/paul-rosser-3979514_ive-just-got-off-an-hour-long-call-with-activity-7175460416091779072-tNWM?utm_source=share&utm_medium=member_desktop\">named the firm<\/a>. <\/p>\n\n\n\n<p>On the evening of 25 April 2024, Sotiris Christophi <a href=\"https:\/\/www.linkedin.com\/posts\/paul-rosser-3979514_not-quite-the-evening-i-was-expecting-when-activity-7189364045248909312-ce-J\/\">arrived unannounced at Paul\u2019s home and threatened him<\/a>. He said Green Jellyfish had been through Paul and his wife\u2019s social media accounts, and was preparing to release some unfavourable information about Paul to the public. Paul immediately told him to leave. Christophi then made a series of calls to Paul\u2019s wife\u2019s personal mobile phone.<\/p>\n\n\n\n<p>We asked Christophi about this back in April: he responded saying he regretted his actions, and asking to speak to us in person. We said we would prefer if Christophi could put his position in writing;<a href=\"#tpal-footnote-ref-12\" id=\"tpal-footnote-source-12\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"12\" aria-label=\"Footnote 12\" aria-expanded=\"false\" title=\"Click to expand footnote 12\"><sup>12<\/sup><\/a> we never heard back.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The tip of the iceberg<\/h2>\n\n\n\n<p>There is a large network of companies associated with Green Jellyfish:<a href=\"#tpal-footnote-ref-13\" id=\"tpal-footnote-source-13\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"13\" aria-label=\"Footnote 13\" aria-expanded=\"false\" title=\"Click to expand footnote 13\"><sup>13<\/sup><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"448\" src=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image.jpeg\" alt=\"\" class=\"wp-image-17596\" srcset=\"https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image.jpeg 854w, https:\/\/taxpolicy.org.uk\/wp-content\/uploads\/2024\/08\/image-768x403.jpeg 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/figure>\n\n\n\n<p>Notable companies in the network are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/find-and-update.company-information.service.gov.uk\/company\/12078297\">GJ2020 Limited<\/a> \u2013 the <a href=\"https:\/\/www.greenjellyfish.co.uk\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Green Jellyfish<\/a> business; it was called Green Jellyfish Ltd but changed its name in September 2023.<a href=\"#tpal-footnote-ref-14\" id=\"tpal-footnote-source-14\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"14\" aria-label=\"Footnote 14\" aria-expanded=\"false\" title=\"Click to expand footnote 14\"><sup>14<\/sup><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/find-and-update.company-information.service.gov.uk\/company\/13849911\">Purple Panda Services Ltd<\/a>, which runs the <a href=\"https:\/\/www.wearepurplepanda.com\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Purple Panda<\/a> business. This appears to have a similar business and branding to Green Jellyfish.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.kirbyandhaslam.co.uk\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Kirby & Haslam<\/a> \u2013 a more seriously-branded R&D firm<\/li>\n\n\n\n<li><a href=\"https:\/\/www.astonshaw.co.uk\/\" target=\"_blank\" rel=\"noreferrer noopener\">Aston Shaw<\/a>, an accounting firm. <\/li>\n<\/ul>\n\n\n\n<p>The precise links between the companies aren\u2019t clear but there is clearly a close relationship between Green Jellyfish and Kirby & Haslam. An adviser acting at arm\u2019s length would have advised Sophie to tell HMRC she was misled by Green Jellyfish. A normal adviser would not accept repeated referrals of improper claims. The letter from Green Jellyfish responding to Sophie\u2019s complaint was (according to the metadata) written by a paralegal working for Kirby & Haslam.<\/p>\n\n\n\n<p><a href=\"https:\/\/find-and-update.company-information.service.gov.uk\/company\/13734359\/persons-with-significant-control\">Kirby & Haslam<\/a> and <a href=\"https:\/\/find-and-update.company-information.service.gov.uk\/company\/05466290\/persons-with-significant-control\">Aston Shaw<\/a> are owned by <a href=\"https:\/\/www.linkedin.com\/in\/steve-christophi-21581523\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Sotiris\/Steve Christophi<\/a>, an accountant regulated by the Association of Chartered Certified Accountants (ACCA).<a href=\"#tpal-footnote-ref-15\" id=\"tpal-footnote-source-15\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"15\" aria-label=\"Footnote 15\" aria-expanded=\"false\" title=\"Click to expand footnote 15\"><sup>15<\/sup><\/a> Christophi denies a connection to Green Jellyfish, but he certainly seemed to be speaking for Green Jellyfish when he visited Paul Rosser\u2019s home to threaten him. <\/p>\n\n\n\n<p>We have a dossier of other apparently fraudulent tax relief claims made by these companies, and will be writing more about them soon.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Green Jellyfish\u2019s response<\/h2>\n\n\n\n<p>Last week we <a href=\"https:\/\/taxpolicy.org.uk\/wp-content\/assets\/GJ_right_to_reply_1.pdf\">wrote to Fladgate LLP,<\/a> who act for both Christophi and Green Jellyfish. <\/p>\n\n\n\n<p>We put to Fladgate that Green Jellyfish submits R&D claims with no technical basis, and all it does is review a company\u2019s corporation tax returns and accounts. We also put to them that Kirby & Haslam invent justifications for Green Jellyfish\u2019s claims after the fact.<\/p>\n\n\n\n<p>There were several curious features to <a href=\"https:\/\/taxpolicy.org.uk\/wp-content\/assets\/GJ_right_to_reply_3.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">Fladgate\u2019s response<\/a>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The Fladgate letter was labelled as \u201cconfidential\u201d. It wasn\u2019t. Solicitors are <a href=\"https:\/\/www.sra.org.uk\/solicitors\/guidance\/slapps-warning-notice\/#:~:text=to%20be%20corrected.-,Labelling%20correspondence,-We%20expect%20you\">not permitted to falsely label letters<\/a> as confidential, and one solicitor is <a href=\"https:\/\/www.lawgazette.co.uk\/news\/zahawi-solicitor-to-face-sdt-over-without-prejudice-email\/5120234.article\">currently appearing<\/a> before the Solicitors Disciplinary Tribunal as a result of such a mislabelling.<a href=\"#tpal-footnote-ref-16\" id=\"tpal-footnote-source-16\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"16\" aria-label=\"Footnote 16\" aria-expanded=\"false\" title=\"Click to expand footnote 16\"><sup>16<\/sup><\/a><\/li>\n\n\n\n<li>Most of Fladgate\u2019s letter to us is taken up with allegations of an \u201cunlawful means conspiracy\u201d against Green Jellyfish by former employees, rival R&D advisers, and an individual who Christophi is currently suing. We have no interest or understanding of any of this (we\u2019re confident that Sophie\u2019s story is real). It is, however, most unusual for a solicitor to put in correspondence what amounts to a conspiracy theory.<\/li>\n\n\n\n<li>Fladgate deny that Green Jellyfish or Kirby & Haslam is behaving improperly, but the denial is very non-specific. <\/li>\n\n\n\n<li>Specific denials are then included in a <a href=\"https:\/\/taxpolicy.org.uk\/wp-content\/assets\/GJ_right_to_reply_2.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">separate email<\/a> from Christophi (on behalf of Kirby & Haslam) and an unknown individual representing Green Jellyfish, which Fladgate forwarded to us. The evidence above (and other evidence we have collated) shows these denials to be false.<\/li>\n\n\n\n<li>The Christophi\/Green Jellyfish email rather deceptively ducks our allegation that it\u2019s improper for Green Jellyfish to claim that care homes, restaurants and childcare companies can often claim R&D relief. (\u201c<em>The legislation is very clear and does<\/em> <em>not exclude a company from making an R&D claim based solely on the sector.<\/em>\u201c)<a href=\"#tpal-footnote-ref-17\" id=\"tpal-footnote-source-17\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"17\" aria-label=\"Footnote 17\" aria-expanded=\"false\" title=\"Click to expand footnote 17\"><sup>17<\/sup><\/a><\/li>\n<\/ul>\n\n\n\n<p>We responded to Fladgate <a href=\"https:\/\/taxpolicy.org.uk\/wp-content\/assets\/GJ_right_to_reply_4.pdf\">saying that we had evidence of actual fraud<\/a>; we have not heard back.<\/p>\n\n\n\n<p>Fladgate is a fine firm with a good reputation. We think there will be widespread disquiet amongst its partners that it\u2019s acting for a business that is widely suspected of fraud, denying that fraud in the face of public evidence, and repeating their client\u2019s wild conspiracy theories.<\/p>\n\n\n\n<p>Everyone, guilty or innocent, deserves a criminal defence, and no criminal lawyer should be criticised for acting for any defendant, no matter how repugnant their crimes. However, defamation is very different. There is no professional or moral duty for a solicitor to write defamation threats on behalf of a business when there is good reason to believe it is carrying on a fraud. Particularly when the consequence of acting is that the solicitor will be facilitating the fraud.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HMRC\u2019s response<\/h2>\n\n\n\n<p>HMRC is prohibited from commenting on individual taxpayers, but told us:<\/p>\n\n\n<p style=\"font-weight: 400; padding-left: 40px;\">\u201c<em>With R&D claims, public money is at stake and taxpayers rightly expect us to scrutinise them, which is why we have increased compliance activity. We do that thoroughly and fairly, and the overwhelming majority of valid claims are paid on time.<\/em><\/p>\n<p style=\"font-weight: 400; padding-left: 40px;\"><em>Any customers who have a concern about an R&D claim they have made, or may have been made on their behalf, should email: <a href=\"mailto:rd.incentivesreliefs@hmrc.gov.uk\">rd.incentivesreliefs@hmrc.gov.uk<\/a> They should title the email as \u2018For the attention of the R&D Anti Abuse Unit\u2019<\/em>\u201c<\/p>\n\n\n<h2 class=\"wp-block-heading\">What should happen to Green Jellyfish?<\/h2>\n\n\n\n<p>Sophie has been deeply affected by what happened to her:<\/p>\n\n\n<p style=\"padding-left: 40px;\">\u201c<em>I contemplated closing my business, as it does not make a huge turnover and I wondered if all this pressure was worth it. I used most of my savings paying back the requested amount and I am still trying to build my savings back up.\u00a0<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em>I always follow the rules and trust others to do the right thing, and \u00a0it felt like I had been taken for an idiot. I don\u2019t understand the mentality of people who act like this and I feel let down by what I\u2019ve experienced.<\/em>\u201c<\/p>\n\n\n<p>We don\u2019t think Sophie should blame herself. She was the victim of what looks like a fraud.\u00a0Those responsible should pay the price.<\/p>\n\n\n\n<p>We will be referring Christophi to the ACCA, although we don\u2019t have much hope \u2013 the ACCA unaccountably is refusing to investigate Christophi\u2019s threat to Paul Rosser. We will also be reporting Green Jellyfish\u2019s false claim of FCA regulation to the FCA.<\/p>\n\n\n\n<p>And the evidence presented in this article suggests that Green Jellyfish and the individuals who run it have defrauded both their own clients and HMRC. <\/p>\n\n\n\n<p>We believe there should be an immediate criminal investigation.<\/p>\n\n\n\n<p>We hope the authorities can move quickly; past experience is that Green Jellyfish and those behind it may not stick around to face the consequences of their actions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to stop the tax cowboys<\/h2>\n\n\n\n<p>Green Jellyfish are not the only tax firm defrauding their clients and HMRC.<\/p>\n\n\n\n<p>The previous Government thought the answer was regulation \u2013 they ran a consultation on \u201c<a href=\"https:\/\/www.gov.uk\/government\/consultations\/raising-standards-in-the-tax-advice-market-strengthening-the-regulatory-framework-and-improving-registration\/raising-standards-in-the-tax-advice-market-strengthening-the-regulatory-framework-and-improving-registration\">raising standards in the tax advice market<\/a>\u201c.<a href=\"#tpal-footnote-ref-18\" id=\"tpal-footnote-source-18\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"18\" aria-label=\"Footnote 18\" aria-expanded=\"false\" title=\"Click to expand footnote 18\"><sup>18<\/sup><\/a> We don\u2019t agree. Green Jellyfish weren\u2019t regulated, but acted with total disregard for the law \u2013 they\u2019d disregard regulation too. And Kirby & Haslam <a href=\"https:\/\/www.accaglobal.com\/gb\/en\/member\/regulation.html\"><strong>was<\/strong> regulated<\/a>. <\/p>\n\n\n\n<p>So it\u2019s not at all clear that regulation is the answer. It would, however, come with a cost \u2013 a new regulatory edifice to be created for currently unregulated advisers, most of whom do a good job. That means cost for them, cost for their clients, and cost for the taxpayer.<\/p>\n\n\n\n<p>The better answer is a simpler and more powerful one: change the incentives. Right now, the reward of churning out fake tax claims is large, and the risk of serious sanctions, or criminal prosecution, is perceived to be low. That needs to change.<\/p>\n\n\n\n<p>Our suggestion: create a new criminal offence of promoting tax schemes, or technical tax positions, that are so unreasonable that no reasonable adviser would think they were correct.<a href=\"#tpal-footnote-ref-19\" id=\"tpal-footnote-source-19\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"19\" aria-label=\"Footnote 19\" aria-expanded=\"false\" title=\"Click to expand footnote 19\"><sup>19<\/sup><\/a> The offence would be accompanied by civil tax penalties equal to 100% of the tax in question, chargeable on the companies involved and the people behind them. <\/p>\n\n\n\n<p>The challenge is to shape the new rules so that the cowboys are pushed out of the business, but legitimate advisers have nothing to be concerned about. That\u2019s hard, but not impossible. And it\u2019s been achieved before. When the <a href=\"https:\/\/www.gov.uk\/government\/publications\/tax-avoidance-general-anti-abuse-rules\">General Anti-Abuse Rule<\/a> was introduced in 2013, <a href=\"https:\/\/www.accountingweb.co.uk\/tax\/hmrc-policy\/anti-avoidance-gaar-on-the-way#:~:text=%22The%20point%20about,ceases%20to%20exist.%E2%80%9D\">some feared<\/a> it could apply to \u201cnormal\u201d tax planning \u2013 in practice it <a href=\"https:\/\/www.taxadvisermagazine.com\/article\/review-cases-have-gone-gaar-panel-what-can-we-learn\">hasn\u2019t<\/a>. <\/p>\n\n\n\n<p>That\u2019s what we\u2019re proposing \u2013 a GAAR-style rule that\u2019s carefully aimed at the cowboys, and with very serious consequences when it applies.<\/p>\n\n\n\n<p>Many people\u2019s instinctive response is that we should \u201cmake tax avoidance illegal\u201d. That can\u2019t, and shouldn\u2019t be done, because we <a href=\"https:\/\/taxpolicy.org.uk\/2024\/01\/22\/avoidancefaq\/#:~:text=what%E2%80%99s%20so%20hard%20about%20defining%20tax%20avoidance%3F\">can\u2019t rigorously define \u201ctax avoidance\u201d<\/a>. <\/p>\n\n\n\n<p>But we can rigorously define \u201ctrying to avoid tax by taking a position that isn\u2019t in fact legally correct, and is so unreasonable that no reasonable adviser would have taken it\u201d. And then make that a criminal offence.<\/p>\n\n\n\n<p>It would be more effective than a new regulatory framework, and an awful lot simpler.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Full credit to <a href=\"https:\/\/www.linkedin.com\/in\/paul-rosser-3979514\/\">Paul Rosser<\/a> of <a href=\"https:\/\/www.randdconsulting.co.uk\/team\/paul-rosser\/\">R&D Consulting<\/a> for discovering and pursuing this story over the last couple of years. It\u2019s an extraordinary story of a tax professional doing the right thing despite considerable professional, <a href=\"https:\/\/www.keystonelaw.com\/keynotes\/online-defamation-what-legal-action-can-you-take\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">legal<\/a> and even <a href=\"https:\/\/www.linkedin.com\/posts\/paul-rosser-3979514_not-quite-the-evening-i-was-expecting-when-activity-7189364045248909312-ce-J\/\">physical<\/a> risk. This article wouldn\u2019t exist without Paul.<a href=\"#tpal-footnote-ref-20\" id=\"tpal-footnote-source-20\" class=\"tpal-footnote-ref\" data-tpal-footnote-id=\"20\" aria-label=\"Footnote 20\" aria-expanded=\"false\" title=\"Click to expand footnote 20\"><sup>20<\/sup><\/a><\/p>\n\n\n\n<p>Thanks above all to Sophie (and other clients\/victims of Green Jellyfish) for telling us their stories. We\u2019ve anonymised Sophie\u2019s details but she\u2019s aware that Green Jellyfish and K&H may identify her; in the unlikely event they\u2019re stupid enough to threaten her, we will take full responsibility for her defence.<\/p>\n\n\n\n<p>Many thanks to K and T for their R&D tax relief expertise, to P for additional research, and as ever to S for his invaluable review and insights. Thanks to J for picking up an accounting error in the original draft.<\/p>\n\n\n\n<p>Some images and text \u00a9 GJ2020 Limited, and used here in the public interest and for purposes of criticism.<\/p>\n\n\n\n<p>Corporate structure diagram \u00a9 Paul Rosser.<\/p>\n\n\n\n<div class=\"tpal-footnotes-list-container\" role=\"doc-endnotes\"><h3>Footnotes<\/h3><ol class=\"tpal-footnotes-list\"><li id=\"tpal-footnote-ref-1\" class=\"tpal-footnote-item\"><p>Hopefully the figure will be much smaller going forward, following <a href=\"https:\/\/www.accountingweb.co.uk\/community\/industry-insights\/the-rules-for-submitting-rd-tax-relief-claims-are-changing-soon-are-you\">new rules<\/a> requiring much more detail in applications from 1 August 2023 <a href=\"#tpal-footnote-source-1\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 1\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-2\" class=\"tpal-footnote-item\"><p>By which we mean not just technically wrong, but indefensible <a href=\"#tpal-footnote-source-2\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 2\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-3\" class=\"tpal-footnote-item\"><p>Sophie is not her real name. For the reasons we set out below, we will not be identifying any of our sources for our Green Jellyfish investigation, except Paul Rosser. We have hidden Sophie\u2019s name, and the details of her business, but not changed anything material to her story. <a href=\"#tpal-footnote-source-3\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 3\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-4\" class=\"tpal-footnote-item\"><p>The guidance in 2021 on this point is the same \u2013 you can <a href=\"https:\/\/web.archive.org\/web\/20210315082942\/https:\/\/www.gov.uk\/guidance\/corporation-tax-research-and-development-rd-relief\">see the 2021 version via the Internet Archive here<\/a>. The main link is to the current HMRC website because we know some people <a href=\"https:\/\/news.ycombinator.com\/item?id=31290566\">cannot easily access the Internet Archive<\/a>. <a href=\"#tpal-footnote-source-4\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 4\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-5\" class=\"tpal-footnote-item\"><p>Prior to 2 July 2021, Green Jellyfish was owned by Glide Business Solutions, which <a href=\"https:\/\/register.fca.org.uk\/s\/firm?id=0014G00002TqOe6QAF\">was FCA-regulated<\/a>. However that is irrelevant to the status of Green Jellyfish and its staff, and in any event Glide wasn\u2019t the shareholder when the email was sent to Sophie in 2022 <a href=\"#tpal-footnote-source-5\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 5\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-6\" class=\"tpal-footnote-item\"><p>We agree; the way Sophie carried on her therapy business during lockdown was \u201cinnovative\u201d in the normal business meaning of the term; but that\u2019s very different from having qualifying R&D expenditure. <a href=\"#tpal-footnote-source-6\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 6\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-7\" class=\"tpal-footnote-item\"><p>The precise nature of the association isn\u2019t clear; more on that below <a href=\"#tpal-footnote-source-7\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 7\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-8\" class=\"tpal-footnote-item\"><p>The accounts show \u00a3558k of corporation tax owing to HMRC; the corporation tax rate at the time was 19% \u2013 this implies taxable profit of \u00a3558k\/19% = \u00a33m. The P&L reserve increased by \u00a32.6m from 2021 to 2022, implying that taxable profits were lower then accounting profits by at least \u00a3150k. Some of this was likely due to capital allowances, as there was a c\u00a3200k addition to plant and machinery. Dividends may also have been paid. And we would not be surprised if the company artificially depressed its taxable profit, given how cavalier Green Jellyfish was with its clients\u2019 tax position. Note that there was an accounting error in the original version of this footnote; many thanks to J for picking this up. <a href=\"#tpal-footnote-source-8\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 8\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-9\" class=\"tpal-footnote-item\"><p>Click \u201cWhat documentation do I need to prepare my claim\u201d <a href=\"#tpal-footnote-source-9\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 9\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-10\" class=\"tpal-footnote-item\"><p>Although, given this appears to be a case of deliberate false claims, HMRC will have <a href=\"https:\/\/www.gov.uk\/hmrc-internal-manuals\/compliance-handbook\/ch53700#:~:text=The%2020%2Dyear%20time%20limit%20applies%20where%20tax%20has%20been%20under%2Dassessed%20or%20under%2Ddeclared%2C%20or%20over%2Drepaid%20or%20wrongly%20credited%2C%20because%20of%20a%20deliberately%20inaccurate%20return%20or%20other%20document.\">20 years to investigate such clients<\/a>. <a href=\"#tpal-footnote-source-10\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 10\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-11\" class=\"tpal-footnote-item\"><p>It is important to add, however, that the contents of this report were written by Tax Policy Associates independently, and the only element which relies solely on evidence from Paul Rosser is the tale of Christophi\u2019s unexpected visit. Christophi has, however, admitted that the event took place. <a href=\"#tpal-footnote-source-11\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 11\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-12\" class=\"tpal-footnote-item\"><p>The subjects of our investigation often ask to speak in person; standard journalistic practice is that responses should be in writing, and we believe there are numerous reasons why that is the only sensible approach. <a href=\"#tpal-footnote-source-12\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 12\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-13\" class=\"tpal-footnote-item\"><p>Many thanks to Paul Rosser for the diagram, which is a product of considerable research by him. The group structure has since changed slightly. <a href=\"#tpal-footnote-source-13\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 13\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-14\" class=\"tpal-footnote-item\"><p>There is something odd going on with its directors, who <a href=\"https:\/\/find-and-update.company-information.service.gov.uk\/company\/12078297\/filing-history#:~:text=02%20Jul%202024-,Termination%20of%20appointment%20of%20Nicola%20Ann%20Colk%20as%20a%20director%20on%202%20July%202024,-View%20PDF\">keep resigning and being reappointed<\/a>. We don\u2019t understand why that would happen. <a href=\"#tpal-footnote-source-14\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 14\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-15\" class=\"tpal-footnote-item\"><p>Christophi is also <a href=\"https:\/\/find-and-update.company-information.service.gov.uk\/company\/05466290\/filing-history?page=4#:~:text=05%20Aug%202008-,Director%27s%20change%20of%20particulars%20\/%20sotos%20christophi%20\/%2005\/08\/2008,-View%20PDF\">sometimes known as Sotos Christophi<\/a>, and you can find him under that name <a href=\"https:\/\/www.accaglobal.com\/uk\/en\/member\/find-an-accountant\/directory-of-member.html\">on the ACCA website<\/a>. He is <a href=\"https:\/\/www.edp24.co.uk\/news\/local-council\/20742005.council-claims-hindered-collecting-business-rates-building\/\">referenced in this rather curious press report<\/a> from 2019 about a council being \u201chindered\u201d (in an unspecified way) from collecting business rates. <a href=\"#tpal-footnote-source-15\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 15\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-16\" class=\"tpal-footnote-item\"><p>Fladgate subsequently told us that they labelled the letter as \u201cconfidential\u201d because they mention a police investigation. They have no first hand knowledge of that investigation and don\u2019t appear certain it exists. We have no idea why they thought the repetition of what is little more than a rumour would be \u201cconfidential\u201d. <a href=\"#tpal-footnote-source-16\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 16\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-17\" class=\"tpal-footnote-item\"><p>Technically it is highly unlikely for businesses of this type to be eligible for R&D relief, but there is little point in debating the law when there is evidence of fraud. We don\u2019t intend to go into this point any further with Christophi\/Green Jellyfish. <a href=\"#tpal-footnote-source-17\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 17\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-18\" class=\"tpal-footnote-item\"><p>It closed shortly before the election, and so we haven\u2019t had a response or any follow-up, but we believe officials are still proceeding on the assumption this will be the way forward. <a href=\"#tpal-footnote-source-18\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 18\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-19\" class=\"tpal-footnote-item\"><p>There would have to be a fair defence for cases where a mistake was made by genuine accident, or where a rogue employee acted despite compliance measures being put in place. <a href=\"#tpal-footnote-source-19\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 19\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><li id=\"tpal-footnote-ref-20\" class=\"tpal-footnote-item\"><p>But, as ever, Tax Policy Associates Limited takes sole responsibility for the content of this article. <a href=\"#tpal-footnote-source-20\" class=\"tpal-footnote-back-link\" aria-label=\"Back to reference 20\" title=\"Jump to footnote in main text\">\u21a9\ufe0e<\/a><\/p>\n<\/li><\/ol><\/div>\n\n\n\n<p>Comments are now closed for legal reasons. Our apologies.<\/p>\n","meta_desc":"The UK loses \u00a31bn each year to fraudulent claims for research and development (R&D) tax relief. We can reveal that one of the firms responsible is Green Jellyfish \u2013 one of the largest firms in the market. Green Jellyfish says it\u2019s a specialist in research and development tax relief, and that they help companies claim [\u2026]","comments":[{"author":"Mrs Rosemary Brocklehurst","date":"August 19, 2024 18:25","content":"Brilliant work Dan. Hope you are as well regarded by Ms Reeves et alas you should be."},{"author":"Oliver","date":"August 19, 2024 18:26","content":"The email linked in the sentence \u201cSpecific denials are then included in a separate email from Christophi\u201d (under the section Green Jellyfish\u2019s response) appears to actually be TPA\u2019s response to Fladgate, not their reply \u2013 just FYI."},{"author":"Peter Langton","date":"August 19, 2024 18:40","content":"Great work keep it up. There must be an argument for HMRC to tell similar stories in real time. I know they can issue warnings in real time and report after prosecution but this so much more impactful. More legislation to pull back further the rules that enable these people to operate in the shadows."},{"author":"Mark Ellis","date":"August 19, 2024 19:34","content":"Did Sophie\u2019s company not have accountants drawing up the accounts and initial CT600 return. Surely she could have asked then for advice about the claim?"},{"author":"John Plumridge","date":"August 19, 2024 19:49","content":"I think I talked to Green Jellyfish not long after they were established. From memory they were wanting us to refer our clients. Luckily for us we didn\u2019t make any referrals because I wasn\u2019t sufficiently satisfied with what they had told me.They also seemed to have an awful lot of staff for a start up. Looks like we dodged a bullet."},{"author":"Mr David Maxwell","date":"August 19, 2024 20:23","content":"Lesson for every Taxpayer , don\u2019t go on blind dates following call from supposedly reputable firms offering their services while claiming FCA regulated. Simple call to FCA verify their registration details. Do your research and request fee quotes in writing from several firms together with draft letter of engagement.Do they hold PI insurance. Finally my main reason for contacting you is the surprise Barclays Bank have Debenture and Cross Company Guarantee registered 26 March , given the adverse publicity and commentary from various professional individuals does Barclays ignore social media posts such as Linkedin . Banks claim they lend to people, well with the myriad of director resignations and reappointments then surely this another red flag or perhaps they are good at giving plausible stories to their senior lenders !"},{"author":"EB Strobes","date":"August 19, 2024 20:47","content":"I\u2019m surprised this otherwise excellent article doesn\u2019t appear to refer to the Claims Notification regime which was introduced last August to cut these cowboys off at the knees. Admittedly I\u2019m not sure whether it is applicable to SMEs as well as those claiming the RDEC, but it seems to me to be an excellent way of making cowboy claims redundant, as it would no longer permit the making of last minute claims from those companies who had never made a prior claim."},{"author":"Steve Hasson","date":"August 19, 2024 21:01","content":"The scale of losses here is breathtaking. I agree with what you say about the desirability of paying valid claims quickly and the potential solution. That said in economic terms the relief was poorly designed, HMRC were slow to spot the truly incredible growth in claims by small businesses and traditionally one of HMRC\u2019s tools was identifying and monitoring suspected \u201crogue\u201d advisors to direct scrutiny toward claims from that source. Equally criminal sanctions applied to such professionals. These cowboy \u201cadvisors\u201d are far from professional but bringing together a group of people and going out to make claims which look fraudulent seem to me to have the makings of conspiracy charges."},{"author":"Michael H","date":"August 19, 2024 22:18","content":"A client of mine had the same issue with G.Jellyfish. GF changed and resubmitted accounts and CT600s that I prepared as accountants without my knowledge or consent."},{"author":"Shazia Karim","date":"August 19, 2024 22:40","content":"I was one of those GJF put a claim in for and I had to pay it back like Sophie."},{"author":"Safia","date":"August 19, 2024 22:55","content":"It\u2019s funny how Dan Robinson (CEO of Impact) has taken dividends but refuses to pay the staff their redundancy wages. If you want a story on this \u2013 get in touch, I\u2019ll happily provide proof."},{"author":"Dan","date":"August 20, 2024 00:08","content":"thanks \u2013 think this is now fixed!"},{"author":"Dan","date":"August 20, 2024 00:10","content":"they told her they weren\u2019t specialists and don\u2019t seem to have checked it at all. A shame."},{"author":"Dan","date":"August 20, 2024 00:11","content":"thanks \u2013 I\u2019m aware there are various stories going round about Impact potentially being wound up, but I\u2019ll leave that to others and focus on the tax."},{"author":"juliette thomas","date":"August 20, 2024 01:11","content":"Thank Dan and Paul for helping the victims of GJF to get the truth out but importantly publicising this huge scam at the cost of the tax payer and SME."},{"author":"Paul","date":"August 20, 2024 06:20","content":"I believe this is just the first article in a series. Yes, the measures HMRC have put in recently such as pre-notification and the Additional Information Form (AIF) are helping reduce fraud, however historically billions of taxpayer funds have been lost before HMRC did very much to stop it."},{"author":"Adam","date":"August 20, 2024 07:43","content":"Thanks Dan, always producing amazing articles. I know you covered a lot on LessTax4Landlords and how they were corporate sponsors at the National Landlords Show. There\u2019s also a company by the name of Comprehensive Tax Planning that still exhibits at the show they also seem to claim R&D as the \u201cmost generous corporate tax relief\u201d."},{"author":"David","date":"August 20, 2024 07:59","content":"Good to see you having the bravery to out a firm like this and highlight the serious question of why HMRC haven\u2019t taken steps to shut them down before now (by refusing to accept claims from them etc) given what they obviously know. Keep up the good work and hopefully HMRC will eventually step up and be much more proactive in this space."},{"author":"Jonathan Yeomans","date":"August 20, 2024 09:21","content":"An impressive piece of investigative journalism, Dan and Paul \u2013 well done. Another approach to tackling the rogue R&D tax advisers is to leverage the \u2018Dishonest Tax Agent\u2019 civil penalties introduced under Schedule 38 of the Finance Act 2012. These penalties can reach up to \u00a350,000 and include the publication of the agent\u2019s details. Operating under a civil standard and the balance of probabilities, HMRC only needs a \u2018reason to believe\u2019 to impose them, rather than the establishment of proof beyond reasonable doubt. Despite being woefully underutilised, these penalties would be ideally suited for situations like this, with the added bonus of granting HMRC access to the R&D adviser\u2019s working papers and files, giving HMRC a deeper insight into any potential web of deceit. Greater use of these penalties is something we\u2019ve advocated for with HMRC and HMT. We should also increase the upper-level amount now that the legislation is more than a decade old. I\u2019ve put a link to the relevant guidance below: https:\/\/www.gov.uk\/guidance\/dishonest-conduct-by-tax-agents"},{"author":"Michael Richards","date":"August 20, 2024 10:50","content":"If you have a system which dangles a carrot to a wide boy, the wide boy is going to chase the carrot. One such system is HMRC cash repayments for R&D claims. To make matters worse, the client pool of the likes of Jellyfish includes not only the greedy man looking to get one over on HMRC, but the unsuspecting small business who don\u2019t even know what R&D is."},{"author":"albert wright","date":"August 20, 2024 10:58","content":"Fascinating story. Several \u201crogue\u201d companies offering help to SMEs who want to claim R&D tax credits were set up because the original scheme was so generous and scrutiny of claims seemed so lax. Paying companies that were making losses was the icing on the cake. It seemed that Government wanted to be seen to be helping small firms invest. They even adjusted the national figures for investment to include the credits given under the scheme. Similar misuse of the Entrepreneurs Tax relief scheme took place when 10% tax relief was available for up to \u00a310 million. Keep up the good work."},{"author":"Frustrated advisor","date":"August 20, 2024 11:00","content":"For the morally bankrupt, any chance to get \u2018free money\u2019 if HMRC adopt a pay now, ask later approach is just too tempting. More fool HMRC for thinking that leopards change spots, same with Covid loans, more free money. They never ever do. There should be a post office style enquiry about HMRC and the taxpayer funds they have handed over to these tax crooks, starting with Harra. From my personal knowledge of the accounting firm, who have a terrible reputation in Norfolk, I\u2019d say it is highly probably that all of these \u2018yellow brick (taxpayer funds) roads\u2019 lead to them and their owner."},{"author":"EB Strobes","date":"August 20, 2024 15:24","content":"To be fair I can see that this is covered within one of Dan\u2019s hyperlinks."},{"author":"Carol","date":"August 20, 2024 15:27","content":"We had similar with a client persuaded to made a claim for 2 years by RDI Solutions. HMRC paid out, to RDI Solutions, but then rejected the claim, just as RDI Solutions called in the administrators. This was back in March, client has not heard anything and no idea where \u00a365K went. Below is all we know RDI Solutions has called in insolvency practitioners and told clients they will have to wait a month for any kind of update Clients of the research and development (R&D) claims firm have been left hanging as RDI Solutions called in Absolute Recovery Limited to review whether the business will have to go into administration or can be restructured. The licensed insolvency practitioner at Doncaster based Absolute Recovery is Stephen Richard Penn. This follows the closure of the R&D company earlier this week when the RDI Solutions\u2019 website was taken down, leaving only a notice online that the business was \u2018not in operation\u2019, having effectively suspended all activity. A brief holding message on the RDI Solutions website has now been updated, stating that the company email has been disabled and is no longer available. Any existing customers have been told they will have to wait minimum 30 days before they are contacted by the insolvency practitioner. The company is run by owner and sole director Naim Mahmud through Mahmud Group Holdings and was set up in 2019; earlier this month the only four remaining directors resigned. When it was up and running, RDI claimed it handled monthly R&D claims worth around \u00a320m in tax relief, representing a sizeable annual claim book of \u00a3240m, and had \u20183,000 clients\u2019. Accounts at Companies House show extensive director loans and intergroup loans are outstanding. In a statement, RDI Solutions said: \u2018The company is currently seeking advice from an insolvency practitioners to assess the company\u2019s financial position and the best course of action moving forward for the business while it attempts to restructure. \u2018There is currently no access to the company emails, for any enquiries, please contact Michael at Absolute Recovery Limited and he will assist with your query. \u2018If your query can wait, Absolute Recovery Limited will be in touch in the next 30 days.\u2019"},{"author":"Alun Oliver","date":"August 20, 2024 20:41","content":"Refreshing to see some sunlight shone on this merky area of tax. Sadly HMRC appear to have been asleep at the wheel and clearly have evidence in their records to spot trends and act far more promptly to close down these cowboys. I agree that regulation won\u2019t achieve anything other than policies and bureaucracy for bona fide tax advisers\u2026 the cowboys will continue to ignore \u2026 unless they are in the cross-hairs. Like Money Laundering \u2013 massive amounts of bureaucracy for all regulated firms etc. But the crooks and \u2018bent\u2019 firms sidestep and disregard. I entirely agree the crooks need to be held accountable with penalties to match tax and fees and exceed such for repeat offenders\u2026 with some threshold (20 cases?) Sufficient to trigger immediate action to freeze accounts pending a prompt and timely investigation with confiscation of all proceeds of crime. Lastly much of this sector initially sought clients by significant referral fees (classic pyramid selling) from lawyers and accountants \u2013 PCRT requires full disclosure of such commissions and the various professional bodies need to consider if they have done enough to advise their members and protect them and public from these charlatan firms as well as policing compliance\u2026 should Sophie\u2019s advisers been more curious?"},{"author":"Hamish","date":"August 20, 2024 20:55","content":"I think that HMRC does what it can with the resources available to it \u2013 they were enormously helpful to myself, and my company, when I inadvertently got sold tax credits as a \u201cgovernment incentive scheme to assist companies post pandemic\u201d \u2013 not a \u201cbounce back scheme\u201d, rather, a genuine \u201cthanks for getting the country through this\u201d type of scheme \u2013 as long as you had genuinely gone to extraordinary lengths not to be a burden, and displayed some innovation in the face of adversity. Yes, of course I was mugged off by these charlatans and now have a debt to pay but I\u2019d rather pay for my stupidity and sleep easy. I didn\u2019t get charged a penalty fortunately. The last I heard I was being threatened with legal action but I\u2019ve heard nothing for a tear or so now. Bring it on I say because I have all the emails they sent \u2013 \u201cI can confirm that you will be paid even if the claim is challenged because you have chosen option B\u201d. Jeez how can I have been so stupid? Anyway, my claim went through Roger Hopkins Limited \u2013 essentially the same company."},{"author":"Mike Rule","date":"August 20, 2024 21:39","content":"Good work Dan and Paul. We have to stand up to these people. I had one trying sell a ludicrous scheme based on the GDPR regulations They seem to move around so perhaps keep tabs on them and publish their new companies"},{"author":"Mel Stokes","date":"August 20, 2024 22:01","content":"I had green jelly fish constantly badgering me about projects and how we were eligible because we were in social care to claim back money and how they would do all the work for us wouldn\u2019t have to do anything, kept saying no thanks. Then we had I\u2019m sure a different firm that had 4 \u201cprojects\u201d you could pick from and they would claim the money back off the tax so nearly signed up to that one but got my accountant to check through the contract first there was info we felt was suspect luckily I never signed it"},{"author":"Paul rosser","date":"August 21, 2024 06:08","content":"Unfortunately the statement of affairs for RDI contains some concerning news regarding it\u2019s assets https:\/\/www.linkedin.com\/posts\/paul-rosser-3979514_since-the-sudden-closure-of-rdi-solutions-activity-7204394900161748992-S7gr"},{"author":"Raheel Malhi","date":"August 21, 2024 08:48","content":"We are also defrauded by Complete care advisory group limited and director at that time now is a director of Green jelly fish limited. They submitted report on our behalf which was totally bogus. They took \u00a317800 from HMRc . HMrC later removed the claim as a fraudulent claim and now asking for the money back . CCA not giving the money back and asking me to re-claim . I refused as they are liars, cheaters and Fraudsters . Problem is no one taking action against them . I have now hired a law firm to take action against them . I like to know if more people can also join as we must do whatever we can to expose these sham companies.My email is REDACTED"},{"author":"Alun","date":"August 21, 2024 09:45","content":"Great work Dan. The Great Train Robbery team stole \u00a370million of public money in today\u2019s prices. A serious police team went after the crooks and chased them to the ends of the planet. Just saying."},{"author":"Martin Haynes","date":"August 22, 2024 11:21","content":"Amazing investigation and reporting. Sadly I am another victim of Green Jellyfish\u2019s fraud. Similar to Sophie\u2019s story, I have had to pay everything back to HMRC, including the huge commission that Green Jellyfish took, plus significant interest payments. I have tried to contact Green Jellyfish to complain and request some of their commission back, but they never respond to me. I run a small business and we cannot afford to lose the many, many thousands that Green Jellyfish took as part of this scam. I have documented evidence of what they sent to HMRC and it\u2019s fraudulent, false and explicitly makes claims that I said are not true (such as plans to sell software to the market, which is total nonsense \u2013 there are other examples too). I never got to see the report or approve it before it was sent to HMRC, I just suddenly received an email from Green Jellyfish saying HMRC had approved the claim. I am tempted to take legal action as Green Jellyfish won\u2019t respond to me, but we\u2019ve lost so much money in this scam, it would be difficult to finance."},{"author":"Paul Rosser","date":"August 22, 2024 22:19","content":"Thank you Mike. Ahh yes the old GDPR data breach tax scam, well know and called out by HMRC as totally fraudulent."},{"author":"Michael Phillips","date":"August 23, 2024 17:11","content":"This is superb \u2013 great investigation as well. Trying to help companies is great but doing it properly, sensibly and more responsibly needs to the way forward. Thanks to Dan and Paul for their monstrous work. Those of us trying to do it properly often get overlooked as the big firms promise the earth and deliver nothing."},{"author":"Paul rosser","date":"August 24, 2024 18:01","content":"Martin there is a class action being prepared by lots of their clients owed money. I believe it\u2019s on a no win, no fee basis so if you want to look at joining the solicitor is Nick Ashcroft at Addleshaw Goddard [edited by TPAL to remove his email address for spam protection] Cheers Paul"},{"author":"Keith Wright","date":"August 28, 2024 09:23","content":"where do we go from here? Complete Care Advisory ltd is part of the cabal fradulantly claiming R&D payments from HMRC. Mark Daniel Robinson, Also of Green Jellyfish one of the main protaganists."},{"author":"Paul","date":"August 28, 2024 17:34","content":"It should be quite obvious to those using Green Jellyfish that they probably weren\u2019t entitled to free money for R&D Credits if they weren\u2019t actually doing any R&D. I\u2019m struggling to be sympathetic towards their plight as they\u2019ve allowed Green Jellyfish to help them make fraudulent claims and then suffered the consequences. This has happened time and time again and will no doubt continue to until the system is robust enough to stop it."},{"author":"Paul Rosser","date":"August 29, 2024 07:51","content":"Thanks Jonathan. I totally agree, HMRC should be looking at penalties for those behind Green Jellyfish, as the amounts they have generated in fees alone is eyewatering and there should be some negative consequences to act as a deterrent for others considering defrauding the taxpayer."},{"author":"Dan","date":"August 29, 2024 11:57","content":"GJ were\/are brilliant salespeople. The businesses were usually very small, and had never heard of R&D tax relief at all. So when they have someone telling them that their innovative business qualifies for the relief, and that\u2019s the intention, I understand they they believed it."}]}; document.addEventListener('DOMContentLoaded', function() { const downloadButton = document.getElementById('pdf_download'); if (!downloadButton) return; // --- 1. MODAL DIALOG LOGIC --- function showPdfOptionsModal() { if (document.getElementById('pdf_options_modal')) return; const modalHTML = ` <div id='pdf_options_overlay' role='presentation' aria-hidden='true' style='position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99998; opacity: 0; transition: opacity 0.3s ease;'></div> <div id='pdf_options_modal' role='dialog' aria-modal='true' aria-labelledby='pdf_options_title' aria-describedby='pdf_options_desc' style='position: fixed; top: 50%; left: 50%; transform: translate(-50%, -60%); background: white; padding: 25px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 99999; font-family: sans-serif; min-width: 340px; max-width: 90vw; opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease;'> <h3 id='pdf_options_title' style='margin-top: 0; color: #1133AF; font-size: 18px;'>PDF Export Options</h3> <div style='display:flex; flex-direction:column; gap:10px'> <label style='display: flex; align-items: center; cursor: pointer; font-size: 16px;'> <input type='checkbox' id='expand_footnotes_check' style='margin-right: 10px; width: 16px; height: 16px;'> Expand footnotes in-line </label> <label style='display: flex; align-items: center; cursor: pointer; font-size: 16px;'> <input type='checkbox' id='include_comments_check' style='margin-right: 10px; width: 16px; height: 16px;'> Include comments </label> </div> <div style='display:flex; gap:12px; margin: 15px 0; flex-wrap:wrap;'> <label style='display:flex; flex-direction:column; flex:1; font-size:14px; gap:6px;'> Page size <select id='pdf_page_size' style='padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px;'> <option value='a4' selected>A4</option> <option value='a3'>A3</option> <option value='a5'>A5</option> <option value='letter'>US Letter</option> <option value='legal'>US Legal</option> <option value='tabloid'>US Tabloid</option> </select> </label> <label style='display:flex; flex-direction:column; flex:1; font-size:14px; gap:6px;'> Orientation <select id='pdf_orientation' style='padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px;'> <option value='portrait' selected>Portrait</option> <option value='landscape'>Landscape</option> </select> </label> <label style='display:flex; flex-direction:column; flex:1; font-size:14px; gap:6px; min-width:180px;'> PDF quality <select id='pdf_quality' style='padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px;'> <option value='medium' selected>Medium (default)</option> <option value='low'>Low (smaller file)</option> <option value='high'>High (sharper)</option> <option value='ultra'>Ultra high (lossless)</option> </select> </label> </div> <div id='pdf_options_desc' style='font-size: 12px; color: #555; background:#f7f7f9; border:1px solid #ececf1; padding:8px 10px; border-radius:4px; margin-bottom: 16px;'> This is a preview feature, still in testing — please send any feedback to <a href='mailto:info@taxpolicy.org.uk'>info@taxpolicy.org.uk</a>. </div> <div style='display: flex; justify-content: flex-end; gap: 10px;'> <button id='pdf_cancel_btn' style='padding: 10px 15px; border: 1px solid #ccc; background: #f0f0f0; border-radius: 5px; cursor: pointer;'>Cancel</button> <button id='pdf_generate_btn' style='padding: 10px 15px; border: none; background: #1133AF; color: white; border-radius: 5px; cursor: pointer;'>Generate PDF</button> </div> </div> `; document.body.insertAdjacentHTML('beforeend', modalHTML); const overlay = document.getElementById('pdf_options_overlay'); const modal = document.getElementById('pdf_options_modal'); const firstFocus = document.getElementById('expand_footnotes_check'); const closeBtn = document.getElementById('pdf_cancel_btn'); const generateBtn = document.getElementById('pdf_generate_btn'); setTimeout(() => { overlay.style.opacity = '1'; modal.style.opacity = '1'; modal.style.transform = 'translate(-50%, -50%)'; (firstFocus || generateBtn).focus(); }, 10); // Make rest of page inert to screen readers while modal is open const hiddenEls = []; Array.from(document.body.children).forEach(el => { if (el.id !== 'pdf_options_overlay' && el.id !== 'pdf_options_modal') { if (!el.hasAttribute('aria-hidden')) { hiddenEls.push(el); el.setAttribute('aria-hidden', 'true'); } } }); const closeModal = () => { overlay.style.opacity = '0'; modal.style.opacity = '0'; modal.style.transform = 'translate(-50%, -60%)'; setTimeout(() => { overlay.remove(); modal.remove(); hiddenEls.forEach(el => el.removeAttribute('aria-hidden')); downloadButton.focus(); }, 300); document.removeEventListener('keydown', onKey); }; // Focus trap within modal function trapFocus(e) { if (e.key !== 'Tab') return; const focusables = modal.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'); const f = Array.from(focusables).filter(x => !x.disabled && x.offsetParent !== null); if (f.length === 0) return; const first = f[0]; const last = f[f.length - 1]; if (e.shiftKey && document.activeElement === first) { last.focus(); e.preventDefault(); } else if (!e.shiftKey && document.activeElement === last) { first.focus(); e.preventDefault(); } } // Close on Esc function onKey(e) { if (e.key === 'Escape') closeModal(); trapFocus(e); } document.addEventListener('keydown', onKey); generateBtn.addEventListener('click', async () => { const expandFootnotes = document.getElementById('expand_footnotes_check').checked; const includeComments = document.getElementById('include_comments_check').checked; const pageSizeSelect = document.getElementById('pdf_page_size'); const orientationSelect = document.getElementById('pdf_orientation'); const qualitySelect = document.getElementById('pdf_quality'); const pageSize = pageSizeSelect ? pageSizeSelect.value : 'a4'; const orientation = orientationSelect ? orientationSelect.value : 'portrait'; const quality = qualitySelect ? qualitySelect.value : 'medium'; closeModal(); // Spinner overlay const spinner = document.createElement('div'); spinner.id = 'pdf_generating_overlay'; spinner.setAttribute('role','status'); spinner.setAttribute('aria-live','polite'); spinner.style.cssText = 'position:fixed;inset:0;z-index:99997;background:rgba(255,255,255,0.7);display:flex;align-items:center;justify-content:center;font-family:sans-serif;'; spinner.innerHTML = "<div style='display:flex;flex-direction:column;align-items:center;gap:8px;color:#1133AF'>"+ "<div style='width:36px;height:36px;border:3px solid #c9d4ff;border-top-color:#1133AF;border-radius:50%;animation:spin 1s linear infinite'></div>"+ "<div>Generating PDF…</div></div>"+ "<style>@keyframes spin{to{transform:rotate(360deg)}}</style>"; document.body.appendChild(spinner); try { await loadJsPDF(); await generatePdf({ expandFootnotes, includeComments, pageSize, orientation, quality }); } catch (error) { console.error('PDF generation failed:', error); } finally { spinner.remove(); document.removeEventListener('keydown', onKey); } }); closeBtn.addEventListener('click', closeModal); overlay.addEventListener('click', closeModal); } downloadButton.addEventListener('click', showPdfOptionsModal); // --- 2. jsPDF Loader (on-demand) --- const JSPDF_CDN = 'https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js'; function loadJsPDF() { return new Promise((resolve, reject) => { if (window.jspdf && window.jspdf.jsPDF) return resolve(); const s = document.createElement('script'); s.src = JSPDF_CDN; s.async = true; s.onload = () => resolve(); s.onerror = () => reject(new Error('Failed to load jsPDF')); document.head.appendChild(s); }); } // --- 3. Font Loader (on-demand) --- async function loadTpaPdfFonts() { if (window.__TPA_PDF_FONTS_LOADING) return window.__TPA_PDF_FONTS_LOADING; const required = ['POPPINS_BOLD_TTF', 'SOURCE_SERIF4_REGULAR_TTF', 'SOURCE_SERIF4_ITALIC_TTF']; const haveAll = () => required.every(k => window.PDF_FONTS && typeof window.PDF_FONTS[k] === 'string' && window.PDF_FONTS[k].length > 1000); if (haveAll()) return Promise.resolve(); const base = (window.TPA_PDF_FONT_BASE_URL || (window.location.origin + '/wp-content/mu-plugins/layout/tpa-pdf-fonts/')).replace(/\/$/, '') + '/'; const sources = { POPPINS_BOLD_TTF: [ base + 'Poppins-Bold.ttf', base + 'Poppins-SemiBold.ttf', base + 'Poppins-Black.ttf', 'https://raw.githubusercontent.com/google/fonts/main/ofl/poppins/Poppins-Bold.ttf' ], SOURCE_SERIF4_REGULAR_TTF: [ base + 'SourceSerif4-VariableFont_opsz,wght.ttf', base + 'SourceSerif4-Regular.ttf', 'https://raw.githubusercontent.com/adobe-fonts/source-serif/main/release/TTF/SourceSerif4-Regular.ttf' ], SOURCE_SERIF4_ITALIC_TTF: [ base + 'SourceSerif4-Italic-VariableFont_opsz,wght.ttf', base + 'SourceSerif4-Italic.ttf', 'https://raw.githubusercontent.com/adobe-fonts/source-serif/main/release/TTF/SourceSerif4-Italic.ttf' ], }; function bufferToBase64(buffer) { let binary = ''; const bytes = new Uint8Array(buffer); const chunk = 0x8000; // 32KB chunks for (let i = 0; i < bytes.length; i += chunk) { binary += String.fromCharCode.apply(null, bytes.subarray(i, i + chunk)); } return btoa(binary); } async function fetchAsBase64(urls) { for (const url of urls) { try { const res = await fetch(url, { mode: 'cors' }); if (!res.ok) continue; const buf = await res.arrayBuffer(); return bufferToBase64(buf); } catch (_) { /* try next */ } } return null; } window.__TPA_PDF_FONTS_LOADING = (async () => { const out = Object.create(null); for (const key of required) { if (window.PDF_FONTS && window.PDF_FONTS[key]) { out[key] = window.PDF_FONTS[key]; continue; } const b64 = await fetchAsBase64(sources[key]); if (b64) out[key] = b64; } if (!window.PDF_FONTS) window.PDF_FONTS = {}; Object.assign(window.PDF_FONTS, out); })(); return window.__TPA_PDF_FONTS_LOADING; } // --- 4. PDF GENERATION LOGIC --- async function generatePdf(options) { if (typeof window.jspdf === 'undefined' || typeof pdfPostData === 'undefined') { console.error('jsPDF library or post data is not available.'); return; } const { jsPDF } = window.jspdf; const { expandFootnotes = false, includeComments = false, pageSize = 'a4', orientation = 'portrait', } = options || {}; const doc = new jsPDF({ orientation, unit: 'mm', format: pageSize, }); // --- Fonts: Poppins (headings) and Source Serif 4 (body) --- await loadTpaPdfFonts(); // Optionally embed Base64 TTFs via window.PDF_FONTS to keep script size reasonable. // Supported keys: // POPPINS_BOLD_TTF, SOURCE_SERIF4_REGULAR_TTF, SOURCE_SERIF4_ITALIC_TTF try { const F = (window.PDF_FONTS || {}); if (F.POPPINS_BOLD_TTF) { doc.addFileToVFS('Poppins-Bold.ttf', F.POPPINS_BOLD_TTF); doc.addFont('Poppins-Bold.ttf', 'Poppins', 'bold'); } if (F.SOURCE_SERIF4_REGULAR_TTF) { doc.addFileToVFS('SourceSerif4-Regular.ttf', F.SOURCE_SERIF4_REGULAR_TTF); doc.addFont('SourceSerif4-Regular.ttf', 'SourceSerif4', 'normal'); } if (F.SOURCE_SERIF4_ITALIC_TTF) { doc.addFileToVFS('SourceSerif4-Italic.ttf', F.SOURCE_SERIF4_ITALIC_TTF); doc.addFont('SourceSerif4-Italic.ttf', 'SourceSerif4', 'italic'); } } catch (e) { console.warn('Custom font registration failed:', e); } function hasFont(family, style) { try { const list = doc.getFontList && doc.getFontList(); return !!(list && list[family] && list[family].indexOf(style) !== -1); } catch (_) { return false; } } const HEAD_FONT = hasFont('Poppins', 'bold') ? 'Poppins' : 'helvetica'; const BODY_FONT = hasFont('SourceSerif4', 'normal') ? 'SourceSerif4' : 'times'; const FULL_UNICODE = (HEAD_FONT === 'Poppins') && (BODY_FONT === 'SourceSerif4'); if (!FULL_UNICODE) { console.warn('PDF export: custom Unicode fonts not loaded. Some characters may be approximated.'); } // Decode HTML entities, optionally approximate unsupported glyphs for standard fonts const decodeEntities = (str) => { if (!str) return ''; const el = document.createElement('textarea'); el.innerHTML = str; return el.value; }; const asciiize = (s) => { if (!s) return ''; // Replace smart quotes/dashes/ellipsis s = s.replace(/[\u2018\u2019\u2032]/g, "'") .replace(/[\u201C\u201D\u2033]/g, '"') .replace(/[\u2013\u2014]/g, '-') .replace(/\u2026/g, '...'); // Decompose accents then remove combining marks try { s = s.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); } catch(_) {} return s; }; const safeText = (s) => FULL_UNICODE ? s : asciiize(decodeEntities(s)); // --- Layout Variables --- const pageHeight = doc.internal.pageSize.getHeight(); const pageWidth = doc.internal.pageSize.getWidth(); const margin = 15; const usableWidth = pageWidth - (margin * 2); let currentY = margin; let currentPage = 1; const brandColor = '#1133AF'; const lineHeight = 7; const imageCache = new Map(); const pxToUnits = (px) => (px * 25.4) / 96; const mmToPixels = (mm, dpi = 150) => Math.max(1, Math.round((mm / 25.4) * dpi)); // Quality profiles function qualityProfile(name) { switch (name) { case 'low': return { dpi: 150, jpeg: 0.55, format: 'JPEG' }; case 'high': return { dpi: 360, jpeg: 0.92, format: 'JPEG' }; case 'ultra': return { dpi: 600, jpeg: 1.0, format: 'PNG' }; // lossless case 'medium': default: return { dpi: 300, jpeg: 0.80, format: 'JPEG' }; } } const Q = qualityProfile(options.quality || 'medium'); const TARGET_DPI = Q.dpi; const JPEG_QUALITY = Q.jpeg; const ENCODE_FORMAT = Q.format; // 'JPEG' | 'PNG' const resolveImageSource = (imgElement) => { return imgElement.getAttribute('data-full-src') || imgElement.getAttribute('data-src') || imgElement.getAttribute('data-lazy-src') || imgElement.currentSrc || imgElement.getAttribute('src'); }; const loadImageForPdf = (src) => { if (!src) { return Promise.reject(new Error('Image source is empty')); } if (imageCache.has(src)) { return imageCache.get(src); } const promise = new Promise((resolve, reject) => { const img = new Image(); if (!src.startsWith('data:')) { img.crossOrigin = 'anonymous'; } img.onload = () => { resolve({ img, width: img.width, height: img.height, source: src, }); }; img.onerror = (err) => reject(err); img.src = src; }); imageCache.set(src, promise); return promise; }; const renderImageElement = async (imgElement, opts = {}) => { if (!imgElement) { return 0; } const src = resolveImageSource(imgElement); if (!src) { return 0; } try { const imageData = await loadImageForPdf(src); if (!imageData.width || !imageData.height) { return 0; } const maxWidth = (typeof opts.maxWidth === 'number' && opts.maxWidth > 0) ? opts.maxWidth : usableWidth; let renderWidth = Math.min(pxToUnits(imageData.width), maxWidth); let renderHeight = renderWidth * (imageData.height / imageData.width); // Ensure very tall images still fit on a page. const maxImageHeight = pageHeight - (margin * 2); if (renderHeight > maxImageHeight) { const scale = maxImageHeight / renderHeight; renderHeight *= scale; renderWidth *= scale; } checkPageBreak(renderHeight); const x = (typeof opts.x === 'number') ? opts.x : margin; // Downscale + JPEG re-encode at target DPI and quality const targetPxW = Math.min(imageData.width, mmToPixels(renderWidth, TARGET_DPI)); const targetPxH = Math.max(1, Math.round(targetPxW * (imageData.height / imageData.width))); const c = document.createElement('canvas'); c.width = targetPxW; c.height = targetPxH; const cx = c.getContext('2d'); // Fill white to avoid black background for transparent PNGs when encoding JPEG cx.fillStyle = '#ffffff'; cx.fillRect(0, 0, c.width, c.height); cx.imageSmoothingEnabled = true; cx.imageSmoothingQuality = 'high'; cx.drawImage(imageData.img, 0, 0, targetPxW, targetPxH); const dataUrl = ENCODE_FORMAT === 'PNG' ? c.toDataURL('image/png') : c.toDataURL('image/jpeg', JPEG_QUALITY); doc.addImage(dataUrl, ENCODE_FORMAT, x, currentY, renderWidth, renderHeight, undefined, 'FAST'); doc.link(x, currentY, renderWidth, renderHeight, { url: imageData.source }); return renderHeight; } catch (error) { console.warn('Failed to render image in PDF:', error); const altText = imgElement.getAttribute('alt'); if (altText) { doc.setFont(BODY_FONT, 'italic'); doc.setFontSize(10); doc.setTextColor('#999999'); const maxWidth = (typeof opts.maxWidth === 'number' && opts.maxWidth > 0) ? opts.maxWidth : usableWidth; const lines = doc.splitTextToSize(`[Image: ${altText}]`, maxWidth); const fallbackHeight = lines.length * 5; checkPageBreak(fallbackHeight); const x = (typeof opts.x === 'number') ? opts.x : margin; doc.text(lines, x, currentY); return fallbackHeight; } return 0; } }; // --- Set PDF document properties --- try { doc.setProperties({ title: pdfPostData.title || document.title || '', subject: pdfPostData.meta_desc || '', author: 'Tax Policy Associates', keywords: pdfPostData.catchwords || '', creator: 'TPA PDF Exporter' }); } catch (_) {} // --- Header with logo + centered title --- async function addCompressedImageFromSrc(src, x, targetWidthMm) { const data = await loadImageForPdf(src); const targetPxW = Math.min(data.width, mmToPixels(targetWidthMm, TARGET_DPI)); const targetPxH = Math.max(1, Math.round(targetPxW * (data.height / data.width))); const c = document.createElement('canvas'); c.width = targetPxW; c.height = targetPxH; const cx = c.getContext('2d'); // Fill white to avoid black background on transparent images when encoding to JPEG cx.fillStyle = '#ffffff'; cx.fillRect(0, 0, c.width, c.height); cx.imageSmoothingEnabled = true; cx.imageSmoothingQuality = 'high'; cx.drawImage(data.img, 0, 0, targetPxW, targetPxH); const dataUrl = ENCODE_FORMAT === 'PNG' ? c.toDataURL('image/png') : c.toDataURL('image/jpeg', JPEG_QUALITY); const heightMm = targetWidthMm * (data.height / data.width); doc.addImage(dataUrl, ENCODE_FORMAT, x, currentY, targetWidthMm, heightMm, undefined, 'FAST'); return heightMm; } // Logo top-left on first page const logoUrl = 'https://taxpolicy.org.uk/wp-content/uploads/2022/04/logo-350x100-blue.jpg'; try { const logoWidthMm = Math.max(20, pageWidth * 0.20); // twice as big (~20% page width) const logoHeightMm = await addCompressedImageFromSrc(logoUrl, margin, logoWidthMm); currentY += logoHeightMm + (lineHeight * 2); // more vertical space before H1 } catch (e) { // If logo fails, continue without blocking currentY += 0; } // Title centered across page doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(24); doc.setTextColor(brandColor); const titleLines = doc.splitTextToSize(safeText(pdfPostData.title), usableWidth); doc.text(titleLines, pageWidth / 2, currentY, { align: 'center' }); currentY += (titleLines.length * 10); doc.setFont(BODY_FONT, 'italic'); doc.setFontSize(11); doc.setTextColor('#555555'); currentY += 6; doc.text(safeText(`Published ${pdfPostData.date}`), margin, currentY); currentY += 6; const slugUrl = `https://taxpolicy.org.uk/${pdfPostData.slug}/`; doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); doc.setTextColor(brandColor); doc.textWithLink(safeText(`Read online: ${slugUrl}`), margin, currentY, { url: slugUrl }); currentY += 10; doc.setDrawColor('#dddddd'); doc.line(margin, currentY, pageWidth - margin, currentY); currentY += 12; // --- Body Content --- const tempDiv = document.createElement('div'); tempDiv.innerHTML = pdfPostData.content; const footnotes = {}; const footnoteListContainer = tempDiv.querySelector('.tpal-footnotes-list-container'); if (footnoteListContainer) { footnoteListContainer.querySelectorAll('li.tpal-footnote-item').forEach(item => { const id = item.id.replace('tpal-footnote-ref-', ''); const contentClone = item.cloneNode(true); const backLink = contentClone.querySelector('.tpal-footnote-back-link'); if (backLink) backLink.remove(); footnotes[id] = backLink ? contentClone.innerHTML.replace(backLink.outerHTML, '') : contentClone.innerHTML; }); footnoteListContainer.remove(); } // Remove contents/buttons and dynamic TOC from PDF tempDiv.querySelectorAll('.jump-to-grid-wrapper, .wp-block-tpal-contents-buttons, .jump-to-grid, .simpletoc-container').forEach(el => el.remove()); // Extract timeline (.tpa-ht) and glossary (.tpa-xdeck) blocks and remove them from flow const timelineBlocks = Array.from(tempDiv.querySelectorAll('.tpa-ht')); const glossaryBlocks = Array.from(tempDiv.querySelectorAll('.tpa-xdeck')); function extractTimelineItems(block) { const items = []; block.querySelectorAll('.card').forEach(card => { const date = (card.querySelector('.date') || {}).textContent || ''; const title = (card.querySelector('.title') || {}).textContent || ''; const p = card.querySelector('p'); const text = p ? p.textContent : ''; items.push({ date: date.trim(), title: title.trim(), text: text.trim() }); }); return items; } function extractGlossary(block) { const titleNode = block.querySelector('.hdr .title'); const deckTitle = titleNode ? titleNode.textContent.trim() : ''; const items = []; block.querySelectorAll('.chip').forEach(chip => { const term = (chip.querySelector('.term') || {}).textContent || ''; const plain = (chip.querySelector('.plain') || {}).textContent || ''; const link = chip.querySelector('.tools a.link'); const linkLabel = link ? link.textContent.trim() : ''; const linkHref = link ? link.getAttribute('href') : ''; items.push({ term: term.trim(), plain: plain.trim(), linkLabel, linkHref }); }); return { deckTitle, items }; } const timelines = timelineBlocks.map(extractTimelineItems).flat(); const glossaryDecks = glossaryBlocks.map(extractGlossary); timelineBlocks.forEach(el => el.remove()); glossaryBlocks.forEach(el => el.remove()); const hasSidebar = (timelines.length > 0) || glossaryDecks.some(d => (d.items || []).length > 0); // Sidebar layout metrics and renderer const columnGap = hasSidebar ? 6 : 0; const mainColWidth = hasSidebar ? Math.max((usableWidth * 2) / 3 - columnGap / 2, 40) : usableWidth; const sidebarWidth = hasSidebar ? Math.max(usableWidth - mainColWidth - columnGap, 32) : 0; const sidebarX = margin + mainColWidth + (hasSidebar ? columnGap : 0); function ensurePage(p) { while (doc.internal.getNumberOfPages() < p) doc.addPage(); } let sidebarPage = 1; let sidebarY = currentY; // align with main content start let lastSidebarPage = 0; if (hasSidebar) { const pad = 4; const cardGap = 4; function drawTimelineCard(item) { doc.setPage(sidebarPage); // Measure content doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(10); const dateText = item.date || ''; const dateH = 5.5; doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(12); const titleLines = doc.splitTextToSize(item.title || '', sidebarWidth - pad * 2); const titleH = titleLines.length * 6.2; doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); const bodyLines = doc.splitTextToSize(item.text || '', sidebarWidth - pad * 2); const bodyH = bodyLines.length * 5; const boxH = pad + dateH + 2 + titleH + 2 + bodyH + pad; if (sidebarY + boxH > pageHeight - margin) { sidebarPage += 1; ensurePage(sidebarPage); sidebarY = margin; doc.setPage(sidebarPage); } // Card frame doc.setDrawColor('#e0e0e0'); doc.setFillColor('#fbfbfd'); doc.rect(sidebarX, sidebarY, sidebarWidth, boxH, 'FD'); let y = sidebarY + pad + 3; doc.setTextColor(brandColor); doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(10); doc.text(dateText, sidebarX + pad, y); y += dateH; doc.setTextColor('#222222'); doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(12); doc.text(titleLines, sidebarX + pad, y); y += titleH + 1; doc.setTextColor('#333333'); doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); doc.text(bodyLines, sidebarX + pad, y); sidebarY += boxH + cardGap; } function drawGlossaryCard(item) { doc.setPage(sidebarPage); const term = item.term || ''; const plain = item.plain || ''; const linkLabel = item.linkLabel || ''; const linkHref = item.linkHref || ''; doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(12); const termLines = doc.splitTextToSize(term, sidebarWidth - pad * 2); const termH = termLines.length * 6.2; doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); const plainLines = doc.splitTextToSize(plain, sidebarWidth - pad * 2); const plainH = plainLines.length * 5; let linkLines = []; let linkH = 0; if (linkLabel && linkHref) { doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(9); linkLines = doc.splitTextToSize(linkLabel, sidebarWidth - pad * 2); linkH = linkLines.length * 4.8 + 1; } const boxH = pad + termH + 2 + plainH + (linkH ? 2 + linkH : 0) + pad; if (sidebarY + boxH > pageHeight - margin) { sidebarPage += 1; ensurePage(sidebarPage); sidebarY = margin; doc.setPage(sidebarPage); } // Frame (set colors after potential page change) doc.setDrawColor('#e0e0e0'); doc.setFillColor('#ffffff'); doc.rect(sidebarX, sidebarY, sidebarWidth, boxH, 'FD'); let y = sidebarY + pad + 2; doc.setTextColor(brandColor); doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(12); doc.text(termLines, sidebarX + pad, y); y += termH + 1; doc.setTextColor('#333333'); doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); doc.text(plainLines, sidebarX + pad, y); if (linkH) { y += plainH + 2; doc.setTextColor(brandColor); doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(9); doc.text(linkLines, sidebarX + pad, y); // clickable area approximation on first line const linkBoxWidth = Math.min(sidebarWidth - pad * 2, (doc.getTextWidth ? doc.getTextWidth(linkLabel) : sidebarWidth - pad * 2)); doc.link(sidebarX + pad, y - 3.8, linkBoxWidth, 5.8, { url: linkHref }); } sidebarY += boxH + cardGap; } // Render timelines first, then glossary timelines.forEach(drawTimelineCard); glossaryDecks.forEach(deck => { (deck.items || []).forEach(drawGlossaryCard); }); lastSidebarPage = sidebarPage; } const nodes = Array.from(tempDiv.childNodes).filter(node => { if (node.nodeType === Node.TEXT_NODE) { return node.textContent.trim() !== ''; } return true; }); // Normalize text to avoid odd spacing (e.g., thin spaces, non‑breaking spaces) // Replace your normalizeSpacing with this extended version const normalizeSpacing = (str) => { if (!str) return ''; let t = String(str); // 1) Hard-strip control chars, soft hyphens, zero-widths, bidi marks, BOM t = t.replace( /[\u0000-\u001F\u007F\u00AD\u200B\u200C\u200D\u2060\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF]/g, '' ); // 2) Normalize NBSP to regular space t = t.replace(/\u00A0/g, ' '); // 3) Handle exotic spaces t = t.replace(/([ \t])[\u1680\u2000-\u200A\u202F\u205F\u3000]+/g, '$1'); t = t.replace(/[\u1680\u2000-\u200A\u202F\u205F\u3000]+([ \t])/g, '$1'); t = t.replace(/([^\s])[\u1680\u2000-\u200A\u202F\u205F\u3000]+([^\s])/g, '$1$2'); // 4) Collapse remaining whitespace t = t.replace(/\s+/g, ' ').trim(); return t; }; const collectWords = (element) => { const tokens = []; const pushTextTokens = (text, context) => { if (!text) return; const parts = text.match(/\s+|\S+/g); if (!parts) return; parts.forEach(part => { if (/^\s+$/.test(part)) { tokens.push({ type: 'space', value: part }); } else if (context.link) { tokens.push({ type: 'link', text: part, link: context.link }); } else { tokens.push({ type: 'text', text: part }); } }); }; const traverse = (node, context = {}) => { node.childNodes.forEach(child => { if (child.nodeType === Node.TEXT_NODE) { pushTextTokens(child.textContent, context); } else if (child.nodeName === 'BR') { tokens.push({ type: 'linebreak' }); } else if (child.nodeName === 'A' && child.classList.contains('tpal-footnote-ref')) { const id = child.dataset.tpalFootnoteId; if (id) { tokens.push({ type: 'footnote', text: id, id }); } } else if (child.nodeName === 'A') { const href = child.href || child.getAttribute('href'); traverse(child, { ...context, link: href }); } else if (child.nodeName === 'IMG') { tokens.push({ type: 'image', element: child }); } else if (child.childNodes && child.childNodes.length > 0) { traverse(child, context); } }); }; traverse(element); return tokens; }; const renderFootnoteExpansion = (id) => { if (!expandFootnotes) { return; } const footnoteHTML = footnotes[id]; if (!footnoteHTML) { return; } const tempFootnoteDiv = document.createElement('div'); tempFootnoteDiv.innerHTML = footnoteHTML; const footnoteText = normalizeSpacing(tempFootnoteDiv.textContent || ''); const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); doc.setTextColor('#555555'); const textLines = doc.splitTextToSize(footnoteText, activeWidth - 8); const lineHeight = (doc.getFontSize() * doc.getLineHeightFactor()) / doc.internal.scaleFactor; const topPadding = 3; const bottomPadding = 4; const textLineCount = Math.max(textLines.length, 1); const textHeight = textLineCount * lineHeight; const boxHeight = textHeight + topPadding + bottomPadding; const afterGap = Math.max(lineHeight * 1.75, 7); checkPageBreak(boxHeight + afterGap); doc.setDrawColor('#e0e0e0'); doc.setFillColor('#f8f8f8'); doc.rect(margin, currentY, activeWidth, boxHeight, 'FD'); doc.text(textLines, margin + 4, currentY + topPadding + lineHeight); currentY += boxHeight + afterGap; doc.setTextColor('#333333'); }; // Render a gallery/grid of images, each ~ 1/4 of the active content width async function renderGalleryGrid(items) { if (!Array.isArray(items) || items.length === 0) return; const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; const gridX = margin; const gap = 3; // mm const cellsPerRow = 4; const cellW = Math.max((activeWidth - gap * (cellsPerRow - 1)) / cellsPerRow, 20); let col = 0; let rowY = currentY; let rowMaxH = 0; for (let i = 0; i < items.length; i++) { const it = items[i]; const thumbSrc = resolveImageSource(it.img); if (!thumbSrc) continue; // Load dimensions to estimate height let data; try { data = await loadImageForPdf(thumbSrc); } catch (e) { data = null; } if (!data) continue; const imgH = cellW * (data.height / data.width); // If first column and not enough space, break to next page if (col === 0) { if (rowY + imgH > pageHeight - margin) { checkPageBreak(imgH); rowY = currentY; } } const x = gridX + col * (cellW + gap); // Downsample + JPEG encode for grid thumb const targetPxW = Math.min(data.width, mmToPixels(cellW, TARGET_DPI)); const targetPxH = Math.max(1, Math.round(targetPxW * (data.height / data.width))); const c = document.createElement('canvas'); c.width = targetPxW; c.height = targetPxH; const cx = c.getContext('2d'); cx.fillStyle = '#ffffff'; cx.fillRect(0, 0, c.width, c.height); cx.imageSmoothingEnabled = true; cx.imageSmoothingQuality = 'high'; cx.drawImage(data.img, 0, 0, targetPxW, targetPxH); const dataUrl = ENCODE_FORMAT === 'PNG' ? c.toDataURL('image/png') : c.toDataURL('image/jpeg', JPEG_QUALITY); doc.addImage(dataUrl, ENCODE_FORMAT, x, rowY, cellW, imgH, undefined, 'FAST'); if (it.href) { doc.link(x, rowY, cellW, imgH, { url: it.href }); } rowMaxH = Math.max(rowMaxH, imgH); col += 1; if (col >= cellsPerRow) { // New row currentY = rowY + rowMaxH + gap; col = 0; rowMaxH = 0; rowY = currentY; } } // Final partial row if (col !== 0) { currentY = rowY + rowMaxH + gap; } // Add a full line break below the grid to separate from following text currentY += lineHeight; } const renderTextBlock = async (tokens, { startX = margin, colWidth = usableWidth } = {}) => { let xPos = startX; let pendingSpaceWidth = 0; const baseFontSize = 12; doc.setFontSize(baseFontSize); const baseSpaceWidth = doc.getStringUnitWidth(' ') * baseFontSize / doc.internal.scaleFactor; for (const token of tokens) { if (token.type === 'space') { if (token.value.includes('\n')) { currentY += lineHeight; xPos = startX; checkPageBreak(lineHeight); pendingSpaceWidth = 0; } else { const whitespaceChars = token.value.replace(/[^\s]/g, ''); const count = whitespaceChars.length || token.value.length || 1; pendingSpaceWidth += baseSpaceWidth * count; } continue; } if (token.type === 'linebreak') { currentY += lineHeight; xPos = startX; checkPageBreak(lineHeight); pendingSpaceWidth = 0; continue; } if (token.type === 'image') { if (xPos !== startX) { currentY += lineHeight; xPos = startX; checkPageBreak(lineHeight); } const maxW = Math.min(colWidth, pageWidth * 0.5); const imageHeight = await renderImageElement(token.element, { x: startX, maxWidth: maxW }); if (imageHeight > 0) { currentY += imageHeight + lineHeight; // ensure full line break after images } xPos = startX; pendingSpaceWidth = 0; continue; } const isFootnote = token.type === 'footnote'; const isLink = token.type === 'link' && token.link; const fontSize = isFootnote ? 8 : 12; doc.setFontSize(fontSize); const wordWidth = doc.getStringUnitWidth(token.text) * fontSize / doc.internal.scaleFactor; let leadingSpaceWidth = (pendingSpaceWidth && xPos !== startX) ? pendingSpaceWidth : 0; if (xPos + leadingSpaceWidth + wordWidth > (startX + colWidth)) { currentY += lineHeight; xPos = startX; checkPageBreak(lineHeight); leadingSpaceWidth = 0; } if (leadingSpaceWidth) { xPos += leadingSpaceWidth; } pendingSpaceWidth = 0; if (isFootnote) { doc.setFontSize(fontSize); doc.setTextColor(brandColor); doc.text(token.text, xPos, currentY - 2); doc.setFontSize(baseFontSize); doc.setTextColor('#333333'); } else if (isLink) { doc.setFontSize(baseFontSize); doc.setTextColor(brandColor); doc.textWithLink(token.text, xPos, currentY, { url: token.link }); doc.setTextColor('#333333'); } else { doc.setFontSize(baseFontSize); doc.setTextColor('#333333'); doc.text(token.text, xPos, currentY); } xPos += wordWidth; if (isFootnote && expandFootnotes) { currentY += lineHeight; xPos = startX; checkPageBreak(lineHeight); renderFootnoteExpansion(token.id); } } if (xPos !== startX) { currentY += lineHeight; } }; async function renderHtmlTable(tableEl) { const getActiveWidth = () => (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; const x = margin; const pad = 2.5; const lineH = 5.2; const border = '#e0e0e0'; const headerBg = '#f0f3ff'; const headerColor = brandColor; const textColor = '#333333'; // Gather rows const thead = tableEl.querySelector('thead'); const tbody = tableEl.querySelector('tbody'); const headerRow = thead ? thead.querySelector('tr') : tableEl.querySelector('tr'); if (!headerRow) return; const headerCells = Array.from(headerRow.children).filter(c => /th|td/i.test(c.tagName)); const bodyRows = Array.from((tbody || tableEl).querySelectorAll('tr')).filter(r => r !== headerRow); const cols = headerCells.length || 1; // Measure column content width by text length const activeWidth = getActiveWidth(); const maxColPx = new Array(cols).fill(0); const collect = (cell) => normalizeSpacing(cell.textContent || ''); const measure = (text, fontSize=11) => (doc.getStringUnitWidth(text || '') * fontSize / doc.internal.scaleFactor); // Measure headers headerCells.forEach((c, i) => { maxColPx[i] = Math.max(maxColPx[i], measure(collect(c), 12)); }); // Measure body bodyRows.forEach(row => { const cells = Array.from(row.children).filter(c => /th|td/i.test(c.tagName)); for (let i = 0; i < cols; i++) { const cell = cells[i]; if (!cell) continue; maxColPx[i] = Math.max(maxColPx[i], measure(collect(cell))); } }); // Convert to mm and scale to fit let colMm = maxColPx.map(px => px + pad*2 + 4); // padding + buffer const total = colMm.reduce((a,b)=>a+b,0); const scale = total > activeWidth ? (activeWidth / total) : 1; colMm = colMm.map(v => Math.max(18, v * scale)); // Compute header height doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(12); const headerLines = headerCells.map((c,i)=> doc.splitTextToSize(collect(c), colMm[i] - pad*2)); const headerHeight = Math.max(...headerLines.map(lines => lines.length * lineH)) + pad*2; const drawHeader = () => { let cx = x; // background doc.setDrawColor(border); doc.setFillColor(headerBg); doc.rect(x, currentY, activeWidth, headerHeight, 'FD'); // text doc.setTextColor(headerColor); doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(12); headerLines.forEach((lines, i) => { const out = FULL_UNICODE ? lines : lines.map(safeText); doc.text(out, cx + pad, currentY + pad + 4); cx += colMm[i]; }); currentY += headerHeight; }; // Start table checkPageBreak(headerHeight + lineH); drawHeader(); doc.setTextColor(textColor); doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(11); for (const row of bodyRows) { const cells = Array.from(row.children).filter(c => /th|td/i.test(c.tagName)); // measure row height const rowLines = new Array(cols).fill([]); let rowHeight = 0; let cx = x; for (let i = 0; i < cols; i++) { const t = collect(cells[i] || document.createElement('td')); const lines = doc.splitTextToSize(t, colMm[i] - pad*2); rowLines[i] = lines; rowHeight = Math.max(rowHeight, lines.length * lineH + pad*2); } // page break with repeating header if (currentY + rowHeight > pageHeight - margin) { checkPageBreak(rowHeight + headerHeight); drawHeader(); } // draw row borders + text cx = x; for (let i = 0; i < cols; i++) { doc.setDrawColor(border); doc.rect(cx, currentY, colMm[i], rowHeight); // border only const out = FULL_UNICODE ? rowLines[i] : rowLines[i].map(safeText); doc.text(out, cx + pad, currentY + pad + 4); cx += colMm[i]; } currentY += rowHeight; } currentY += 3; // gap after table } const checkPageBreak = (neededHeight) => { if (currentY + neededHeight > pageHeight - margin) { currentPage += 1; // Ensure page exists (sidebar rendering may have created pages already) if (typeof ensurePage === 'function') ensurePage(currentPage); else doc.addPage(); doc.setPage(currentPage); currentY = margin; } }; // Reset to first page for main content rendering doc.setPage(currentPage); for (const node of nodes) { // Check before any element, ensure space for at least one line. checkPageBreak(lineHeight); // H2 Handler if (node.nodeName === 'H2') { currentY += 6; doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(16); doc.setTextColor(brandColor); const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; const h2Lines = doc.splitTextToSize(safeText(node.textContent.trim()), activeWidth); const headingHeight = (h2Lines.length * 7) + 3; checkPageBreak(headingHeight + lineHeight); doc.text(h2Lines, margin, currentY); currentY += (h2Lines.length * 7) + 3; } // Separator (WordPress core/separator) else if ( node.nodeName === 'HR' || (node.nodeType === Node.ELEMENT_NODE && node.classList && (node.classList.contains('wp-block-separator') || node.matches('hr.wp-block-separator'))) ) { const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; checkPageBreak(2); doc.setDrawColor('#dddddd'); doc.setLineWidth(0.3); doc.line(margin, currentY, margin + activeWidth, currentY); doc.setLineWidth(0.2); currentY += lineHeight; // small gap under separator } // Spacer block else if (node.nodeType === Node.ELEMENT_NODE && node.classList && node.classList.contains('wp-block-spacer')) { const styleAttr = node.getAttribute('style') || ''; let hPx = 20; // default if not specified const m = styleAttr.match(/height\s*:\s*([0-9.]+)px/i); if (m) { hPx = parseFloat(m[1]) || 20; } const hMm = pxToUnits(hPx); checkPageBreak(hMm); currentY += hMm; } // H3 Handler else if (node.nodeName === 'H3') { currentY += 4; doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(14); doc.setTextColor('#222222'); const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; const h3Lines = doc.splitTextToSize(safeText(node.textContent.trim()), activeWidth); const headingHeight = (h3Lines.length * 6) + 2; checkPageBreak(headingHeight + lineHeight); doc.text(h3Lines, margin, currentY); currentY += (h3Lines.length * 6) + 2; } // Paragraph Handler else if (node.nodeName === 'P' && node.textContent.trim() !== '') { // Widow/Orphan control: ensure at least two lines of space before starting a paragraph checkPageBreak(lineHeight * 2); doc.setFont(BODY_FONT, 'normal'); doc.setTextColor('#333333'); const tokens = collectWords(node); const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; await renderTextBlock(tokens, { startX: margin, colWidth: activeWidth }); currentY += 4; // Standard paragraph gap } // List Handler else if (node.nodeName === 'UL' || node.nodeName === 'OL') { const listItems = Array.from(node.children).filter(child => child.nodeName === 'LI'); if (listItems.length === 0) { continue; } const isOrdered = node.nodeName === 'OL'; let itemNumber = 1; if (isOrdered) { const startAttr = parseInt(node.getAttribute('start'), 10); if (!Number.isNaN(startAttr)) { itemNumber = startAttr; } } for (let index = 0; index < listItems.length; index++) { const item = listItems[index]; checkPageBreak(lineHeight * 2); doc.setFont(BODY_FONT, 'bold'); doc.setFontSize(12); doc.setTextColor('#333333'); const markerText = isOrdered ? `${itemNumber + index}.` : '•'; const markerWidth = doc.getStringUnitWidth(markerText) * 12 / doc.internal.scaleFactor; const indentOffset = Math.max(markerWidth + 3, 6); const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; const textStart = Math.min(margin + indentOffset, margin + activeWidth - 10); doc.text(markerText, margin, currentY); doc.setFont(BODY_FONT, 'normal'); doc.setTextColor('#333333'); const tokens = collectWords(item); await renderTextBlock(tokens, { startX: textStart, colWidth: (hasSidebar && currentPage <= lastSidebarPage) ? (mainColWidth - indentOffset) : (usableWidth - indentOffset) }); if (index < listItems.length - 1) { currentY += 2; } } currentY += 3; } // Zoomable image block else if (node.nodeType === Node.ELEMENT_NODE && node.matches && node.matches('.tpal-zoomable-image')) { const anchors = Array.from(node.querySelectorAll('.tpal-zoomable-image__item a.tpal-zoomable-image__frame')); const items = anchors.map(a => ({ href: a.getAttribute('href') || a.href, img: a.querySelector('img') })).filter(it => it.img); await renderGalleryGrid(items); } // NGG replacement grids else if (node.nodeType === Node.ELEMENT_NODE && node.matches && (node.matches('.ngg-lite') || node.matches('.ngg-lite-single'))) { const anchors = Array.from(node.querySelectorAll('a.glightbox')); const items = anchors.map(a => ({ href: a.getAttribute('href') || a.href, img: a.querySelector('img') })).filter(it => it.img); await renderGalleryGrid(items); } // Table handler else if (node.nodeName === 'TABLE') { await renderHtmlTable(node); } // Image-only blocks (e.g., figures without text) else if (node.nodeType === Node.ELEMENT_NODE) { const imgElement = node.matches('img') ? node : node.querySelector('img'); if (imgElement) { const activeWidth = (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth; const inGallery = !!(imgElement.closest && imgElement.closest('.tpal-zoomable-image, .ngg-lite, .ngg-lite-single')); const capWidth = inGallery ? activeWidth : Math.min(activeWidth, pageWidth * 0.5); const imageHeight = await renderImageElement(imgElement, { x: margin, maxWidth: capWidth }); if (imageHeight > 0) { currentY += imageHeight + lineHeight; // ensure full line break after images } const caption = node.matches('figure') ? node.querySelector('figcaption') : null; if (caption && caption.textContent.trim() !== '') { const captionLines = doc.splitTextToSize(safeText(caption.textContent.trim()), (hasSidebar && currentPage <= lastSidebarPage) ? mainColWidth : usableWidth); const captionHeight = (captionLines.length * 5) + 4; checkPageBreak(captionHeight); doc.setFont(BODY_FONT, 'italic'); doc.setFontSize(10); doc.setTextColor('#555555'); doc.text(captionLines, margin, currentY); currentY += captionHeight; } } } } // --- Render Footnote List at the End (if not expanded) --- if (!expandFootnotes && Object.keys(footnotes).length > 0) { currentY += 4; checkPageBreak(18); doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(16); doc.setTextColor(brandColor); doc.text(safeText('Footnotes'), margin, currentY); currentY += 7; Object.keys(footnotes).sort((a, b) => a - b).forEach(id => { const tempFootnoteDiv = document.createElement('div'); tempFootnoteDiv.innerHTML = footnotes[id]; const footnoteText = normalizeSpacing(tempFootnoteDiv.textContent || ''); const text = safeText(`${id}. ${footnoteText}`); doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); doc.setTextColor('#333333'); const lines = doc.splitTextToSize(text, usableWidth - 5); checkPageBreak(lines.length * 4.5 + 2); doc.text(lines, margin, currentY); currentY += (lines.length * 4.5) + 2; }); } // --- Render Comments (if requested) --- if (includeComments) { // Prefer server-provided comments; fall back to DOM parsing let comments = Array.isArray(pdfPostData.comments) ? pdfPostData.comments.map((c, i) => ({ number: i + 1, author: normalizeSpacing(c.author || ''), datetime: normalizeSpacing(c.date || ''), text: normalizeSpacing(c.content || ''), })) : []; if (comments.length === 0) { const commentsRoot = document.getElementById('comments') || document.querySelector('.comments-area') || document.querySelector('#respond')?.parentElement; if (commentsRoot) { const items = commentsRoot.querySelectorAll('li.comment, .comment'); let idx = 1; items.forEach(li => { const author = (li.querySelector('.fn, .comment-author, .comment-author cite') || {}).textContent || ''; const timeEl = li.querySelector('time[datetime]') || li.querySelector('.comment-meta time') || li.querySelector('a time'); const datetime = timeEl ? (timeEl.getAttribute('datetime') || timeEl.textContent || '') : ''; const contentEl = li.querySelector('.comment-content') || li.querySelector('.comment-body') || li; const tmp = document.createElement('div'); tmp.innerHTML = contentEl ? contentEl.innerHTML : ''; const text = normalizeSpacing(tmp.textContent || ''); if (text.trim()) { comments.push({ number: idx++, author: normalizeSpacing(author), datetime: normalizeSpacing(datetime), text }); } }); } } if (comments.length > 0) { currentY += 8; checkPageBreak(20); doc.setFont(HEAD_FONT, 'bold'); doc.setFontSize(16); doc.setTextColor(brandColor); doc.text(safeText('Comments'), margin, currentY); currentY += 8; comments.forEach(c => { // Measure text doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(11); const textLines = doc.splitTextToSize(safeText(c.text), usableWidth - 12); const headerH = 6; const bodyH = textLines.length * 5.5; const boxH = headerH + bodyH + 10; checkPageBreak(boxH + 4); // Card doc.setDrawColor('#e0e0e0'); doc.setFillColor('#ffffff'); doc.rect(margin, currentY, usableWidth, boxH, 'FD'); // Header line: number, author, datetime let y = currentY + 7; doc.setTextColor('#333333'); doc.setFont(BODY_FONT, 'bold'); doc.text(safeText(`${c.number}. ${c.author || 'Anonymous'}`), margin + 5, y); doc.setFont(BODY_FONT, 'normal'); doc.setTextColor(brandColor); if (c.datetime) { doc.text(safeText(c.datetime), margin + usableWidth - 5, y, { align: 'right' }); } // Body y += 5; doc.setTextColor('#333333'); doc.setFont(BODY_FONT, 'normal'); doc.text(textLines, margin + 5, y); currentY += boxH + 6; }); } } // --- Footers on each page --- try { const total = doc.internal.getNumberOfPages(); for (let p = 1; p <= total; p++) { doc.setPage(p); const ph = doc.internal.pageSize.getHeight(); const pw = doc.internal.pageSize.getWidth(); const footerY = ph - 5; // 5mm from bottom doc.setFont(BODY_FONT, 'normal'); doc.setFontSize(10); // slightly smaller than body (12) doc.setTextColor('#666666'); // Title centered doc.text(pdfPostData.title, pw / 2, footerY, { align: 'center' }); // Page number right doc.text(String(p), pw - margin, footerY, { align: 'right' }); } } catch (e) { console.warn('Failed adding footers:', e); } const fileName = `${pdfPostData.slug}.pdf`; doc.save(fileName); } });