Skip to content

Commit 54469d2

Browse files
Merge pull request #4286 from alphagov/self-assessment-penalty-change
Self Assessment penalty calculator change
2 parents 1044738 + 0cc5644 commit 54469d2

File tree

6 files changed

+48
-12
lines changed

6 files changed

+48
-12
lines changed

lib/smart_answer/calculators/self_assessment_penalties.rb

+10-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class SelfAssessmentPenalties < OpenStruct
1515
"2015-16": ONLINE_FILING_DEADLINE_YEAR.starting_in(2017).begins_on,
1616
"2016-17": ONLINE_FILING_DEADLINE_YEAR.starting_in(2018).begins_on,
1717
"2017-18": ONLINE_FILING_DEADLINE_YEAR.starting_in(2019).begins_on,
18+
"2018-19": ONLINE_FILING_DEADLINE_YEAR.starting_in(2020).begins_on,
1819
},
1920
offline_filing_deadline: {
2021
"2012-13": OFFLINE_FILING_DEADLINE_YEAR.starting_in(2013).begins_on,
@@ -23,6 +24,7 @@ class SelfAssessmentPenalties < OpenStruct
2324
"2015-16": OFFLINE_FILING_DEADLINE_YEAR.starting_in(2016).begins_on,
2425
"2016-17": OFFLINE_FILING_DEADLINE_YEAR.starting_in(2017).begins_on,
2526
"2017-18": OFFLINE_FILING_DEADLINE_YEAR.starting_in(2018).begins_on,
27+
"2018-19": OFFLINE_FILING_DEADLINE_YEAR.starting_in(2019).begins_on,
2628
},
2729
payment_deadline: {
2830
"2012-13": PAYMENT_DEADLINE_YEAR.starting_in(2014).begins_on,
@@ -31,6 +33,7 @@ class SelfAssessmentPenalties < OpenStruct
3133
"2015-16": PAYMENT_DEADLINE_YEAR.starting_in(2017).begins_on,
3234
"2016-17": PAYMENT_DEADLINE_YEAR.starting_in(2018).begins_on,
3335
"2017-18": PAYMENT_DEADLINE_YEAR.starting_in(2019).begins_on,
36+
"2018-19": PAYMENT_DEADLINE_YEAR.starting_in(2020).begins_on,
3437
},
3538
}.freeze
3639

@@ -48,6 +51,8 @@ def tax_year_range
4851
SmartAnswer::YearRange.tax_year.starting_in(2016)
4952
when "2017-18"
5053
SmartAnswer::YearRange.tax_year.starting_in(2017)
54+
when "2018-19"
55+
SmartAnswer::YearRange.tax_year.starting_in(2018)
5156
end
5257
end
5358

@@ -69,6 +74,8 @@ def one_year_after_start_date_for_penalties
6974
PENALTY_YEAR.starting_in(2019).begins_on
7075
when "2017-18"
7176
PENALTY_YEAR.starting_in(2020).begins_on
77+
when "2018-19"
78+
PENALTY_YEAR.starting_in(2021).begins_on
7279
end
7380
end
7481

@@ -186,12 +193,12 @@ def calculate_interest_for_date(date)
186193
end
187194

188195
def daily_rate(date)
189-
# Rate drops from 3% to 2.75% on 23 August 2016
190-
rate_change_date = Date.new(2016, 8, 23)
196+
# Rate increased to 3.25% on 21 August 2018
197+
rate_change_date = Date.new(2018, 8, 21)
191198
if date < rate_change_date
192199
0.03 / 365.0
193200
else
194-
0.0275 / 365.0
201+
0.0325 / 365.0
195202
end
196203
end
197204
end

lib/smart_answer_flows/estimate-self-assessment-penalties.rb

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def define
1414
option :"2015-16"
1515
option :"2016-17"
1616
option :"2017-18"
17+
option :"2018-19"
1718

1819
on_response do |response|
1920
self.calculator = Calculators::SelfAssessmentPenalties.new

lib/smart_answer_flows/estimate-self-assessment-penalties/estimate_self_assessment_penalties.govspeak.erb

+9-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212
- sending your Self Assessment tax return
1313
- paying your Self Assessment tax bill
1414

15-
^You can only calculate penalties for the current tax year.^
15+
This calculator can only give an estimate of what you owe and does not take account of:
1616

17-
This calculator doesn’t take account of any:
17+
- payments you’ve made towards your tax bill
18+
- outstanding interest or penalties for previous tax years
19+
- credit you have from previous tax years
20+
21+
Do not use the calculator if you:
22+
23+
- got your request to fill in a Self Assessment less than 3 months before the deadline, so had more time to file it
24+
- sent a paper return after October 31, but HMRC agreed you had a reasonable excuse to not file online
1825

19-
- partial payments or penalty payments you’ve made towards your tax bill
20-
- outstanding interest or penalties for previous tax years
21-
- credit you have from previous tax years
2226
<% end %>

lib/smart_answer_flows/estimate-self-assessment-penalties/questions/which_year.govspeak.erb

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"2014-15": "6 April 2014 to 5 April 2015",
99
"2015-16": "6 April 2015 to 5 April 2016",
1010
"2016-17": "6 April 2016 to 5 April 2017",
11-
"2017-18": "6 April 2017 to 5 April 2018"
11+
"2017-18": "6 April 2017 to 5 April 2018",
12+
"2018-19": "6 April 2018 to 5 April 2019",
1213
) %>

test/integration/smart_answer_flows/estimate_self_assessment_penalties_test.rb

+23
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,27 @@ class EstimateSelfAssessmentPenaltiesTest < ActiveSupport::TestCase
230230
end
231231
end
232232
end
233+
context "online return, tax year 2018-19" do
234+
setup do
235+
add_response :"2018-19"
236+
add_response :online
237+
end
238+
should "ask when bill was paid" do
239+
assert_current_node :when_submitted?
240+
end
241+
context "10% fine + 1000pounds(previous fine)(band 4), taxdue > 6002pounds" do
242+
setup do
243+
add_response "2020-06-01"
244+
add_response "2020-06-01"
245+
add_response "10000.00"
246+
end
247+
should "show results" do
248+
assert_equal 430, current_state.calculator.late_filing_penalty
249+
assert_equal 10000, current_state.calculator.estimated_bill
250+
assert_equal 107.74, current_state.calculator.interest
251+
assert_equal 500, current_state.calculator.late_payment_penalty
252+
assert_equal 11037, current_state.calculator.total_owed_plus_filing_penalty
253+
end
254+
end
255+
end
233256
end

test/unit/calculators/self_assessment_penalties_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def setup
249249
should "have values from rate at 2.75%" do
250250
@calculator.payment_deadline = Date.parse("2016-08-23")
251251
@calculator.payment_date = Date.parse("2016-10-31")
252-
assert_equal 5.12, @calculator.interest.value.to_f
252+
assert_equal 5.59, @calculator.interest.value.to_f
253253
end
254254
end
255255

@@ -258,15 +258,15 @@ def setup
258258
@calculator.tax_year = "2015-16"
259259
@calculator.payment_deadline = Date.parse("2017-1-31")
260260
@calculator.payment_date = Date.parse("2017-3-1")
261-
assert_equal 2.11, @calculator.interest.value.to_f
261+
assert_equal 2.3, @calculator.interest.value.to_f
262262
end
263263
end
264264

265265
context "deadline is before rate change date, payment is after rate change date" do
266266
should "have value calculated with rates from before and after change" do
267267
@calculator.payment_deadline = Date.parse("2016-01-31")
268268
@calculator.payment_date = Date.parse("2016-10-31")
269-
assert_equal 21.97, @calculator.interest.value.to_f
269+
assert_equal 22.44, @calculator.interest.value.to_f
270270
end
271271
end
272272
end

0 commit comments

Comments
 (0)