diff --git a/edivorce/apps/core/static/js/main.js b/edivorce/apps/core/static/js/main.js index 40bd3b7f..d6d22583 100755 --- a/edivorce/apps/core/static/js/main.js +++ b/edivorce/apps/core/static/js/main.js @@ -458,6 +458,49 @@ $(function () { 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 custody conditions and only show additional question of amount payor will pay + // if all of the children are in sole custody of payor. + var children = JSON.parse($('input[name="claimant_children"]').val()); + + var payorElement = $("input[name='child_support_payor']:checked").val(); + var soleCustodyCondition = null; + if (payorElement === 'Myself (Claimant 1)') { + soleCustodyCondition = 'Lives with you' + } else if (payorElement === 'My Spouse (Claimant 2)') { + soleCustodyCondition = 'Lives with spouse'; + } + + var hasSoleCustody = children.every(function(child){ + return soleCustodyCondition && child.child_live_with === soleCustodyCondition + }); + + if (hasSoleCustody) { + $('#monthly_amount_question').show(); + } else { + $('#monthly_amount_question').hide(); + } + }; + + $('#__claimant_names').each(updateClaimantName); + $('input[name="child_support_payor"]').on('change', updateClaimantName); + + $("#btn_add_reconciliation_periods").on('click', function () { $('#reconciliation_period_fields').append($('#reconciliation_period_group').children().clone()); // add event lister for newly added from_date field, to_date field, delete button, and date picker diff --git a/edivorce/apps/core/templates/question/06_children_payor_medical.html b/edivorce/apps/core/templates/question/06_children_payor_medical.html index 1aca32fe..2eb2a361 100644 --- a/edivorce/apps/core/templates/question/06_children_payor_medical.html +++ b/edivorce/apps/core/templates/question/06_children_payor_medical.html @@ -9,6 +9,12 @@ {% block content %}
+ Child support orders made in British Columbia are based on the + + Federal Child Support Guidelines. + These guidelines contain clear rules that courts use to set child support as well as tables + that list the amount of child support the payor has to pay. These amounts are based on how much he + or she earns and how many children the payor must support. Each province has its own table; use the + one for the province where the payor lives. +
++ To figure out how much child support the payor will be paying under the guidelines: +
++ or +
++ Schedule 1 refers to the federal child support tables which set out the amount of monthly child + support payments for each province on the basis of the annual income of the spouse ordered to pay + child support (the “support payer”) and the number of children for whom a table amount is payable. +
+| If... | +Then… | +
|---|---|
| you both live in the same province or territory | +use the table for that province or territory. | +
| you live in different provinces or territories and one of you has sole custody and the other + parent must pay support + | +use the table for the province or territory where the paying parent lives. | +
| you live in different provinces or territories and you share or split custody | +use the tables for both provinces or territories where you reside to determine what you + would each pay to the other parent. + | +
| one of you lives outside Canada | +use the table for the province or territory where the parent in Canada lives. The laws of + the other country may apply in some cases. You may want to consult a lawyer. You may also + find information relating to interjurisdictional + support useful. + | +