Skip to content

Commit

Permalink
more fixes for muni
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Sep 12, 2024
1 parent 93bec8a commit 25dacc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class='card'>
<a class='top' [href]='href'>
<span class='value' [innerHtml]='entry.value'></span>
<span class='value' [innerHtml]='entry.s_value'></span>
<span class='title'>{{entry.title}}</span>
<div class='chevron'></div>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ export class ItemMuniComponent implements OnChanges, AfterViewInit {
}
}
if (b.code.length === 1) {
b.num_value = b.executed || b.revised || b.allocated;
b.num_value = Math.abs(b.executed || b.revised || b.allocated || 0);
if (b.code[0] < '6') {
this.incomeBudgets.push(b);
this.totalIncome += parseFloat(b.value);
this.totalIncome += Math.abs(parseFloat(b.value));
} else {
this.expenseBudgets.push(b);
this.totalExpense += parseFloat(b.value);
this.totalExpense += Math.abs(parseFloat(b.value));
}
}
});
Expand All @@ -62,7 +62,7 @@ export class ItemMuniComponent implements OnChanges, AfterViewInit {
} else {
b.pct = (b.num_value / this.totalExpense) * 100 + '%';
}
b.value = this.format.ils(b.num_value);
b.s_value = this.format.ils(b.num_value);
}
});
this.incomeBudgets = this.incomeBudgets.sort((a, b) => a.code.localeCompare(b.code));
Expand Down

0 comments on commit 25dacc1

Please sign in to comment.