Convert the admin cost sats to kroner only when the deduction is on
This commit is contained in:
1 parent
79aafdf607
commit
2c6237b862
1 file changed
+7
-1
@@ -180,7 +180,13 @@ def report(year, conn=None):
|
||||
gevinst_ore = sum(account["gevinst_ore"] for account in accounts)
|
||||
tap_ore = sum(account["tap_ore"] for account in accounts)
|
||||
brukt_ore = sum(account["brukt_ore"] for account in accounts)
|
||||
netto_ore = gevinst_ore - tap_ore - (admin_cost_ore if deduct_admin else 0)
|
||||
# The sats become kroner only when the owner asks for the deduction, and
|
||||
# at the year-end rate of the tax year (section 3.10).
|
||||
if deduct_admin:
|
||||
admin_cost_ore = _round_div(admin_cost_sats * (price or 0), SATS_PER_BTC)
|
||||
else:
|
||||
admin_cost_ore = 0
|
||||
netto_ore = gevinst_ore - tap_ore - admin_cost_ore
|
||||
skatt_ore = _round_div(max(netto_ore, 0) * tax_rate, 100)
|
||||
if wealth_enabled:
|
||||
formuesskatt_ore = _round_div(
|
||||
|
||||
Reference in new issue
Block a user