|
|
|
@ -197,10 +197,11 @@ $(function () { |
|
|
|
// Dynamically calculate total child support payment for payor
|
|
|
|
var calcTotalChildSupportPayment = function() { |
|
|
|
var payor = $('#child_support_payor').text(); |
|
|
|
var payorMonthlyChildSupportAmount = parseFloat($('#payor_monthly_child_support_amount').text()) || 0; |
|
|
|
var yourShare = parseFloat($('#your_proportionate_share_amount').text()) || 0; |
|
|
|
var spouseShare = parseFloat($('#spouse_proportionate_share_amount').text()) || 0; |
|
|
|
var fact_sheet_b_proposed_amount = parseFloat($('#fact_sheet_b_proposed_amount').text()) || 0; |
|
|
|
var fact_sheet_c_proposed_amount = parseFloat($('#fact_sheet_c_proposed_amount').text()) || 0; |
|
|
|
var factSheet_B_ProposedAmount = parseFloat($('#fact_sheet_b_proposed_amount').text()) || 0; |
|
|
|
var factSheet_C_ProposedAmount = parseFloat($('#fact_sheet_c_proposed_amount').text()) || 0; |
|
|
|
var payorShare = 0; |
|
|
|
|
|
|
|
if (payor === 'Myself (Claimant 1)') { |
|
|
|
@ -213,7 +214,15 @@ $(function () { |
|
|
|
payorShare = yourShare + spouseShare; |
|
|
|
} |
|
|
|
|
|
|
|
return (payorShare + fact_sheet_b_proposed_amount + fact_sheet_c_proposed_amount).toFixed(2); |
|
|
|
if ($('#show_fact_sheet_b').text() === 'False') { |
|
|
|
factSheet_B_ProposedAmount = 0; |
|
|
|
} |
|
|
|
if ($('#show_fact_sheet_c').text() === 'False') { |
|
|
|
factSheet_C_ProposedAmount = 0; |
|
|
|
} |
|
|
|
|
|
|
|
// This number should include the share paid to individual
|
|
|
|
return (payorMonthlyChildSupportAmount + payorShare + factSheet_B_ProposedAmount + factSheet_C_ProposedAmount).toFixed(2); |
|
|
|
}; |
|
|
|
|
|
|
|
$('#total_child_support_payment').text(calcTotalChildSupportPayment()); |
|
|
|
|