@@ -252,6 +253,18 @@
Acknowledgment of Terms
let exceptionBlock = document.getElementById(`exception_block_${exceptions}`);
document.getElementById(`exception_header_${exceptions}`).style.display = 'block';
exceptionBlock.innerHTML = `
+
+
+
+
+
diff --git a/apcd-cms/src/apps/exception/views.py b/apcd-cms/src/apps/exception/views.py
index 60dfd810..c7bdbd11 100644
--- a/apcd-cms/src/apps/exception/views.py
+++ b/apcd-cms/src/apps/exception/views.py
@@ -52,7 +52,7 @@ def _set_submitter(sub):
"submitter_code": sub[1],
"payor_code": sub[2],
"user_name": sub[3],
- "org_name": title_case(sub[4])
+ "entity_name": title_case(sub[4])
}
def _set_cdl(file_type):
@@ -77,12 +77,8 @@ def post(self, request):
errors = []
submitters = request.session.get('submitters')
- submitter = next(submitter for submitter in submitters if int(submitter[0]) == int(form['business-name']))
- if _err_msg(submitter):
- errors.append(_err_msg(submitter))
-
+ # To create counter of exception requests and corresponding fields
max_iterations = 1
-
for i in range(2, 6):
if form.get('field-threshold-exception_{}'.format(i)):
max_iterations += 1
@@ -90,6 +86,9 @@ def post(self, request):
break
for iteration in range(max_iterations):
+ submitter = next(submitter for submitter in submitters if int(submitter[0]) == int(form['business-name_{}'.format(iteration + 1)]))
+ if _err_msg(submitter):
+ errors.append(_err_msg(submitter))
except_response = apcd_database.create_threshold_exception(form, iteration + 1, submitter)
if _err_msg(except_response):
errors.append(_err_msg(except_response))
@@ -137,7 +136,7 @@ def _set_submitter(sub):
"submitter_code": sub[1],
"payor_code": sub[2],
"user_name": sub[3],
- "org_name": title_case(sub[4])
+ "entity_name": title_case(sub[4])
}
context["submitters"] = []
diff --git a/apcd-cms/src/apps/extension/templates/extension_submission_form/extension_submission_form.html b/apcd-cms/src/apps/extension/templates/extension_submission_form/extension_submission_form.html
index 82d22467..e23b7d44 100644
--- a/apcd-cms/src/apps/extension/templates/extension_submission_form/extension_submission_form.html
+++ b/apcd-cms/src/apps/extension/templates/extension_submission_form/extension_submission_form.html
@@ -42,8 +42,8 @@
Extension Information
diff --git a/apcd-cms/src/apps/extension/views.py b/apcd-cms/src/apps/extension/views.py
index db2ceef3..4d49227c 100644
--- a/apcd-cms/src/apps/extension/views.py
+++ b/apcd-cms/src/apps/extension/views.py
@@ -32,7 +32,7 @@ def _set_submitter(sub):
"submitter_code": sub[1],
"payor_code": sub[2],
"user_name": sub[3],
- "org_name": title_case(sub[4])
+ "entity_name": title_case(sub[4])
}
context["submitters"] = []
context["applicable_data_periods"] = []
diff --git a/apcd-cms/src/apps/utils/apcd_database.py b/apcd-cms/src/apps/utils/apcd_database.py
index f1ae4852..0e215815 100644
--- a/apcd-cms/src/apps/utils/apcd_database.py
+++ b/apcd-cms/src/apps/utils/apcd_database.py
@@ -825,7 +825,7 @@ def create_threshold_exception(form, iteration, sub_data):
) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
"""
values = (
- _clean_value(form["business-name"]),
+ _clean_value(form['business-name_{}'.format(iteration)]),
sub_data[1],
sub_data[2],
sub_data[3],
@@ -1269,11 +1269,11 @@ def get_submitter_info(user):
submitters.submitter_code,
submitters.payor_code,
submitter_users.user_id,
- submitters.org_name
+ submitters.entity_name
FROM submitter_users
JOIN submitters
ON submitter_users.submitter_id = submitters.submitter_id and submitter_users.user_id = (%s)
- ORDER BY submitters.org_name, submitter_users.submitter_id
+ ORDER BY submitters.entity_name, submitter_users.submitter_id
"""
cur = conn.cursor()
cur.execute(query, (user,))