app/models/tax_household.rb
def total_aptc_available_amount_for_enrollment(hbx_enrollment, effective_on, excluding_enrollment = nil)
    return 0 if hbx_enrollment.blank?
    return 0 if is_all_non_aptc?(hbx_enrollment)
    monthly_available_aptc = monthly_max_aptc(hbx_enrollment, effective_on)
    member_aptc_hash = aptc_available_amount_by_member(monthly_available_aptc, excluding_enrollment)
    total = family.active_family_members.reduce(0) do |sum, member|
      sum + (member_aptc_hash[member.id.to_s] || 0)
    end
    family_members = unwanted_family_members(hbx_enrollment)
    unchecked_aptc_thhms = find_aptc_tax_household_members(family_members)
    deduction_amount = total_benchmark_amount(unchecked_aptc_thhms, hbx_enrollment) if unchecked_aptc_thhms
    total = total - deduction_amount
    (total < 0.00) ? 0.00 : float_fix(total)
  end
# Pass hbx_enrollment and get the total amount of APTC available by hbx_enrollment_members
Pass hbx_enrollment and get the total amount of APTC available by hbx_enrollment_members
Pass hbx_enrollment and get the total amount of APTC available by hbx_enrollment_members
def total_aptc_available_amount_for_enrollment(hbx_enrollment, effective_on, excluding_enrollment = nil)
    return 0 if hbx_enrollment.blank?
    return 0 if is_all_non_aptc?(hbx_enrollment)
    monthly_available_aptc = monthly_max_aptc(hbx_enrollment, effective_on)
    member_aptc_hash = aptc_available_amount_by_member(monthly_available_aptc, excluding_enrollment)
    total = family.active_family_members.reduce(0) do |sum, member|
      sum + (member_aptc_hash[member.id.to_s] || 0)
    end
    family_members = unwanted_family_members(hbx_enrollment)
    unchecked_aptc_thhms = find_aptc_tax_household_members(family_members)
    deduction_amount = total_benchmark_amount(unchecked_aptc_thhms, hbx_enrollment) if unchecked_aptc_thhms
    total = total - deduction_amount
    (total < 0.00) ? 0.00 : float_fix(total)
  end
def total_aptc_available_amount_for_enrollment ( hbx_enrollment , effective_on , excluding_enrollment = nil ) return 0 if hbx_enrollment . blank? return 0 if is_all_non_aptc? ( hbx_enrollment ) monthly_available_aptc = monthly_max_aptc ( hbx_enrollment , effective_on ) member_aptc_hash = aptc_available_amount_by_member ( monthly_available_aptc , excluding_enrollment ) total = family . active_family_members . reduce ( 0 ) do | sum , member | sum + ( member_aptc_hash [ member . id . to_s ] || 0 ) end family_members = unwanted_family_members ( hbx_enrollment ) unchecked_aptc_thhms = find_aptc_tax_household_members ( family_members ) deduction_amount = total_benchmark_amount ( unchecked_aptc_thhms , hbx_enrollment ) if unchecked_aptc_thhms total = total - deduction_amount ( total < 0.00 ) ? 0.00 : float_fix ( total ) end
Pass hbx_enrollment and get the total amount of APTC available by hbx_enrollment_members
Pass hbx_enrollment and get the total amount of APTC available by hbx_enrollment_members
hbx_enrollment
effective_on
excluding_enrollment