Browse Source

DIV-578

pull/160/head
Justin Johnson 8 years ago
parent
commit
6d144a2e51
3 changed files with 33 additions and 9 deletions
  1. +3
    -3
      edivorce/apps/core/templates/pdf/form37.html
  2. +8
    -4
      edivorce/apps/core/templates/pdf/partials/fact_sheet_b.html
  3. +22
    -2
      edivorce/apps/core/utils/derived.py

+ 3
- 3
edivorce/apps/core/templates/pdf/form37.html View File

@ -165,7 +165,7 @@
</li>
<li>
<li> <!-- 3 -->
{% if derived.wants_child_support %}
The Notice of Joint Family Claim includes a claim for a child
support order.
@ -175,7 +175,7 @@
{% endif %}
</li>
<li>
<li> <!-- 4 -->
{% if responses.how_will_calculate_income == 'using specific rules' %}
<ol style="list-style-type: lower-alpha;">
<li>Claimant 1's annual income as determined under sections 15 to
@ -264,7 +264,7 @@
Child Support Fact Sheet A (special expenses), and the amount set
out in the proposed order for the expenses under section 7 of the
Guidelines is
{{ responses.total_section_seven_expenses|money }}.
{{ derived.payor_section_seven_expenses|money }}.
{% endif %}
</li>


+ 8
- 4
edivorce/apps/core/templates/pdf/partials/fact_sheet_b.html View File

@ -40,10 +40,10 @@
<tr>
<td>Guidelines Table Amount</td>
<td class="amount">$
<span class="actual">{{ responses.total_paid_child_support|money:False }}</span>
<span class="actual">{{ responses.your_child_support_paid|money:False }}</span>
</td>
<td class="amount">$
<span class="actual">{{ responses.total_spouse_paid_child_support|money:False }}</span>
<span class="actual">{{ responses.your_spouse_child_support_paid|money:False }}</span>
</td>
</tr>
<tr>
@ -73,11 +73,15 @@
sought:
</p>
<p style="min-height: 4em;">{{ responses.additional_relevant_spouse_children_info }}</p>
{% if responses.additional_relevant_spouse_children_info %}
<p>{{ responses.additional_relevant_spouse_children_info }}</p>
{% else %}
<p style="min-height: 4em;"></p>
{% endif %}
<p>
It is proposed that child support in the amount of
{{ derived.total_monthly_support_1_and_a|money }}
{{ derived.total_monthly_b|money }}
per month be paid by {{ derived.child_support_payor }}.
</p>


+ 22
- 2
edivorce/apps/core/utils/derived.py View File

@ -45,6 +45,7 @@ DERIVED_DATA = [
'claimant_1_share',
'claimant_2_share_proportion',
'claimant_2_share',
'payor_section_seven_expenses',
'total_monthly_support_1_and_a',
'guideline_amounts_difference',
'claimant_debts',
@ -55,6 +56,7 @@ DERIVED_DATA = [
'others_income',
'total_others_income',
'high_income_amount',
'total_monthly_b',
]
@ -283,6 +285,16 @@ def total_section_seven_expenses(responses, derived):
return 0
def payor_section_seven_expenses(responses, derived):
""" Return the monthly cost of section 7 expense for the identified payor """
if derived['child_support_payor'] == 'Claimant 1':
return derived['claimant_1_share']
elif derived['child_support_payor'] == 'Claimant 2':
return derived['claimant_2_share']
return derived['total_section_seven_expenses']
def annual_total_section_seven_expenses(responses, derived):
""" Return the annual cost of the monthly cost of section 7 expense """
@ -372,12 +384,12 @@ def guideline_amounts_difference(responses, derived):
"""
try:
amount_1 = float(responses.get('total_paid_child_support', 0))
amount_1 = float(responses.get('your_child_support_paid', 0))
except ValueError:
amount_1 = 0
try:
amount_2 = float(responses.get('total_spouse_paid_child_support', 0))
amount_2 = float(responses.get('your_spouse_child_support_paid', 0))
except ValueError:
amount_2 = 0
@ -466,3 +478,11 @@ def high_income_amount(responses, derived):
over = 0
return under + over
def total_monthly_b(responses, derived):
""" Return the total amount payable by the payor for Fact Sheet B """
difference = derived['guideline_amounts_difference']
return difference

Loading…
Cancel
Save