示例#1
0
 private List<BenefitElectionNonFsaRecord> GetElectionRecords(ElectionParameter electionParameter)
 {
     m_electionParameter = electionParameter;
     var plan = m_planRepository.SelectClientBenefitPlan(electionParameter.PlanID);
     var benefitElections = new List<BenefitElectionNonFsaRecord>();
     var nonEoiElectionData = GetNonEoiElectionData(electionParameter);
     var employeePayPeriodsPerAnnum =
         m_payPeriodsPerAnumCalculator.GetEmployeePayPeriodsPerAnnum(electionParameter.UserID,
             electionParameter.PlanTypeID);
     var employerPayPeriodsPerAnnum =
         m_payPeriodsPerAnumCalculator.GetEmployerPayPeriodsPerAnnum(electionParameter.UserID,
             electionParameter.PlanTypeID);
     var previousPlan = m_previousPlanCalculator.SelectPreviousPlan(nonEoiElectionData);
     var employee = m_userRepository.GetEmployee(electionParameter.UserID);
     foreach (CoveredUser coveredUser in electionParameter.CoveredUsers)
     {
         var be = new BenefitElectionNonFsaRecord();
         be.UserID = coveredUser.UserID;
         be.ParentUserID = electionParameter.UserID;
         be.AlternateID1 = GetUserAlternateID1(coveredUser.UserID);
         be.AlternateID2 = GetUserAlternateID2(coveredUser.UserID);
         be.PlanID = electionParameter.PlanID;
         be.PlanTypeID = electionParameter.PlanTypeID;
         be.BenefitClassID = GetBenefitClassID();
         be.TierID = electionParameter.ElectionAmount.TierID;
         be.BenefitStartDate = electionParameter.EffectiveDate;
         be.BenefitEndDate = plan.TerminationDate;
         be.ElectionStartDate = m_electionStartDateCalculator.GetElectionStartDate(nonEoiElectionData);
         be.Premium = m_premiumCalculator.GetPremium(nonEoiElectionData);
         be.PremiumOverride = m_premiumOverrideCalculator.GetPremiumOverride(nonEoiElectionData);
         be.Contribution = electionParameter.ElectionAmount.EmployeeContribution;
         be.Coverage = electionParameter.ElectionAmount.CoverageAmount;
         be.RateQualifier = m_userRateDiscriminatorCalculator.GetRateDiscriminator(electionParameter.UserID,
             electionParameter.PlanTypeID);
         be.BenefitPlanYear = plan.EffectiveDate.Year.ToString();
         be.ImputedIncomeMonthly = m_imputedIncomeCalculator.GetImputedIncomeMonthly(nonEoiElectionData);
         be.ImputedIncomePerPay = be.ImputedIncomePerPay/employeePayPeriodsPerAnnum;
         be.AfterTax = m_afterTaxCalculator.GetAfterTax(nonEoiElectionData);
         be.AfterTaxDeductionPerPay = be.AfterTax/employeePayPeriodsPerAnnum;
         be.EOIRequired = electionParameter.EOIRequired;
         be.EOICoverage = electionParameter.EoiElectionAmount.CoverageAmount;
         be.EOIPlan = electionParameter.PlanID.ToString();
         be.EOITier = electionParameter.ElectionAmount.TierID.ToString();
         be.EOIDefaultContribution = electionParameter.EoiElectionAmount.EmployeeContribution;
         be.EOIDefaultPremium = m_premiumCalculator.GetPremium(nonEoiElectionData);
         be.EOIDefaultCoverage = electionParameter.EoiElectionAmount.CoverageAmount;
         be.PCP1 = coveredUser.Pcp;
         be.PCP2 = coveredUser.Pcp2;
         be.PCP1Seen = coveredUser.PcpSeen;
         be.PCP2Seen = coveredUser.Pcp2Seen;
         be.PreviousPlanID = previousPlan.PreviousPlanID;
         be.PreviousPlanNetwork = previousPlan.PreviousPlanNetwork;
         be.ClientDeductionPerPay = electionParameter.ElectionAmount.PerPayCheckDeduction;
         be.SavedUserID = electionParameter.UserID;
         be.BenefitElectionPayrollScheduleID = employee.PayrollScheduleID;
         be.PayrollExportUniqueID = employee.PayrollExportUniqueID;
         be.EmployerMonthlyContribution = electionParameter.ElectionAmount.EmployerContribution;
         be.EmployerPerPayContribution = electionParameter.ElectionAmount.EmployerContribution*12/
                                         employerPayPeriodsPerAnnum;
         be.BenefitAmount = electionParameter.ElectionAmount.BenefitAmount;
         be.EoiBenefitAmount = electionParameter.EoiElectionAmount.BenefitAmount;
         benefitElections.Add(be);
     }
     return benefitElections;
 }
示例#2
0
 private ElectionData GetNonEoiElectionData(ElectionParameter electionParameter)
 {
     return new ElectionData()
     {
         ParentUserID = electionParameter.UserID,
         EffectiveDate = electionParameter.EffectiveDate,
         PlanTypeID = electionParameter.PlanTypeID,
         PlanID = electionParameter.PlanID,
         TierID = electionParameter.ElectionAmount.TierID,
         CoveredUsers = electionParameter.CoveredUsers,
         BasicEmployeeMonthlyCost = electionParameter.ElectionAmount.EmployeeContribution,
         BasicEmployerMonthlyCost = electionParameter.ElectionAmount.EmployerContribution,
         BasicPremiumCost = electionParameter.ElectionAmount.EmployeeContribution + electionParameter.ElectionAmount.EmployerContribution,
         Coverage = electionParameter.ElectionAmount.CoverageAmount
     };
 }
示例#3
0
 public bool Save(ElectionParameter electionParameter)
 {
     return true;
 }