From 9b53b959a4f622cf1a36f4aff20a7c2a38583f11 Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Mon, 21 Nov 2022 16:55:12 +0100 Subject: [PATCH] Updated cost model for EasyEnergy --- app/models/cost.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/models/cost.rb b/app/models/cost.rb index b2369c3..79ef5ee 100644 --- a/app/models/cost.rb +++ b/app/models/cost.rb @@ -56,10 +56,23 @@ class Cost def easy_energy_rate(formatted_hour) year = Date.parse(formatted_hour).year + month = Date.parse(formatted_hour).month + case year - when 2020..2022 + when 2020..2021 # opslag, zonder BTW 0.00800 + when 2022 + case month + when 1..11 + # opslag, before increase + 0.00800 + when 12 + # opslag, met BTW: 0,01962 + 0.018 + end + when 2023 + 0.018 end end