From 71569fc867b35625ed1f912444dd48f5be2650c5 Mon Sep 17 00:00:00 2001 From: Esme Rubinstein Date: Thu, 2 Nov 2023 12:13:20 -0400 Subject: [PATCH] adding check for canceled policy in issuer assigned values --- app/operations/reports/generate_rcno_report.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/operations/reports/generate_rcno_report.rb b/app/operations/reports/generate_rcno_report.rb index 98d943ed..b2b21a8d 100644 --- a/app/operations/reports/generate_rcno_report.rb +++ b/app/operations/reports/generate_rcno_report.rb @@ -389,7 +389,7 @@ def issuer_assigned_subscriber_id issuer_issuer_subscriber_id = @rcni_row[18] - if ffm_issuer_subscriber_id.blank? && issuer_issuer_subscriber_id.blank? + if @policy.aasm_state == "canceled" | (ffm_issuer_subscriber_id.blank? && issuer_issuer_subscriber_id.blank?) return [ffm_issuer_subscriber_id, issuer_issuer_subscriber_id, "D"] end @@ -417,7 +417,9 @@ def issuer_assigned_member_id issuer_issuer_member_id = @rcni_row[19] - return [ffm_issuer_member_id, issuer_issuer_member_id, "D"] if ffm_issuer_member_id.blank? && issuer_issuer_member_id.blank? + if @policy.aasm_state == "canceled" | (ffm_issuer_member_id.blank? && issuer_issuer_member_id.blank?) + return [ffm_issuer_member_id, issuer_issuer_member_id, "D"] + end if ffm_issuer_member_id.blank? && issuer_issuer_member_id.present? return [ffm_issuer_member_id, issuer_issuer_member_id, @@ -464,7 +466,7 @@ def issuer_assigned_policy_number issuer_issuer_policy_number = @rcni_row[21] - if ffm_issuer_policy_number.blank? && issuer_issuer_policy_number.blank? + if @policy.aasm_state == "canceled" | (ffm_issuer_policy_number.blank? && issuer_issuer_policy_number.blank?) return [ffm_issuer_policy_number, issuer_issuer_policy_number, "D"] end