Browse Source

DIV-942: Updated child support amount on F37.

pull/160/head
Charles Shin 6 years ago
parent
commit
578ea74e84
2 changed files with 23 additions and 9 deletions
  1. +4
    -8
      edivorce/apps/core/templates/pdf/form37.html
  2. +19
    -1
      edivorce/apps/core/templatetags/composites.py

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

@ -229,11 +229,7 @@
<li> <!-- 6 -->
{% if responses.how_will_calculate_income == 'entered agreement' %} <!-- 6d -->
The proposed order sets out that
{% if responses.child_support_in_order == 'DIFF' %}
{{ responses.order_monthly_child_support_amount|money }}
{% else %}
{{ responses.difference_payment_amounts|money }}
{% endif %}
{% monthly_child_support_amount %}
is the amount of child support payable by
{{ derived.child_support_payor }},
in accordance with the agreement referred to in section 4 of
@ -245,7 +241,7 @@
>{{ responses.child_support_in_order_reason }}</div>
{% elif responses.child_support_in_order == 'MATCH' %} <!-- 6a -->
The proposed order sets out that
{{ responses.difference_payment_amounts|money }}
{% monthly_child_support_amount %}
is the amount of child support payable by
{{ derived.child_support_payor }},
which amount accords with the Guidelines.
@ -253,14 +249,14 @@
The proposed order by consent, pursuant to section 15.1(7) of the
Divorce Act (Canada) or section 150(2) of the Family Law Act,
sets out that
{{ responses.order_monthly_child_support_amount|money }}
{% monthly_child_support_amount %}
is the amount of child support payable by
{{ derived.child_support_payor }},
which amount is different than the amount required by the
Guidelines.
{% else %} <!-- 6c -->
The proposed order sets out that
{{ responses.order_monthly_child_support_amount|money }}
{% monthly_child_support_amount %}
is the amount of child support payable by
{{ derived.child_support_payor }},
which amount is different than the amount required by the


+ 19
- 1
edivorce/apps/core/templatetags/composites.py View File

@ -4,7 +4,7 @@ users full responses.
"""
from django import template
from .format_utils import date_formatter
from .format_utils import date_formatter, money
from django.utils.html import format_html
register = template.Library()
@ -22,3 +22,21 @@ def effective_date(context):
else:
effective = date_formatter(date)
return effective
@register.simple_tag(takes_context=True)
def monthly_child_support_amount(context):
""" Returns monthly child support amount based on user's answers """
amount = '0.00'
if context['responses'].get('child_support_in_order', '') == 'DIFF':
amount = context['responses'].get('order_monthly_child_support_amount', '')
elif context['responses'].get('child_support_in_order', '') == 'MATCH':
if context['derived'].get('show_fact_sheet_b', '') or context['derived'].get('show_fact_sheet_c', ''):
""" Shared or Split custody """
amount = context['responses'].get('difference_payment_amounts', '')
else:
""" Sole custody """
amount = context['derived'].get('schedule_1_amount', '')
return money(amount)

Loading…
Cancel
Save