Show the admin cost in sats, and the deducted kroner when there are any
This commit is contained in:
1 parent
be645ffaa5
commit
374238f6ca
1 file changed
+19
-12
+19
-12
@@ -60,18 +60,25 @@
|
|||||||
function renderTotals(report, settings) {
|
function renderTotals(report, settings) {
|
||||||
var totals = report.totals;
|
var totals = report.totals;
|
||||||
totalsBox.textContent = "";
|
totalsBox.textContent = "";
|
||||||
[
|
var figures = [
|
||||||
["Formue", totals.formue_ore],
|
["Formue", Skuld.formatKroner(totals.formue_ore)],
|
||||||
["Gevinst", totals.gevinst_ore],
|
["Gevinst", Skuld.formatKroner(totals.gevinst_ore)],
|
||||||
["Tap", totals.tap_ore],
|
["Tap", Skuld.formatKroner(totals.tap_ore)],
|
||||||
["Brukt inngangsverdi", totals.brukt_ore],
|
["Brukt inngangsverdi", Skuld.formatKroner(totals.brukt_ore)],
|
||||||
["Netto", totals.netto_ore],
|
["Netto", Skuld.formatKroner(totals.netto_ore)],
|
||||||
["Inntekt", totals.inntekt_ore],
|
["Inntekt", Skuld.formatKroner(totals.inntekt_ore)],
|
||||||
["Skatt (" + settings.tax_rate_percent + " %)", totals.skatt_ore],
|
["Skatt (" + settings.tax_rate_percent + " %)", Skuld.formatKroner(totals.skatt_ore)],
|
||||||
["Formuesskatt", totals.formuesskatt_ore],
|
["Formuesskatt", Skuld.formatKroner(totals.formuesskatt_ore)],
|
||||||
["Forvaltningskostnad", totals.admin_cost_ore]
|
["Forvaltningskostnad", Skuld.formatSats(totals.admin_cost_sats) + " sats"]
|
||||||
].forEach(function (pair) {
|
];
|
||||||
totalsBox.appendChild(figure(pair[0], Skuld.formatKroner(pair[1])));
|
if (totals.admin_cost_ore) {
|
||||||
|
figures.push([
|
||||||
|
"Forvaltningskostnad trekt frå",
|
||||||
|
Skuld.formatKroner(totals.admin_cost_ore)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
figures.forEach(function (pair) {
|
||||||
|
totalsBox.appendChild(figure(pair[0], pair[1]));
|
||||||
});
|
});
|
||||||
|
|
||||||
var price = report.year_end_price_ore
|
var price = report.year_end_price_ore
|
||||||
|
|||||||
Reference in new issue
Block a user