Step {% step_order step="children" %}:Children - What are you asking for
-
+
What is the monthly child support amount
to be paid by {% payorize %}?
+ {% if child_support_in_order_error %}{% include 'partials/required.html' %}{% endif %}
-
-
Do you and the other parent agree (have consented) on the child support amount?
+
+
Do you and the other parent agree (have consented) on the child support amount?
+ {% if claimants_agree_to_child_support_amount_error %}{% include 'partials/required.html' %}{% endif %}
+
Do you have a separation agreement that sets out what you've agreed to around parenting and child support?
+
+
Do you have a separation agreement that sets out what you've agreed to around parenting and child support?
+ {% if have_separation_agreement_error %}{% include 'partials/required.html' %}{% endif %}
+
The court needs to know what the current parenting arrangements are for the children of the marriage. Please describe below.
+
+
The court needs to know what the current parenting arrangements are for the children of the marriage. Please describe below.
+ {% if what_parenting_arrangements_error %}{% include 'partials/required.html' %}{% endif %}
+
What should we consider when determining parenting arrangements?
@@ -300,8 +311,7 @@
{% input_field type="textarea" name="what_parenting_arrangements" class="response-textarea form-control" maxlength="20000" rows="7"%}
- {% if 'Child support' in want_which_orders|load_json %}
-
+
Are you asking the court for an
order about parenting arrangements or contact
with a child?
+ {% if want_parenting_arrangements_error %}{% include 'partials/required.html' %}{% endif %}
@@ -329,8 +340,10 @@
-
-
Please indicate the parenting arrangements you are asking for below.
+
+
Please indicate the parenting arrangements you are asking for below.
+ {% if order_respecting_arrangement_error %}{% include 'partials/required.html' %}{% endif %}
+
You need to include each of the orders you want pertaining to guardianship, parental responsibilities and
parenting time, and contact with the child. You will need to write them as if a Judge is telling you to do it.
@@ -353,8 +366,8 @@
{% input_field type="textarea" name="order_respecting_arrangement" class="response-textarea form-control" maxlength="20000" rows="7"%}
-
-
+ {% if 'Child support' in want_which_orders|load_json %}
+
If you are asking for an
please describe what you are asking for.
+ {% if order_for_child_support_error %}{% include 'partials/required.html' %}{% endif %}
Child support is determined according to the federal government’s
@@ -400,8 +414,10 @@
{% endif %}
{# DIV-963: Show/hide logic and text update will be handled by JavaScript function updateChildSupportActQuestion() #}
-
-
Please indicate which act(s) you are asking for child support under.
+
+
Please indicate which act(s) you are asking for child support under.
+ {% if child_support_act_error %}{% include 'partials/required.html' %}{% endif %}
+
diff --git a/edivorce/apps/core/utils/conditional_logic.py b/edivorce/apps/core/utils/conditional_logic.py
index cc55daa9..c613a543 100644
--- a/edivorce/apps/core/utils/conditional_logic.py
+++ b/edivorce/apps/core/utils/conditional_logic.py
@@ -67,3 +67,69 @@ def determine_missing_undue_hardship_reasons(questions_dict):
return False
return True
+
+
+def determine_child_support_payor(questions_dict):
+ payor = questions_dict.get('child_support_payor', '')
+ if payor == 'Myself (Claimant 1)':
+ return 'Claimant 1'
+ elif payor == 'My Spouse (Claimant 2)':
+ return 'Claimant 2'
+ elif payor == 'Both myself and my spouse':
+ return 'both Claimant 1 and Claimant 2'
+ return ''
+
+
+def determine_show_fact_sheet_f_you(questions_dict):
+ """
+ If claimant 1 (you) is a payor and makes over $150,000/year, show fact sheet F for claimant 1
+ """
+ payor = determine_child_support_payor(questions_dict)
+ try:
+ annual = float(questions_dict.get('annual_gross_income', 0))
+ except ValueError:
+ annual = 0
+ return (payor == 'Claimant 1' or payor == 'both Claimant 1 and Claimant 2') and annual > 150000
+
+
+def determine_show_fact_sheet_f_spouse(questions_dict):
+ """
+ If claimant 2 (spouse) is a payor and makes over $150,000/year, show fact sheet F for claimant 2
+ """
+ payor = determine_child_support_payor(questions_dict)
+
+ try:
+ annual = float(questions_dict.get('spouse_annual_gross_income', 0))
+ except ValueError:
+ annual = 0
+
+ return (payor == 'Claimant 2' or payor == 'both Claimant 1 and Claimant 2') and annual > 150000
+
+
+def determine_child_support_act_requirement(questions_dict):
+ orders_wanted = json.loads(questions_dict.get('want_which_orders', '[]'))
+ return 'Child support' in orders_wanted
+
+
+def determine_special_expenses_detail_error(questions_dict):
+ special_expenses_keys = ["child_care_expenses", "annual_child_care_expenses", "children_healthcare_premiums",
+ "annual_children_healthcare_premiums", "health_related_expenses", "annual_health_related_expenses",
+ "extraordinary_educational_expenses", "annual_extraordinary_educational_expenses",
+ "post_secondary_expenses", "annual_post_secondary_expenses", "extraordinary_extracurricular_expenses",
+ "annual_extraordinary_extracurricular_expenses"]
+
+ if questions_dict.get('special_extraordinary_expenses') == 'YES':
+ for special_expense in special_expenses_keys:
+ value = questions_dict.get(special_expense)
+ if value and value != '0.00':
+ return False
+ return True
+ else:
+ return False
+
+
+def get_cleaned_response_value(response):
+ ignore_values = [None, '', '[]', '[["",""]]', '[["also known as",""]]']
+ if response not in ignore_values:
+ return response
+ return None
\ No newline at end of file
diff --git a/edivorce/apps/core/utils/derived.py b/edivorce/apps/core/utils/derived.py
index 6b7593de..0554e9e8 100644
--- a/edivorce/apps/core/utils/derived.py
+++ b/edivorce/apps/core/utils/derived.py
@@ -17,6 +17,13 @@ from edivorce.apps.core.utils import conditional_logic
# This array is order sensitive: later functions may depend on values from
# earlier ones
+from edivorce.apps.core.utils.conditional_logic import (
+ determine_child_support_payor,
+ determine_show_fact_sheet_f_spouse,
+ determine_show_fact_sheet_f_you,
+ determine_special_expenses_detail_error
+)
+
DERIVED_DATA = [
'orders_wanted',
'children',
@@ -79,6 +86,7 @@ DERIVED_DATA = [
'pursuant_parenting_arrangement',
'pursuant_child_support',
'sole_custody',
+ 'special_expenses_detail_error',
]
@@ -216,31 +224,11 @@ def fact_sheet_e_error(responses, derived):
def show_fact_sheet_f_you(responses, derived):
- """
- If claimant 1 (you) is a payor and makes over $150,000/year, show fact sheet F for claimant 1
- """
- payor = child_support_payor(responses, derived)
-
- try:
- annual = float(responses.get('annual_gross_income', 0))
- except ValueError:
- annual = 0
-
- return (payor == 'Claimant 1' or payor == 'both Claimant 1 and Claimant 2') and annual > 150000
+ return determine_show_fact_sheet_f_you(responses)
def show_fact_sheet_f_spouse(responses, derived):
- """
- If claimant 2 (spouse) is a payor and makes over $150,000/year, show fact sheet F for claimant 2
- """
- payor = child_support_payor(responses, derived)
-
- try:
- annual = float(responses.get('spouse_annual_gross_income', 0))
- except ValueError:
- annual = 0
-
- return (payor == 'Claimant 2' or payor == 'both Claimant 1 and Claimant 2') and annual > 150000
+ return determine_show_fact_sheet_f_spouse(responses)
def show_fact_sheet_f(responses, derived):
@@ -397,16 +385,7 @@ def schedule_1_amount(responses, derived):
def child_support_payor(responses, derived):
""" Return the payor phrased for the affidavit """
-
- payor = responses.get('child_support_payor', '')
- if payor == 'Myself (Claimant 1)':
- return 'Claimant 1'
- elif payor == 'My Spouse (Claimant 2)':
- return 'Claimant 2'
- elif payor == 'Both myself and my spouse':
- return 'both Claimant 1 and Claimant 2'
-
- return ''
+ return determine_child_support_payor(responses)
def child_support_payor_by_name(responses, derived):
@@ -760,6 +739,10 @@ def sole_custody(responses, derived):
return conditional_logic.determine_sole_custody(responses)
+def special_expenses_detail_error(responses, derived):
+ return determine_special_expenses_detail_error(responses)
+
+
def _any_question_errors(responses, questions):
for field in questions:
error_field_name = f'{field}_error'