import Foundation
let pattern = #"""
^
(\d{1,3})
\b
.+?
\b
(\d[\d.,]+)
\n
"""#
let regex = try! NSRegularExpression(pattern: pattern, options: [.anchorsMatchLines, .allowCommentsAndWhitespace])
let testString = #"""
Adjustment of Profits Computation
Turnover from Trade or Profession 108,036
Profit Per Accounts 35,226
Addback: Disallowable Expenditure
Depreciation 325
Entertaining 29
- 354
Deduct: Allowances and Other Deductions
Capital Allowances 1,337
34,243 (1,337)
Adjusted Case I Profit 34,243
Losses Memorandum 1 Trade Property
Losses Brought Forward 16,758 -
Used in this Computation Against Trading Profits (16,758) - (16,758)
Used in this Computation Against General Profits -
Net Trading and Professional Profit 17,485
Losses Memorandum 2 Trade Property
Losses Carried Back from Later Period to be Used Against -
General Profits
Used in this Computation Against General Profits -
Losses from Current Period - -
Loss Surrendered for R & D Credit -
Losses Available after Loss Surrendered for R & D Credit - -
Used in this Computation Against General Profits - - -
Losses Carried Back to Earlier Period - Terminal loss
claim? [Y/N]
Losses Carried Forward - -
General Profits Before Other Deductions and Reliefs 17,485
Losses Used in this Computation -
Carried Back from Later Period [Trade], Current Year [Trade/Property]
Profits Chargeable to Corporation Tax 17,485
Computation Tax Payable Calculation
Financial Years beginning 1 April: Profit Tax Rates
2015 1,485 20% 297.00
2016 16,000 20% 3,200.00
Corporation Tax Payable 3,497.00
Capital Allowances Summary
Main Pool Special Rate Pool Single Assets Short Single Assets
Life Expensive Cars
WDV Brought Forward - - - -
Non-FYA - - -
Additions FYA @ 100% -
AIA Qualifying 1,337 - -
AIA Claimed (1,337) - -
Disposals - - - -
WDA Claimed - - - -
Balancing Allowance - - - -
Balancing Charge - - - -
WDV Carried Forward - - - -
For period 01/03/2016 to 28/02/2017 Page 2
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Company Tax Return
HM Revenue & CT600 (2017) Version 3
Customs for accounting periods starting on or after 1 April 2015
Your Company Tax Return
If we send the company a Notice to deliver a Company Tax Return it has to comply by the filing date or we charge a penalty, even if there
is no tax to pay.
A return includes a Company Tax Return form, any supplementary pages, accounts, computations and any relevant information. The
CT600 Guide tells you how the return must be formatted and delivered. It contains general information you may need to deliver your
return, links to more detailed advice and box-by–box guidance for this form and the supplementary pages.
The forms in the CT600 series set out the information we need and provide a standard format for calculations.
Company information
1 Company name Test Case Ltd
2 Company registration number 012312244
3 Tax reference 123123123
4 Type of company
About this return
This is the above company's return for the period
30 from DD/MM/YYYY 35 to DD/MM/YYYY
01/03/2016 ct2017v1 28/02/2017
Put an ‘X’ in the appropriate box(es) below
40 A repayment is due for this return period
45 Claim or relief affecting an earlier period
50 Making more than one return for this company now
55 This return contains estimated figures
60 Company part of a group that is not small
65 Notice of disclosable avoidance schemes
Transfer pricing
70 Compensating adjustment claimed
75 Company qualifies for SME exemption
Accounts and computations
80 I attach accounts and computations for the period to which this return relates X
85 I attach accounts and computations for a different period
For period 01/03/2016 to 28/02/2017 Page 1
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
About this return continued
90 If you are not attaching the accounts and computations, say why not
Supplementary pages enclosed
95 Loans to participators by close companies - form CT600A
100 Controlled foreign companies and foreign permanent establishment exemptions - form CT600B
105 Group and consortium - form CT600C
110 Insurance - form CT600D
115 Charities and Community Amateur Sports Clubs (CASCs) - form CT600E
120 Tonnage Tax - form CT600F
125 form CT600G (not currently used)
130 Cross-border Royalties - form CT600H
135 Supplementary charge in respect of ring fence trades - form CT600I
140 Disclosure of Tax Avoidance Schemes - form CT600J
141 Restitution Tax - form CT600K
Tax calculation
Turnover
145 Total turnover from trade 108,036
150 Banks, building societies, insurance companies and other financial concerns –
put an ‘X’ in this box if you do not have a recognised turnover and have not made an entry in box 145
Income
155 Trading profits 34,243
160 Trading losses brought forward claimed against profits 16,758
165 Net trading profits – box 155 minus box 160 17,485
170 Bank, building society or other interest, and profits from -
non-trading loan relationships
172 Put an ‘X’ in box 172 if the figure in box 170 is net of
carrying back a deficit from a later accounting period
175 Annual payments not otherwise charged to Corporation Tax -
and from which Income Tax has not been deducted
For period 01/03/2016 to 28/02/2017 Page 2
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Income continued
180 Non-exempt dividends or distributions from non-UK resident companies -
185 Income from which Income Tax has been deducted -
190 Income from a property business -
195 Non-trading gains on intangible fixed assets -
200 Tonnage Tax profits -
205 Income not falling under any other heading -
Chargeable gains
210 Gross chargeable gains -
215 Allowable losses including losses brought forward -
220 Net chargeable gains - box 210 minus box 215 -
Profits before deductions and reliefs
225 Losses brought forward against certain investment income -
230 Non-trade deficits on loan relationships (including interest) and derivative contracts -
(financial instruments) brought forward
235 Profits before other deductions and reliefs - net sum of boxes 165 to 205 and 220 17,485
minus sum of boxes 225 and 230
Deductions and reliefs
240 Losses on unquoted shares -
245 Management expenses -
250 UK property business losses for this or previous accounting period -
255 Capital allowances for the purposes of management of the business -
260 Non-trade deficits for this accounting period from loan relationships and derivative -
contacts (financial instruments)
For period 01/03/2016 to 28/02/2017 Page 3
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Deductions and reliefs continued
265 Non-trading losses on intangible fixed assets -
275 Total trading losses of this or a later accounting period 155123
280 Put an ‘X’ in box 280 if amounts carried back from later accounting periods are
included in box 275
290 Non-trade capital allowances -
295 Total of deductions and reliefs – total of boxes 240 to 275 and 290 -
300 Profits before qualifying donations and group relief – box 235 minus box 295 17,485
305 Qualifying donations -
310 Group relief -
315 Profits chargeable to Corporation Tax – box 300 minus boxes 305 and 310 17,485
320 Ring fence profits included -
Tax calculation
Enter how much profit has to be charged and at what rate
Financial Amount of profit Rate of tax Tax
year (yyyy) %
330 2015 335 1,485 340 20.00% 345 297.00
350 - 355 360 -
365 - 370 375 -
380 2016 385 16,000 390 20.00% 395 3,200.00
400 - 405 410 -
415 - 420 425 -
Corporation Tax - total of boxes 345, 360, 375, 395, 410 and 425 430 3,497.00
Marginal relief for ring fence trades 435 -
Corporation Tax chargeable - box 430 minus box 435 440 3,497.00
For period 01/03/2016 to 28/02/2017 Page 4
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Reliefs and deductions in terms of tax
445 Community investment relief -
450 Double taxation relief -
455 Put an ‘X’ in box 455 if box 450 includes an underlying Rate relief claim
460 Put an ‘X’ in box 460 if box 450 includes any amount carried back from a later
period
465 Advanced Corporation Tax -
470 Total reliefs and deduction in terms of tax - total of boxes 445, 450 and 465 -
Calculation of tax outstanding or overpaid
475 Net Corporation Tax liability – box 440 minus box 470 3,497.00
480 Tax payable on loans and arrangements to participators -
485 Put an ‘X’ in box 485 if you completed box A70 in the supplementary pages
CT600A
490 CFC tax payable -
495 Bank levy payable -
496 Bank surcharge payable -
500 CFC tax, bank levy and bank surcharge payable – total of box 490, 495 and 496 -
505 Supplementary charge (ring fence trades) payable -
510 Tax chargeable – total of boxes 475, 480, 500 and 505 3,497.00
515 Income Tax deducted from gross income included in profits -
520 Income Tax repayable to the company -
525 Self-assessment of tax payable before restitution tax – box 510 minus box 515 3,497.00
527 Restitution tax -
528 Self-assessment of tax payable – total of boxes 525 and 527 3,497.00
For period 01/03/2016 to 28/02/2017 Page 5
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Tax reconciliation
530 Research and Development credit -
535 (not currently used)
540 Creative tax credit -
545 Total of Research and Development credit, and creative tax credit – total boxes 530 -
and 540
550 Land remediation tax credit -
555 Life assurance company tax credit -
560 Total land remediation and life assurance company tax credit – total box 550 and -
555
565 Capital allowances first-year tax credit -
570 Surplus Research and Development credits or creative tax credit payable – box 545 -
minus box 525
575 Land remediation or life assurance company tax credit payable – total of boxes 545 -
and 560 minus boxes 525 and 570
580 Capital allowances first-year tax credit payable – boxes 545, 560 and 565 minus -
boxes 525, 570 and 575
585 Ring fence Corporation Tax included -
590 Ring fence supplementary charge included -
595 Tax already paid (and not already repaid) -
600 Tax outstanding – box 525 minus boxes 545, 560, 565 and 595 3,497.00
605 Tax overpaid including surplus or payable credits – total sum of boxes 545, 560, -
565 and 595 minus 525
610 Group tax refunds surrendered to this company -
615 Research and Development expenditure credits surrendered to this company -
For period 01/03/2016 to 28/02/2017 Page 6
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Indicators and information
620 Franked investment income/Exempt ABGH distributions -
625 Number of 51% group companies -
Put an ‘X’ in the relevant boxes, if in the period, the company:
630 should have made (whether it has or not) instalment payments under the Corporation Tax (Instalment Payments)
Regulations 1998
635 is within a group payments arrangement for the period
640 has written down or sold intangible assets
645 has made cross-border royalty payments
Information about enhanced expenditure
Research and Development (R&D) or creative enhanced expenditure
650 Put an ‘X’ in box 650 if the claim is made by a small or medium-sized enterprise (SME), including a SME subcontractor to
a large company
655 Put an ‘X’ in box 655 if the claim is made by a large company
660 R&D enhanced expenditure -
665 Creative enhanced expenditure -
670 R&D and creative enhanced expenditure - total of boxes 660 and 665 -
675 R&D enhanced expenditure of an SME on work sub contracted to it by a large -
company
680 Vaccine research expenditure -
Land remediation enhanced expenditure
685 Enter the total enhanced expenditure -
For period 01/03/2016 to 28/02/2017 Page 7
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Information about capital allowances and balancing charges
Allowances and charges in calculation of trading profits and losses
Capital allowances Balancing charges
Annual investment allowance 690 1,337
Machinery and plant - special rate pool 695 - 700 -
Machinery and plant - main pool 705 1,337 710 -
Business premises renovation 715 - 720 -
Enterprise zones 721 - 722 -
Zero emissions goods vehicles 723 - 724 -
Other allowances and charges 725 - 730 -
Allowances and charges not included in calculation of trading profits and losses
Capital allowances Balancing charges
Annual investment allowance 735 -
Business premises renovation 740 - 745 -
Enterprise zones 746 - 747 -
Zero emissions goods vehicles 748 - 749 -
Other allowances and charges 750 - 755 -
Qualifying expenditure
760 Machinery and plant on which first year allowance is claimed -
765 Designated environmentally friendly machinery and plant -
770 Machinery and plant on long-life assets and integral features -
775 Other machinery and plant 1,337
For period 01/03/2016 to 28/02/2017 Page 8
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Losses, deficits and excess amounts
Amount arising
Amount Maximum available for surrender
as group relief
Losses of trades carried on wholly or partly 780 - 785 -
in the UK
Losses of trade carried on wholly outside 790 -
the UK - special rate pool
Non-trading deficits on loan relationships 795 - 800 -
and derivative contracts
UK property business losses 805 - 810 -
Overseas property business 815 -
Losses from miscellaneous transactions 820 -
Capital losses 825 -
Non-trading losses on intangible fixed 830 - 835 -
assets
Excess amounts
Amount Maximum available for surrender
as group relief
Non-trading capital allowances 840 -
Qualifying donations 845 -
Management expenses 850 - 855 -
For period 01/03/2016 to 28/02/2017 Page 9
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Overpayments and repayments
Small repayments
860 Do not repay sums of - or less
Read the overpayments and repayments section of the Company Tax Return Guide for specific guidance on when and how to
make an entry in this box.
Repayments for the period covered by this return
865 Repayment of Corporation Tax -
870 Repayment of Income Tax -
875 Payable Research and Development tax credit -
880 Payable Research and Development expenditure credit -
885 Payable creative tax credit -
890 Payable land remediation of life assurance company tax credit -
895 Payable capital allowances first-year tax credit -
Surrender of tax refund within group
Including surrenders under the Instalment Payments Regulations
900 The following amount is to be surrendered -
Put an 'X' in the appropriate box(es) below
the joint Notice is attached 905
or
will follow 910
915 Please stop repayment of the following amount until we send you the Notice -
Bank details (for person to whom a repayment is to be made)
920 Name of bank or building society
925 Branch sort code
930 Account number
935 Name of account
940 Building society reference
For period 01/03/2016 to 28/02/2017 Page 10
Rotaready Limited (UTR: 6757612933) IRmark: 4BM4SIXJ6OVED4ZLXHJWOEV7SEG3LULX
- Prepared by: Howlader & Co on 16/11/2017 at 09:30
Payments to a person other than the company
945 Complete the authority below if you want the repayment to be made to a person other than the company
I, as (enter status - company secretary, treasurer, liquidator or authorised agent, etc.)
950 of (enter company name)
955 authorise (enter name)
960 of address (enter address)
Postcode
965 Nominee reference
to receive payment on company's behalf
970 Name
Declaration
Declaration
I declare that the information I have given on this Company Tax Return and any supplementary pages is correct and complete
to the best of my knowledge and belief.
I understand that giving false information in the return, or concealing any part of the company’s profits or tax payable, can lead
to both the company and me being prosecuted.
975 Name
James Harvey
980 Date DD/MM/YYYY
16/11/2017 16/11/2018
985 Status
Director
For period 01/03/2016 to 28/02/2017 Page 11
"""#
let stringRange = NSRange(location: 0, length: testString.utf16.count)
let matches = regex.matches(in: testString, range: stringRange)
var result: [[String]] = []
for match in matches {
var groups: [String] = []
for rangeIndex in 1 ..< match.numberOfRanges {
let nsRange = match.range(at: rangeIndex)
guard !NSEqualRanges(nsRange, NSMakeRange(NSNotFound, 0)) else { continue }
let string = (testString as NSString).substring(with: nsRange)
groups.append(string)
}
if !groups.isEmpty {
result.append(groups)
}
}
print(result)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Swift 5.2, please visit: https://developer.apple.com/documentation/foundation/nsregularexpression