From 7c1e22386a9ed2afe18c8c5f2b23d766db9d6b49 Mon Sep 17 00:00:00 2001 From: Kate Drwecka Date: Tue, 23 Jul 2019 16:00:44 -0400 Subject: [PATCH 1/3] update values on review page --- api/user.json | 46 +++++++++++++++-------------------- locales/en.json | 6 ++++- views/confirmation/review.pug | 12 ++++----- 3 files changed, 29 insertions(+), 35 deletions(-) diff --git a/api/user.json b/api/user.json index 3db3f563..ceb1207d 100644 --- a/api/user.json +++ b/api/user.json @@ -39,23 +39,23 @@ "netIncome": { "name": "Net Income", "line": 236, - "amount": 20000.00 + "amount": 19305.10 }, "taxableIncome": { "name": "Taxable Income", "line": 260, - "amount": 5000.00 + "amount": 19305.10 } }, "taxes": { "federal": { "name": "Net Federal tax", - "amount": 1998.00, + "amount": 1060.00, "line": 420 }, "provincial": { - "name": "Net Provincial tax", - "amount": 1106.00, + "name": "Net Ontario tax", + "amount": 533.00, "line": 428 }, "CPP": { @@ -93,7 +93,6 @@ "disabilityClaim": null, "disabilityAmount": { "name": "Disability", - "line": 316, "amount": 0.00 }, "rrspClaim": null, @@ -104,7 +103,6 @@ }, "ageAmount": { "name": "Age Amount", - "line": 301, "amount": 7500.00 }, "rrspAmount": 0, @@ -115,27 +113,23 @@ "pensionIncomeClaim": null, "pensionIncomeClaimAmount": { "name": "Pension", - "line": 314, "amount": 700.00 }, "childcareClaim": null, "childcareAmount": { "name": "Childcare Expenses", - "line": 214, - "amount": 1517.94 + "amount": 0.00 }, "singleParentClaim": null, "dependentDisabilityClaim": null, "medicalExpenseClaim": null, "medicalExpenseClaimAmount": { "name": "Medical Expenses", - "line": 331, - "multiLine": "330/331", - "amount": 1227.34 + "line": 330, + "amount": 0.00 }, "amountsFromSpouse": { "name": "Amounts transfered from spouse", - "line": 326, "amount": 0.00 }, "politicalContributionClaim": null, @@ -154,32 +148,30 @@ "climateActionIncentiveIsRural": null }, "refund": { - "Total Payable": { + "totalPayable": { "name": "Total Payable", "line": 435, - "amount": 0.00 + "amount": 1593.00 }, - "Total Deducted": { + "totalDeducted": { "name": "Total Deducted", "line": 437, - "amount": 0.00 + "amount": 2312.88 }, - "Total Credits": { + "totalCredits": { "name": "Total Credits", - "line": 482, "amount": 2500.00 }, - "Total Refund": { + "totalRefund": { "name": "Total Refund", "line": 484, - "amount": 3200.00 + "amount": 719.88 } }, "benefits": { - "Canada child benefit": 6639.00, - "Climate action incentive": 0.00, - "GST/HSTC": 0.00, - "Trillium": 300.00, - "totalBenefits": 6939.00 + "Climate action incentive": 154.00, + "GST/HSTC": 440.00, + "Ontario trillium benefits": 307.92, + "totalBenefits": 901.92 } } diff --git a/locales/en.json b/locales/en.json index f734616b..2f969d5b 100644 --- a/locales/en.json +++ b/locales/en.json @@ -255,5 +255,9 @@ "Total Deducted (437)": "Total Deducted (437)", "Total Credits (482)": "Total Credits (482)", "Total Refund (484)": "Total Refund (484)", - "I confirm that, as far as I know, all the information in this tax return is accurate": "I confirm that, as far as I know, all the information in this tax return is accurate" + "I confirm that, as far as I know, all the information in this tax return is accurate": "I confirm that, as far as I know, all the information in this tax return is accurate", + "Ontario trillium benefits": "Ontario trillium benefits", + "Detailed breakdown of tax refund": "Detailed breakdown of tax refund", + "Medical Expenses (330)": "Medical Expenses (330)", + "Net Ontario tax (428)": "Net Ontario tax (428)" } \ No newline at end of file diff --git a/views/confirmation/review.pug b/views/confirmation/review.pug index c0db36f7..2ecbea02 100644 --- a/views/confirmation/review.pug +++ b/views/confirmation/review.pug @@ -8,6 +8,7 @@ block variables -var incomes = hasData(data, 'financial.incomes') ? data.financial.incomes : {} -var taxes = hasData(data, 'financial.taxes') ? data.financial.taxes : {} -var refund = hasData(data, 'refund') ? data.refund : {} + -var totalRefund = hasData(data, 'refund.totalRefund') ? data.refund.totalRefund : 0 -var refundLines = sortByLineNumber(data.deductions, taxes, incomes, refund) -var count = 1; @@ -25,7 +26,7 @@ block content thead tr th.breakdown-table__heading #{__('Your annual benefits')} - th.breakdown-table__heading $#{currencyFilter(totalBenefits, 0)} + th.breakdown-table__heading $#{currencyFilter(totalBenefits)} tbody tr th(colspan="2").breakdown-table__subheading #{__('Detailed breakdown of benefits')} @@ -44,19 +45,16 @@ block content thead tr th.breakdown-table__heading #{__('Your projected refund')} - th.breakdown-table__heading +$#{currencyFilter(totalBenefits, 0)} + th.breakdown-table__heading +$#{currencyFilter(totalRefund.amount)} tbody tr - th(colspan="2").breakdown-table__subheading #{__('Detailed breakdown of benefits')} + th(colspan="2").breakdown-table__subheading #{__('Detailed breakdown of tax refund')} each refundLine in refundLines -var lineNumber = refundLine.multiLine ? refundLine.multiLine : refundLine.line - - //- do I like this space-row thing right now? no - //- but until our date and how we sort these lines is more solid, it lives tr( class={ ['breakdown-table__summary-row space-row']: refundLine.name === "Total Refund", - ['space-row']: count === 5 || count === 8 || count === 11 || count === 13 + ['space-row']: count === 4 || count === 5 || count === 6 || count === 8 } ) td #{__(`${refundLine.name} (${lineNumber})`)} From 1e64d21d38b8950c01678e1df191f0a60a25bebe Mon Sep 17 00:00:00 2001 From: Kate Drwecka Date: Tue, 23 Jul 2019 16:18:09 -0400 Subject: [PATCH 2/3] update working on income --- views/financial/income.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/financial/income.pug b/views/financial/income.pug index 8a952ae2..2249d8b7 100644 --- a/views/financial/income.pug +++ b/views/financial/income.pug @@ -50,7 +50,7 @@ block content each tax in taxes tr - td #{__(`${tax.name} deduction`)} + td #{__(`${tax.name.replace('Net ', '')} deduction`)} td $#{currencyFilter(tax.amount)} tr.breakdown-table__summary-row From 336b6c6b587f5fafd934f4fb3024fc71bc961a7b Mon Sep 17 00:00:00 2001 From: Kate Drwecka Date: Tue, 23 Jul 2019 16:26:18 -0400 Subject: [PATCH 3/3] update locals, update benefit title Ontario Trillium Benefit is title case - https://www.ontario.ca/page/ontario-trillium-benefit --- api/user.json | 2 +- locales/en.json | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/user.json b/api/user.json index ceb1207d..94ed9c17 100644 --- a/api/user.json +++ b/api/user.json @@ -171,7 +171,7 @@ "benefits": { "Climate action incentive": 154.00, "GST/HSTC": 440.00, - "Ontario trillium benefits": 307.92, + "Ontario Trillium Benefit": 307.92, "totalBenefits": 901.92 } } diff --git a/locales/en.json b/locales/en.json index 2f969d5b..f734616b 100644 --- a/locales/en.json +++ b/locales/en.json @@ -255,9 +255,5 @@ "Total Deducted (437)": "Total Deducted (437)", "Total Credits (482)": "Total Credits (482)", "Total Refund (484)": "Total Refund (484)", - "I confirm that, as far as I know, all the information in this tax return is accurate": "I confirm that, as far as I know, all the information in this tax return is accurate", - "Ontario trillium benefits": "Ontario trillium benefits", - "Detailed breakdown of tax refund": "Detailed breakdown of tax refund", - "Medical Expenses (330)": "Medical Expenses (330)", - "Net Ontario tax (428)": "Net Ontario tax (428)" + "I confirm that, as far as I know, all the information in this tax return is accurate": "I confirm that, as far as I know, all the information in this tax return is accurate" } \ No newline at end of file