<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="OrderEntry.aspx.vb" Inherits="FinIQWebApp.OrderEntry" %>

<%@ Register Src="../FinIQ_User_Controls/Smart_Search_Customer_Control/FinIQ_Customer_SmartSearch.ascx"
    TagName="FinIQ_Customer_SmartSearch" TagPrefix="ucsmart" %>

<%@ Register Src="../FinIQ_User_Controls/Smart_Search_Funds_Control/FinIQ_FundsCode.ascx" TagPrefix="ucFundsearch" TagName="FinIQ_FundsCode" %>
<%@ Register Src="../FinIQ_User_Controls/FundSearch/FinIQ_FundSearch.ascx" TagPrefix="ucFundsearch1" TagName="FinIQ_FundsCode1" %>

<%@ Register Src="../FinIQ_User_Controls/DateControl.ascx" TagName="DateControl" TagPrefix="uc1" %>

<%@ Register Src="~/FinIQ_User_Controls/Smart_Search_RM_Control/Smart_Serach_RM_Control.ascx" TagPrefix="dtuc_RM" TagName="Smart_Serach_RM_Control" %>

<%--<asp:Content runat="server" ContentPlaceHolderID="MainContent">--%>
<link rel="stylesheet" type="text/css" href='<%=ResolveClientUrl("~/FinIQJS/jquery-ui.min.css")%>' />
<script src='<%=ResolveClientUrl("~/FinIQJS/external/jquery/jquery.min.js")%>'></script>
<script src='<%=ResolveClientUrl("~/FinIQJS/jquery-ui.min.js")%>'></script>
<link href='<%=ResolveClientUrl("~/App_Themes/Style1.css")%>' rel="stylesheet">
<link rel="stylesheet" type="text/css" href='<%=ResolveClientUrl("~/App_Themes/ConfirmationBox.css")%>' />
<script src='<%=ResolveClientUrl("~/FinIQJS/conformationBox.js")%>'></script>
<script src='<%=ResolveClientUrl("~/FinIQJS/jscolor.js")%>'></script>
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet'>
<script src='<%=ResolveClientUrl("~/FinIQJS/CalendarPopup.js")%>'></script>
<script src='<%=ResolveClientUrl("RMW.js")%>'></script>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title id="PageTitle1" runat="server">Funds Trade Capture</title>
    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <link href="OrderEntry.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <script src="../FinIQJS/external/jquery/jquery.min.js"></script>
    <script src="../FinIQJS/jquery-ui.min.js"></script>
    <script src="../FinIQJS/FinIQCommon.js"></script>
    <script type="text/javascript">

        function BookOrder() {
            randomNum();
            var branch;
            var LTVOverride;

            if (document.getElementById("ddlBranch").selectedIndex == -1)
                branch = "";
            else
                branch = document.getElementById("ddlBranch").options[document.getElementById("ddlBranch").selectedIndex].label;

            if ($('#chkLVTOverride').is(':checked') === true)
                LTVOverride = "Y";
            else
                LTVOverride = "N";

            var inputParams = {
                "FinIQRequestHeader": {
                    "FinIQProductParameters": {
                        "SystemTemplate": document.getElementById('hdnChildTemplateCode').value,    //"Funds_Trade_Setup",
                        "SystemLogin": "finiqservice",
                        "SystemEvent": "L1",
                        "ImportMode": "INSERT",
                        "ValidateMode": "PROCESS",
                        "RefreshMode": "FULLREFRESH",
                        "SystemProduct": "Mutual Funds"
                    },
                    "FinIQRequesterContext": {
                        "MachinePort": "ASD",
                        "RequestAt": "26-02-2018 09:42:35",
                        "LoginID": document.getElementById('<%=hdnUserID.ClientID%>').value,//Added By Mohini|7-Nov-2020|to remove hardcode Value
                        "LoginGroup": "Dealers",
                        "MachineIP": "127.0.0.1",
                        "RequestID": "12345-67890-12345-67890",
                        "EntityCode": "PB",
                        "EntityID": document.getElementById('<%=hdnEntityID.ClientID%>').value, //Added By Mohini|7-Nov-2020|to remove hardcode Value
                        "SourceSystem": "PIB"
                    }
                },
                "FinIQRequestBody": {
                    "RecordType": "D",
                    "ApplicationID": "PIB" + document.getElementById('hdnApplicationID').value, //"PIB206604000444",
                    "ApplicationType": document.getElementById("ddlFundMode").options[document.getElementById("ddlFundMode").selectedIndex].value,
                    "SourceofOrigin": "PIB",
                    "SalespersonOfficerCodeTeam": "AB82",
                    "UTSalespersonCode": "1234",
                    "DomicileBranchCode": "AB33",
                    "DomicileBankCode": "30",
                    "EffectingBranchCode": branch,
                    "EffectingBankCode": "30",
                    "Bank": "UOB",
                    "ReferrorEmployeeName": "ABCD Name1",
                    "ReferrorEmployeeID": "AB7887997",
                    "ExternalReferrorName": document.getElementById("ddl_Portfolio").options[document.getElementById("ddl_Portfolio").selectedIndex].value,
                    "ExternalReferrorID": "76879678",
                    "ExternalReferrorIDType": "PP",
                    "ExternalReferrorIDCountry": "SG",
                    "ReferrorFlag": "Y",
                    "SubmittedDateTime": "03-07-2015 05:14:06",
                    "RcRpIndicator": "E",
                    "SalespersonEmployeeID": document.getElementById('hdnRMId').value,
                    //"SalespersonEmployeeID": document.getElementById('Smart_Serach_RM_Control_automplete_2').value,
                    "SalespersonName1LastName": "NAME 1345",
                    "SalespersonName2MidName": "NAME 2322425",
                    "CIFNumber": document.getElementById("hdnCIFNumber").value,
                    "Salutation": "MR",
                    "ApplicantName1": document.getElementById("hdnCustomerName").value,
                    "ApplicantName2": "NAME 31",
                    "IDInformation": "ID12",
                    "IDTypeCode": "PP",
                    "IDCountryCode": "SG",
                    "PhoneWork": "6532123232",
                    "PhoneHome": "6532123232",
                    "PhoneMobile": "9865321245",
                    "Email": "test@email.com",
                    "DateofBirth": "03-07-2015",
                    "Age": "27",
                    "Gender": "male",
                    "Race": "abc",
                    "MaritalStatus": "M",
                    "CountryofCitizenshipCode": "SG",
                    "CountryofResidenshipCode": "SG",
                    "PermanentResidentFlg": "SG",
                    "CDPNo": "1234",
                    "CPFNo": "3216",
                    "TaxStatus": "P",
                    "OtherIdentification": "ID13",
                    "EmployerName": "NAME E3",
                    "TypeofBusiness": "B1",
                    "JobDesignation": "SSC",
                    "Position": "ABC",
                    "EmployeeFlag": "Y",
                    "ApplicantType": "ABC",
                    "CareOfName": "NAME78789",
                    "AddressSeqNum": "1313131",
                    "AddressType": "ABCD",
                    "AddressFormat": "ABCD1",
                    "Block": "4",
                    "Street": "6",
                    "Storey": "8",
                    "Unit": "10",
                    "BuildingName": "B3",
                    "POBox": "3648",
                    "PostalCode": "36486",
                    "City": "SG",
                    "Country": "SG",
                    "AddressLine1": "LINE1",
                    "AddressLine2": "LINE2",
                    "AddressLine3": "LINE3",
                    "AddressLine4": "LINE4",
                    "Segment": "PB",
                    "CustomerRiskScoreRc": "3",
                    "RiskReviewDate": "12-05-2018",
                    "RiskSource": "ABCD",
                    "RcId": "ABCD",
                    "RcIdType": "XY",
                    "RcIdCountry": "SG",
                    "IDExpiryDate": "30-07-2019",
                    "CountryofBirthCode": "SG",
                    "TIN1": "4646",
                    "Country1Code": "SG",
                    "TIN2": "46466",
                    "Country2Code": "SG",
                    "Reason1": "4647",
                    "Reason2": "4646",
                    "TIN3": "4646",
                    "Country3Code": "SG",
                    "Reason3": "77546",
                    "TIN4": "4646",
                    "Country4": "SG",
                    "Reason4": "5353",
                    "FundCode": document.getElementById("lblFundCode").innerHTML,
                    "ProductRiskScoreRp": "01",
                    "CurrencyDenominated": document.getElementById('hdnFundCCY').value,//"CurrencyDenominated": "SGD",
                    "TradeDate": $("#dtTradeDate_txtDate").val(), //document.getElementById('hdnDate').value,
                    "TransactionType": document.getElementById("ddlFundMode").options[document.getElementById("ddlFundMode").selectedIndex].value,
                    "FINorWPNo": "13411111",
                    "Discount": "12",
                    "ExistingSubscriberofFund": "01",
                    "ExistingSubscriberACNo": document.getElementById("ddlAccountNo").options[document.getElementById("ddlAccountNo").selectedIndex].value,
                    "SigningCondition": "C1",
                    "ModeofPayment": "SA",
                    "PurchaseAmount": document.getElementById("txtNominalAmount").value.replace(/,/g, ""), //Changed by Aditya B || 16-Aug-2019 || Replaced 'txtNominalAmount' with 'hdnPurchaseAmount'
                    "DividendInstruction": "AB",
                    "RegularSavingsMode": "CA",
                    "NumberofMthsorQtrs": "1",
                    "RegularInvestment": "10",
                    "DepositAmount": "10000",
                    "SwitchFrom": document.getElementById("hdnSwitchFromFundCode").value,
                    "SwitchTo": document.getElementById('hdnSwitchingFundCode').value,
                    "SwitchUnits": document.getElementById("hdnSwitchUnits").value.replace(/,/g, ""),
                    "ModeofSettlement": "CPFISSA",
                    "RealizedAmountUnits": document.getElementById("hdnSwitchUnits").value.replace(/,/g, ""),
                    //"RealizedAmountUnits": document.getElementById("txtUnits").value.replace(/,/g, ""),
                    "AccountPaymentType": "Cash",
                    "UOBCreditCardNumber": "54654789",
                    "UOBCreditCardExpiry": "30-08-2026",
                    "ApprovalCode": "ghjhg",
                    "ChequeNumber": "100000111",
                    "UOBDebitingACNo": "1110001",
                    "TelegraphicTransfertoFundManagerACNo": "546545",
                    "CPFApprovedBank": "uo",
                    "CPFACNo": "10000003",
                    "CPFInvestmentACNo": "30000001",
                    "CompletedStandingInstructionFormPreviously": "33",
                    "SRSOperator": "BA",
                    "SRSACNo": "30101111131",
                    "CreditingACNo": "80000002",
                    "CreditingACNoForDividend": "80003002",
                    "CreditingACName1ForDividend": "NAME1",
                    "CreditingACName2ForDividend": "NAME2",
                    "CreditingACCurrencyForDividend": "SGD",
                    "CampaignCode": "13",
                    "SystemCampaignCode": "cd",
                    "EarlyMaturityProceedsInstruction": "Instruction 1",
                    "CreditingACNoMaturity": "21345",
                    "AccountType": document.getElementById("ddl_AccountType").options[document.getElementById("ddl_AccountType").selectedIndex].value,
                    "tofundccy": document.getElementById("hdnToFundCcy").value,
                    "ToFundNav": document.getElementById("txtSwitchingFundNAV").value.replace(/,/g, ""),
                    "SalesCharge": document.getElementById("txtSalesChargeNew").value.replace(/,/g, ""),
                    "LTVNo": document.getElementById("txtLTV").value.replace(/,/g, ""),
                    "LTVOverride": LTVOverride,
                    "Load_Fee": document.getElementById("txtLoadCharge").value.replace(/,/g, ""),
                    "ExitLoadFee": document.getElementById("hdnRedemptionChargesPerc1").value,
                    "EntryLoadFee": document.getElementById("hdnFrontEndLoad2").value,
                    "SameFundHouseFlag": document.getElementById("hdnSameFundHouseFlag").value
                }
            }
            inputParams = JSON.stringify(inputParams);
            //$.support.cors = true;
            $.ajax({
                type: "POST",
                url: "http://" + location.hostname + "/finiqservice/PIB_Services.svc/ImportUTAPI",
                headers: {
                    'Content-Type': 'application/json'
                },
                data: inputParams,
                dataType: "json",
                cache: false,
                success: function (data) {
                    if (data.FinIQResponseBody.Status === "SUCCESS") {
                        if (document.getElementById("hdnParentTemplateCode").value === "Hedge_Fund")
                            document.getElementById('lblMessage').innerHTML = "<img src='../App_Themes/images/imgSuccess.png' style='width:18px;height:18px;vertical-align:middle;'>" + " IOI Ref " + data.FinIQResponseBody.NoteMasterID;
                        else
                            document.getElementById('lblMessage').innerHTML = "<img src='../App_Themes/images/imgSuccess.png' style='width:18px;height:18px;vertical-align:middle;'>" + " Order " + data.FinIQResponseBody.NoteMasterID + " placed successfully.";
                        document.getElementById('hdnNMID').value = data.FinIQResponseBody.NoteMasterID;
                    }
                    else
                        document.getElementById('lblMessage').innerHTML = "<img src='../App_Themes/images/Warning_Msg.png' style='width:18px;height:18px;vertical-align:middle;'>" + data.FinIQResponseBody.ErrorDetails.ErrorDescription;
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert(errorThrown);
                }
            });
        }

        $(document).ready(function () {
            randomNum();
            if (document.getElementById('ddlFundMode').value == 'RD')
                document.getElementById('hdnNominalAmt').value = "0.00";
            else
                document.getElementById('hdnNominalAmt').value = document.getElementById("txtNominalAmount").value.replace(/,/g, "");

        });

        function randomNum() {
            document.getElementById('hdnApplicationID').value = Math.floor(Math.random() * 90000000) + 10000000; //Math.floor(Math.random() * 20);
        }

        function getdate() {
            var today = new Date();
            var dd = today.getDate();
            var mm = today.getMonth() + 1; //January is 0!
            var yyyy = today.getFullYear();
            if (dd < 10) {
                dd = '0' + dd
            }
            if (mm < 10) {
                mm = '0' + mm
            }
            today = dd + '-' + mm + '-' + yyyy;
            document.getElementById('hdnDate').value = today;
        }

        function ShowHideCustDetails() {
            if ($('#<%=lblCustDetails.ClientID%>').val() != undefined) {
                $("#trCustDetails").toggle();
                $("#trHeightForCustDetails").toggle();
            }
        }

        function ClosePopup() {
            try {
                if (window.parent.$('.ui-dialog-content:visible').length > 0) {
                    window.parent.$('.ui-dialog-content:visible').dialog('close');
                    //window.parent.$('#divIframe').dialog('close');
                }
                else if (window.parent.$('iframe').length > 0) {
                    window.parent.$('iframe').closest('div').css('display', 'none');
                    window.parent.$('iframe').remove();
                }
                else
                    window.close();
            } catch (e) {
                throw (e);
            }
        }

        function ResizeWindow(ctrl) {
            try {
                var win = document.getElementById(ctrl.id).ownerDocument.defaultView;
                if (win != undefined && win != null) {
                    if (win.location.href.includes('RMWorkstation')) {
                        if (ctrl.innerHTML === "More Details") {
                            localStorage.setItem('FundsPopupHeight', win.outerHeight);
                            win.resizeTo(556, 850);
                        }
                        else
                            win.resizeTo(556, localStorage.getItem('FundsPopupHeight'));
                    }
                }
            } catch (e) {
                throw (e);
            }
        }

    </script>
    <style type="text/css">
        .auto-style1 {
            /*width: 110px;*/
            min-width: 105px;
            max-width: 105px;
            padding-left: 25px;
            padding-bottom: 3px;
            padding-right: 15px;
        }

        .auto-style2 {
            width: 180px;
            /*padding-left: 25px;*/
            padding-left: 30px;
            padding-right: 25px;
            padding-bottom: 3px;
        }

        hr {
            border: none;
            border-top: 1px dotted #000;
            color: #fff;
            background-color: #fff;
            height: 1px;
            width: 100%;
        }

        .lblLink, .lblMessage {
            color: #0368b6 !important;
        }

        .lblLink1 {
            /*padding-left: 7px; font-size: 13px !important; text-decoration: underline; margin-left: 3px;*/
            font-size: 11px !important;
            text-decoration: underline !important;
            color: #0368b6 !important;
            display: inline;
            cursor: pointer !important;
            font-style: italic;
        }

        .lbolTitle {
            padding-bottom: 15px !important;
        }

        .lblHeaderStyling {
            font-family: Verdana !important;
            color: #325d81 !important;
            font-size: 14px !important;
            font-weight: bold;
        }

        .width120 {
            min-width: 120px;
        }

        #FindCustSmart_automplete_1 {
            margin-top: 2px;
            min-width: 270px;
            max-width: 270px;
        }

        #Smart_Serach_RM_Control_automplete_2 {
            width: 118px !important;
        }

        /*#txtSIPStartDate_txtDate {
        margin-top:10px;
        }*/
    </style>
</head>
<body>

    <div id="div6" runat="server" style="float: left;">
        <form id="form1" runat="server">

            <asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>

            <table>
                <tr>
                    <td>
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="updPanel"
                            DisplayAfter="0">
                            <ProgressTemplate>
                                <div class="divLoading">
                                    <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...&nbsp;&nbsp;
                                    </span>
                                </div>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </td>
                </tr>
            </table>

            <asp:UpdatePanel runat="server" ID="updPanel" UpdateMode="Conditional">
                <ContentTemplate>

                    <h1 id="PageTitle" runat="server" class="lblHeaderStyling" style="font: bold; margin-left: 28px !important; margin-top: 25px !important">Funds Order Capture</h1>

                    <table cellpadding="1" cellspacing="1" style="padding-top: 18px; padding-bottom: 4%;" align="left">
                        <tr id="trFundName" runat="server" style="display: none;">
                            <td class="auto-style1">
                                <asp:Label ID="Label1" runat="server" Text="Fund Name"></asp:Label>
                            </td>
                            <td colspan="3">
                                <asp:Label runat="server" ID="lblFundName" Visible="false"></asp:Label>
                                <ucFundsearch1:FinIQ_FundsCode1 runat="server" ID="FinIQ_FundsCode1" OnUC_FundDetails="FindFund_UC_FundDetails1" SetWidth="254" SetHeight="41" />
                            </td>
                        </tr>
                        <tr style="height: 8px;">
                            <td></td>
                        </tr>
                        <tr id="trISINCurr" runat="server" style="display: none">
                            <td class="auto-style1">
                                <asp:Label ID="Label2" runat="server" Text="ISIN"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtISIN" Enabled="false" Width="118px"></asp:TextBox>
                            </td>
                            <td class="auto-style1">
                                <asp:Label ID="Label3" runat="server" Text="Currency"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtCurrency" Enabled="false" Width="118px"></asp:TextBox>
                            </td>
                        </tr>

                        <%--                        <tr>
                            <td class="auto-style1">
                                <asp:Label ID="Label4" runat="server" Text="Order Type"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlOrderType" runat="server" CssClass="ddl lblOrderEntry" Width="118px" Style="margin-top: 2px" Enabled="false">
                                    <asp:ListItem Text="Market" />
                                    <asp:ListItem Text="Limit" />
                                </asp:DropDownList>
                            </td>
                        </tr>--%>

                        <tr>
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lbl6" Text="Order Type"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlFundMode" runat="server" CssClass="ddl" Width="118px" Style="margin-top: 2px" AutoPostBack="true">
                                    <asp:ListItem Text="Subscription" Value="SB" />
                                    <asp:ListItem Text="Redemption" Value="RD" />
                                    <asp:ListItem Text="Switch" Value="SW" />
                                    <asp:ListItem Text="SIP" Value="SIP" />
                                    <asp:ListItem Text="SWP" Value="SWP" />
                                </asp:DropDownList>
                            </td>
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lbl8" Text="NAV (Indicative)"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtNAV" runat="server" CssClass="txt" Width="118px" Enabled="false" Style="text-align: right !important"></asp:TextBox>
                            </td>
                        </tr>

                        <tr id="trSwitchingFund" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 6px">
                                <asp:Label runat="server" ID="Label11" Text="Switching Fund"></asp:Label>
                            </td>
                            <td>
                                <ucFundsearch:FinIQ_FundsCode runat="server" ID="FinIQ_FundsCode" OnUC_FundDetails="FindFund_UC_FundDetails" />
                            </td>
                            <td class="auto-style1" style="padding-top: 8px">
                                <asp:Label runat="server" ID="lblSwitchingFundCodeHeader" Text="Switching Fund Code"></asp:Label>
                            </td>
                            <td>
                                <asp:Label ID="lblSwitchingFundCode" runat="server" CssClass="lbl"></asp:Label>
                            </td>
                        </tr>

                        <tr id="trSwitchingFundNAV" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 14px">
                                <asp:Label runat="server" Text="Switching Fund NAV"></asp:Label>
                            </td>
                            <td style="padding-top: 10px">
                                <asp:TextBox ID="txtSwitchingFundNAV" runat="server" CssClass="txt" Width="118px" Enabled="false" Style="text-align: right !important"></asp:TextBox>
                            </td>
                            <td class="auto-style1" style="padding-top: 14px">
                                <asp:Label runat="server" Text="Switching Fund Currency"></asp:Label>
                            </td>
                            <td style="padding-top: 10px">
                                <asp:TextBox ID="txtSwitchingFundCcy" runat="server" CssClass="txt" Width="118px" Enabled="false"></asp:TextBox>
                            </td>
                        </tr>

                        <tr>
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lblNominalAmount" Text="Nominal Amount"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtNominalAmount" runat="server" CssClass="txt" Width="118px" Style="text-align: right !important; margin-top: 1px" AutoPostBack="true" onKeyPress="return onlyNominal(event,this);" />
                            </td>
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lblUnits" Text="Units"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtUnits" runat="server" CssClass="txt" Width="118px" Style="text-align: right !important" AutoPostBack="true" onKeyPress="AllowNumericWithdecimal(this.id)"></asp:TextBox>
                                <asp:DropDownList ID="ddlSIPFrequency" runat="server" CssClass="ddl" Width="118px" Style="display: none;" />
                            </td>
                        </tr>

                        <%--                        <tr id="trSIPFrequency" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 10px">
                                <asp:Label ID="Label7" runat="server" Text="Frequency"></asp:Label></td>
                            <td style="padding-top: 8px">
                                <asp:DropDownList ID="ddlSIPFrequency" runat="server" CssClass="ddl" Width="118px" />
                            </td>
                        </tr>--%>
                        <tr id="trSIPStartDate" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 2px">
                                <asp:Label runat="server" Text="Start Date"></asp:Label></td>
                            <td>
                                <uc1:DateControl ID="txtSIPStartDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" DoPostBack="false" TextBoxSize="94px" />
                            </td>
                            <td class="auto-style1" style="padding-top: 4px">
                                <asp:Label runat="server" Text="End Date"></asp:Label></td>
                            <td>
                                <uc1:DateControl ID="txtSIPEndDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" DoPostBack="false" TextBoxSize="94px" />
                            </td>
                        </tr>

                        <%--                        <tr id="trSIPMaturityDate" runat="server" style="display: none">
                            
                        </tr>--%>

                        <tr>
                            <td colspan="3" style="padding-left: 25px; padding-top: 10px;">
                                <asp:Label Text="" runat="server" ID="lblMinInvAmountValidation" CssClass="lblToDisappear" />
                            </td>
                        </tr>

                        <tr style="height: 20px" id="trForHeightNoCustPassed" runat="server">
                            <td></td>
                        </tr>

                        <tr id="trCustomerName" runat="server">
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lbl1" Text="Customer"></asp:Label>
                            </td>
                            <td colspan="3">
                                <ucsmart:FinIQ_Customer_SmartSearch runat="server" OnUC_Postback="FindCustSmart_UC_Postback" SetTabIndex="1" ID="FindCustSmart" />
                                <asp:Label ID="lblCustomerName" runat="server" CssClass="lbl" Style="display: none"></asp:Label>
                            </td>
                        </tr>

                        <tr runat="server" id="trCustNameLabel">
                            <td class="auto-style1">Customer
                            </td>
                            <td colspan="3">
                                <asp:Label runat="server" ID="lblCustName"></asp:Label>
                                <img src="~/EQQuickOrderEntry/Images/CustomerDetails.png" height="16" width="16" title="Customer Details" style="cursor: hand; vertical-align: middle;" onclick="ShowHideCustDetails();" id="ImgCustInfo" runat="server" role="button" />
                            </td>
                        </tr>

                        <tr style="height: 5px">
                            <td></td>
                        </tr>

                        <tr id="trHeightForCustDetails" style="height: 15px" runat="server">
                            <td></td>
                        </tr>

                        <tr id="trCustDetails" style="display: none;" runat="server">
                            <td class="auto-style1"></td>
                            <td colspan="3">
                                <asp:Label runat="server" ID="lblCustDetails"></asp:Label>
                            </td>
                        </tr>

                    </table>

                    <table style="border-top-color: #dddddd; border-top-style: solid; border-top-width: 1px; padding-top: 4%">
                        <tr id="trPortfolio" runat="server" style="display: none">
                            <td class="auto-style1" style="">
                                <asp:Label runat="server" ID="lbl2" Text="Portfolio"></asp:Label>
                            </td>
                            <td colspan="3" style="width: 415px">
                                <asp:DropDownList ID="ddl_Portfolio" runat="server" CssClass="ddl" Width="254px" AutoPostBack="true"></asp:DropDownList>
                            </td>
                        </tr>

                        <tr id="trAccountType" runat="server" style="display: none">
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lbl3" Text="Account Type"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddl_AccountType" runat="server" CssClass="ddl" Width="118px" AutoPostBack="true" Style="margin-top: 2px"></asp:DropDownList>
                            </td>
                            <td class="auto-style1"></td>
                            <td style="width: 118px"></td>
                        </tr>

                        <tr id="trAccountNo" runat="server" style="display: none">
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lbl4" Text="Account No"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlAccountNo" runat="server" CssClass="ddl" Width="118px" Style="margin-top: 2px"></asp:DropDownList>
                            </td>
                        </tr>

                        <tr id="trRMBranch" runat="server" style="display: none">
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lblRM" CssClass="lbl" Text="RM"></asp:Label>
                            </td>
                            <td>
                                <dtuc_RM:Smart_Serach_RM_Control runat="server" ID="Smart_Serach_RM_Control" UC_Postback="Smart_Search_RM_PostBack1" />
                            </td>
                        </tr>

                        <tr id="trBranch" runat="server" style="display: none">
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="Label14" CssClass="lbl" Text="Branch"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList runat="server" ID="ddlBranch" CssClass="ddl" Width="118px"></asp:DropDownList>
                            </td>
                        </tr>

                        <tr runat="server" id="trFundCode" style="display: none">
                            <td class="auto-style1">
                                <asp:Label runat="server" ID="lbl5" Text="Fund Code"></asp:Label>
                            </td>
                            <td>
                                <asp:Label ID="lblFundCode" runat="server" CssClass="lbl"></asp:Label>
                            </td>
                        </tr>

                        <tr runat="server" id="trTradeDate" style="display: none;">
                            <td class="auto-style1">
                                <span>Trade Date</span>
                            </td>
                            <td>
                                <uc1:DateControl ID="dtTradeDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" DoPostBack="false" TextBoxSize="94px" />
                            </td>
                        </tr>

                        <tr id="trLoadCharge" runat="server" style="display: none;">
                            <td class="auto-style1">
                                <asp:Label runat="server" Text="Load Charge (%)"></asp:Label></td>
                            <td style="width: 118px">
                                <asp:TextBox runat="server" Width="118px" ID="txtLoadCharge" CssClass="txt" Style="text-align: right;" AutoPostBack="true" onKeyPress="AllowNumericWithdecimal(this.id)" Enabled="false" />
                            </td>
                            <td colspan="2">
                                <table>
                                    <tr>
                                        <%--<td style="padding-top: 3px;">
                                            <asp:Label ID="lblFundCcy" runat="server" Style="font-size: 8px; font-style: italic; color: #0368B6;" />
                                        </td>--%>
                                        <td style="padding-top: 3px;">
                                            <asp:Label ID="lblLoadChargeAmt" runat="server" CssClass="lblToDisappear" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr id="trSalesChargeNew" runat="server" style="display: none">
                            <td class="auto-style1">
                                <span>Sales Charge (%)</span>
                            </td>
                            <td>
                                <asp:TextBox runat="server" CssClass="txt" ID="txtSalesChargeNew" Width="118px" Text="0.00" Style="text-align: right;" AutoPostBack="true" />
                            </td>
                        </tr>
                        <tr id="trLTVFields1" runat="server" style="display: none;">
                            <td class="auto-style1">
                                <span>LTV</span>
                            </td>
                            <td>
                                <asp:TextBox runat="server" CssClass="txt" ID="txtLTV" Width="118px" />
                            </td>
                        </tr>
                        <tr id="trLTVFields2" runat="server" style="display: none;">
                            <td class="auto-style1"></td>
                            <td>
                                <asp:CheckBox Text="LTV Override" runat="server" ID="chkLVTOverride" />
                            </td>
                        </tr>
                        <tr id="trCashBalance" runat="server" style="display: none;">
                            <td class="auto-style1" style="padding-top: 8px">
                                <asp:Label ID="lblFundBalanceHeader" runat="server" Text="Available Cash Balance"></asp:Label></td>
                            <td style="text-align: right; width: 118px">
                                <table>
                                    <tr>
                                        <td style="vertical-align: bottom;">
                                            <asp:Label ID="lblBalanceCcy" runat="server" Style="font-size: 8px;" />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblFundBalance" runat="server" CssClass="lbl" Style="margin-right: 22px"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>

                        <tr id="trCurrentHoldings" runat="server" style="display: none;">
                            <td class="auto-style1" style="padding-top: 8px">
                                <asp:Label ID="Label4" runat="server" Text="Current Holdings (Units)"></asp:Label></td>
                            <td style="text-align: right; width: 118px">
                                <asp:Label ID="lblCurrentHoldings" runat="server" CssClass="lbl" Style="margin-right: 26px"></asp:Label>
                            </td>
                        </tr>

                        <tr id="trOrderDetailsCaption" runat="server" style="display: none">
                            <td></td>
                            <td>
                                <asp:Label ID="lblOrderDetailsCaption" runat="server" Text="" Style="font-weight: bold"></asp:Label>
                            </td>
                        </tr>

                        <%--Subscription Validation Fields || START--%>
                        <%--<tr id="trMinimumInitialInvestmentAmount" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 12px">
                                <asp:Label ID="lblMinInitialInvestmentAmountHeader" runat="server" CssClass="lblOrderEntry" Text="Min Initial Investment Amt"></asp:Label></td>
                            <td style="text-align: right; width: 118px">
                                <asp:Label ID="lblMinInitialInvestmentAmount" runat="server" CssClass="lbl lblOrderEntry" Style="margin-right: 22px"></asp:Label>
                            </td>
                        </tr>--%>
                        <%--<tr id="trMinimumSubsequentInvestment" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 14px">
                                <asp:Label ID="Label8" runat="server" CssClass="lblOrderEntry" Text="Min Subsequent Investment Amt"></asp:Label></td>
                            <td style="text-align: right; width: 118px">
                                <asp:Label ID="lblMinimumSubsequentInvestment" runat="server" CssClass="lbl lblOrderEntry" Style="margin-right: 22px"></asp:Label>
                            </td>
                        </tr>--%>
                        <%--Subscription Validation Fields || END--%>

                        <%--SIP Fields || START--%>
                        <%-- <tr id="trMinSIPInstallment" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 12px">
                                <asp:Label ID="Label5" runat="server" Text="Min SIP Installment Amt"></asp:Label></td>
                            <td style="text-align: right; width: 118px">
                                <asp:Label ID="lblMinSIPInstallment" runat="server" CssClass="lbl" Style="margin-right: 22px"></asp:Label>
                            </td>
                        </tr>
                        <tr id="trMinSWPInstallment" runat="server" style="display: none">
                            <td class="auto-style1" style="padding-top: 12px">
                                <asp:Label ID="Label6" runat="server" Text="Min SWP Installment Amt"></asp:Label></td>
                            <td style="text-align: right; width: 118px">
                                <asp:Label ID="lblMinSWPInstallment" runat="server" CssClass="lbl" Style="margin-right: 22px"></asp:Label>
                            </td>
                        </tr>--%>
                        <%--SIP Fields || END--%>
                    </table>

                    <table>

                        <tr style="height: 25px">
                            <td></td>
                        </tr>

                        <tr>
                            <td class="auto-style1" style="text-align: left">
                                <asp:LinkButton ID="lnkbtnMoreDetails" runat="server" Text="More Details" CssClass="lblLink1" OnClientClick="ResizeWindow(this);"></asp:LinkButton>
                            </td>
                            <td style="text-align: center; width: 295px">
                                <asp:Button ID="btnBookOrder" runat="server" Text="Place Order" CssClass="btn" Style="width: 100px !important" />
                                <asp:Button ID="btnClosePopup" runat="server" Text="Close" CssClass="btn" Width="100px" OnClientClick="ClosePopup();" />
                            </td>
                        </tr>

                        <tr style="height: 20px">
                            <td></td>
                        </tr>

                    </table>

                    <table>

                        <tr>
                            <td class="auto-style1"></td>
                            <td style="text-align: center; width: 295px">
                                <asp:Label ID="lblMessage" runat="server" CssClass="lblError" Style="white-space: pre-wrap;"></asp:Label>
                            </td>
                        </tr>

                    </table>
                    <asp:HiddenField ID="hdnCIFNumber" runat="server" Value="" />
                    <asp:HiddenField ID="hdnCustomerID" runat="server" Value="" />
                    <asp:HiddenField ID="hdnAccountNo" runat="server" Value="" />
                    <asp:HiddenField ID="hdnCustomerName" runat="server" Value="" />

                    <asp:HiddenField ID="hdnCashBal" runat="server" Value="" />
                    <asp:HiddenField ID="hdnHolding" runat="server" Value="" />
                    <asp:HiddenField ID="hdnProductId" runat="server" />
                    <asp:HiddenField ID="hdnApplicationID" runat="server" Value="" />
                    <asp:HiddenField ID="hdnDate" runat="server" Value="" />
                    <asp:HiddenField ID="hdnFundCCY" runat="server" Value="" />
                    <asp:HiddenField ID="hdnSettlementDate" runat="server" Value="" />
                    <asp:HiddenField ID="hdnNMID" runat="server" Value="" />
                    <asp:HiddenField ID="hdn_SchemeCode" runat="server" Value="" />
                    <%--  Code Added By Dinesh On 21-Apr-2018 Demo--%>
                    <asp:HiddenField ID="hdn_Note_Master_ID" runat="server" Value="" />
                    <%--  Code Added By Dinesh On 21-Apr-2018 Demo--%>
                    <asp:HiddenField ID="hdnNominalAmt" runat="server" Value="" />
                    <asp:HiddenField ID="hdncustid" runat="server" />
                    <asp:HiddenField ID="hdn_FacilityDescription" runat="server" Value="" />
                    <%--  Code Added By Dinesh On 21-Apr-2018 Demo--%>
                    <asp:HiddenField ID="hdn_FacilityType" runat="server" Value="" />
                    <%--  Code Added By Dinesh On 21-Apr-2018 Demo--%>
                    <asp:HiddenField ID="hdnSwitchingFundCode" runat="server" Value="" />
                    <asp:HiddenField ID="hdnPurchaseAmount" runat="server" Value="" />
                    <asp:HiddenField ID="hdnSwitchFromFundCode" runat="server" Value="" />
                    <asp:HiddenField ID="hdnSwitchUnits" runat="server" Value="" />
                    <asp:HiddenField ID="hdnSwitchingFundCcy" runat="server" Value="" />
                    <asp:HiddenField ID="hdnToFundCcy" runat="server" />
                    <asp:HiddenField ID="hdnNoteMasterId" runat="server" />
                    <asp:HiddenField ID="hdnIsKYCPassed" runat="server" />
                    <asp:HiddenField ID="hdnBranchName" runat="server" />
                    <asp:HiddenField ID="hdnRMId" runat="server" />
                    <asp:HiddenField ID="hdnRMName" runat="server" />
                    <asp:HiddenField ID="hdnMinInitialSubAmount" runat="server" />
                    <asp:HiddenField ID="hdnMinInitialInvestmentAmount" runat="server" />
                    <asp:HiddenField ID="hdnMinSIPInstallment" runat="server" />
                    <asp:HiddenField ID="hdnMinSWPInstallment" runat="server" />
                    <asp:HiddenField ID="hdnExchangeRate" runat="server" />
                    <asp:HiddenField ID="hdnInsertMode" runat="server" />
                    <asp:HiddenField ID="hdnChildTemplateCode" runat="server" />
                    <asp:HiddenField ID="hdnParentTemplateCode" runat="server" />
                    <asp:HiddenField ID="hdnMinAmtToHold" runat="server" />
                    <asp:HiddenField ID="hdnFundUmbrella2" runat="server" />
                    <asp:HiddenField ID="hdnFundUmbrella1" runat="server" />
                    <asp:HiddenField ID="hdnRedemptionChargesPerc2" runat="server" />
                    <asp:HiddenField ID="hdnRedemptionChargesPerc1" runat="server" />
                    <asp:HiddenField ID="hdnFrontEndLoad2" runat="server" />
                    <asp:HiddenField ID="hdnFrontEndLoad1" runat="server" />
                    <asp:HiddenField ID="hdnUnitsLabel" runat="server" Value="Units (Indicative)" />
                    <asp:HiddenField ID="hdnSameFundHouseFlag" runat="server" />
                <%--'Added By MohiniM || to pass logindetails to place order|| 7-Nov-2020 -Start--%>
                    <input type="hidden" id="hdnEntityID"  runat="server" />
                    <input type="hidden" id="hdnUserID" runat="server" />
                <%--'Added By MohiniM || to pass logindetails to place order|| 7-Nov-2020 -End--%>

                </ContentTemplate>
            </asp:UpdatePanel>
        </form>
    </div>

</body>
</html>
