Skip to content

Commit

Permalink
Fixed issue with price calculation of awattar neu
Browse files Browse the repository at this point in the history
The order how the prices are calculated has been wrong.

Currently it is calculated like (spot price + 1.5 Cent) + 3% + 20% and therefore a 3% surcharge on the 1.5Cent fee is added as well. This is wrong.

According to awattar price page, the 3% surcharge is only applied to the spot price but not to the additional fee.

I checked with my last invoice and after the fix, it matches the values.
  • Loading branch information
wolfio authored and lewurm committed May 16, 2024
1 parent 74335dc commit bc942a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tariffs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const awattar_neu = new Tarif (
"+3% + 1.80ct/kWh",
575,
(function (price, kwh, include_monthly_fee, monthly_fee_factor) {
let amount = price.plus(kwh.times(1.5)).times(1.03).times(1.2);
let amount = price.times(1.03).plus(kwh.times(1.5)).times(1.2);
if (include_monthly_fee) amount = amount.plus(this.grundgebuehr_ct*monthly_fee_factor);
return amount;
})
Expand Down

0 comments on commit bc942a4

Please sign in to comment.