Skip to content

Commit

Permalink
Merge pull request #955 from hdoupe/no-rounding
Browse files Browse the repository at this point in the history
Output page fixes
  • Loading branch information
hdoupe authored Jan 15, 2019
2 parents 6775c3d + f22cf11 commit 1a917b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Go
[here](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pulls?q=is%3Apr+is%3Aclosed)
for a complete commit history.

Release 1.7.7 on 2019-01-14
Release 1.7.7 on 2019-01-15
----------------------------
**Major Changes**
- None
Expand All @@ -16,6 +16,7 @@ Release 1.7.7 on 2019-01-14
**Bug Fixes**
- [#952](https://github.com/ospc-org/ospc.org/pull/952) - Update links - Hank Doupe
- [#953](https://github.com/ospc-org/ospc.org/pull/953) - Update more links - Hank Doupe
- [#955](https://github.com/ospc-org/ospc.org/pull/955) - Output page fixes - Hank Doupe

Release 1.7.6 on 2018-11-09
----------------------------
Expand Down
4 changes: 2 additions & 2 deletions static/js/taxbrain-tablebuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ $(function() {
var j = 0;
_.each(row.cells, function(cell) {
if (_.isEmpty(cell.year_values)) {
that.get('rows')[i]['cells'][j]['tot_value'] = that.numberWithCommas((parseFloat(cell.value)).toFixed(cell.format.decimals));
that.get('rows')[i]['cells'][j]['tot_value'] = that.numberWithCommas(parseFloat(cell.value));
} else {
_.each(_.keys(cell.year_values), function(year) {
that.get('rows')[i]['cells'][j]['year_values'][year] = that.numberWithCommas((parseFloat(cell.year_values[year])).toFixed(cell.format.decimals));
that.get('rows')[i]['cells'][j]['year_values'][year] = that.numberWithCommas(parseFloat(cell.year_values[year]));
});
}
j++;
Expand Down
14 changes: 7 additions & 7 deletions webapp/apps/taxbrain/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,17 @@ def default_taxcalc_data(cls, start_year, metadata=True):
TAXCALC_RESULTS_DFTABLE_COL_LABELS = taxcalc.DIFF_TABLE_LABELS[:]
TAXCALC_RESULTS_MTABLE_COL_FORMATS = [
# divisor, unit, decimals
[ 1000, None, 0], # 'Returns',
[ 1000000, None, 0], # 'Returns',
[1000000000, 'Dollars', 1], # 'AGI',
[ 1000, None, 0], # 'Standard Deduction Filers',
[ 1000000, None, 0], # 'Standard Deduction Filers',
[1000000000, 'Dollars', 1], # 'Standard Deduction',
[ 1000, None, 0], # 'Itemizers',
[ 1000000, None, 0], # 'Itemizers',
[1000000000, 'Dollars', 1], # 'Itemized Deduction',
[1000000000, 'Dollars', 1], # 'Personal Exemption',
[1000000000, 'Dollars', 1], # 'Taxable Income',
[1000000000, 'Dollars', 1], # 'Regular Tax',
[1000000000, 'Dollars', 1], # 'AMTI',
[ 1000, None, 0], # 'AMT Filers',
[ 1000000, None, 0], # 'AMT Filers',
[1000000000, 'Dollars', 1], # 'AMT',
[1000000000, 'Dollars', 1], # 'Tax before Credits',
[1000000000, 'Dollars', 1], # 'Non-refundable Credits',
Expand All @@ -247,10 +247,10 @@ def default_taxcalc_data(cls, start_year, metadata=True):
[1000000000, 'Dollars', 1], # 'After-Tax Expanded Income'
]
TAXCALC_RESULTS_DFTABLE_COL_FORMATS = [
[ 1000, None, 0], # "Count", --> All Tax Units
[ 1000, None, 0], # "Tax Units with Tax Cut",
[ 1000000, None, 0], # "Count", --> All Tax Units
[ 1000000, None, 0], # "Tax Units with Tax Cut",
[ 1, '%',1], # "Percent Tax Decrease" --> "Percent with Tax Cut"
[ 1000, None, 0], # "Tax Units with Tax Cut",
[ 1000000, None, 0], # "Tax Units with Tax Cut",
[ 1, '%', 1], # "Percent Tax Increase" --> "Percent with Tax Increase",
[ 1, 'Dollars', 0], # "Average Tax Change",
[1000000000, 'Dollars', 1], # "Total Tax Difference",
Expand Down

0 comments on commit 1a917b2

Please sign in to comment.