public LoanDetailsModel OpenConciergeCommandEmbedded(string workQueueType, string action, Guid loanId, string prospectId)
        {
            var user = ( UserAccount )HttpContext.Session[SessionHelper.UserData];

            if (action == "DefaultCommand")
            {
                if (workQueueType == "Prospects")
                {
                    action = loanId == Guid.Empty ? "Manage Prospects" : "Manage Loan Application";
                }
                else
                {
                    action = "Manage Loan Application";
                }
            }

            String additionalInformation = "";

            if (action == "Manage Disclosures")
            {
                additionalInformation = GeneralSettingsServiceFacade.RetrieveeSigningVendorIntegrationEnabled() &&
                                        LoanServiceFacade.RetrieveeSigningEnabledForLoan(loanId)
                                            ? "eSigning Room"
                                            : "";
            }

            var titleInformation = ConciergeWorkQueueServiceFacade.ExecuteSPGetBorrowerData("GetBorrowerData", loanId, user.UserAccountId);

            LeadSource leadSource  = LoanServiceFacade.RetrieveHearAboutUs(loanId);
            string     hearAboutUs = string.Empty;

            if (leadSource != null)
            {
                if (leadSource.AffinityGroup == Contracts.Affiliate.AffinityGroup.PartnersProfiles)
                {
                    if (leadSource.HBMId != null && leadSource.HBMId != Guid.Empty)
                    {
                        hearAboutUs = leadSource.LeadSourceId + " Realtor-HBM";
                    }
                    else
                    {
                        hearAboutUs = leadSource.LeadSourceId + " Realtor";
                    }
                }
                else
                {
                    hearAboutUs = leadSource.LeadSourceId + " " + leadSource.Description;
                }
            }

            return(new LoanDetailsModel {
                Title = action, TitleInformation = titleInformation, AdditionalInformation = additionalInformation, HearAboutUs = hearAboutUs
            });
        }
        public ActionResult RetrieveSmartGfeData(ManageFeesViewModel model)
        {
            ModelState.Clear();
            var loan = LoanServiceFacade.RetrieveLoan(model.TitleAndEscrow.LoanId, false, model.TitleAndEscrow.UserAccountId);

            var costGroupNumber11      = model.TitleAndEscrow.CostGroups.First(c => c.CostGroupNumber == 11);
            var costGroupNumber12      = model.TitleAndEscrow.CostGroups.First(c => c.CostGroupNumber == 12);
            var closingCostRequestId   = IntegrationLogServiceFacade.GetClosingCorpXmlForLoanId(model.TitleAndEscrow.LoanId, model.TitleAndEscrow.UserAccountId);
            var defaultCostCalculation = new DefaultCostCalculation()
            {
                LoanId = model.TitleAndEscrow.LoanId,
                ClosingCostRequestId  = closingCostRequestId,
                FeeProvider           = model.TitleAndEscrow.FeeProvider,
                MortgageType          = loan.MortgageType,
                PropertyValue         = loan.SubjectProperty.CurrentEstimatedValue.HasValue ? ( decimal )loan.SubjectProperty.CurrentEstimatedValue : 0,
                LoanAmount            = ( decimal )loan.BaseLoanAmount,
                StateName             = loan.SubjectProperty.Address == null ? null : loan.SubjectProperty.Address.StateName,
                PropertyType          = loan.SubjectProperty.PropertyType,
                InvestorName          = loan.InvestorName,
                CompanyProfile        = CompanyProfileServiceFacade.RetrieveCompanyProfile(),
                LoanTransactionTypeId = loan.LoanType
            };

            costGroupNumber11 = CostServiceFacade.RetrieveCostFromSmartGfe(defaultCostCalculation, model.TitleAndEscrow.UserAccountId, costGroupNumber11);
            costGroupNumber12 = CostServiceFacade.RetrieveCostFromSmartGfe(defaultCostCalculation, model.TitleAndEscrow.UserAccountId, costGroupNumber12);
            ManageFeesHelper.PreselectDefaultCosts(costGroupNumber11);
            ManageFeesHelper.PreselectDefaultCosts(costGroupNumber12);
            var group1100Index = model.TitleAndEscrow.CostGroups.FindIndex(g => g.CostGroupNumber == 11);

            model.TitleAndEscrow.CostGroups.RemoveAt(group1100Index);
            model.TitleAndEscrow.CostGroups.Insert(group1100Index, costGroupNumber11);
            var group1200Index = model.TitleAndEscrow.CostGroups.FindIndex(g => g.CostGroupNumber == 12);

            model.TitleAndEscrow.CostGroups.RemoveAt(group1200Index);
            model.TitleAndEscrow.CostGroups.Insert(group1200Index, costGroupNumber12);

            var itemize = GeneralSettingsServiceFacade.RetrieveStatusByGeneralSettingsName("Itemize Lender Credit", Guid.Empty, 0);

            LoanHelper.PerformPTCCalculationsForTitleEscrow(model.TitleAndEscrow.CostGroups, itemize);
            ManageFeesHelper.PopulateComboBoxes(model);
            ManageFeesHelper.SetTitleAndEscrowModel(model);
            return(PartialView("Commands/ManageFees/_manageFeeSmartGfeSection", model));
        }
Exemple #3
0
        public static bool ShowStartProspectButton(HttpContext httpContext)
        {
            List <GeneralSettings> generalSettings = null;

            if (httpContext.Session["generalSettings"] != null)
            {
                generalSettings = httpContext.Session["generalSettings"] as List <GeneralSettings>;
            }
            else
            {
                generalSettings = GeneralSettingsServiceFacade.RetrieveGeneralSettings();
                httpContext.Session["generalSettings"] = generalSettings;
            }

            if (generalSettings == null)
            {
                return(false);
            }

            string settingName = "Loan Center - Show Start Prospect button";

            return(generalSettings.FirstOrDefault(s => s.SettingName == settingName) != null && generalSettings.FirstOrDefault(s => s.SettingName == settingName).Status);
        }
Exemple #4
0
        public bool InitiateDisclosure(Guid loanId)
        {
            bool retVal = false;

            Int32       userAccountId = -1;
            UserAccount user          = new UserAccount();

            if (Session[SessionHelper.UserData] != null && (( UserAccount )Session[SessionHelper.UserData]).Username == User.Identity.Name)
            {
                user = ( UserAccount )Session[SessionHelper.UserData];
            }
            else
            {
                user = UserAccountServiceFacade.GetUserByName(User.Identity.Name);
            }

            if (user != null)
            {
                userAccountId = user.UserAccountId;
            }

            bool useDigitalDocsImpIntegration = GeneralSettingsServiceFacade.IsIMPIntegrationForDigitalDocsEnabled();

            DigitalDocsServiceFacade.RequestReDisclosuresPackage(loanId, userAccountId);

            if (useDigitalDocsImpIntegration)
            {
                var eventContentDisclosures = new EventContentDisclosures();
                eventContentDisclosures.UserAccountId = userAccountId;
                string contentXml = Event.ContentObjectSerialize(eventContentDisclosures);

                var impEvent = new Event("Event.Integration.Disclosures.ExecuteRules", User.Identity.Name, loanId, contentXml);
                retVal = EventsServiceFacade.CreateEvent(impEvent);
            }

            return(retVal);
        }
Exemple #5
0
        public LoanDetailsModel OpenConciergeCommandEmbedded(string workQueueType, string action, Guid loanId, string prospectId)
        {
            var    user  = (UserAccount)HttpContext.Session[SessionHelper.UserData];
            string title = action;

            if (action == "DefaultCommand")
            {
                if (workQueueType == "Prospects")
                {
                    action = loanId == Guid.Empty ? "Manage Prospects" : "Loan Conditions";
                }
                else
                {
                    action = "Condtions";
                    title  = "Loan Conditions";
                }
            }

            String additionalInformation = "";

            if (action == "Manage Disclosures")
            {
                additionalInformation = GeneralSettingsServiceFacade.RetrieveeSigningVendorIntegrationEnabled() &&
                                        LoanServiceFacade.RetrieveeSigningEnabledForLoan(loanId)
                                            ? "eSigning Room"
                                            : "";
            }

            if (action == "Conditions")
            {
                title = "Loan Conditions";
            }

            var titleInformation = ConciergeWorkQueueServiceFacade.ExecuteSPGetBorrowerData("GetBorrowerData", loanId, user.UserAccountId);

            LeadSource leadSource  = LoanServiceFacade.RetrieveHearAboutUs(loanId);
            string     hearAboutUs = string.Empty;

            if (leadSource != null)
            {
                if (leadSource.AffinityGroup == Contracts.Affiliate.AffinityGroup.PartnersProfiles)
                {
                    if (leadSource.HBMId != null && leadSource.HBMId != Guid.Empty)
                    {
                        hearAboutUs = leadSource.LeadSourceId + " Realtor-HBM";
                    }
                    else
                    {
                        hearAboutUs = leadSource.LeadSourceId + " Realtor";
                    }
                }
                else
                {
                    hearAboutUs = leadSource.LeadSourceId + " " + leadSource.Description;
                }
            }

            LoanServiceFacade loanServiceFacade = new LoanServiceFacade();
            var  reDesclosureExists             = loanServiceFacade.RetrieveLoanChangeIndicators(loanId, false);
            bool showRedisclosureTab            = reDesclosureExists != null && reDesclosureExists.ChangeOfCircumstanceList != null && reDesclosureExists.ChangeOfCircumstanceList.Count > 0;

            return(new LoanDetailsModel {
                Title = title, TitleInformation = titleInformation, AdditionalInformation = additionalInformation, HearAboutUs = hearAboutUs, LoanId = loanId, ShowRedisclosureTab = showRedisclosureTab
            });
        }
        public ConciergeCommandEmbedded OpenConciergeCommandEmbedded(string workQueueType, string action, Guid loanId, string prospectId, bool hideHeader)
        {
            var user = ( UserAccount )HttpContext.Session[SessionHelper.UserData];

            if (action == "DefaultCommand")
            {
                if (loanId != Guid.Empty)
                {
                    prospectId = String.Empty;
                }

                if (workQueueType == "Prospects")
                {
                    if (loanId == Guid.Empty)
                    {
                        action = "Manage Prospects";
                    }
                    else
                    {
                        action = "Manage Loan Application";
                    }
                }
                else
                {
                    action = "Manage Loan Application";
                }
            }

            String additionalInformation = "";

            if (action == "Manage Disclosures")
            {
                var disclosureModel = LoanServiceFacade.RetrieveDisclosureModel(loanId, IdentityManager.GetUserAccountId());

                additionalInformation = GeneralSettingsServiceFacade.RetrieveeSigningVendorIntegrationEnabled() &&
                                        LoanServiceFacade.RetrieveeSigningEnabledForLoan(loanId) && disclosureModel == DisclosuresModel.eSign
                                            ? "eSigning Room"
                                            : "";
            }

            Int32 tempuserAccount = 0;

            int         userAccountId = LoanServiceFacade.RetrieveUserAccountIdByLoanId(loanId, user.UserAccountId);
            UserAccount userAccount   = UserAccountServiceFacade.GetUserById(userAccountId);

            if (userAccount.IsTemporary)
            {
                tempuserAccount = userAccountId;
            }

            string conciergeUrl = GetConciergeUrl(new Guid(), workQueueType, action, loanId, prospectId, tempuserAccount);

            var titleInformation = ConciergeWorkQueueServiceFacade.ExecuteSPGetBorrowerData("GetBorrowerData", loanId, user.UserAccountId);

            if (userAccount.IsTemporary)
            {
                titleInformation = "";
            }

            var leadSourceInformation = ContactServiceFacade.RetrieveLeadSourceByContactIdAndLoanId(-1, loanId, user.UserAccountId);
            var leadSourceInfo        = String.Empty;

            if (leadSourceInformation != null)
            {
                if (leadSourceInformation.AffinityGroup == Contracts.Affiliate.AffinityGroup.PartnersProfiles)
                {
                    if (leadSourceInformation.HBMId != null && leadSourceInformation.HBMId != Guid.Empty)
                    {
                        leadSourceInfo = leadSourceInformation.LeadSourceId + " Realtor HBM";
                    }
                    else
                    {
                        leadSourceInfo = leadSourceInformation.LeadSourceId + " Realtor";
                    }
                }
                else
                {
                    leadSourceInfo = leadSourceInformation.LeadSourceId + " " + leadSourceInformation.Description;
                }
            }
            string title = action;

            switch (title)
            {
            case "Manage Loan Application":
                title = "Loan Application";
                break;

            case "Manage Loan":
                title = "Loan Details";
                break;

            case "Manage Disclosures":
                title = "Disclosures";
                break;

            case "Manage Documents":
                title = "Documents";
                break;

            case "Manage Appraisal":
                title = "Appraisal";
                break;

            case "Manage Activities":
                title = "Activities";
                break;

            case "Manage Alerts":
                title = "Alerts";
                break;

            case "Manage Credit":
                title = "Credit";
                break;
            }

            if (userAccount.IsTemporary && title == "Loan Application")
            {
                title = "Create Account";
            }

            return(new ConciergeCommandEmbedded()
            {
                Title = title, TitleInformation = titleInformation, ConciergeUrl = conciergeUrl, LeadSourceInformation = leadSourceInfo, AdditionalInformation = additionalInformation, HideHeader = hideHeader
            });
        }