Browse Source

DIV-806: Display fact sheet f if the income of the payor is over threshold amount

pull/160/head
Benard Ebinu 7 years ago
parent
commit
5e769e6cb4
2 changed files with 171 additions and 192 deletions
  1. +8
    -29
      edivorce/apps/core/static/js/main.js
  2. +163
    -163
      edivorce/apps/core/templates/question/06_children_facts.html

+ 8
- 29
edivorce/apps/core/static/js/main.js View File

@ -442,40 +442,19 @@ $(function () {
populateChildrenFactSheets(); populateChildrenFactSheets();
}); });
var updateClaimantName = function() {
var payor = '';
var element = $('#__claimant_names');
$("input[name='child_support_payor']:checked").each(function() {
if ($(this).val() === 'Myself (Claimant 1)') {
payor = element.find('input[name="name_you"]').val() || 'Claimant 1';
} else if ($(this).val() === 'My Spouse (Claimant 2)') {
payor = element.find('input[name="name_spouse"]').val() || 'Claimant 2';
} else if ($(this).val() === 'Both myself and my spouse') {
payor = (element.find('input[name="name_you"]').val() || 'Claimant 1') + ' and ' +
(element.find('input[name="name_spouse"]').val() || 'Claimant 2');
}
});
$('.__name-of-payor').text(payor);
// check who has sole custody
var children = JSON.parse($('input[name="claimant_children"]').val());
var youHaveSoleCustody = children.every(function(child){
return child.child_live_with === 'Lives with you'
});
var spouseHasSoleCustody = children.every(function(child){
return child.child_live_with === 'Lives with spouse'
});
if (youHaveSoleCustody || spouseHasSoleCustody) {
$('#monthly_amount_question').show();
var showHideFactSheetF = function() {
var claimant = $(this).val();
if ( claimant === 'Myself (Claimant 1)' && parseFloat($('input[name="annual_gross_income"]').val()) > 150000) {
$('#fact_sheet_f').show();
} else if ( claimant === 'My Spouse (Claimant 2)' && parseFloat($('input[name="spouse_annual_gross_income"]').val()) > 150000) {
$('#fact_sheet_f').show();
} else { } else {
$('#monthly_amount_question').hide();
$('#fact_sheet_f').hide();
} }
}; };
// $('#__claimant_names').each(updateClaimantName);
// $('input[name="child_support_payor"]').on('change', updateClaimantName);
$('input[name="child_support_payor"]').on('click', showHideFactSheetF).filter(':checked').each(showHideFactSheetF);
$("#btn_add_reconciliation_periods").on('click', function () { $("#btn_add_reconciliation_periods").on('click', function () {


+ 163
- 163
edivorce/apps/core/templates/question/06_children_facts.html View File

@ -355,6 +355,9 @@
</div> </div>
<div class="question-well"> <div class="question-well">
{% money_input_field name="annual_gross_income" hidden="true" %}
{% money_input_field name="spouse_annual_gross_income" hidden="true" %}
<h3>Who is the <h3>Who is the
<span class="tooltip-link" <span class="tooltip-link"
data-toggle="tooltip" data-placement="right" data-html="true" data-toggle="tooltip" data-placement="right" data-html="true"
@ -471,179 +474,176 @@
</div> </div>
{% endif %} {% endif %}
{% if annual_gross_income|integer > 150000 %}
<div id="annual_gross_income_question">
<div class="question-well fact-sheets" id="you_fact_sheet_f">
<h1>Income over $150,000 (Fact Sheet F)</h1>
<p>
Since you have previously indicated that the payor's income is over $150,000 you will need to provide
answers to the next set of questions. The child support guideline table you previously entered only goes
to $150,000. Income beyond that point requires a 2 stage calculation, the amount payable at $150,000 +
the amount payable on the income in excess of $150,000. This takes into account other factors such as
the financial ability of each parent, maintaining a certain quality of life, etc. It is no longer a
matter of there being money simply to look after the needs of the child, but rather the level of care
factoring in the family's lifestyle.
</p>
<div class="question-well fact-sheets" id="fact_sheet_f" hidden>
<h1>Income over $150,000 (Fact Sheet F)</h1>
<p>
Since you have previously indicated that the payor's income is over $150,000 you will need to provide
answers to the next set of questions. The child support guideline table you previously entered only goes
to $150,000. Income beyond that point requires a 2 stage calculation, the amount payable at $150,000 +
the amount payable on the income in excess of $150,000. This takes into account other factors such as
the financial ability of each parent, maintaining a certain quality of life, etc. It is no longer a
matter of there being money simply to look after the needs of the child, but rather the level of care
factoring in the family's lifestyle.
</p>
<p>
<div class="collapse-trigger collapsed" data-toggle="collapse" aria-expanded="false"
data-target="#collapseIncomeNeeded" aria-controls="collapseIncomeNeeded">
<div>
Whose income is needed?
</div>
<p>
<div class="collapse-trigger collapsed" data-toggle="collapse" aria-expanded="false"
data-target="#collapseIncomeNeeded" aria-controls="collapseIncomeNeeded">
<div>
Whose income is needed?
</div> </div>
</p>
</div>
</p>
<div class="collapse" id="collapseIncomeNeeded">
<div>
<p>
If the paying parent earns more than $150,000 per year, you may need to calculate both incomes.
The Federal Guidelines provide two options:
</p>
<ul style="list-style: none;">
<li>
<strong>Option 1</strong>: You can use the tables to determine the child support amount for the first $150,000. Then add
the percentage listed in the tables for the portion of income over $150,000. If you choose this
option, you would only need to calculate the paying parent’s income.
</li>
<li>
<strong>Option 2</strong>: You can use the tables to determine the child support amount for the first $150,000. You can
then determine an amount for the portion of income over $150,000 by looking at the condition,
means, needs and other circumstances of the child and the financial ability of each of you to
contribute. If you choose this option, you would need to calculate both incomes.
</li>
</ul>
<p>
In some cases:
</p>
<ul>
<li>
You may need to calculate your child’s income—for example, if the child is over the age of
majority and you are taking his or her financial means into consideration to determine a
child support amount.
</li>
<li>
You may need to calculate the income of every member of both households to compare the
standards of living if either of you is claiming undue hardship.
</li>
</ul>
<p>
Source: The
{% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/step5-etap5.html#h7" link_text="Federal Child Support Guidelines" %}
Department of Justice
</p>
<div class="collapse" id="collapseIncomeNeeded">
<div>
<p>
If the paying parent earns more than $150,000 per year, you may need to calculate both incomes.
The Federal Guidelines provide two options:
</p>
<ul style="list-style: none;">
<li>
<strong>Option 1</strong>: You can use the tables to determine the child support amount for the first $150,000. Then add
the percentage listed in the tables for the portion of income over $150,000. If you choose this
option, you would only need to calculate the paying parent’s income.
</li>
<li>
<strong>Option 2</strong>: You can use the tables to determine the child support amount for the first $150,000. You can
then determine an amount for the portion of income over $150,000 by looking at the condition,
means, needs and other circumstances of the child and the financial ability of each of you to
contribute. If you choose this option, you would need to calculate both incomes.
</li>
</ul>
<p>
In some cases:
</p>
<ul>
<li>
You may need to calculate your child’s income—for example, if the child is over the age of
majority and you are taking his or her financial means into consideration to determine a
child support amount.
</li>
<li>
You may need to calculate the income of every member of both households to compare the
standards of living if either of you is claiming undue hardship.
</li>
</ul>
<p>
Source: The
{% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/step5-etap5.html#h7" link_text="Federal Child Support Guidelines" %}
Department of Justice
</p>
</div>
</div> </div>
</div>
<table class="table table-bordered">
<thead>
<tr>
<th></th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td class="fact-sheet-question">
How many child(ren) are you asking for support?
</td>
<td class="fact-sheet-answer">
{% input_field type="number" name="number_children_seeking_support" class="fact-sheet-input" %}
</td>
</tr>
<tr>
<td class="fact-sheet-question">
<p>
What is the monthly
{% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" link_text="Child Support Guidelines" %}
amount for $150,000?
</p>
{% include "partials/inline_question_determine_amount_to_pay.html" with collapse_target_id="collapse_guideline_amount" %}
</td>
<td class="fact-sheet-answer">
<div class="dollar-prefix">
{% money_input_field name="child_support_amount_under_high_income" class="fact-sheet-input guideline-amount money" data_sum="true" data_sum_class="guideline-amount" data_sum_target_id="total_amount" %}
</div>
</td>
</tr>
<tr>
<td class="fact-sheet-question">
What is the % of income over $150,000 from the
<table class="table table-bordered">
<thead>
<tr>
<th></th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td class="fact-sheet-question">
How many child(ren) are you asking for support?
</td>
<td class="fact-sheet-answer">
{% input_field type="number" name="number_children_seeking_support" class="fact-sheet-input" %}
</td>
</tr>
<tr>
<td class="fact-sheet-question">
<p>
What is the monthly
{% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" link_text="Child Support Guidelines" %} {% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" link_text="Child Support Guidelines" %}
?
</td>
<td class="fact-sheet-answer">
<div class="percent-suffix">
{% input_field type="number" name="percent_income_over_high_income_limit" class="fact-sheet-input" %}
<label>%</label>
</div>
</td>
</tr>
<tr>
<td class="fact-sheet-question">
<p>
What is the monthly child support amount to be paid on the portion of income over
$150,000?
</p>
<div class="collapse-trigger collapsed" data-toggle="collapse" aria-expanded="false"
data-target="#collapse_high_income_amounts"
aria-controls="collapse_high_income_amounts">
<div>
How can I determine this amount?
</div>
</div>
<div class="collapse" id="collapse_high_income_amounts">
<div>
<p>
The child support tables only show an amount for the first $150,000 of income.
You have
two choices for determining how much child support should be paid on the portion
of
income over $150,000:
</p>
<ul>
<li>
you can multiply the amount of income over $150,000 by the percentage shown
in the
table for the province or territory where the paying parent lives; or
</li>
<li>
you can agree on an additional amount of support based on the condition,
means,
needs and other circumstances of your children and your financial ability to
contribute.
</li>
</ul>
<p>
Source:
{% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" link_text="Federal Child Support Guidelines" %}
, Department of Justice
</p>
</div>
</div>
</td>
<td class="fact-sheet-answer">
<div class="dollar-prefix">
{% money_input_field name="amount_income_over_high_income_limit" class="fact-sheet-input guideline-amount money" data_sum="true" data_sum_class="guideline-amount" data_sum_target_id="total_amount" %}
amount for $150,000?
</p>
{% include "partials/inline_question_determine_amount_to_pay.html" with collapse_target_id="collapse_guideline_amount" %}
</td>
<td class="fact-sheet-answer">
<div class="dollar-prefix">
{% money_input_field name="child_support_amount_under_high_income" class="fact-sheet-input guideline-amount money" data_sum="true" data_sum_class="guideline-amount" data_sum_target_id="total_amount" %}
</div>
</td>
</tr>
<tr>
<td class="fact-sheet-question">
What is the % of income over $150,000 from the
{% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" link_text="Child Support Guidelines" %}
?
</td>
<td class="fact-sheet-answer">
<div class="percent-suffix">
{% input_field type="number" name="percent_income_over_high_income_limit" class="fact-sheet-input" %}
<label>%</label>
</div>
</td>
</tr>
<tr>
<td class="fact-sheet-question">
<p>
What is the monthly child support amount to be paid on the portion of income over
$150,000?
</p>
<div class="collapse-trigger collapsed" data-toggle="collapse" aria-expanded="false"
data-target="#collapse_high_income_amounts"
aria-controls="collapse_high_income_amounts">
<div>
How can I determine this amount?
</div> </div>
</td>
</tr>
<tr>
<td class="fact-sheet-question">
Guidelines table amount
</td>
<td class="fact-sheet-answer" readonly>
<div class="dollar-prefix">
{% money_input_field name="total_guideline_amount" id="total_amount" class="fact-sheet-input money" readonly="" data_mirror="true" data_mirror_target="#agreed_total_amount" data_mirror_broadcast_change="true" %}
</div>
<div class="collapse" id="collapse_high_income_amounts">
<div>
<p>
The child support tables only show an amount for the first $150,000 of income.
You have
two choices for determining how much child support should be paid on the portion
of
income over $150,000:
</p>
<ul>
<li>
you can multiply the amount of income over $150,000 by the percentage shown
in the
table for the province or territory where the paying parent lives; or
</li>
<li>
you can agree on an additional amount of support based on the condition,
means,
needs and other circumstances of your children and your financial ability to
contribute.
</li>
</ul>
<p>
Source:
{% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" link_text="Federal Child Support Guidelines" %}
, Department of Justice
</p>
</div> </div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
<td class="fact-sheet-answer">
<div class="dollar-prefix">
{% money_input_field name="amount_income_over_high_income_limit" class="fact-sheet-input guideline-amount money" data_sum="true" data_sum_class="guideline-amount" data_sum_target_id="total_amount" %}
</div>
</td>
</tr>
<tr>
<td class="fact-sheet-question">
Guidelines table amount
</td>
<td class="fact-sheet-answer" readonly>
<div class="dollar-prefix">
{% money_input_field name="total_guideline_amount" id="total_amount" class="fact-sheet-input money" readonly="" data_mirror="true" data_mirror_target="#agreed_total_amount" data_mirror_broadcast_change="true" %}
</div>
</td>
</tr>
</tbody>
</table>
</div> </div>
{% endif %}
<div class="question-well"> <div class="question-well">
<h3>Are you or your spouse claiming undue hardship?</h3> <h3>Are you or your spouse claiming undue hardship?</h3>


Loading…
Cancel
Save