You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3210 lines
173 KiB

  1. <%@ Page Title="" Language="C#" MasterPageFile="~/AgentNew/AgentMain.Master" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="SendV2.aspx.cs" Inherits="Swift.web.AgentNew.AgentSend.SendV2" %>
  2. <%@ Register Src="/Component/AutoComplete/SwiftTextBox.ascx" TagName="SwiftTextBox" TagPrefix="uc1" %>
  3. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
  4. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  5. <style>
  6. .error {
  7. color: red;
  8. float: right;
  9. margin-bottom: 0;
  10. }
  11. input, textarea {
  12. text-transform: uppercase;
  13. }
  14. .text-amount {
  15. font-family: Verdana;
  16. font-size: 13px;
  17. text-align: right;
  18. font-weight: bold;
  19. }
  20. .input-group-addon {
  21. padding: 4px 12px !important;
  22. font-weight: 600 !important;
  23. }
  24. .input-group .form-control:first-child {
  25. font-weight: 600 !important;
  26. }
  27. .amountDiv {
  28. background: none repeat scroll 0 0 black;
  29. clear: both;
  30. color: white;
  31. float: right;
  32. font-size: 12px;
  33. font-weight: 600;
  34. padding: 2px 8px;
  35. margin-right: 15px;
  36. margin-bottom: 0px;
  37. width: auto;
  38. }
  39. .amount_data {
  40. margin-right: 0PX;
  41. }
  42. .wizard .tab-pane {
  43. margin-top: 35px !important;
  44. }
  45. .ErrMsg {
  46. color: red !important;
  47. }
  48. td:empty:after {
  49. content: "\00a0";
  50. }
  51. .form-group {
  52. position: relative;
  53. }
  54. .form-group label.error {
  55. position: absolute;
  56. right: 15px;
  57. font-weight: 300;
  58. }
  59. .complete .form-group {
  60. margin-bottom: 0px !important;
  61. }
  62. .complete .form-group label {
  63. font-weight: 400;
  64. }
  65. .wizard {
  66. margin: 30px auto !important;
  67. }
  68. </style>
  69. <!-- #region Document Ready -->
  70. <script type="text/javascript">
  71. function GetCustomerSearchType() {
  72. return $('#<%=ddlCustomerType.ClientID%>').val();
  73. }
  74. $(document).ready(function () {
  75. scroll(0, 0);
  76. $('#divHideShow').show();
  77. $('#divHideShow').show();
  78. $('#subLocation').hide();
  79. $('#divBankBranch').hide();
  80. $('.displayPayerInfo').hide();
  81. $('#availableBalSpan').hide();
  82. $('#<%=ddlRecIdType_err.ClientID%>').hide();
  83. $('#<%=txtRecIdNo_err.ClientID%>').hide();
  84. $(".readonlyOnCustomerSelect").attr("disabled", "disabled");
  85. var customerIdFromMapping = '<%=GetCustomerId()%>';
  86. if (customerIdFromMapping !== null && customerIdFromMapping !== '') {
  87. ExistingData();
  88. PopulateReceiverDDL(customerIdFromMapping);
  89. SearchCustomerDetails(customerIdFromMapping, 'mapping');
  90. }
  91. $('.trScheme').hide();
  92. $("#lblServiceChargeAmt").attr("readonly", true);
  93. $("#ddlCustomerType").change(function () {
  94. var d = ["", ""];
  95. SetItem("<% =txtSearchData.ClientID%>", d);
  96. });
  97. $('txtpBranch_aText').attr("readonly", true);
  98. $("#<%=txtCollAmt.ClientID%>").blur(function () {
  99. CollAmtOnChange();
  100. });
  101. $("#<%=txtPayAmt.ClientID%>").blur(function () {
  102. checkdata($("#<%=txtPayAmt.ClientID%>").val(), 'pAmt');
  103. });
  104. $('#<%=ddlCustomerType.ClientID%>').change(function () {
  105. <% = txtSearchData.InitFunction() %>
  106. });
  107. $('#btnDepositDetail').click(function () {
  108. var collAmt = PopUpWindow("CollectionDetail.aspx", "");
  109. if (collAmt == "undefined" || collAmt == null || collAmt == "") {
  110. collAmt = $('#<%=txtCollAmt.ClientID%>').text();
  111. }
  112. else {
  113. if ((collAmt) > 0) {
  114. SetValueById("<%=txtCollAmt.ClientID %>", collAmt, "");
  115. $('#<%=txtCollAmt.ClientID%>').attr("readonly", true);
  116. $('#<%=txtPayAmt.ClientID%>').attr("readonly", true);
  117. }
  118. else {
  119. SetValueById("<%=txtCollAmt.ClientID %>", "", "");
  120. SetValueById("<%=txtPayAmt.ClientID %>", "", "");
  121. $('#<%=txtCollAmt.ClientID%>').attr("readonly", false);
  122. $('#<%=txtPayAmt.ClientID%>').attr("readonly", false);
  123. }
  124. CalculateTxn(collAmt);
  125. }
  126. });
  127. $("#<%=ddSenIdType.ClientID%>").change(function () {
  128. ManageSendIdValidity();
  129. });
  130. $("#<%=locationDDL.ClientID%>").change(function () {
  131. LoadSublocation();
  132. });
  133. $("#<%=pCountry.ClientID%>").change(function () {
  134. ResetAmountFields();
  135. ClearCalculatedAmount();
  136. $("#<%=pMode.ClientID %>").empty();
  137. $("#<%=pAgent.ClientID %>").empty();
  138. $("#<%=pCurrDdl.ClientID %>").empty();
  139. $("#branch").empty();
  140. $('#<%=branch.ClientID%>').removeClass('required');
  141. $("#<%=locationDDL.ClientID %>").empty();
  142. $("#<%=subLocationDDL.ClientID %>").empty();
  143. $('#divBankBranch').hide();
  144. $("#tdLblBranch").hide();
  145. $("#tdTxtBranch").hide();
  146. $('#txtpBranch_aText').attr("class", "disabled form-control");
  147. $("#txtpBranch_err").hide();
  148. $("#txtpBranch_aValue").val('');
  149. $("#txtpBranch_aText").val('');
  150. $("#<%=txtRecDepAcNo.ClientID%>").val('');
  151. $("#<%=lblExCurr.ClientID%>").text('');
  152. $("#<%=lblPayCurr.ClientID%>").text('');
  153. $('#<%=lblPerTxnLimit.ClientID%>').text('0.00');
  154. $('#spnPayoutLimitInfo').html('');
  155. var partnerId = $("#<%=hddPayoutPartner.ClientID%>").val();
  156. var pmode = $("#<%=pMode.ClientID%>").val();
  157. if ($("#<%=pCountry.ClientID%> option:selected ").val() != "") {
  158. PcountryOnChange('c', "");
  159. SetPayCurrency($("#<%=pCountry.ClientID%>").val());
  160. ManageLocationData();
  161. }
  162. HideShowFieldsOnTxnTab();
  163. });
  164. $("#<%=pMode.ClientID%>").change(function () {
  165. ManageHiddenFields();
  166. ClearCalculatedAmount();
  167. $('.displayPayerInfo').hide();
  168. $("#<%=txtRecDepAcNo.ClientID%>").val('');
  169. $("#tdLblBranch").hide();
  170. $("#tdTxtBranch").hide();
  171. $('#txtpBranch_aText').attr("class", "disabled form-control");
  172. $("#txtpBranch_err").hide();
  173. $("#txtpBranch_aValue").val('');
  174. $("#txtpBranch_aText").val('');
  175. ReceivingModeOnChange();
  176. GetPayoutPartner();
  177. HideShowFieldsOnTxnTab();
  178. });
  179. $('.collMode-chk').click(function () {
  180. $('#availableBalSpan').hide();
  181. if (!$(this).is(':checked')) {
  182. return false;
  183. }
  184. if ($(this).val() == 'Bank Deposit') {
  185. var customerId = $('#ContentPlaceHolder1_txtSearchData_aValue').val();
  186. if (customerId == "" || customerId == null || customerId == undefined) {
  187. alert('Please Choose Existing Sender for Coll Mode: Bank Deposit');
  188. return false;
  189. }
  190. $('.deposited-bank').css('display', '');
  191. $('.deposited-bank-hide').hide();
  192. CheckAvailableBalance($(this).val());
  193. }
  194. else {
  195. $('.deposited-bank').css('display', 'none');
  196. $('.deposited-bank-hide').show();
  197. }
  198. $('.collMode-chk').not(this).prop('checked', false);
  199. });
  200. });
  201. ShowCalDefault("#<% =txtSendIdValidDate.ClientID%>");
  202. CalIDIssueDate("#<% =txtSendIdExpireDate.ClientID%>");
  203. CalSenderDOB("#<% =txtSendDOB.ClientID%>");
  204. function CallBackAutocomplete(id) {
  205. var d = [GetItem("<%=txtSearchData.ClientID %>")[0], GetItem("<%=txtSearchData.ClientID %>")[1].split('|')[0]];
  206. SetItem("<% =txtSearchData.ClientID%>", d);
  207. PopulateReceiverDDL(GetItem("<%=txtSearchData.ClientID %>")[0]);
  208. SearchCustomerDetails(GetItem("<%=txtSearchData.ClientID %>")[0]);
  209. ClearReceiverData();
  210. DisabledAllTabs();
  211. }
  212. $(document).ajaxStart(function () {
  213. $("#DivLoad").show();
  214. });
  215. $(document).ajaxComplete(function (event, request, settings) {
  216. $("#DivLoad").hide();
  217. });
  218. $(document).on('click', '#btnCalcClean', function () {
  219. ClearTxnData();
  220. ClearCalculatedAmount();
  221. $('#<%=pCurrDdl.ClientID%>').empty();
  222. });
  223. $(document).on('click', '#btnReceiverClr', function () {
  224. $('.readonlyOnReceiverSelect').removeAttr("disabled");
  225. ClearReceiverData();
  226. });
  227. $(document).unbind('keydown').bind('keydown', function (event) {
  228. var doPrevent = false;
  229. if (event.keyCode === 8) {
  230. var d = event.srcElement || event.target;
  231. if ((d.tagName.toUpperCase() === 'INPUT' && (d.type.toUpperCase() === 'TEXT' || d.type.toUpperCase() === 'PASSWORD'))
  232. || d.tagName.toUpperCase() === 'TEXTAREA') {
  233. doPrevent = d.readOnly || d.disabled;
  234. }
  235. else {
  236. doPrevent = true;
  237. }
  238. }
  239. if (doPrevent) {
  240. event.preventDefault();
  241. if (confirm("You have pressed back button. Are you sure you want to leave this page?")) {
  242. window.history.back();
  243. }
  244. }
  245. });
  246. $(document).on('blur', '#<%=txtSendDOB.ClientID%>', function () {
  247. var CustomerDob = GetValue("<%=txtSendDOB.ClientID %>");
  248. if (CustomerDob != "") {
  249. var CustYears = datediff(CustomerDob, 'years');
  250. if (parseInt(CustYears) < 18) {
  251. alert('Customer age must be 18 or above !');
  252. return;
  253. }
  254. }
  255. });
  256. $(document).on('change', '#<%=ddlRecIdType.ClientID%>', function () {
  257. $('#<%=txtRecIdNo.ClientID%>').val('');
  258. var idType = $("#<%=ddlRecIdType.ClientID%> option:selected").text();
  259. var idTypeVal = $("#<%=ddlRecIdType.ClientID%> option:selected").val();
  260. $('#<%=txtRecIdNo.ClientID%>').attr('disabled', 'disabled').removeClass('required').removeAttr('style');
  261. $('#<%=txtRecIdNo_err.ClientID%>').hide();
  262. if (idTypeVal !== "" && idTypeVal !== null && idTypeVal !== "0") {
  263. $('#<%=txtRecIdNo.ClientID%>').removeAttr('disabled').addClass('required');
  264. $('#<%=txtRecIdNo_err.ClientID%>').show();
  265. }
  266. if (idType == "Alien Registration Card") {
  267. $(".recIdDateValidate").css("display", "");
  268. }
  269. else {
  270. $(".recIdDateValidate").css("display", "none");
  271. }
  272. });
  273. $(document).on('change', '#<%= pAgent.ClientID %>', function () {
  274. var bankId = $("#<%= pAgent.ClientID %> option:selected").val();
  275. if (bankId === "" || bankId === null) {
  276. return;
  277. }
  278. var pmode = $("#<%=pMode.ClientID%>").val();
  279. var partnerId = $("#<%=hddPayoutPartner.ClientID%>").val();
  280. $('#divBankBranch').hide();
  281. $('#<%=branch.ClientID%>').removeClass('required');
  282. $('.displayPayerInfo').hide();
  283. PopulateBankDetails(bankId, pmode);
  284. if (partnerId === apiPartnerIds[0] || pmode === "2") {
  285. if ((partnerId === apiPartnerIds[0]) && pmode === "2") {
  286. $('#agentBranchRequired').hide();
  287. }
  288. $('#divBankBranch').show();
  289. if ((partnerId === apiPartnerIds[0]) && pmode === "2" && (bankId != "0" && bankId != null && bankId != "")) {
  290. LoadPayerData();
  291. }
  292. }
  293. });
  294. $(document).on('change', '#<%=ddlPayer.ClientID%>', function () {
  295. var payerId = $(this).val();
  296. var cityId = $("#<%=subLocationDDL.ClientID%>").val();
  297. if (payerId !== "" && payerId !== null) {
  298. var partnerId = $('#<%=hddPayoutPartner.ClientID%>').val();
  299. var dataToSend = { MethodName: 'getPayerBranchDataByPayerAndCityId', payerId: payerId, partnerId: partnerId, CityId: cityId };
  300. $.post("", dataToSend, function (response) {
  301. $("#myModal1").modal('show');
  302. var data = jQuery.parseJSON(response);
  303. CreateDDLFromData(data, "<%=ddlPayerBranch.ClientID%>");
  304. });
  305. }
  306. });
  307. $(document).on('change', '#<%=ddlPayerBranch.ClientID%>', function () {
  308. payerBranchId = $(this).val();
  309. if (payerBranchId === null || payerBranchId === "") {
  310. return alert("Please Select Payer Branch Information");
  311. }
  312. payerText = $('#<%=ddlPayer.ClientID%> option:selected').text();
  313. payerBranchText = $('#<%=ddlPayerBranch.ClientID%> option:selected').text();
  314. $("#<%=payerText.ClientID%>").text(payerText);
  315. $("#<%=payerBranchText.ClientID%>").text(payerBranchText);
  316. $('.displayPayerInfo').show();
  317. $("#myModal1").modal('hide');
  318. });
  319. $(document).on('change', "#ContentPlaceHolder1_txtSearchData_aSearch", function () {
  320. var value = $(this).val();
  321. if (value === null || value === "") {
  322. ClearAllCustomerInfo();
  323. }
  324. });
  325. </script>
  326. <!-- #endregion -->
  327. </asp:Content>
  328. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  329. <div class="page-wrapper">
  330. <div class="row" style="display: none;">
  331. <div class="col-sm-12">
  332. <div class="page-title">
  333. <h1></h1>
  334. <asp:HiddenField ID="hideCustomerId" runat="server" />
  335. <ol class="breadcrumb">
  336. <li><a href="/AgentNew/Dashboard.aspx"><i class="fa fa-home"></i></a></li>
  337. <li><a href="#">Transaction </a></li>
  338. <li><a href="#">Send Transaction</a></li>
  339. <span style="float: right;">
  340. <div class="row" style="float: right;">
  341. <div class="amountDiv">
  342. Limit :&nbsp;
  343. <asp:Label ID="availableAmt" runat="server"></asp:Label>
  344. <asp:Label ID="balCurrency" runat="server" Text="JPY"></asp:Label>
  345. </div>
  346. </div>
  347. </span>
  348. </ol>
  349. </div>
  350. </div>
  351. </div>
  352. <div class="col-md-12">
  353. <div class="amount_data amountDiv">
  354. <span>Available Limit: <span id="availableAmountDetails" runat="server"></span></span>
  355. </div>
  356. </div>
  357. <div id="divLoad" style="position: absolute; left: 450px; top: 250px; background-color: black; border: 1px solid black; display: none;">
  358. Processing...
  359. </div>
  360. <section>
  361. <asp:HiddenField ID="hdnOfacRes" runat="server" />
  362. <asp:HiddenField ID="hdnOfacReason" runat="server" />
  363. <input type="hidden" id="hdnPayMode" runat="server" />
  364. <input type="hidden" id="hdntranCount" runat="server" />
  365. <asp:HiddenField ID="hdnLimitAmount" runat="server" />
  366. <asp:HiddenField ID="hdnAgentRefId" runat="server" />
  367. <asp:HiddenField ID="hdnBeneficiaryIdReq" runat="server" />
  368. <asp:HiddenField ID="hdnBeneficiaryContactReq" runat="server" />
  369. <asp:HiddenField ID="hdnRelationshipReq" runat="server" />
  370. <input type="hidden" id="confirmHidden" />
  371. <input type="hidden" id="confirmHiddenChrome" />
  372. <asp:HiddenField ID="hddPayoutPartner" runat="server" />
  373. <asp:HiddenField ID="hddTPExRate" runat="server" />
  374. <asp:HiddenField ID="hddImgURL" runat="server" />
  375. <asp:HiddenField ID="isDisplaySignature" runat="server" />
  376. <input type="hidden" id="scDiscount" name="scDiscount" />
  377. <input type="hidden" id="exRateOffer" value="exRateOffer" />
  378. <div class="wizard" id="divStep1">
  379. <div class="wizard-inner">
  380. <div class="connecting-line"></div>
  381. <ul class="nav nav-tabs" role="tablist">
  382. <li role="presentation" class="active" id="tab1">
  383. <a href="#step1" data-toggle="tab" aria-controls="step1" id="firstTab" role="tab" title="Sender Information">
  384. <span class="round-tab">
  385. <i class="fa fa-user" aria-hidden="true"></i>
  386. </span>
  387. </a>
  388. </li>
  389. <li role="presentation" class="disabled disableThisOnClearData" id="tab2">
  390. <a href="#step2" data-toggle="tab" aria-controls="step2" role="tab" class="otherTab" title="Receiver Information">
  391. <span class="round-tab">
  392. <i class="fa fa-user" aria-hidden="true"></i>
  393. </span>
  394. </a>
  395. </li>
  396. <li role="presentation" class="disabled disableThisOnClearData" id="tab3">
  397. <a href="#step3" data-toggle="tab" aria-controls="step3" role="tab" class="otherTab" title="Transaction Information">
  398. <span class="round-tab">
  399. <i class="fa fa-file-text-o" aria-hidden="true"></i>
  400. </span>
  401. </a>
  402. </li>
  403. <li role="presentation" class="disabled disableThisOnClearData" id="tab4">
  404. <a href="#step4" data-toggle="tab" aria-controls="step4" role="tab" class="otherTab" title="Customer Due Diligence Information -(CDDI)">
  405. <span class="round-tab">
  406. <i class="fa fa-check" aria-hidden="true"></i>
  407. </span>
  408. </a>
  409. </li>
  410. <li role="presentation" class="disabled disableThisOnClearData" id="tab5">
  411. <a href="#ContentPlaceHolder1_complete" data-toggle="tab" aria-controls="complete" role="tab" class="otherTab" title="Sending Money Information">
  412. <span class="round-tab">
  413. <i class="fa fa-check" aria-hidden="true"></i>
  414. </span>
  415. </a>
  416. </li>
  417. </ul>
  418. </div>
  419. <div class="tab-content">
  420. <div class="tab-pane active" role="tabpanel" id="step1">
  421. <div class="panel panel-default" style="margin-top: 10px;">
  422. <div class="panel-body">
  423. <div class="row">
  424. <div class="col-md-4 form-group">
  425. <asp:DropDownList ID="ddlCustomerType" runat="server" CssClass="form-control disableOnValidFirstTab" Style="margin-bottom: 5px;">
  426. </asp:DropDownList>
  427. </div>
  428. <div class="col-md-4 form-group">
  429. <uc1:SwiftTextBox ID="txtSearchData" runat="server" Category="remit-searchCustomer" CssClass="form-control disableOnValidFirstTab" Param1="@GetCustomerSearchType()" Title="Blank for All" />
  430. </div>
  431. <div class="col-md-4 form-group">
  432. <%--<input name="button3" type="button" id="btnAdvSearch" onclick="PickSenderData('a');" class="btn btn-primary disableOnValidFirstTab" value="Advance Search" style="margin-bottom: 2px;" />--%>
  433. <input name="button4" type="button" id="btnClear" value="Clear" class="btn btn-clear" onclick="ClearAllCustomerInfo();" style="margin-bottom: 2px;" />
  434. </div>
  435. <div class="col-md-2" style="display: none;">
  436. <span>Country: </span>
  437. <asp:DropDownList ID="sCountry" runat="server" CssClass="form-control"></asp:DropDownList>
  438. </div>
  439. </div>
  440. </div>
  441. </div>
  442. <h3>Sender Information</h3>
  443. <div class="panel panel-default" style="margin-top: 10px;">
  444. <div class="panel-body">
  445. <div class="row">
  446. <div class="col-sm-4 form-group showOnIndividual">
  447. <label for="ContentPlaceHolder1_txtSendFirstName">First Name <span class="ErrMsg" id='txtSendFirstName_err'>*</span></label>
  448. <asp:TextBox ID="txtSendFirstName" placeholder="First Name" runat="server" CssClass="required SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this,'Sender First Name');"></asp:TextBox>
  449. </div>
  450. <div class="col-sm-4 form-group showOnIndividual">
  451. <label for="ContentPlaceHolder1_txtSendMidName">Middle Name</label>
  452. <asp:TextBox ID="txtSendMidName" runat="server" placeholder="Middle Name" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Middle Name');"></asp:TextBox>
  453. </div>
  454. <div class="col-sm-4 form-group showOnIndividual">
  455. <label for="ContentPlaceHolder1_txtSendLastName">Last Name</label>
  456. <asp:TextBox ID="txtSendLastName" runat="server" placeholder="Last Name" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Last Name');"></asp:TextBox>
  457. </div>
  458. <div class="col-sm-4 form-group">
  459. <label for="ContentPlaceHolder1_txtSendEmail">
  460. Email<asp:RegularExpressionValidator ID="rev1" runat="server" Display="Dynamic"
  461. ErrorMessage="Invalid Email Id!" ForeColor="Red" SetFocusOnError="True" ValidationGroup="send"
  462. ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="inv"
  463. ControlToValidate="txtSendEmail"></asp:RegularExpressionValidator></label>
  464. <asp:TextBox ID="txtSendEmail" runat="server" placeholder="Email" CssClass="LargeTextBox form-control readonlyOnCustomerSelect"></asp:TextBox>
  465. </div>
  466. <div class="col-sm-4 form-group">
  467. <label for="ContentPlaceHolder1_ddlSendCustomerType">Customer Type</label>
  468. <asp:DropDownList ID="ddlSendCustomerType" runat="server" onchange="ChangeCustomerType()" CssClass="SmallTextBox form-control readonlyOnCustomerSelect">
  469. </asp:DropDownList>
  470. </div>
  471. <div class="col-sm-4 form-group">
  472. <label for="txtSendPostal">Zip Code:<span class="ErrMsg" id=''>*</span></label>
  473. <asp:TextBox ID="txtSendPostal" runat="server" placeholder="Postal Code" CssClass="form-control required readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Postal Code');"></asp:TextBox>
  474. </div>
  475. <div class="col-sm-4 form-group">
  476. <label for="custLocationDDL">State:<span class="ErrMsg">*</span></label>
  477. <asp:DropDownList ID="custLocationDDL" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  478. </div>
  479. <div class="col-sm-4 form-group">
  480. <label for="sCustStreet">Street:<span runat="server" class="ErrMsg" id='sCustStreet_err'>*</span></label>
  481. <asp:TextBox ID="sCustStreet" runat="server" placeholder="Street" CssClass="required SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Street Name');"></asp:TextBox>
  482. </div>
  483. <div class="col-sm-4 form-group" id="tdSenCityLbl" runat="server">
  484. <label for="txtSendCity" runat="server" id="lblsCity">
  485. City<span runat="server" class="ErrMsg" id='txtSendCity_err'>*</span></label>
  486. <asp:TextBox ID="txtSendCity" runat="server" placeholder="City" CssClass="required form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender City');"></asp:TextBox>
  487. </div>
  488. <div class="col-sm-4 form-group hideOnIndividual">
  489. <label for="companyName">
  490. Company Name<span runat="server" class="ErrMsg" id='companyName_err'>*</span></label>
  491. <asp:TextBox ID="companyName" runat="server" placeholder="Company Name" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Company Name');"></asp:TextBox>
  492. </div>
  493. <div class="col-sm-4 form-group hideOnIndividual">
  494. <label for="exampleInputEmail1">
  495. Business Type<span runat="server" class="ErrMsg" id='Span2'>*</span></label>
  496. <asp:DropDownList ID="ddlEmpBusinessType" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  497. </div>
  498. <div class="col-sm-4 form-group">
  499. <label for="exampleInputEmail1">
  500. Mobile No<span runat="server" class="ErrMsg" id='txtSendMobile_err'>*</span></label>
  501. <asp:TextBox ID="txtSendMobile" runat="server" placeholder="Mobile Number" CssClass="required form-control readonlyOnCustomerSelect" MaxLength="16" onchange="CheckForMobileNumber(this, 'Receiver Mobile No.');"></asp:TextBox>
  502. </div>
  503. <div class="col-sm-4 form-group">
  504. <label for="txtSendTel">Sender Phone</label>
  505. <asp:TextBox ID="txtSendTel" runat="server" placeholder="Phone Number" CssClass="form-control readonlyOnCustomerSelect" onchange="CheckForPhoneNumber(this,'Sender Phone No.');" MaxLength="15"></asp:TextBox>
  506. </div>
  507. <div class="col-sm-4 form-group">
  508. <label for="exampleInputEmail1">
  509. Native Country<span class="ErrMsg" id='txtSendNativeCountry_err'>*</span></label>
  510. <asp:DropDownList ID="txtSendNativeCountry" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  511. </div>
  512. <div class="col-sm-4 form-group showOnIndividual" id="trOccupation" runat="server">
  513. <label for="exampleInputEmail1">
  514. Occupation<span runat="server" class="ErrMsg" id='occupation_err'>*</span></label>
  515. <asp:DropDownList ID="occupation" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  516. </div>
  517. <div class="col-sm-4 form-group showOnIndividual" id="trSalaryRange" runat="server">
  518. <label for="exampleInputEmail1">
  519. Monthly Income<%--<span runat="server" id="ddlSalary_err" class="ErrMsg">*</span>--%></label>
  520. <asp:DropDownList ID="ddlSalary" runat="server" CssClass="form-control readonlyOnCustomerSelect">
  521. <asp:ListItem Value="">Select</asp:ListItem>
  522. <asp:ListItem>JPY 0 - JPY1,700,000</asp:ListItem>
  523. <asp:ListItem>JPY1,700,000 - JPY3,400,000</asp:ListItem>
  524. <asp:ListItem>JPY3,400,000 - JPY6,800,000</asp:ListItem>
  525. <asp:ListItem>JPY6,800,000 - JPY13,000,000</asp:ListItem>
  526. <asp:ListItem>Above JPY13,000,000</asp:ListItem>
  527. </asp:DropDownList>
  528. </div>
  529. <div class="col-sm-4 form-group showOnIndividual">
  530. <label for="exampleInputEmail1">Gender</label>
  531. <asp:DropDownList ID="ddlSenGender" runat="server" CssClass="form-control readonlyOnCustomerSelect">
  532. <asp:ListItem Value="">Select</asp:ListItem>
  533. <asp:ListItem Value="Male">Male</asp:ListItem>
  534. <asp:ListItem Value="Female">Female</asp:ListItem>
  535. </asp:DropDownList>
  536. </div>
  537. <div class="col-sm-4 form-group showOnIndividual">
  538. <label for="exampleInputEmail1">
  539. Date Of Birth<span runat="server" class="ErrMsg" id='txtSendDOB_err'>*</span></label>
  540. <asp:TextBox ID="txtSendDOB" runat="server" ReadOnly="true" CssClass="form-control readonlyOnCustomerSelect" placeholder="YYYY/MM/DD"></asp:TextBox>
  541. </div>
  542. <div class="col-sm-4 form-group">
  543. <label for="exampleInputEmail1">
  544. Issued Date<span runat="server" class="ErrMsg" id="Span1">*</span></label>
  545. <asp:TextBox ID="txtSendIdExpireDate" onchange="return DateValidation('txtSendIdExpireDate','i')" MaxLength="10" runat="server" placeholder="YYYY/MM/DD" CssClass="required form-control readonlyOnCustomerSelect"></asp:TextBox>
  546. <asp:RangeValidator ID="RangeValidator3" runat="server"
  547. ControlToValidate="txtSendIdExpireDate"
  548. MaximumValue="12/31/2100"
  549. MinimumValue="01/01/1900"
  550. Type="Date"
  551. ForeColor="Red"
  552. ErrorMessage="Invalid date!"
  553. ValidationGroup="customer"
  554. CssClass="inv"
  555. SetFocusOnError="true"
  556. Display="Dynamic"> </asp:RangeValidator>
  557. </div>
  558. <div class="col-sm-4 form-group" id="tdSenExpDateLbl" runat="server">
  559. <label for="exampleInputEmail1">
  560. Expire Date<span runat="server" class="ErrMsg" id='txtSendIdValidDate_err'>*</span></label>
  561. <asp:TextBox ID="txtSendIdValidDate" onchange="return DateValidation('txtSendIdValidDate')" MaxLength="10" runat="server" placeholder="YYYY/MM/DD" CssClass="required form-control readonlyOnCustomerSelect"></asp:TextBox>
  562. <asp:RangeValidator ID="RangeValidator2" runat="server"
  563. ControlToValidate="txtSendIdValidDate"
  564. MaximumValue="12/31/2100"
  565. MinimumValue="01/01/1900"
  566. Type="Date"
  567. ForeColor="Red"
  568. ErrorMessage="Invalid date!"
  569. ValidationGroup="customer"
  570. CssClass="inv"
  571. SetFocusOnError="true"
  572. Display="Dynamic"> </asp:RangeValidator>
  573. </div>
  574. <div class="col-sm-4 form-group" id="trSenId" runat="server" valign="bottom">
  575. <label for="ddSenIdType" runat="server" id="Label1">
  576. ID Type<span runat="server" class="ErrMsg" id='ddSenIdType_err'>*</span></label>
  577. <asp:DropDownList ID="ddSenIdType" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  578. </div>
  579. <div class="col-sm-4 form-group">
  580. <label for="companyName">
  581. ID Number<span runat="server" class="ErrMsg" id='txtSendIdNo_err'>*</span></label>
  582. <asp:TextBox ID="txtSendIdNo" placeholder="ID Number" MaxLength="14" runat="server" CssClass="form-control required" onblur="CheckSenderIdNumber(this);" Style="width: 100%;"></asp:TextBox>
  583. </div>
  584. <div style="display:none" class="col-sm-4 form-group hideOnIndividual">
  585. <label for="exampleInputEmail1">
  586. Place Of Issue</label>
  587. <asp:DropDownList ID="ddlIdIssuedCountry" runat="server" CssClass="form-control readonlyOnCustomerSelect"></asp:DropDownList>
  588. </div>
  589. </div>
  590. </div>
  591. </div>
  592. <ul class="list-inline pull-right">
  593. <li>
  594. <button type="button" id="senderDetails" class="btn btn-primary next-step" data-i="1">Save and continue</button>
  595. </li>
  596. </ul>
  597. </div>
  598. <div class="tab-pane" role="tabpanel" id="step2">
  599. <h3>Receiver Information</h3>
  600. <div class="panel panel-default" style="margin-top: 10px;">
  601. <div class="panel-body">
  602. <div class="row">
  603. <div class="col-sm-4 form-group">
  604. <label for="exampleInputEmail1">Choose Receiver</label>
  605. <asp:DropDownList ID="ddlReceiver" runat="server" onchange="DDLReceiverOnChange();" CssClass="form-control"></asp:DropDownList>
  606. </div>
  607. </div>
  608. <div class="row">
  609. <div class="col-sm-4 form-group">
  610. <label for="exampleInputEmail1">First Name<span class="ErrMsg" id='txtRecFName_err'>*</span></label>
  611. <asp:TextBox ID="txtRecFName" runat="server" placeholder="First Name" CssClass="required SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver First Name');"></asp:TextBox>
  612. </div>
  613. <div class="col-sm-4 form-group">
  614. <label for="exampleInputEmail1">Middle Name</label>
  615. <asp:TextBox ID="txtRecMName" runat="server" placeholder="Middle Name" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Middle Name');"></asp:TextBox>
  616. </div>
  617. <div class="col-sm-4 form-group">
  618. <label for="exampleInputEmail1">Last Name</label>
  619. <asp:TextBox ID="txtRecLName" runat="server" placeholder="Last Name" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Last Name');"></asp:TextBox>
  620. </div>
  621. <div class="col-sm-4 form-group">
  622. <label for="exampleInputEmail1">
  623. Address<span runat="server" class="ErrMsg" id='txtRecAdd1_err'>*</span></label>
  624. <asp:TextBox ID="txtRecAdd1" runat="server" placeholder="Receiver Address" CssClass="required form-control"></asp:TextBox>
  625. </div>
  626. <div class="col-sm-4 form-group" id="trRecContactNo" runat="server">
  627. <label for="exampleInputEmail1">
  628. Mobile No. <span runat="server" class="ErrMsg" id='txtRecMobile_err'>*</span></label>
  629. <asp:TextBox ID="txtRecMobile" runat="server" MaxLength="16" placeholder="Mobile Number" CssClass="required form-control" onchange="CheckForMobileNumber(this, 'Receiver Mobile No.');"></asp:TextBox>
  630. </div>
  631. <div class="col-sm-4 form-group" id="Div1" runat="server">
  632. <label for="exampleInputEmail1">Phone No.</label>
  633. <asp:TextBox ID="txtRecTel" runat="server" placeholder="Phone Number" CssClass="form-control readonlyOnReceiverSelect" MaxLength="15" onchange="CheckForPhoneNumber(this, 'Receiver Tel. No.');"></asp:TextBox>
  634. </div>
  635. <div class="col-sm-4 form-group trRecId" id="trRecId" runat="server">
  636. <label for="ddlRecIdType">
  637. ID Type <span runat="server" class="ErrMsg" id='ddlRecIdType_err'>*</span></label>
  638. <asp:DropDownList ID="ddlRecIdType" runat="server" CssClass="form-control readonlyOnReceiverSelect"></asp:DropDownList>
  639. </div>
  640. <div class="col-sm-4 form-group trRecId" id="trRecId1" runat="server">
  641. <label for="exampleInputEmail1">
  642. ID No.<span runat="server" class="ErrMsg" id='txtRecIdNo_err'>*</span></label>
  643. <asp:TextBox ID="txtRecIdNo" runat="server" placeholder="ID Number" CssClass="form-control readonlyOnReceiverSelect" disabled="disabled" onblur="CheckForSpecialCharacter(this, 'Receiver ID Number');"></asp:TextBox>
  644. </div>
  645. <div class="col-sm-4 form-group" style="display: none">
  646. <label for="exampleInputEmail1">Gender</label>
  647. <asp:DropDownList ID="ddlRecGender" runat="server" CssClass="form-control readonlyOnReceiverSelect">
  648. <asp:ListItem Value="">SELECT</asp:ListItem>
  649. <asp:ListItem Value="Male">Male</asp:ListItem>
  650. <asp:ListItem Value="Female">Female</asp:ListItem>
  651. </asp:DropDownList>
  652. </div>
  653. <div class="col-sm-4 form-group" id="tdRecCityLbl" runat="server" hidden>
  654. <label for="ddlRecIdType">
  655. City <span runat="server" class="ErrMsg" id='txtRecCity_err'>*</span></label>
  656. <asp:TextBox ID="txtRecCity" placeholder="Receiver City" runat="server" CssClass="form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver City');"></asp:TextBox>
  657. </div>
  658. <%--<div class="col-sm-4 form-group" id="tdRecDobLbl" runat="server" hidden>
  659. <label for="exampleInputEmail1">
  660. DOB <span runat="server" class="ErrMsg" id='txtRecDOB_err'>*</span></label>
  661. <asp:TextBox ID="txtRecDOB" runat="server" CssClass="form-control" ReadOnly="true" placeholder="YYYY/MM/DD"></asp:TextBox>
  662. </div>--%>
  663. <div class="col-sm-4 form-group">
  664. <label for="exampleInputEmail1">
  665. Email
  666. <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
  667. ErrorMessage="Invalid Email Id!" ForeColor="Red" SetFocusOnError="True" ValidationGroup="send"
  668. ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="inv"
  669. ControlToValidate="txtRecEmail"></asp:RegularExpressionValidator></label>
  670. <asp:TextBox ID="txtRecEmail" runat="server" placeholder="Email" CssClass="LargeTextBox form-control readonlyOnReceiverSelect"></asp:TextBox>
  671. </div>
  672. </div>
  673. </div>
  674. </div>
  675. <ul class="list-inline pull-right">
  676. <li>
  677. <button type="button" id="" class="btn btn-default prev-step">Previous</button>
  678. </li>
  679. <li>
  680. <button id="receiverDetails" type="button" class="btn btn-primary next-step" data-i="2">Save and continue</button>
  681. </li>
  682. </ul>
  683. </div>
  684. <div class="tab-pane" role="tabpanel" id="step3">
  685. <h3>Transaction Information</h3>
  686. <div class="panel panel-default" style="margin-top: 10px;">
  687. <div class="panel-body">
  688. <div class="row">
  689. <div class="col-sm-8 form-group">
  690. <label for="exampleInputEmail1">Collection Mode</label>
  691. <div id="collModeTd" runat="server"></div>
  692. </div>
  693. </div>
  694. <div class="row">
  695. <div class="col-sm-4 form-group">
  696. <label for="exampleInputEmail1">Receiving Country <span class="ErrMsg" id="pCountry_err">*</span></label>
  697. <asp:DropDownList ID="pCountry" runat="server" CssClass="required form-control"></asp:DropDownList>
  698. </div>
  699. <div class="col-sm-4 form-group">
  700. <label for="exampleInputEmail1">Receiving Mode <span class="ErrMsg">*</span></label>
  701. <asp:DropDownList ID="pMode" runat="server" CssClass="required form-control" AutoPostBack="false"></asp:DropDownList>
  702. </div>
  703. <asp:UpdatePanel ID="UpdatePanel2" runat="server">
  704. <ContentTemplate>
  705. <div class="col-sm-4 form-group">
  706. <label for="exampleInputEmail1">Agent/Bank <span class="ErrMsg" id="pAgent_err">*</span></label>
  707. <asp:DropDownList ID="pAgent" runat="server" CssClass="required form-control"></asp:DropDownList>
  708. <asp:DropDownList ID="pAgentDetail" runat="server" CssClass="form-control" Style="display: none;"></asp:DropDownList>
  709. <asp:DropDownList ID="pAgentMaxPayoutLimit" runat="server" CssClass="form-control" Style="display: none;"></asp:DropDownList>
  710. <span id="hdnreqAgent" style="display: none"></span>
  711. <input type="hidden" id="hdnBankType" />
  712. </div>
  713. </ContentTemplate>
  714. </asp:UpdatePanel>
  715. <div class="col-sm-4 form-group" id="divBankBranch">
  716. <label for="branch">Branch <span class="ErrMsg">*</span></label>
  717. <div id="ddlAgentBranch">
  718. <select id="branch" runat="server" class="form-control">
  719. <option value="">SELECT BRANCH</option>
  720. </select>
  721. </div>
  722. <input type="hidden" id="txtpBranch_aValue" class="form-control" />
  723. <span id="hdnreqBranch" style="display: none"></span><span class="ErrMsg" id="reqBranch" style="display: none"></span>
  724. <div id="divBranchMsg" style="display: none;" class="note"></div>
  725. </div>
  726. <div class="col-sm-4 form-group" id="trAccno" style="display: none;">
  727. <label for="exampleInputEmail1">Bank Account No <span id="txtRecDepAcNo_err" class="ErrMsg">*</span></label>
  728. <asp:TextBox ID="txtRecDepAcNo" runat="server" CssClass="form-control" onblur="CheckForSpecialCharacter(this, 'Receiver Acc No.');"></asp:TextBox>
  729. </div>
  730. <div class="col-sm-4 form-group">
  731. <label for="exampleInputEmail1">Payout Currency <span class="ErrMsg">*</span></label>
  732. <select id="pCurrDdl" runat="server" class="required form-control" onchange="CalculateTxn();"></select>
  733. </div>
  734. <div class="col-sm-4 form-group">
  735. <label for="exampleInputEmail1">State <span class="ErrMsg">*</span></label>
  736. <asp:DropDownList ID="locationDDL" runat="server" CssClass="form-control"></asp:DropDownList>
  737. </div>
  738. <div class="col-sm-4 form-group" id="subLocation">
  739. <label for="exampleInputEmail1">City <span class="ErrMsg">*</span></label>
  740. <asp:DropDownList ID="subLocationDDL" runat="server" CssClass="form-control"></asp:DropDownList>
  741. </div>
  742. <div class="col-sm-4 form-group" hidden>
  743. <label for="exampleInputEmail1">Introducer (If Any)</label>
  744. <asp:TextBox runat="server" CssClass="form-control" ID="introducerTxt" placeholder="Introducer (If Any)"></asp:TextBox>
  745. </div>
  746. <div class="col-sm-4 form-group">
  747. <label for="exampleInputEmail1">Collection Amount <span class="ErrMsg" id='txtCollAmt_err'>*</span></label>
  748. <div class="input-group m-b">
  749. <asp:TextBox ID="txtCollAmt" runat="server" CssClass="required BigAmountField form-control" Style="font-size: 16px; font-weight: bold; padding: 2px;"></asp:TextBox>
  750. <span class="input-group-addon">
  751. <asp:Label ID="lblCollCurr" runat="server" Text="JPY" class="amountLabel" Style="display: none"></asp:Label>
  752. (Max Limit: <u><b>
  753. <asp:Label ID="lblPerTxnLimit" runat="server" Text="0.00"></asp:Label></b></u>)&nbsp;
  754. <asp:Label ID="lblPerTxnLimitCurr" runat="server">JPY</asp:Label>
  755. </span>
  756. </div>
  757. </div>
  758. <div class="col-sm-4 form-group">
  759. <label for="exampleInputEmail1">Sending Amount</label><br />
  760. <div class="input-group m-b">
  761. <asp:TextBox ID="lblSendAmt" runat="server" Text="0.00" class="amountLabel form-control disabled" disabled="disabled"></asp:TextBox>
  762. <span class="input-group-addon">
  763. <asp:Label ID="lblSendCurr" runat="server" Text="MYR" class="amountLabel"></asp:Label>
  764. </span>
  765. </div>
  766. </div>
  767. <div class="col-sm-4 form-group">
  768. <label for="exampleInputEmail1">
  769. Service Charge:&nbsp;
  770. </label>
  771. <div class="input-group m-b">
  772. <asp:TextBox ID="lblServiceChargeAmt" runat="server" Text="0" class="form-control" onblur="return ReCalculate();"></asp:TextBox>
  773. <span class="input-group-addon">
  774. <asp:Label ID="lblServiceChargeCurr" runat="server" Text="JPY" class="amountLabel"></asp:Label>
  775. </span>
  776. </div>
  777. </div>
  778. <div class="col-sm-4 form-group">
  779. <label for="exampleInputEmail1">Payout Amount <span class="ErrMsg">*</span></label>
  780. <div class="input-group m-b">
  781. <asp:TextBox ID="txtPayAmt" runat="server" Enabled="false" CssClass="required BigAmountField disabled form-control"></asp:TextBox>
  782. <span class="input-group-addon">
  783. <asp:Label ID="lblPayCurr" runat="server" Text="" class="amountLabel"></asp:Label>
  784. <i class="fa fa-refresh btn btn-sm btn-primary" onclick="ChangeCalcBy()"></i>
  785. </span>
  786. </div>
  787. </div>
  788. <div class="col-sm-4 form-group">
  789. <label for="exampleInputEmail1">Customer Rate</label>
  790. <div class="input-group m-b">
  791. <asp:TextBox ID="lblExRate" runat="server" Text="0.00" class="amountLabel form-control disabled" disabled="disabled"></asp:TextBox>
  792. <span class="input-group-addon">
  793. <asp:Label ID="lblExCurr" runat="server" Text="" class="amountLabel"></asp:Label>
  794. </span>
  795. </div>
  796. </div>
  797. <div class="col-md-12 displayPayerInfo">
  798. <div class="col-md-6">
  799. <div class="col-sm-2">
  800. <label for="payerText">Payer :</label>
  801. </div>
  802. <div class="col-sm-10">
  803. <b><span runat="server" id="payerText"></span></b>
  804. </div>
  805. </div>
  806. <div class="col-md-6">
  807. <div class="col-sm-3">
  808. <label for="payerBranchText">Payer Branch :</label>
  809. </div>
  810. <div class="col-sm-9">
  811. <b><span runat="server" id="payerBranchText"></span></b>
  812. </div>
  813. </div>
  814. </div>
  815. <div class="col-md-12">
  816. <span id="spnWarningMsg" style="font-size: 13px; font-family: Verdana; font-weight: bold; color: Red;"></span>
  817. </div>
  818. <div class="col-md-12">
  819. <input type="button" id="btnCalcClean" value="Clear" class="btn btn-primary" />
  820. <input type="hidden" id="finalAgentId" />
  821. <span id="finalSenderId" style="display: none"></span>
  822. <input type="hidden" id="txtCustomerLimit" runat="server" value="0" />
  823. <asp:HiddenField ID="txnPerDayCustomerLimit" runat="server" Value="0" />
  824. <input type="hidden" id="hdnInvoicePrintMethod" />
  825. </div>
  826. <div class="col-md-12" align="center" style="display: none">
  827. <span id="span_txnInfo" align="center" runat="server" style="font-size: 15px; color: #FFFFFF; background-color: #333333; line-height: 15px; vertical-align: middle; text-align: center; font-weight: bold;"></span>
  828. </div>
  829. <div class="col-md-12" style="display: none">
  830. <span id="spnPayoutLimitInfo" style="color: red; font-size: 16px; font-weight: bold;"></span>
  831. </div>
  832. </div>
  833. </div>
  834. </div>
  835. <ul class="list-inline pull-right">
  836. <li>
  837. <button type="button" id="backToReceiver" class="btn btn-default prev-step">Previous</button>
  838. </li>
  839. <li>
  840. <button type="button" id="txnDetails" class="btn btn-primary btn-info-full next-step" data-i="3">Save and continue</button>
  841. </li>
  842. </ul>
  843. </div>
  844. <div class="tab-pane" role="tabpanel" id="step4">
  845. <h3>Customer Due Diligence Information -(CDDI)</h3>
  846. <div class="panel panel-default" style="margin-top: 10px;">
  847. <div class="panel-body">
  848. <div class="row">
  849. <div class="col-sm-4 form-group">
  850. <label for="exampleInputEmail1">
  851. Purpose of Remittance<span runat="server" class="ErrMsg" id='purpose_err'>*</span>
  852. </label>
  853. <asp:DropDownList ID="purpose" runat="server" CssClass="required form-control"></asp:DropDownList>
  854. </div>
  855. <div class="col-sm-4 form-group">
  856. <label for="exampleInputEmail1">
  857. Relationship with Receiver<span runat="server" class="ErrMsg" id='relationship_err'>*</span>
  858. </label>
  859. <asp:DropDownList ID="relationship" runat="server" CssClass="required form-control"></asp:DropDownList>
  860. </div>
  861. <div class="col-sm-4 form-group">
  862. <label for="exampleInputEmail1">
  863. Source of Fund<span runat="server" class="ErrMsg" id='sourceOfFund_err'>*</span>
  864. </label>
  865. <asp:DropDownList ID="sourceOfFund" runat="server" CssClass="required form-control"></asp:DropDownList>
  866. </div>
  867. <div class="col-md-12 form-group">
  868. <label for="exampleInputEmail1">Message to Receiver</label>
  869. <asp:TextBox ID="txtPayMsg" runat="server" CssClass="LargeTextBox form-control" TextMode="MultiLine" onblur="CheckForSpecialCharacter(this, 'Message to Receiver');"></asp:TextBox>
  870. </div>
  871. </div>
  872. </div>
  873. </div>
  874. <ul class="list-inline pull-right">
  875. <li>
  876. <button type="button" id="backToTxnDetails" class="btn btn-default prev-step">Previous</button>
  877. </li>
  878. <li>
  879. <button type="button" class="btn btn-primary btn-info-full verifyTxn" data-i="4" id="jmeContinueSign">Save and continue</button>
  880. </li>
  881. </ul>
  882. </div>
  883. <div class="tab-pane" runat="server" role="tabpanel" id="complete">
  884. <h3>Sending Money Information</h3>
  885. <div class="panel panel-default" style="margin-top: 10px;">
  886. <div class="panel-body">
  887. <div class="row">
  888. <div class="col-md-6">
  889. <div class="panel panel-default">
  890. <div class="panel-heading">
  891. <h4 class="panel-title">Sender Information</h4>
  892. </div>
  893. <div class="panel-body complete">
  894. <div class="row">
  895. <div class="col-md-4 form-group">
  896. <label>Sender's Name:</label>
  897. </div>
  898. <div class="col-md-8 form-group">
  899. <label id="txtSenderName"></label>
  900. </div>
  901. <div class="col-md-4 form-group">
  902. <label>Address:</label>
  903. </div>
  904. <div class="col-md-8 form-group">
  905. <label id="txtSenderAddress"></label>
  906. </div>
  907. <div class="col-md-4 form-group">
  908. <label>Id Type</label>
  909. </div>
  910. <div class="col-md-8 form-group">
  911. <label id="senderIdType">Id Type:</label>
  912. </div>
  913. <div class="col-md-4 form-group">
  914. <label>Id No:</label>
  915. </div>
  916. <div class="col-md-8 form-group">
  917. <label id="txtSenderIdNumber"></label>
  918. </div>
  919. <div class="col-md-4 form-group">
  920. <label>ID Expiry Date:</label>
  921. </div>
  922. <div class="col-md-8 form-group">
  923. <label id="txtSenderIdExpiryDate"></label>
  924. </div>
  925. <div class="col-md-4 form-group">
  926. <label>DOB:</label>
  927. </div>
  928. <div class="col-md-8 form-group">
  929. <label id="txtSenderDob"></label>
  930. </div>
  931. <div class="col-md-4 form-group">
  932. <label>City:</label>
  933. </div>
  934. <div class="col-md-8 form-group">
  935. <label id="txtSenderCity"></label>
  936. </div>
  937. <div class="col-md-4 form-group">
  938. <label>Country:</label>
  939. </div>
  940. <div class="col-md-8 form-group">
  941. <label id="txtSenderCountry"></label>
  942. </div>
  943. <div class="col-md-4 form-group">
  944. <label>Email:</label>
  945. </div>
  946. <div class="col-md-8 form-group">
  947. <label id="txtSenderEmail"></label>
  948. </div>
  949. <div class="col-md-4 form-group">
  950. <label>Contact No:</label>
  951. </div>
  952. <div class="col-md-8 form-group">
  953. <label id="txtSenderContactNo"></label>
  954. </div>
  955. </div>
  956. </div>
  957. </div>
  958. </div>
  959. <div class="col-md-6">
  960. <div class="panel panel-default">
  961. <div class="panel-heading">
  962. <h4 class="panel-title">Receiver Information</h4>
  963. </div>
  964. <div class="panel-body complete">
  965. <div class="row">
  966. <div class="col-md-4 form-group">
  967. <label>Receiver's Name:</label>
  968. </div>
  969. <div class="col-md-8 form-group">
  970. <label id="txtReceiverName"></label>
  971. </div>
  972. <div class="col-md-4 form-group">
  973. <label>Address:</label>
  974. </div>
  975. <div class="col-md-8 form-group">
  976. <label id="txtReceiverAddress"></label>
  977. </div>
  978. <div class="col-md-4 form-group">
  979. <label>Id Type:</label>
  980. </div>
  981. <div class="col-md-8 form-group">
  982. <label id="receiverIdType"></label>
  983. </div>
  984. <div class="col-md-4 form-group">
  985. <label>Id No:</label>
  986. </div>
  987. <div class="col-md-8 form-group">
  988. <label id="txtReceiverIdNumber"></label>
  989. </div>
  990. <div class="col-md-4 form-group">
  991. <label>Purpose of Remittance:</label>
  992. </div>
  993. <div class="col-md-8 form-group">
  994. <label id="por"></label>
  995. </div>
  996. <div class="col-md-4 form-group">
  997. <label>Relationship:</label>
  998. </div>
  999. <div class="col-md-8 form-group">
  1000. <label id="txnRelationship"></label>
  1001. </div>
  1002. <div class="col-md-4 form-group">
  1003. <label>Email:</label>
  1004. </div>
  1005. <div class="col-md-8 form-group">
  1006. <label id="txtReceiverEmail"></label>
  1007. </div>
  1008. <div class="col-md-4 form-group">
  1009. <label>Contact No:</label>
  1010. </div>
  1011. <div class="col-md-8 form-group">
  1012. <label id="txtReceiverContactNo"></label>
  1013. </div>
  1014. </div>
  1015. </div>
  1016. </div>
  1017. </div>
  1018. <div class="col-md-12">
  1019. <div class="panel panel-default">
  1020. <div class="panel-heading">
  1021. <h4 class="panel-title">Transaction Information</h4>
  1022. </div>
  1023. <div class="panel-body complete">
  1024. <div class="row">
  1025. <div class="col-md-2 form-group">
  1026. <label>Collection Amount:</label>
  1027. </div>
  1028. <div class="col-md-4 form-group">
  1029. <label id="txtCollAmtJpy"></label>
  1030. </div>
  1031. <div class="col-md-2 form-group">
  1032. <label>Sent Amount:</label>
  1033. </div>
  1034. <div class="col-md-4 form-group">
  1035. <label id="txtSentAmtJpy"></label>
  1036. </div>
  1037. <div class="col-md-2 form-group">
  1038. <label>Service Charge:</label>
  1039. </div>
  1040. <div class="col-md-4 form-group">
  1041. <label id="txtServiceCharge"></label>
  1042. </div>
  1043. <div class="col-md-2 form-group">
  1044. <label>Customer Rate:</label>
  1045. </div>
  1046. <div class="col-md-4 form-group">
  1047. <label id="txtCustomerRate"></label>
  1048. </div>
  1049. <div class="col-md-2 form-group">
  1050. <label>Payout Amount:</label>
  1051. </div>
  1052. <div class="col-md-4 form-group">
  1053. <label id="txtPayoutRate"></label>
  1054. </div>
  1055. </div>
  1056. </div>
  1057. </div>
  1058. </div>
  1059. <div class="col-md-12">
  1060. <div class="panel panel-default">
  1061. <div class="panel-heading">
  1062. <h4 class="panel-title">Payout Agent/Bank Information</h4>
  1063. </div>
  1064. <div class="panel-body complete">
  1065. <div class="row">
  1066. <div class="col-md-2 form-group">
  1067. <label>Country:</label>
  1068. </div>
  1069. <div class="col-md-4 form-group">
  1070. <label id="txtPCountry"></label>
  1071. </div>
  1072. <div class="col-md-2 form-group">
  1073. <label>Mode Of Payment:</label>
  1074. </div>
  1075. <div class="col-md-4 form-group">
  1076. <label id="txtModeOfPayment"></label>
  1077. </div>
  1078. <div class="col-md-2 form-group">
  1079. <label>Payout Agent/Location:</label>
  1080. </div>
  1081. <div class="col-md-4 form-group">
  1082. <label id="txtPayoutAgent"></label>
  1083. </div>
  1084. <div class="col-md-2 form-group payout-branch">
  1085. <label>Customer Branch:</label>
  1086. </div>
  1087. <div class="col-md-4 form-group payout-branch">
  1088. <label id="txtCustomerBranch"></label>
  1089. </div>
  1090. <div class="col-md-2 form-group">
  1091. <label>City:</label>
  1092. </div>
  1093. <div class="col-md-4 form-group">
  1094. <label id="txtReceiverCity"></label>
  1095. </div>
  1096. <div class="col-md-2 form-group">
  1097. <label>Country:</label>
  1098. </div>
  1099. <div class="col-md-4 form-group">
  1100. <label id="txtReceiverCountry"></label>
  1101. </div>
  1102. </div>
  1103. </div>
  1104. </div>
  1105. </div>
  1106. <div class="col-md-12" id="ofacField" style="display: none">
  1107. <div class="panel panel-default">
  1108. <div class="panel-heading">
  1109. <h4 class="panel-title">OFAC Information</h4>
  1110. </div>
  1111. <div>
  1112. <span id="ofacMsg" style="font-size: 13px; font-family: Verdana; font-weight: bold; color: Red;"></span>
  1113. </div>
  1114. <div class="panel-body">
  1115. <div class="row" id="ofacData">
  1116. </div>
  1117. <div>
  1118. <fieldset runat="server">
  1119. <legend style="background-color: red">Note: If are in compliance then you can not make the transaction !!!
  1120. </legend>
  1121. </fieldset>
  1122. </div>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. <div class="col-md-12" id="complinceField" style="display: none">
  1127. <div class="panel panel-default">
  1128. <div class="panel-heading">
  1129. <h4 class="panel-title">Complince Information</h4>
  1130. </div>
  1131. <div class="panel-body">
  1132. <div class="row" id="complinceData">
  1133. </div>
  1134. <fieldset id="Fieldset1" runat="server">
  1135. <legend style="background-color: red">Note: If are in compliance then you can not make the transaction !!!
  1136. </legend>
  1137. </fieldset>
  1138. </div>
  1139. </div>
  1140. </div>
  1141. <div class="col-md-12" id="reConfirmField">
  1142. <div class="col-sm-12" hidden>
  1143. <div class="form-inline">
  1144. <span>Txn. Password:</span> &nbsp; &nbsp;&nbsp;&nbsp;
  1145. <asp:TextBox ID="txnPassword" CssClass="form-control" placeholder="Enter Txn. Password" runat="server" Width="200px" TextMode="Password"></asp:TextBox>
  1146. &nbsp;&nbsp;(Note: Please use your login password to confirm the transaction)
  1147. </div>
  1148. </div>
  1149. <div id="EnableDigitalSignature" runat="server">
  1150. <div class="form-group">
  1151. <div class="col-sm-5" style="display:none">
  1152. <label class="control-label">Customer Password:</label>
  1153. <div>
  1154. <asp:TextBox TextMode="Password" ID="customerPassword" runat="server" CssClass="form-control" MaxLength="20"></asp:TextBox>
  1155. </div>
  1156. </div>
  1157. </div>
  1158. <div class="form-group">
  1159. <div class="col-sm-5">
  1160. <span>Customer Signature:</span>
  1161. <div id="signature-pad" class="signature-pad">
  1162. <div class="signature-pad--body">
  1163. <canvas></canvas>
  1164. </div>
  1165. <div class="signature-pad--footer">
  1166. <div class="description">Sign above</div>
  1167. <div class="signature-pad--actions">
  1168. <div>
  1169. <button type="button" class="btn btn-default clear" data-action="clear">Clear</button>
  1170. <button type="button" class="btn btn-default" data-action="undo">Undo</button>
  1171. </div>
  1172. </div>
  1173. </div>
  1174. </div>
  1175. </div>
  1176. </div>
  1177. </div>
  1178. <div class="col-sm-12" hidden>
  1179. <div class="form-group">
  1180. <label>Receipt Print Mode</label>
  1181. <asp:RadioButtonList ID="invoicePrintMode" CssClass="form-control" runat="server" RepeatDirection="Horizontal">
  1182. <asp:ListItem Value="s" style="margin-right: 10px">Single </asp:ListItem>
  1183. <asp:ListItem Value="d"> Double</asp:ListItem>
  1184. </asp:RadioButtonList>
  1185. </div>
  1186. </div>
  1187. <div class="col-sm-12">
  1188. <asp:UpdatePanel ID="updatePnl" runat="server">
  1189. <ContentTemplate>
  1190. <div class="table-responsive">
  1191. <table class="table">
  1192. <tr>
  1193. <td>
  1194. <asp:CheckBox ID="chkCdd" Visible="false" runat="server" Style="font-family: Verdana; font-weight: bold; font-size: 20px; color: red;"
  1195. Text="We have conducted Due Diligence by filling up CDD (Customer Due Diligence) Form with the customer details." AutoPostBack="true"
  1196. OnCheckedChanged="chkCdd_CheckedChanged" />
  1197. <br />
  1198. <asp:CheckBox ID="chkMultipleTxn" Visible="false" runat="server"
  1199. Style="font-family: Verdana; font-weight: bold; font-size: 24px; color: Red;"
  1200. Text="We have verified this sender's previous transaction and want to proceed this transaction."
  1201. AutoPostBack="true" OnCheckedChanged="chkMultipleTxn_CheckedChanged" />
  1202. </td>
  1203. </tr>
  1204. </table>
  1205. </div>
  1206. </ContentTemplate>
  1207. </asp:UpdatePanel>
  1208. </div>
  1209. </div>
  1210. </div>
  1211. </div>
  1212. <div class="clearfix"></div>
  1213. </div>
  1214. <ul class="list-inline pull-right">
  1215. <li>
  1216. <button type="button" id="backToCDDI" class="btn btn-default prev-step">Previous</button>
  1217. </li>
  1218. <li>
  1219. <input type="button" id="sendTran" runat="server" value="Send Txn" class="btn btn-primary btn-info-full" onclick="proceed()" />
  1220. <%--<asp:Button ty="button" ID="sendTran" runat="server" Text="Send Txn" CssClass="btn btn-primary btn-info-full" OnClientClick="return proceed()" />--%>
  1221. </li>
  1222. </ul>
  1223. </div>
  1224. </div>
  1225. </div>
  1226. </section>
  1227. <div class="container-fluid">
  1228. <div class="row">
  1229. <div class="col-md-12">
  1230. <div class="modal fade" id="myModal1" style="margin-top: 200px;" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  1231. <div class="modal-dialog modal-md" role="document">
  1232. <div class="modal-content">
  1233. <div class="modal-header" id="modelUserForSave">
  1234. <center> <h2 class="modal-title">Choose Payer Details<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></h2></center>
  1235. </div>
  1236. <div class="modal-body">
  1237. <div class="form-group">
  1238. <div class="col-md-4">
  1239. <label class="control-label">Payer Data :<span class="ErrMsg">*</span></label>
  1240. </div>
  1241. <div class="col-md-8">
  1242. <asp:DropDownList ID="ddlPayer" runat="server" CssClass="form-control"></asp:DropDownList>
  1243. </div>
  1244. </div>
  1245. <div class="form-group">
  1246. <div class="col-md-4">
  1247. <label class="control-label">Payer Branch : <span class="ErrMsg">*</span></label>
  1248. </div>
  1249. <div class="col-md-8">
  1250. <asp:DropDownList ID="ddlPayerBranch" runat="server" CssClass="form-control"></asp:DropDownList>
  1251. </div>
  1252. </div>
  1253. </div>
  1254. </div>
  1255. </div>
  1256. </div>
  1257. </div>
  1258. </div>
  1259. </div>
  1260. </div>
  1261. <!-- #region Tab View -->
  1262. <script src="../js/SendTxnTab/sendtxn.js" type="text/javascript"></script>
  1263. <script src="../js/SendTxnTab/CustomerSignature.js" type="text/javascript"></script>
  1264. <!-- #endregion -->
  1265. <!-- #region Signature -->
  1266. <!-- #endregion -->
  1267. <!-- #region Auto Complete -->
  1268. <script type="text/javascript">
  1269. function Autocomplete() {
  1270. $(".searchinput").autocomplete({
  1271. source: function (request, response) {
  1272. $.ajax({
  1273. type: "POST",
  1274. contentType: "application/json; charset=utf-8",
  1275. url: "../../../Autocomplete.asmx/GetAllCountry",
  1276. data: "{'keywordStartsWith': '" + request.term + "'}",
  1277. dataType: "json",
  1278. async: true,
  1279. success: function (data) {
  1280. response(
  1281. $.map(data.d, function (item) {
  1282. return {
  1283. value: item.Value,
  1284. key: item.Key
  1285. };
  1286. }));
  1287. window.parent.resizeIframe();
  1288. },
  1289. error: function (result) {
  1290. alert("Due to unexpected errors we were unable to load data");
  1291. }
  1292. });
  1293. },
  1294. minLength: 2
  1295. });
  1296. };
  1297. Autocomplete();
  1298. </script>
  1299. <!-- #endregion -->
  1300. <!-- #region Functions -->
  1301. <script type="text/javascript">
  1302. function DisabledAllTabs() {
  1303. $('.disableThisOnClearData').addClass('disabled');
  1304. }
  1305. function HideShowFieldsOnTxnTab() {
  1306. $('#subLocation').show();
  1307. $('#<%=subLocationDDL.ClientID%>').addClass('required');
  1308. $('#<%=locationDDL.ClientID%>').addClass('required');
  1309. var pmode = $("#<%=pMode.ClientID%>").val();
  1310. var partnerId = $("#<%=hddPayoutPartner.ClientID%>").val();
  1311. if (partnerId === apiPartnerIds[1]) {
  1312. $('#subLocation').hide();
  1313. $('#<%=locationDDL.ClientID%>').removeClass('required');
  1314. $('#<%=subLocationDDL.ClientID%>').removeClass('required');
  1315. }
  1316. if (partnerId === apiPartnerIds[0] || pmode === "2") {
  1317. $('#<%=branch.ClientID%>').addClass('required');
  1318. if ((partnerId === apiPartnerIds[0]) && pmode === "2") {
  1319. $('#agentBranchRequired').hide();
  1320. $('#<%=branch.ClientID%>').removeClass('required');
  1321. LoadPayerData();
  1322. }
  1323. $('#divBankBranch').show();
  1324. }
  1325. }
  1326. function CalcOnEnter(e) {
  1327. var evtobj = window.event ? event : e;
  1328. var charCode = e.which || e.keyCode;
  1329. if (charCode == 13) {
  1330. $("#btnCalculate").focus();
  1331. }
  1332. }
  1333. function AddNewReceiver(senderId) {
  1334. url = "" + "/AgentNew/Administration/CustomerSetup/Benificiar/Manage.aspx?customerId=" + senderId + "&AddType=s";
  1335. var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
  1336. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  1337. if (isChrome) {
  1338. PopUpWindow(url, param);
  1339. return true;
  1340. }
  1341. var id = PopUpWindow(url, param);
  1342. if (id == "undefined" || id == null || id == "") {
  1343. }
  1344. else {
  1345. PopulateReceiverDDL(senderId);
  1346. SearchReceiverDetails(id);
  1347. }
  1348. }
  1349. function PostMessageToParentAddReceiver(id) {
  1350. var senderId = $("#ContentPlaceHolder1_txtSearchData_aValue").val();
  1351. PopulateReceiverDDL(senderId);
  1352. SearchReceiverDetails(id);
  1353. SetDDLValueSelected("<%=ddlReceiver.ClientID%>", id);
  1354. }
  1355. function ChangeCalcBy() {
  1356. ClearCalculatedAmount();
  1357. if ($("#<%=txtPayAmt.ClientID%>").is(":disabled")) {
  1358. $('#<%=txtCollAmt.ClientID%>').attr('disabled', true);
  1359. $('#<%=txtPayAmt.ClientID%>').attr('disabled', false);
  1360. } else {
  1361. $('#<%=txtPayAmt.ClientID%>').attr('disabled', true);
  1362. $('#<%=txtCollAmt.ClientID%>').attr('disabled', false);
  1363. }
  1364. }
  1365. function ReCalculate() {
  1366. if (!$("#<%=lblServiceChargeAmt.ClientID%>").attr("readonly")) {
  1367. if (parseFloat($('#<%=lblServiceChargeAmt.ClientID%>').val()) >= 0) {
  1368. CalculateTxn($("#<%=txtCollAmt.ClientID%>").val(), 'cAmt', 'Y');
  1369. }
  1370. else {
  1371. alert('Service charge can not be negative!');
  1372. $('#<%=lblServiceChargeAmt.ClientID%>').val('0');
  1373. $('#<%=lblServiceChargeAmt.ClientID%>').focus();
  1374. }
  1375. }
  1376. }
  1377. function PickSenderData(obj) {
  1378. var url = "";
  1379. if (obj == "a") {
  1380. url = "" + "TxnHistory/SenderAdvanceSearch.aspx";
  1381. }
  1382. if (obj == "s") {
  1383. url = "" + "TxnHistory/SenderTxnHistory.aspx";
  1384. }
  1385. var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
  1386. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  1387. if (isChrome) {
  1388. PopUpWindow(url, param);
  1389. return true;
  1390. }
  1391. var id = PopUpWindow(url, param);
  1392. if (id == "undefined" || id == null || id == "") {
  1393. }
  1394. else {
  1395. ClearSearchField();
  1396. PopulateReceiverDDL(id);
  1397. SearchCustomerDetails(id);
  1398. }
  1399. }
  1400. function PickReceiverFromSender(obj) {
  1401. var senderId = $('#finalSenderId').text();
  1402. var sName = $('#senderName').text();
  1403. if (senderId == "" || senderId == "undefined") {
  1404. alert('Please select the Sender`s Details');
  1405. return;
  1406. }
  1407. var url = "";
  1408. if (obj === "a") {
  1409. return AddNewReceiver(senderId);
  1410. }
  1411. if (obj == "r") {
  1412. url = "" + "/AgentNew/SendTxn/TxnHistory/ReceiverHistoryBySender.aspx?sname=" + sName + "&senderId=" + senderId;
  1413. }
  1414. if (obj == "s") {
  1415. url = "" + "/AgentNew/SendTxn/TxnHistory/SenderAdvanceSearch.aspx?senderId=" + senderId;
  1416. }
  1417. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  1418. var res = PopUpWindow(url, param);
  1419. if (res == "undefined" || res == null || res == "") {
  1420. }
  1421. else {
  1422. SearchReceiverDetails(res);
  1423. }
  1424. }
  1425. function DDLReceiverOnChange() {
  1426. $('.readonlyOnReceiverSelect').attr("disabled", "disabled");
  1427. var receiverId = $("#<%=ddlReceiver.ClientID%>").val();
  1428. if (receiverId != '' && receiverId != undefined && receiverId != "0") {
  1429. SearchReceiverDetails(receiverId);
  1430. }
  1431. else if (receiverId == "0") {
  1432. PickReceiverFromSender('a');
  1433. }
  1434. else if (receiverId == null || receiverId == "") {
  1435. $('.readonlyOnReceiverSelect').removeAttr("disabled");
  1436. ClearReceiverData();
  1437. }
  1438. }
  1439. function SearchReceiverDetails(customerId) {
  1440. if (customerId == "" || customerId == null) {
  1441. ClearReceiverData();
  1442. alert('Invalid receiver selected!');
  1443. }
  1444. var dataToSend = { MethodName: 'SearchReceiver', customerId: customerId };
  1445. $.post('<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(), dataToSend, function (response) {
  1446. ParseResponseForReceiverData(response);
  1447. }).fail(function () {
  1448. });
  1449. return true;
  1450. }
  1451. function ParseResponseForReceiverData(response) {
  1452. ClearTxnData();
  1453. $('.readonlyOnReceiverSelect').attr("disabled", "disabled");
  1454. var data = jQuery.parseJSON(response);
  1455. CheckSession(data);
  1456. if (data[0].errorCode != "0") {
  1457. alert(data[0].msg);
  1458. return;
  1459. }
  1460. if (data.length > 0) {
  1461. debugger
  1462. //****Transaction Detail****
  1463. $("#receiverName").text(data[0].firstName + ' ' + data[0].middleName + ' ' + data[0].lastName1);
  1464. $("#<%=txtRecFName.ClientID %>").val(data[0].firstName);
  1465. $("#<%=txtRecMName.ClientID %>").val(data[0].middleName);
  1466. $("#<%=txtRecLName.ClientID %>").val(data[0].lastName1);
  1467. $("#<%=txtRecAdd1.ClientID %>").val(data[0].address);
  1468. $("#<%=txtRecCity.ClientID %>").val(data[0].city);
  1469. $("#<%=txtRecMobile.ClientID %>").val(data[0].mobile);
  1470. $("#<%=txtRecTel.ClientID %>").val(data[0].homePhone);
  1471. $("#<%=txtRecIdNo.ClientID %>").val(data[0].idNumber);
  1472. $("#<%=txtRecEmail.ClientID %>").val(data[0].email);
  1473. $("#<%=ddlRecGender.ClientID %>").val(data[0].gender);
  1474. SetDDLValueSelected("<%=ddlRecIdType.ClientID %>", data[0].idType);
  1475. SetDDLTextSelected("<%=ddlRecGender.ClientID %>", data[0].gender);
  1476. SetDDLValueSelected("<%=ddlReceiver.ClientID %>", data[0].receiverId);
  1477. if ($.isNumeric(data[0].purposeOfRemit)) {
  1478. SetDDLValueSelected("<%=purpose.ClientID %>", data[0].purposeOfRemit);
  1479. } else {
  1480. SetDDLTextSelected("<%=purpose.ClientID %>", data[0].purposeOfRemit);
  1481. }
  1482. if ($.isNumeric(data[0].relationship)) {
  1483. SetDDLValueSelected("<%=relationship.ClientID %>", data[0].relationship);
  1484. } else {
  1485. SetDDLTextSelected("<%=relationship.ClientID %>", data[0].relationship);
  1486. }
  1487. //****Transaction Detail****
  1488. SetDDLValueSelected("<%=pCountry.ClientID%>", data[0].COUNTRYID);
  1489. PcountryOnChange('c', data[0].paymentMethod.toUpperCase(), data[0].bankId);
  1490. //select bank branch
  1491. //if (data[0].paymentMethod.toUpperCase() == 'BANK DEPOSIT') {
  1492. // var isBranchByName = 'N';
  1493. // var branch = '';
  1494. //}
  1495. PopulateBankDetails(data[0].bankId, 2, 'N', data[0].branchId);
  1496. SetPayCurrency(data[0].COUNTRYID);
  1497. PAgentChange();
  1498. $('#<%=txtRecDepAcNo.ClientID%>').val(data[0].receiverAccountNo);
  1499. ManageHiddenFields(data[0].paymentMethod.toUpperCase());
  1500. $(".readonlyOnCustomerSelect").attr("disabled", "disabled");
  1501. $("#txtpBranch_aValue").val('');
  1502. $("#txtpBranch_aText").val('');
  1503. $("lblRemainingQuota").text('Reward Amount : ' + data[0].rewardPoints);
  1504. <%--if ($("#<%=pCountry.ClientID%> option:selected ").val() != "") {
  1505. PcountryOnChange('c', "");
  1506. SetPayCurrency($("#<%=pCountry.ClientID%>").val());
  1507. }--%>
  1508. ManageLocationData();
  1509. HideShowFieldsOnTxnTab();
  1510. }
  1511. }
  1512. function PopulateReceiverDDL(customerId) {
  1513. if (customerId == "" || customerId == null) {
  1514. alert('Invalid customer selected!');
  1515. }
  1516. var dataToSend = { MethodName: 'PopulateReceiverDDL', customerId: customerId };
  1517. $.post('<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(), dataToSend, function (response) {
  1518. PopulateReceiverDataDDL(response);
  1519. }).fail(function () {
  1520. alert("Error from pupulatereceiverDDL");
  1521. });
  1522. return true;
  1523. }
  1524. function PopulateReceiverDataDDL(response) {
  1525. var data = jQuery.parseJSON(response);
  1526. var ddl = GetElement("<%=ddlReceiver.ClientID%>");
  1527. $(ddl).empty();
  1528. var option = document.createElement("option");
  1529. option.text = 'Select Receiver';
  1530. option.value = '';
  1531. ddl.options.add(option);
  1532. for (var i = 0; i < data.length; i++) {
  1533. option = document.createElement("option");
  1534. option.text = data[i].fullName.toUpperCase();
  1535. option.value = data[i].receiverId;
  1536. try {
  1537. ddl.options.add(option);
  1538. }
  1539. catch (e) {
  1540. alert(e);
  1541. }
  1542. }
  1543. option = document.createElement("option");
  1544. option.text = 'New Receiver';
  1545. option.value = '0';
  1546. ddl.options.add(option);
  1547. }
  1548. function ClearSearchField() {
  1549. var d = ["", ""];
  1550. SetItem("<% =txtSearchData.ClientID%>", d);
  1551. <% = txtSearchData.InitFunction() %>;
  1552. }
  1553. function CheckForMobileNumber(nField, fieldName) {
  1554. var numberPattern = /^[+]?[0-9]{6,16}$/;
  1555. var maxLength = nField.maxLength;
  1556. test = numberPattern.test(nField.value);
  1557. if (!test) {
  1558. alert(fieldName + ' Is Not Valid ! Maximum ' + maxLength + ' Numeric Characters only valid ');
  1559. nField.value = '';
  1560. nField.focus();
  1561. return false
  1562. }
  1563. return true;
  1564. }
  1565. function CheckForPhoneNumber(nField, fieldName) {
  1566. var numberPattern = /^[+]?[0-9]{6,15}$/;
  1567. var maxLength = nField.maxLength;
  1568. test = numberPattern.test(nField.value);
  1569. if (!test) {
  1570. alert(fieldName + ' Is Not Valid ! Maximum ' + maxLength + ' Numeric Characters only valid ');
  1571. nField.value = '';
  1572. nField.focus();
  1573. return false
  1574. }
  1575. return true;
  1576. }
  1577. function CheckSession(data) {
  1578. if (data == undefined || data == "" || data == null)
  1579. return;
  1580. if (data[0].session_end == "1") {
  1581. document.location = "../../../Logout.aspx";
  1582. }
  1583. }
  1584. function ResetAmountFields() {
  1585. //Reset Fields
  1586. $("#<%=txtPayAmt.ClientID%>").val('');
  1587. $('#<%=txtPayAmt.ClientID%>').attr("readonly", false);
  1588. $("#<%=lblSendAmt.ClientID%>").text('0.00');
  1589. $("#<%=lblServiceChargeAmt.ClientID%>").val('0');
  1590. $("#<%=lblExRate.ClientID%>").text('0.00');
  1591. $("#lblDiscAmt").text('0.00');
  1592. $("#<%=lblPayCurr.ClientID%>").text('');
  1593. $('#spnWarningMsg').html('');
  1594. }
  1595. function checkdata(amt, obj) {
  1596. ClearCalculatedAmount();
  1597. if (amt > 0)
  1598. CalculateTxn(amt, obj);
  1599. else
  1600. ClearCalculatedAmount();
  1601. }
  1602. function ManageSendIdValidity() {
  1603. var senIdType = $("#<%=ddSenIdType.ClientID%>").val();
  1604. if (senIdType == "") {
  1605. $("#<%=tdSenExpDateLbl.ClientID%>").show();
  1606. $("#<%=txtSendIdValidDate.ClientID%>").attr("class", "required readonlyOnCustomerSelect form-control");
  1607. }
  1608. else {
  1609. var senIdTypeArr = senIdType.split('|');
  1610. if (senIdTypeArr[1] == "E") {
  1611. $("#<%=tdSenExpDateLbl.ClientID%>").show();
  1612. $("#<%=txtSendIdValidDate.ClientID%>").attr("class", "required readonlyOnCustomerSelect form-control");
  1613. }
  1614. else {
  1615. $("#<%=tdSenExpDateLbl.ClientID%>").hide();
  1616. $("#<%=txtSendIdValidDate.ClientID%>").attr("class", "readonlyOnCustomerSelect form-control");
  1617. }
  1618. }
  1619. }
  1620. function CheckSenderIdNumber(me) {
  1621. if (me.readOnly) {
  1622. $('#spnIdNumber').html('');
  1623. GetElement("spnIdNumber").style.display = "none";
  1624. return;
  1625. }
  1626. CheckForSpecialCharacter(me, 'Sender ID Number');
  1627. var sIdNo = me.value;
  1628. if (sIdNo === null || sIdNo === "") {
  1629. return;
  1630. }
  1631. var dataToSend = { MethodName: "CheckSenderIdNumber", sIdNo: sIdNo };
  1632. var options =
  1633. {
  1634. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1635. data: dataToSend,
  1636. dataType: 'JSON',
  1637. type: 'POST',
  1638. success: function (response) {
  1639. var data = jQuery.parseJSON(response);
  1640. if (data[0].errorCode != "0") {
  1641. $('#spnIdNumber').html(data[0].msg);
  1642. GetElement("spnIdNumber").style.display = "block";
  1643. }
  1644. else {
  1645. $('#spnIdNumber').html('');
  1646. GetElement("spnIdNumber").style.display = "none";
  1647. }
  1648. }
  1649. };
  1650. $.ajax(options);
  1651. }
  1652. function LoadCustomerRate() {
  1653. var pCountry = $("#<%=pCountry.ClientID%> option:selected").val();
  1654. var pMode = $('#<%=pMode.ClientID %> option:selected').val();
  1655. var pModeTxt = $('#<%=pMode.ClientID %> option:selected').text();
  1656. var pAgent = $("#<%=pAgent.ClientID%> option:selected").val();
  1657. if (pAgent === "undefined")
  1658. pAgent = null;
  1659. var collCurr = $('#<%=lblCollCurr.ClientID%>').text();
  1660. var dataToSend = {
  1661. MethodName: 'LoadCustomerRate', pCountry: pCountry, pMode: pMode, pAgent: pAgent, collCurr: collCurr
  1662. };
  1663. var options =
  1664. {
  1665. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1666. data: dataToSend,
  1667. dataType: 'JSON',
  1668. type: 'POST',
  1669. success: function (response) {
  1670. var data = response;
  1671. if (data == null || data == undefined || data == "")
  1672. return;
  1673. if (data[0].ErrCode != "0") {
  1674. $("#<%=lblExRate.ClientID%>").text(data[0].Msg);
  1675. return;
  1676. }
  1677. var exRate = data[0].exRate;
  1678. var pCurr = data[0].pCurr;
  1679. var limit = data[0].limit;
  1680. var limitCurr = data[0].limitCurr;
  1681. exRate = roundNumber(exRate, 10);
  1682. $("#<%=lblExRate.ClientID%>").text(exRate);
  1683. $("#<%=lblExCurr.ClientID%>").text(pCurr);
  1684. $("#<%=lblPerTxnLimit.ClientID%>").text(limit);
  1685. $("#<%=lblPerTxnLimitCurr.ClientID%>").text(limitCurr);
  1686. return;
  1687. }
  1688. };
  1689. $.ajax(options);
  1690. return true;
  1691. }
  1692. function CollAmtOnChange() {
  1693. var collAmt = $("#<%=txtCollAmt.ClientID%>").val();
  1694. if (collAmt == "")
  1695. collAmt = "0";
  1696. var collAmtFormatted = CurrencyFormatted(collAmt);
  1697. collAmtFormatted = CommaFormatted(collAmtFormatted);
  1698. var collCurr = $('#<%=lblCollCurr.ClientID%>').text();
  1699. if (collAmt == "0") {
  1700. ClearCalculatedAmount();
  1701. return;
  1702. }
  1703. checkdata(collAmt, 'cAmt');
  1704. }
  1705. function ClearCalculatedAmount() {
  1706. $("#<%=txtCollAmt.ClientID%>").val('');
  1707. $('#<%=lblSendAmt.ClientID%>').val(0);
  1708. $('#<%=lblServiceChargeAmt.ClientID%>').val(0);
  1709. $('#<%=lblExRate.ClientID%>').val(0);
  1710. $('#<%=txtPayAmt.ClientID%>').val('');
  1711. }
  1712. function ClearAllCustomerInfo() {
  1713. location.reload();
  1714. }
  1715. function LoadLocationDDL(response) {
  1716. var data = response;
  1717. var ddl = GetElement("<%=locationDDL.ClientID %>");
  1718. $(ddl).empty();
  1719. $('#<%=subLocationDDL.ClientID%>').empty();
  1720. var option;
  1721. option = document.createElement("option");
  1722. for (var i = 0; i < data.length; i++) {
  1723. option = document.createElement("option");
  1724. option.text = data[i].LOCATIONNAME;
  1725. option.value = data[i].LOCATIONID;
  1726. try {
  1727. ddl.options.add(option);
  1728. }
  1729. catch (e) {
  1730. alert(e);
  1731. }
  1732. }
  1733. }
  1734. function ManageLocationData() {
  1735. var pCountry = $('#<%=pCountry.ClientID%> :selected').text();
  1736. var pMode = $('#<%=pMode.ClientID%>').val();
  1737. var payoutPartnerId = $('#<%=hddPayoutPartner.ClientID%>').val();
  1738. if (pCountry == '151') {
  1739. $('#<%=locationDDL.ClientID%>').empty();
  1740. $('#<%=subLocationDDL.ClientID%>').empty();
  1741. return;
  1742. }
  1743. var dataToSend = { MethodName: 'getLocation', PCountry: pCountry, PMode: pMode, PartnerId: payoutPartnerId };
  1744. var options = {
  1745. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  1746. data: dataToSend,
  1747. dataType: 'JSON',
  1748. type: 'POST',
  1749. success:
  1750. function (response) {
  1751. LoadLocationDDL(response);
  1752. },
  1753. error: function (result) {
  1754. alert("Due to unexpected errors we were unable to load data");
  1755. }
  1756. };
  1757. $.ajax(options);
  1758. }
  1759. function GetPayoutPartner(payMode) {
  1760. var pCountry = $('#<%=pCountry.ClientID%>').val();
  1761. var pMode = $('#<%=pMode.ClientID%>').val();
  1762. var dataToSend = { MethodName: 'getPayoutPartner', PCountry: pCountry, PMode: pMode };
  1763. var options = {
  1764. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  1765. data: dataToSend,
  1766. dataType: 'JSON',
  1767. type: 'POST',
  1768. async: false,
  1769. success:
  1770. function (response) {
  1771. var datas = response;
  1772. var agentId = "";
  1773. if (datas.length > 0) {
  1774. agentId = datas[0].agentId;
  1775. }
  1776. $('#<%=hddPayoutPartner.ClientID%>').val(agentId);
  1777. },
  1778. error: function (result) {
  1779. alert("Due to unexpected errors we were unable to load data");
  1780. }
  1781. };
  1782. $.ajax(options);
  1783. }
  1784. function LoadSublocation() {
  1785. var pLocation = $('#<%=locationDDL.ClientID%>').val();
  1786. var dataToSend = { MethodName: 'getSubLocation', PLocation: pLocation };
  1787. var options = {
  1788. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  1789. data: dataToSend,
  1790. dataType: 'JSON',
  1791. type: 'POST',
  1792. success:
  1793. function (response) {
  1794. LoadSubLocationDDL(response);
  1795. },
  1796. error: function (result) {
  1797. alert("Due to unexpected errors we were unable to load data");
  1798. }
  1799. };
  1800. $.ajax(options);
  1801. }
  1802. function LoadSubLocationDDL(response) {
  1803. var data = response;
  1804. var ddl = GetElement("<%=subLocationDDL.ClientID %>");
  1805. $(ddl).empty();
  1806. var option;
  1807. option = document.createElement("option");
  1808. option.text = "Select City";
  1809. option.value = "";
  1810. ddl.options.add(option);
  1811. for (var i = 0; i < data.length; i++) {
  1812. option = document.createElement("option");
  1813. option.text = data[i].LOCATIONNAME;
  1814. option.value = data[i].LOCATIONID;
  1815. try {
  1816. ddl.options.add(option);
  1817. }
  1818. catch (e) {
  1819. alert(e);
  1820. }
  1821. }
  1822. }
  1823. function ClearTxnData() {
  1824. $("#<%=pAgent.ClientID%>").empty();
  1825. $("#<%=pMode.ClientID%>").empty();
  1826. $("#txtpBranch_aValue").val("");
  1827. $("#txtpBranch_aText").val("");
  1828. $("#<%=txtRecDepAcNo.ClientID%>").val("");
  1829. $("#<%=txtCollAmt.ClientID%>").val("");
  1830. $('#<%=txtCollAmt.ClientID%>').attr("readonly", false);
  1831. $("#<%=txtPayAmt.ClientID%>").val("");
  1832. $('#<%=txtPayAmt.ClientID%>').attr("readonly", false);
  1833. $("#<%=lblSendAmt.ClientID%>").text('0.00');
  1834. $("#<%=lblServiceChargeAmt.ClientID%>").val('0');
  1835. $("#<%=lblExRate.ClientID%>").text('0.00');
  1836. $("#lblDiscAmt").text('0.00');
  1837. $("#<%=lblExRate.ClientID%>").text('0.00');
  1838. $("#scDiscount").val('0.00');
  1839. $("#exRateOffer").val('0.00');
  1840. $("#<%=lblPayCurr.ClientID%>").text("");
  1841. $("#<%=lblPerTxnLimit.ClientID%>").text('0.00');
  1842. SetDDLValueSelected("<%=pCountry.ClientID%>", "");
  1843. SetDDLValueSelected("<%=ddlSalary.ClientID%>", "");
  1844. SetDDLValueSelected("<%=ddlSalary.ClientID%>", "");
  1845. $('#branch').empty();
  1846. $('#<%=branch.ClientID%>').empty();
  1847. $('#<%=locationDDL.ClientID%>').empty();
  1848. $('#<%=subLocationDDL.ClientID%>').empty();
  1849. $('#spnWarningMsg').html('');
  1850. }
  1851. function SearchCustomerDetails(customerId, type) {
  1852. if (customerId == "" || customerId == null) {
  1853. alert('Search value is missing');
  1854. $('#<%=txtSearchData.ClientID%>').focus();
  1855. return false;
  1856. }
  1857. var dataToSend = { MethodName: 'SearchCustomer', customerId: customerId };
  1858. $.post('<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1859. dataToSend,
  1860. function (response) {
  1861. ParseResponseData(response);
  1862. if (type == 'mapping') {
  1863. var data = jQuery.parseJSON(response);
  1864. var d = [customerId, data[0].senderName];
  1865. SetItem("<% =txtSearchData.ClientID%>", d);
  1866. }
  1867. }).fail(function () {
  1868. });
  1869. return true;
  1870. }
  1871. function CalculateTxn(amt, obj, isManualSc) {
  1872. var collAmt = parseFloat($('#<%=txtCollAmt.ClientID%>').val().replace(',', '').replace(',', '').replace(',', ''));
  1873. var availableBal = parseFloat($('#<%=availableAmountDetails.ClientID%>').text().replace(',', '').replace(',', '').replace(',', ''));
  1874. if (collAmt === NaN || collAmt === null || collAmt === "")
  1875. collAmt = 0;
  1876. var customerId = $('#ContentPlaceHolder1_txtSearchData_aValue').val();
  1877. if ($('#11063').is(':checked')) {
  1878. availableBal = parseFloat($('#availableBal').text().replace(',', '').replace(',', '').replace(',', ''));
  1879. if (collAmt > availableBal) {
  1880. alert('Collection amount can not be greater then Available Balance!');
  1881. ClearCalculatedAmount();
  1882. return false;
  1883. }
  1884. }
  1885. if (isManualSc == '' || isManualSc == undefined) {
  1886. isManualSc = 'N';
  1887. }
  1888. $("#DivLoad").show();
  1889. var pCountry = GetValue("<%=pCountry.ClientID %>");
  1890. var pCountrytxt = $("#<%=pCountry.ClientID %> option:selected").text();
  1891. var pMode = GetValue("<%=pMode.ClientID %>");
  1892. var pModetxt = $("#<%=pMode.ClientID %> option:selected").text();
  1893. if (pCountry == "" || pCountry == null || pCountry == undefined) {
  1894. alert("Please choose payout country");
  1895. GetElement("<%=pCountry.ClientID %>").focus();
  1896. return false;
  1897. }
  1898. if (pMode == "" || pMode == null || pMode == undefined) {
  1899. alert("Please choose payment mode");
  1900. GetElement("<%=pMode.ClientID %>").focus();
  1901. return false;
  1902. }
  1903. var pAgent = Number(GetValue("<%=pAgent.ClientID %>"));
  1904. var pAgentBranch = GetValue("txtpBranch_aValue");
  1905. var collAmt = GetValue("<%=txtCollAmt.ClientID %>");
  1906. var txtCustomerLimit = GetValue("<%=txtCustomerLimit.ClientID%>");
  1907. var txnPerDayCustomerLimit = GetValue("<%=txnPerDayCustomerLimit.ClientID %>");
  1908. var schemeCode = '';
  1909. if (obj == "cAmt")
  1910. collAmt = amt;
  1911. if (parseFloat(txtCustomerLimit) + parseFloat(collAmt) > txnPerDayCustomerLimit) {
  1912. alert('Transaction cannot be proceed. Customer limit exceeded ' + parseFloat(txnPerDayCustomerLimit));
  1913. ClearCalculatedAmount();
  1914. return false;
  1915. }
  1916. var payAmt = GetValue("<%=txtPayAmt.ClientID %>");
  1917. if (obj == "pAmt")
  1918. payAmt = amt;
  1919. var payCurr = $('#<%=pCurrDdl.ClientID%>').val();
  1920. var collCurr = $('#<%=lblCollCurr.ClientID%>').text();
  1921. var senderId = $('#finalSenderId').text();
  1922. var couponId = '';
  1923. var sc = $("#<%=lblServiceChargeAmt.ClientID%>").val();
  1924. if (pCountry == "203" && payCurr == "USD") {
  1925. if ((pMode == "1" && pAgent != "2091") || (pMode != "12" && pAgent != "2091")) {
  1926. alert('USD receiving is only allow for Door to Door');
  1927. ClearCalculatedAmount();
  1928. return false;
  1929. }
  1930. }
  1931. var dataToSend = {
  1932. MethodName: 'CalculateTxn', pCountry: pCountry, pCountrytxt: pCountrytxt, pMode: pMode, pAgent: pAgent
  1933. , pAgentBranch: pAgentBranch, collAmt: collAmt, payAmt: payAmt, payCurr: payCurr, collCurr: collCurr
  1934. , pModetxt: pModetxt, senderId: senderId, schemeCode: schemeCode, couponId: couponId, isManualSc: isManualSc
  1935. , sc: sc
  1936. };
  1937. var options =
  1938. {
  1939. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1940. data: dataToSend,
  1941. dataType: 'JSON',
  1942. type: 'POST',
  1943. success: function (response) {
  1944. ParseCalculateData(response, obj);
  1945. }
  1946. };
  1947. $.ajax(options);
  1948. $("#DivLoad").hide();
  1949. return true;
  1950. }
  1951. function ParseCalculateData(response, amtType) {
  1952. var data = response;
  1953. CheckSession1(data);
  1954. if (data[0].ErrCode == "1") {
  1955. alert(data[0].Msg);
  1956. ClearCalculatedAmount();
  1957. return;
  1958. }
  1959. if (data[0].ErrCode == "101") {
  1960. SetValueById("spnWarningMsg", "", data[0].Msg);
  1961. }
  1962. $('#<%=lblSendAmt.ClientID%>').text(parseFloat(Number(data[0].sAmt).toFixed(3))); //
  1963. $('#<%=lblExRate.ClientID%>').val(roundNumber(data[0].exRate, 8));
  1964. $('#<%=lblPayCurr.ClientID%>').text(data[0].pCurr);
  1965. $('#<%=lblExCurr.ClientID%>').text(data[0].pCurr);
  1966. $('#<%=lblPerTxnLimit.ClientID%>').text(data[0].limit);
  1967. $('#<%=lblPerTxnLimitCurr.ClientID%>').text(data[0].limitCurr);
  1968. $('#<%=lblServiceChargeAmt.ClientID%>').val(parseFloat(data[0].scCharge).toFixed(0));
  1969. if (data[0].tpExRate != '' || data[0].tpExRate != undefined) {
  1970. $('#<%=hddTPExRate.ClientID%>').val(data[0].tpExRate)
  1971. }
  1972. SetValueById("<%=txtCollAmt.ClientID %>", parseFloat(Number(data[0].collAmt).toFixed(3)), ""); //
  1973. SetValueById("<%=lblSendAmt.ClientID %>", parseFloat(Number(data[0].sAmt).toFixed(3)), ""); //
  1974. SetValueById("<%=txtPayAmt.ClientID %>", parseFloat(Number(data[0].pAmt).toFixed(2)), "");
  1975. var exRateOffer = data[0].exRateOffer;
  1976. var scOffer = data[0].scOffer;
  1977. var scDiscount = data[0].scDiscount;
  1978. SetValueById("scDiscount", data[0].scDiscount, "");
  1979. SetValueById("exRateOffer", data[0].exRateOffer, "");
  1980. var html = "<span style='color: red;'>" + exRateOffer + "</span> (Exchange Rate)<br />";
  1981. html += "<span style='color: red;'>" + scDiscount + "</span> (Service Charge)";
  1982. }
  1983. var eddval = "<%=Swift.web.Library.GetStatic.ReadWebConfig("cddEddBal","300000") %>";
  1984. function CheckSession1(data) {
  1985. if (data == undefined || data == "" || data == null)
  1986. return;
  1987. if (data.session_end == "1") {
  1988. document.location = "../../../Logout.aspx";
  1989. }
  1990. }
  1991. function LoadPayMode(response, myDDL, recall, selectField, obj) {
  1992. var data = response;
  1993. CheckSession(data);
  1994. $(myDDL).empty();
  1995. var option;
  1996. if (selectField != "" && selectField != undefined) {
  1997. option = document.createElement("option");
  1998. option.text = selectField;
  1999. option.value = "";
  2000. myDDL.options.add(option);
  2001. }
  2002. for (var i = 0; i < data.length; i++) {
  2003. option = document.createElement("option");
  2004. option.text = data[i].typeTitle;
  2005. option.value = data[i].serviceTypeId;
  2006. try {
  2007. myDDL.options.add(option);
  2008. }
  2009. catch (e) {
  2010. alert(e);
  2011. }
  2012. }
  2013. if (recall == 'pcurr') {
  2014. SetDDLTextSelected("<%=pMode.ClientID%>", obj);
  2015. }
  2016. }
  2017. function ParseLoadDDl(response, myDDL, recall, selectField) {
  2018. var data = response;
  2019. CheckSession(data);
  2020. var ddl2 = GetElement("<%=pAgentDetail.ClientID %>");
  2021. var ddl3 = GetElement("<%=pAgentMaxPayoutLimit.ClientID%>");
  2022. $(ddl2).empty();
  2023. $(ddl3).empty();
  2024. $(myDDL).empty();
  2025. $('#spnPayoutLimitInfo').html('');
  2026. if ($("#<%=pMode.ClientID%> option:selected").val() != "" && recall == "agentSelection") {
  2027. $('#hdnreqAgent').text(data[0].agentSelection);
  2028. }
  2029. var option;
  2030. if (selectField != "" && selectField != undefined) {
  2031. option = document.createElement("option");
  2032. option.text = selectField;
  2033. option.value = "";
  2034. myDDL.options.add(option);
  2035. }
  2036. for (var i = 0; i < data.length; i++) {
  2037. option = document.createElement("option");
  2038. option.text = data[i].AGENTNAME.toUpperCase();
  2039. option.value = data[i].bankId;
  2040. var option2 = document.createElement("option");
  2041. option2.value = data[i].bankId;
  2042. option2.text = data[i].FLAG;
  2043. var option3 = document.createElement("option");
  2044. option3.value = data[i].bankId;
  2045. option3.text = data[i].maxPayoutLimit;
  2046. try {
  2047. myDDL.options.add(option);
  2048. ddl2.options.add(option2);
  2049. ddl3.options.add(option3);
  2050. }
  2051. catch (e) {
  2052. alert(e);
  2053. }
  2054. }
  2055. var pCountry = $("#<%=pCountry.ClientID%> option:selected").text();
  2056. var pCurr = $("#<%=lblPayCurr.ClientID%>").text();
  2057. $('#spnPayoutLimitInfo').html('Payout Limit for ' + pCountry + ' : ' + data[0].maxPayoutLimit);
  2058. }
  2059. function SetDDLTextSelected(ddl, selectText) {
  2060. $("#" + ddl + " option").each(function () {
  2061. if ($(this).text() == selectText) {
  2062. $(this).prop('selected', true);
  2063. return;
  2064. }
  2065. });
  2066. }
  2067. function SetDDLValueSelected(ddl, selectText) {
  2068. $("#" + ddl + " option").each(function () {
  2069. if ($(this).val() == selectText) {
  2070. $(this).prop('selected', true);
  2071. return;
  2072. }
  2073. });
  2074. }
  2075. function ClearData() {
  2076. var a = true;
  2077. var b = false;
  2078. $(".readonlyOnCustomerSelect").attr("disabled", "disabled");
  2079. $(".showOnCustomerSelect").removeClass("hidden");
  2080. ShowElement('tblSearch');
  2081. $('#divHideShow').show();
  2082. $('#<%=txtSendFirstName.ClientID%>').attr("readonly", a);
  2083. $('#<%=txtSendMidName.ClientID%>').attr("readonly", a);
  2084. $('#<%=txtSendLastName.ClientID%>').attr("readonly", a);
  2085. $('#<%=txtSendIdNo.ClientID%>').attr("readonly", a);
  2086. $('#<%=txtSendNativeCountry.ClientID%>').attr("readonly", a);
  2087. $('#availableBal').text('0');
  2088. }
  2089. function PcountryOnChange(obj, pmode) {
  2090. PcountryOnChange(obj, pmode, "");
  2091. }
  2092. function PcountryOnChange(obj, pmode, pAgentSelected) {
  2093. var pCountry = GetValue("<%=pCountry.ClientID %>");
  2094. if (pCountry == "" || pCountry == null)
  2095. return;
  2096. var method = "";
  2097. if (obj == 'c') {
  2098. method = "PaymentModePcountry";
  2099. }
  2100. if (obj == 'pcurr') {
  2101. method = "PCurrPcountry";
  2102. }
  2103. var dataToSend = { MethodName: method, pCountry: pCountry };
  2104. var options =
  2105. {
  2106. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  2107. data: dataToSend,
  2108. dataType: 'JSON',
  2109. type: 'POST',
  2110. async: false,
  2111. success: function (response) {
  2112. if (obj == 'c') {
  2113. var data = response;
  2114. LoadPayMode(response, document.getElementById("<%=pMode.ClientID %>"), 'pcurr', "", pmode);
  2115. ReceivingModeOnChange("", pAgentSelected);
  2116. GetPayoutPartner(data[0].serviceTypeId);
  2117. }
  2118. else if (obj == 'pcurr') {
  2119. var data = response;
  2120. if (response == "")
  2121. return false;
  2122. $('#<%=lblPayCurr.ClientID%>').text(data[0].currencyCode);
  2123. $('#<%=lblExCurr.ClientID%>').text(data[0].currencyCode);
  2124. return true;
  2125. }
  2126. return true;
  2127. },
  2128. error: function (result) {
  2129. alert("Due to unexpected errors we were unable to load data");
  2130. }
  2131. };
  2132. $.ajax(options);
  2133. }
  2134. function ReceivingModeOnChange(pModeSelected, pAgentSelected) {
  2135. ResetAmountFields();
  2136. $("#<%=pAgent.ClientID %>").empty();
  2137. PaymentModeChange(pModeSelected, pAgentSelected);
  2138. };
  2139. // WHILE CLICKING COLL MODE POPULATE AGENT/BANK
  2140. function PaymentModeChange(pModeSelected, pAgentSelected) {
  2141. var pMode = "";
  2142. if (pModeSelected == "" || pModeSelected == null)
  2143. pMode = $("#<%=pMode.ClientID %> option:selected").text();
  2144. else {
  2145. pMode = pModeSelected;
  2146. }
  2147. pCountry = GetValue("<%=pCountry.ClientID %>");
  2148. $('#trAccno').hide();
  2149. $("#<%=txtRecDepAcNo.ClientID%>").attr("class", "form-control");
  2150. $('#trForCPOB').hide();
  2151. if (pMode == "BANK DEPOSIT") {
  2152. $('#trAccno').show();
  2153. $("#<%=txtRecDepAcNo.ClientID%>").attr("class", "required form-control");
  2154. $('#trAccno').show();
  2155. }
  2156. var dataToSend = { MethodName: "loadAgentBank", pMode: pMode, pCountry: pCountry };
  2157. var options =
  2158. {
  2159. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  2160. data: dataToSend,
  2161. dataType: 'JSON',
  2162. type: 'POST',
  2163. success: function (response) {
  2164. LoadAgentSetting();
  2165. ParseLoadDDl(response, GetElement("<%=pAgent.ClientID %>"), 'agentSelection', "");
  2166. if (pAgentSelected != "" && pAgentSelected != null && pAgentSelected != undefined) {
  2167. SetDDLValueSelected("<%=pAgent.ClientID %>", pAgentSelected);
  2168. }
  2169. LoadCustomerRate();
  2170. }
  2171. };
  2172. $.ajax(options);
  2173. }
  2174. function LoadAgentSetting() {
  2175. var pCountry = $("#<%=pCountry.ClientID%> option:selected").val();
  2176. var pMode = $("#<%=pMode.ClientID%> option:selected").val();
  2177. var pModeTxt = $("#<%=pMode.ClientID%> option:selected").text();
  2178. var dataToSend = { MethodName: "PAgentChange", pCountry: pCountry, pMode: pMode };
  2179. var options =
  2180. {
  2181. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  2182. data: dataToSend,
  2183. dataType: 'JSON',
  2184. type: 'POST',
  2185. success: function (response) {
  2186. ApplyAgentSetting(response, pModeTxt);
  2187. }
  2188. };
  2189. $.ajax(options);
  2190. }
  2191. // WHILE CLICKING Pagent POPULATE agent branch
  2192. function PAgentChange() {
  2193. var pAgent = GetValue("<%=pAgent.ClientID %>");
  2194. if (pAgent == null || pAgent == "" || pAgent == undefined)
  2195. return;
  2196. SetDDLValueSelected("<%=pAgentDetail.ClientID %>", pAgent);
  2197. var pBankType = $("#<%=pAgentDetail.ClientID%> option:selected").text();
  2198. var pCountry = $("#<%=pCountry.ClientID%> option:selected").val();
  2199. var pMode = $("#<%=pMode.ClientID%> option:selected").val();
  2200. var pModeTxt = $("#<%=pMode.ClientID%> option:selected").text();
  2201. var dataToSend = { MethodName: "PAgentChange", pCountry: pCountry, pAgent: pAgent, pMode: pMode, pBankType: pBankType };
  2202. var options =
  2203. {
  2204. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  2205. data: dataToSend,
  2206. dataType: 'JSON',
  2207. type: 'POST',
  2208. success: function (response) {
  2209. ApplyAgentSetting(response, pModeTxt);
  2210. if (pModeTxt == "CASH PAYMENT TO OTHER BANK")
  2211. LoadAgentByExtAgent(pAgent);
  2212. LoadCustomerRate();
  2213. }
  2214. };
  2215. $.ajax(options);
  2216. }
  2217. function ApplyAgentSetting(response, pModeTxt) {
  2218. var data = response;
  2219. CheckSession(data);
  2220. $("#btnPickBranch").show();
  2221. $("#divBranchMsg").hide();
  2222. if (data == "" || data == null) {
  2223. var defbeneficiaryIdReq = $("#<%=hdnBeneficiaryIdReq.ClientID%>").val();
  2224. var defbeneficiaryContactReq = $("<%=hdnBeneficiaryContactReq.ClientID%>").val();
  2225. if (defbeneficiaryIdReq == "H") {
  2226. $("#<%=ddlRecIdType.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2227. $("#<%=txtRecIdNo.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2228. }
  2229. else if (defbeneficiaryIdReq == "M") {
  2230. $(".trRecId").show();
  2231. $("#<%=ddlRecIdType.ClientID%>").attr("class", "required form-control readonlyOnReceiverSelect");
  2232. $("#<%=txtRecIdNo.ClientID%>").attr("class", "required form-control readonlyOnReceiverSelect");
  2233. $("#<%=ddlRecIdType_err.ClientID%>").show();
  2234. $("#<%=txtRecIdNo_err.ClientID%>").show();
  2235. }
  2236. else if (defbeneficiaryIdReq == "O") {
  2237. $(".trRecId").show();
  2238. $("#<%=ddlRecIdType.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2239. $("#<%=txtRecIdNo.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2240. $("#<%=ddlRecIdType_err.ClientID%>").hide();
  2241. $("#<%=txtRecIdNo_err.ClientID%>").hide();
  2242. }
  2243. if (defbeneficiaryContactReq == "H") {
  2244. $("#<%=trRecContactNo.ClientID%>").hide();
  2245. $("#<%=txtRecMobile.ClientID%>").attr("class", "form-control");
  2246. }
  2247. else if (defbeneficiaryContactReq == "M") {
  2248. $("#<%=trRecContactNo.ClientID%>").show();
  2249. $("#<%=txtRecMobile.ClientID%>").attr("class", "required form-control");
  2250. $("#<%=txtRecMobile_err.ClientID%>").show();
  2251. }
  2252. else if (defbeneficiaryContactReq == "O") {
  2253. $("#<%=trRecContactNo.ClientID%>").show();
  2254. $("#<%=txtRecMobile.ClientID%>").attr("class", "form-control");
  2255. $("#<%=txtRecMobile_err.ClientID%>").hide();
  2256. }
  2257. $("#tdLblBranch").show();
  2258. $("#tdTxtBranch").show();
  2259. if (pModeTxt == "BANK DEPOSIT") {
  2260. $('#txtpBranch_aText').attr("readonly", true);
  2261. $('#txtpBranch_aText').attr("class", "required disabled form-control");
  2262. $("#txtpBranch_err").show();
  2263. }
  2264. else {
  2265. $('#txtpBranch_aText').attr("readonly", true);
  2266. $('#txtpBranch_aText').attr("class", "disabled form-control");
  2267. $("#txtpBranch_err").hide();
  2268. }
  2269. return;
  2270. }
  2271. var branchSelection = data[0].branchSelection;
  2272. var maxLimitAmt = data[0].maxLimitAmt;
  2273. var agMaxLimitAmt = data[0].agMaxLimitAmt;
  2274. var beneficiaryIdReq = data[0].benificiaryIdReq;
  2275. var relationshipReq = data[0].relationshipReq;
  2276. var beneficiaryContactReq = data[0].benificiaryContactReq;
  2277. var acLengthFrom = data[0].acLengthFrom;
  2278. var acLengthTo = data[0].acLengthTo;
  2279. var acNumberType = data[0].acNumberType;
  2280. if (branchSelection == "Not Required") {
  2281. $("#tdLblBranch").hide();
  2282. $("#tdTxtBranch").hide();
  2283. $('#txtpBranch_aText').attr("class", "disabled form-control");
  2284. $("#txtpBranch_err").hide();
  2285. }
  2286. else if (branchSelection == "Manual Type") {
  2287. $("#tdLblBranch").show();
  2288. $("#tdTxtBranch").show();
  2289. $('#txtpBranch_aText').attr("readonly", false);
  2290. $('#txtpBranch_aText').attr("class", "required form-control");
  2291. $("#txtpBranch_err").show();
  2292. $("#divBranchMsg").show();
  2293. $("#btnPickBranch").hide();
  2294. }
  2295. else if (branchSelection == "SELECT") {
  2296. $("#tdLblBranch").show();
  2297. $("#tdTxtBranch").show();
  2298. $('#txtpBranch_aText').attr("readonly", true);
  2299. $('#txtpBranch_aText').attr("class", "required disabled form-control");
  2300. $("#txtpBranch_err").show();
  2301. }
  2302. else {
  2303. $("#tdLblBranch").show();
  2304. $("#tdTxtBranch").show();
  2305. $('#txtpBranch_aText').attr("readonly", true);
  2306. $('#txtpBranch_aText').attr("class", "disabled form-control");
  2307. $("#txtpBranch_err").hide();
  2308. }
  2309. if (beneficiaryIdReq == "H") {
  2310. $("#<%=ddlRecIdType.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2311. $("#<%=txtRecIdNo.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2312. }
  2313. else if (beneficiaryIdReq == "M") {
  2314. $("#<%=trRecId.ClientID%>").show();
  2315. $("#<%=ddlRecIdType.ClientID%>").attr("class", "required form-control readonlyOnReceiverSelect");
  2316. $("#<%=txtRecIdNo.ClientID%>").attr("class", "required form-control readonlyOnReceiverSelect");
  2317. $("#<%=ddlRecIdType_err.ClientID%>").show();
  2318. $("#<%=txtRecIdNo_err.ClientID%>").show();
  2319. }
  2320. else if (beneficiaryIdReq == "O") {
  2321. $("#<%=trRecId.ClientID%>").show();
  2322. $("#<%=ddlRecIdType.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2323. $("#<%=txtRecIdNo.ClientID%>").attr("class", "form-control readonlyOnReceiverSelect");
  2324. $("#<%=ddlRecIdType_err.ClientID%>").hide();
  2325. $("#<%=txtRecIdNo_err.ClientID%>").hide();
  2326. }
  2327. if (beneficiaryContactReq == "H") {
  2328. $("#<%=trRecContactNo.ClientID%>").hide();
  2329. $("#<%=txtRecMobile.ClientID%>").attr("class", "form-control");
  2330. }
  2331. else if (beneficiaryContactReq == "M") {
  2332. $("#<%=trRecContactNo.ClientID%>").show();
  2333. $("#<%=txtRecMobile.ClientID%>").attr("class", "required form-control");
  2334. $("#<%=txtRecMobile_err.ClientID%>").show();
  2335. }
  2336. else if (beneficiaryContactReq == "O") {
  2337. $("#<%=trRecContactNo.ClientID%>").show();
  2338. $("#<%=txtRecMobile.ClientID%>").attr("class", "form-control");
  2339. $("#<%=txtRecMobile_err.ClientID%>").hide();
  2340. }
  2341. }
  2342. function ParseResponseData(response) {
  2343. var data = jQuery.parseJSON(response);
  2344. CheckSession(data);
  2345. if (data[0].errorCode != "0") {
  2346. alert(data[0].msg);
  2347. return;
  2348. }
  2349. $(".readonlyOnCustomerSelect").removeAttr("disabled");
  2350. $(".readonlyOnReceiverSelect").removeAttr("disabled");
  2351. if (data.length > 0) {
  2352. //****Transaction Detail****
  2353. ClearTxnData();
  2354. SetDDLTextSelected("<%=ddlSalary.ClientID%>", data[0].monthlyIncome);
  2355. $(".readonlyOnCustomerSelect").attr("disabled", "disabled");
  2356. $("#txtpBranch_aValue").val('');
  2357. $("#txtpBranch_aText").val('');
  2358. if (data[0].pBankBranch != "" && data[0].pBankBranch != undefined) {
  2359. $("#tdLblBranch").show();
  2360. $("#tdTxtBranch").show();
  2361. $('#txtpBranch_aText').attr("readonly", true);
  2362. $('#txtpBranch_aText').attr("class", "required disabled form-control");
  2363. $("#txtpBranch_err").show();
  2364. $("#txtpBranch_aValue").val(data[0].pBankBranch);
  2365. $("#txtpBranch_aText").val(data[0].pBankBranchName);
  2366. }
  2367. $("#<%=txtRecDepAcNo.ClientID%>").val(data[0].accountNo);
  2368. $('#<%=span_txnInfo.ClientID%>').html("Today's Sent : #Txn(" + data[0].txnCount + "), Amount(" + data[0].txnSum + " " + data[0].collCurr + ")");
  2369. SetValueById("<%=txtCustomerLimit.ClientID%>", data[0].txnSum2, "");
  2370. SetValueById("<%=txnPerDayCustomerLimit.ClientID %>", data[0].txnPerDayCustomerLimit, "");
  2371. SetValueById("<%=hdntranCount.ClientID %>", data[0].txnCount, "");
  2372. $('#senderName').text(data[0].senderName);
  2373. $('#finalSenderId').text(data[0].customerId);
  2374. $('#<%=txtSendPostal.ClientID%>').val(data[0].szipCode);
  2375. $('#<%=sCustStreet.ClientID%>').val(data[0].street);
  2376. $('#<%=txtSendCity.ClientID%>').val(data[0].sCity);
  2377. $('#<%=companyName.ClientID%>').val(data[0].companyName);
  2378. $('#availableBal').text(data[0].AVAILABLEBALANCE);
  2379. $('#availableBalSpan').hide();
  2380. $('#<%=custLocationDDL.ClientID %>').val(data[0].sState);
  2381. $('#<%=ddlEmpBusinessType.ClientID %>').val(data[0].organizationType);
  2382. SetValueById("<%=ddlSendCustomerType.ClientID %>", data[0].customerType, "");
  2383. SetValueById("<%=txtSendIdExpireDate.ClientID %>", data[0].idIssueDate, "");
  2384. SetValueById("<%=txtSendFirstName.ClientID %>", data[0].sfirstName, "");
  2385. SetValueById("<%=txtSendMidName.ClientID %>", data[0].smiddleName, "");
  2386. SetValueById("<%=txtSendLastName.ClientID %>", data[0].slastName1, "");
  2387. SetValueById("<%=txtSendIdNo.ClientID %>", data[0].sidNumber, "");
  2388. if (data[0].sidNumber == "") {
  2389. $('#<%=txtSendIdNo.ClientID%>').attr("readonly", false);
  2390. SetDDLValueSelected("<%=ddSenIdType.ClientID %>", "");
  2391. }
  2392. else {
  2393. $('#<%=txtSendIdNo.ClientID%>').attr("readonly", true);
  2394. }
  2395. SetValueById("<%=txtSendIdValidDate.ClientID %>", data[0].svalidDate, "");
  2396. SetValueById("<%=ddlIdIssuedCountry.ClientID %>", data[0].PLACEOFISSUE, "");
  2397. SetValueById("<%=txtSendDOB.ClientID %>", data[0].sdob, "");
  2398. SetValueById("<%=txtSendTel.ClientID %>", data[0].shomePhone, "");
  2399. if (data[0].shomePhone == "")
  2400. $('#<%=txtSendTel.ClientID%>').attr("readonly", false);
  2401. SetValueById("<%=txtSendMobile.ClientID %>", data[0].smobile, "");
  2402. if (data[0].smobile == "")
  2403. $('#<%=txtSendMobile.ClientID%>').attr("readonly", false);
  2404. SetValueById("<%=txtSendPostal.ClientID %>", data[0].szipCode, "");
  2405. if (data[0].szipCode == "")
  2406. $('#<%=txtSendPostal.ClientID%>').attr("readonly", false);
  2407. SetDDLValueSelected("<%=txtSendNativeCountry.ClientID%>", data[0].scountry);
  2408. SetValueById("<%=txtSendEmail.ClientID %>", data[0].semail, "");
  2409. if (data[0].semail == "")
  2410. $('#<%=txtSendEmail.ClientID%>').attr("readonly", false);
  2411. SetValueById("<%=companyName.ClientID %>", data[0].companyName, "");
  2412. SetDDLValueSelected("<%=ddlSenGender.ClientID%>", data[0].sgender);
  2413. SetDDLTextSelected("<%=ddSenIdType.ClientID%>", data[0].idName);
  2414. ManageSendIdValidity();
  2415. $('#divSenderIdImage').html(data[0].SenderIDimage);
  2416. SetDDLValueSelected("<%=occupation.ClientID%>", data[0].sOccupation);
  2417. SetDDLValueSelected("<%=sourceOfFund.ClientID%>", data[0].sourceOfFund);
  2418. ChangeCustomerType();
  2419. HideShowFieldsOnTxnTab();
  2420. }
  2421. ManageLocationData();
  2422. }
  2423. function ClearReceiverData() {
  2424. $('#receiverName').text('');
  2425. $('#finalBenId').text('');
  2426. SetDDLValueSelected("<%=ddlEmpBusinessType.ClientID %>", "11010");
  2427. SetDDLValueSelected("<%=ddlRecIdType.ClientID %>", "");
  2428. SetDDLValueSelected("<%=ddlReceiver.ClientID %>", "");
  2429. SetValueById("<%=txtRecFName.ClientID %>", "", "");
  2430. SetValueById("<%=txtRecMName.ClientID %>", "", "");
  2431. SetValueById("<%=txtRecLName.ClientID %>", "", "");
  2432. SetDDLTextSelected("<%=ddlRecIdType.ClientID%>", "SELECT");
  2433. SetDDLTextSelected("<%=ddlRecGender.ClientID%>", "SELECT");
  2434. SetValueById("<%=txtRecIdNo.ClientID %>", "", "");
  2435. SetValueById("<%=txtRecTel.ClientID %>", "", "");
  2436. SetValueById("<%=txtRecMobile.ClientID %>", "", "");
  2437. SetValueById("<%=txtRecAdd1.ClientID %>", "", "");
  2438. SetValueById("<%=txtRecCity.ClientID %>", "", "");
  2439. SetValueById("<%=txtRecEmail.ClientID %>", "", "");
  2440. SetDDLValueSelected("<%=relationship.ClientID %>", "");
  2441. SetDDLValueSelected("<%=purpose.ClientID %>", "");
  2442. }
  2443. function ValidateDate(date) {
  2444. if (date == "") {
  2445. return true;
  2446. }
  2447. if (Date.parse(date)) {
  2448. return true;
  2449. } else {
  2450. return false;
  2451. }
  2452. }
  2453. function SetPayCurrency(pCountry) {
  2454. var dataToSend = { MethodName: 'PCurrPcountry', pCountry: pCountry };
  2455. var options = {
  2456. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  2457. data: dataToSend,
  2458. dataType: 'JSON',
  2459. type: 'POST',
  2460. async: false,
  2461. success:
  2462. function (response) {
  2463. var data = response;
  2464. var ddl = GetElement("<%=pCurrDdl.ClientID%>");
  2465. $(ddl).empty();
  2466. var option;
  2467. for (var i = 0; i < data.length; i++) {
  2468. option = document.createElement("option");
  2469. option.text = data[i].currencyCode;
  2470. option.value = data[i].currencyCode;
  2471. try {
  2472. ddl.options.add(option);
  2473. if (data[i].isDefault == "Y") {
  2474. $('#<%=pCurrDdl.ClientID%>').val(data[i].currencyCode);
  2475. }
  2476. }
  2477. catch (e) {
  2478. alert(e);
  2479. }
  2480. }
  2481. },
  2482. error: function (result) {
  2483. alert("Due to unexpected errors we were unable to load data");
  2484. }
  2485. };
  2486. $.ajax(options);
  2487. }
  2488. function ChangeCustomerType() {
  2489. customerTypeId = $("#<%=ddlSendCustomerType.ClientID%>").val();
  2490. if (customerTypeId == "4700") {
  2491. $(".hideOnIndividual").hide();
  2492. var emptyOnCompany = ['#<%=companyName.ClientID%>'];
  2493. for (i = 0; i < emptyOnCompany.length; i++) {
  2494. $(emptyOnCompany[i]).val('');
  2495. $(emptyOnCompany[i]).text('');
  2496. $(emptyOnCompany[i]).removeClass('required');
  2497. }
  2498. $(".showOnIndividual").show();
  2499. $("#<%=companyName.ClientID%>").removeClass("Required");
  2500. $("#<%=ddlEmpBusinessType.ClientID%>").val("11010");
  2501. $("#<%=ddlEmpBusinessType.ClientID%>").removeClass("required");
  2502. $("#<%=occupation.ClientID%>").addClass("required");
  2503. }
  2504. else if (customerTypeId == "4701") {
  2505. $(".hideOnIndividual").show();
  2506. $(".showOnIndividual").hide();
  2507. var emptyOnIndividual = ['#<%=txtSendFirstName.ClientID%>', '#<%=txtSendMidName.ClientID%>', '#<%=txtSendLastName.ClientID%>'];
  2508. for (i = 0; i < emptyOnIndividual.length; i++) {
  2509. $(emptyOnIndividual[i]).val('');
  2510. $(emptyOnIndividual[i]).text('');
  2511. $(emptyOnIndividual[i]).removeClass('required');
  2512. }
  2513. $('#<%=ddlSalary.ClientID%>').val('');
  2514. $('#<%=occupation.ClientID%>').val('');
  2515. $('#<%=ddlSenGender.ClientID%>').val('');
  2516. $('#<%=txtSendDOB.ClientID%>').val('');
  2517. $("#<%=ddlEmpBusinessType.ClientID%>").addClass("required");
  2518. $("#<%=companyName.ClientID%>").addClass("required");
  2519. $("#<%=occupation.ClientID%>").removeClass("required");
  2520. }
  2521. }
  2522. function CheckAvailableBalance(collectionMode) {
  2523. var customerId = $("#ContentPlaceHolder1_txtSearchData_aValue").val();
  2524. var dataToSend = { MethodName: 'CheckAvialableBalance', collectionMode: collectionMode, customerId: customerId };
  2525. $.post('<%=ResolveUrl("SendV2.aspx") %>?', dataToSend, function (response) {
  2526. $('#availableBalSpan').show();
  2527. $("#availableBalSpan").html(response);
  2528. }).fail(function () {
  2529. alert("Due to unexpected errors we were unable to load data");
  2530. });
  2531. }
  2532. function PopulateBankDetails(bankId, receiveMode, isBranchByName, branchSelected) {
  2533. ManageHiddenFields(receiveMode);
  2534. var partnerId = $("#<%=hddPayoutPartner.ClientID%>").val();
  2535. var dataToSend = '';
  2536. if (isBranchByName == '' || isBranchByName == undefined) {
  2537. dataToSend = { bankId: bankId, type: 'bb', pMode: receiveMode, partnerId: partnerId };
  2538. }
  2539. else {
  2540. dataToSend = { bankId: bankId, type: 'bb', isBranchByName: isBranchByName, branchSelected: branchSelected, pMode: receiveMode, partnerId: partnerId };
  2541. }
  2542. $.get("/AgentNew/SendTxn/FormLoader.aspx", dataToSend, function (data) {
  2543. GetElement("ddlAgentBranch").innerHTML = data;
  2544. });
  2545. }
  2546. function ManageHiddenFields(receiveMode) {
  2547. receiveMode = ($("#<%=pMode.ClientID%> option:selected").val() == '' || $("#<%=pMode.ClientID%> option:selected").val() == undefined) ? receiveMode : $("#<%=pMode.ClientID%> option:selected").val();
  2548. if (receiveMode == "2" || receiveMode.toUpperCase() == 'BANK DEPOSIT') {
  2549. $("#divBankBranch").css("display", "");
  2550. }
  2551. else {
  2552. $("#divBankBranch").css("display", "none");
  2553. }
  2554. }
  2555. function GetPayoutPartner(payMode) {
  2556. var pCountry = $('#<%=pCountry.ClientID%>').val();
  2557. var pMode = $('#<%=pMode.ClientID%>').val();
  2558. var dataToSend = { MethodName: 'getPayoutPartner', PCountry: pCountry, PMode: pMode };
  2559. var options = {
  2560. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  2561. data: dataToSend,
  2562. dataType: 'JSON',
  2563. type: 'POST',
  2564. async: false,
  2565. success:
  2566. function (response) {
  2567. var datas = response;
  2568. var agentId = "";
  2569. if (datas.length > 0) {
  2570. agentId = datas[0].agentId;
  2571. }
  2572. $('#<%=hddPayoutPartner.ClientID%>').val(agentId);
  2573. },
  2574. error: function (result) {
  2575. alert("Due to unexpected errors we were unable to load data");
  2576. }
  2577. };
  2578. $.ajax(options);
  2579. }
  2580. function LoadPayerData() {
  2581. var bankId = $("#<%=pAgent.ClientID%>").val();
  2582. if (bankId !== null && bankId !== "") {
  2583. var partnerId = $('#<%=hddPayoutPartner.ClientID%>').val();
  2584. if (partnerId === apiPartnerIds[1]) {
  2585. bankId = $('#<%=pAgent.ClientID%> :selected').text();
  2586. }
  2587. var dataToSend = { MethodName: 'getPayerDataByBankId', bankId: bankId, partnerId: partnerId };
  2588. $.post("", dataToSend, function (response) {
  2589. $("#myModal1").modal('show');
  2590. var data = jQuery.parseJSON(response);
  2591. var ddl = GetElement("<%=ddlPayerBranch.ClientID%>");
  2592. $(ddl).empty();
  2593. CreateDDLFromData(data, "<%=ddlPayer.ClientID%>");
  2594. });
  2595. }
  2596. }
  2597. function CreateDDLFromData(data, elementId, defaultText = null) {
  2598. var ddl = GetElement(elementId);
  2599. $(ddl).empty();
  2600. var option;
  2601. if (defaultText !== null) {
  2602. option = document.createElement("option");
  2603. option.text = defaultText;
  2604. option.value = '';
  2605. ddl.options.add(option);
  2606. }
  2607. for (var i = 0; i < data.length; i++) {
  2608. option = document.createElement("option");
  2609. option.text = data[i].payerName;
  2610. option.value = data[i].payerId;
  2611. try {
  2612. ddl.options.add(option);
  2613. }
  2614. catch (e) {
  2615. alert(e);
  2616. }
  2617. }
  2618. }
  2619. function proceed() {
  2620. var isdisplayDignature = $("#" + ContentPlaceHolderId + "isDisplaySignature").val();
  2621. if (isdisplayDignature.toLowerCase() === 'true') {
  2622. if (CheckSignatureCustomer()) {
  2623. ValidateTxn('S');
  2624. return true;
  2625. } else {
  2626. return false;
  2627. }
  2628. }
  2629. ValidateTxn('S');
  2630. return true;
  2631. }
  2632. function GetFieldVaule(value) {
  2633. if (value == '' || value == undefined || value == null) {
  2634. return '&nbsp;'
  2635. }
  2636. else {
  2637. return value;
  2638. }
  2639. }
  2640. function ValidateTxn(type) {
  2641. var pBankBranchText = $("#<%=branch.ClientID%> option:selected").text();
  2642. if (pBankBranchText.length <= 0) {
  2643. pBankBranchText = $("#branch option:selected").text();
  2644. }
  2645. var pBank = $("#<%=pAgent.ClientID %> option:selected").val();
  2646. if (pBank == "SELECT" || pBank == "undefined")
  2647. pBank = "";
  2648. var hdnreqAgent = $('#hdnreqAgent').html();
  2649. var hdnreqBranch = $('#hdnreqBranch').html();
  2650. var dm = $("#<%=pMode.ClientID %> option:selected").text();
  2651. if ($('#<%=pMode.ClientID%>').val() == '2') {
  2652. if (pBankBranchText == null || pBankBranchText == "" || pBankBranchText == "undefined" || pBankBranchText == "-1") {
  2653. alert("Branch is required ");
  2654. return false;
  2655. }
  2656. if (hdnreqBranch == "Manual Type") {
  2657. if (pBankBranchText == null || pBankBranchText == "" || pBankBranchText == "undefined" || pBankBranchText == "-1") {
  2658. alert("Branch is required ");
  2659. return false;
  2660. }
  2661. }
  2662. }
  2663. if (hdnreqAgent == "M") {
  2664. if (pBank == null || pBank == "" || pBank == "undefined") {
  2665. alert("Agent/Bank is required ");
  2666. $("#<%=pAgent.ClientID %>").focus();
  2667. return false;
  2668. }
  2669. }
  2670. var por = $("#<%=purpose.ClientID %> option:selected").text();
  2671. por = por.replace("SELECT", "");
  2672. var sof = $("#<%=sourceOfFund.ClientID %> option:selected").text().replace("SELECT", "");
  2673. sof = sof.replace("SELECT", "");
  2674. var sendAmt = $('#<%=lblSendAmt.ClientID%>').text();
  2675. if (sendAmt > parseInt(eddval)) {
  2676. if (por == "") {
  2677. alert("Purpose of Remittance is required for sending amount greater than " + eddval);
  2678. $("#<%=purpose.ClientID %>").focus();
  2679. return false;
  2680. }
  2681. if (sof == "") {
  2682. alert("Source of fund is required for sending amount greater than " + eddval);
  2683. $("#<%=sourceOfFund.ClientID %>").focus();
  2684. return false;
  2685. }
  2686. }
  2687. var pCountry = $("#<%=pCountry.ClientID %> option:selected").text();
  2688. if (pCountry == "SELECT" || pCountry == undefined)
  2689. pCountry = "";
  2690. var pCountryId = $("#<%=pCountry.ClientID %> option:selected").val();
  2691. var collMode = $("#<%=pMode.ClientID %> option:selected").text();
  2692. var collModeId = $("#<%=pMode.ClientID %> option:selected").val();
  2693. var pAgent = "";
  2694. var pAgentName = "";
  2695. var pBankText = $("#<%=pAgent.ClientID %> option:selected").text();
  2696. if (pBankText == "[SELECT]" || pBankText == "[Any Where]" || pBankText == undefined)
  2697. pBankText = "";
  2698. var pBankBranch = $("#<%=branch.ClientID%> option:selected").val();
  2699. if (pBankBranch == "SELECT" || pBankBranch == undefined)
  2700. pBankBranch = "";
  2701. SetDDLValueSelected("<%=pAgentDetail.ClientID %>", pBank);
  2702. var pBankType = $("#<%=pAgentDetail.ClientID%> option:selected").text();
  2703. var pCurr = $('#<%=lblPayCurr.ClientID%>').text();
  2704. var collCurr = $('#<%=lblCollCurr.ClientID%>').text();
  2705. var collAmt = GetValue("<%=txtCollAmt.ClientID %>");
  2706. var customerTotalAmt = GetValue("txtCustomerLimit");
  2707. var payAmt = GetValue("<% =txtPayAmt.ClientID %>");
  2708. var scharge = $('#<%=lblServiceChargeAmt.ClientID%>').val();
  2709. var discount = $('#lblDiscAmt').text();
  2710. var exRate = $('#<%=lblExRate.ClientID%>').val();
  2711. var scDiscount = $('#scDiscount').val();
  2712. var exRateOffer = $('#exRateOffer').val();
  2713. //Sender Data
  2714. var senderId = $('#finalSenderId').text();
  2715. var sfName = GetValue("<% =txtSendFirstName.ClientID %>");
  2716. var smName = GetValue("<% =txtSendMidName.ClientID %>");
  2717. var slName = GetValue("<% =txtSendLastName.ClientID %>");
  2718. var sIdType = $("#<% =ddSenIdType.ClientID %> option:selected").text();
  2719. if (sIdType == "SELECT" || sIdType == undefined || sIdType == "")
  2720. sIdType = "";
  2721. else
  2722. sIdType = sIdType.split('|')[0];
  2723. var sGender = $("#<% =ddlSenGender.ClientID %> option:selected").val();
  2724. var sIdNo = GetValue("<% =txtSendIdNo.ClientID %>");
  2725. var sIdValid = GetValue("<% =txtSendIdValidDate.ClientID %>");
  2726. if (ValidateDate(sIdValid) == false) {
  2727. alert('Sender Id expiry date is invalid');
  2728. $('#<%=txtSendIdValidDate.ClientID%>').focus();
  2729. return false;
  2730. }
  2731. var sdob = GetValue("<% =txtSendDOB.ClientID %>");
  2732. var sTel = GetValue("<% =txtSendTel.ClientID %>");
  2733. var sMobile = GetValue("<% =txtSendMobile.ClientID %>");
  2734. var sCompany = GetValue("<%=companyName.ClientID %>");
  2735. var sNaCountry = $("#<%=txtSendNativeCountry.ClientID %> option:selected").text();
  2736. var sCity = $('#<%=txtSendCity.ClientID%>').val(); --GetItem("<%=txtSendCity.ClientID%>")[0];
  2737. var sPostCode = GetValue("<% =txtSendPostal.ClientID %>");
  2738. var sEmail = GetValue("<% =txtSendEmail.ClientID %>");
  2739. var smsSend = "N";
  2740. var newCustomer = "N";
  2741. var benId = $('#finalBenId').text();
  2742. var rfName = GetValue("<% =txtRecFName.ClientID %>");
  2743. var rmName = GetValue("<% =txtRecMName.ClientID %>");
  2744. var rlName = GetValue("<% =txtRecLName.ClientID %>");
  2745. var rIdType = $("#<% =ddlRecIdType.ClientID %> option:selected").text();
  2746. if (rIdType == "SELECT" || rIdType == "undefined")
  2747. rIdType = "";
  2748. var rGender = $("#<% =ddlRecGender.ClientID %> option:selected").val();
  2749. var rIdNo = GetValue("<% =txtRecIdNo.ClientID %>");
  2750. var rTel = GetValue("<% =txtRecTel.ClientID %>");
  2751. var rMobile = GetValue("<% =txtRecMobile.ClientID %>");
  2752. var rCity = GetValue("<% =txtRecCity.ClientID %>");
  2753. var rAdd1 = GetValue("<% =txtRecAdd1.ClientID %>");
  2754. var rEmail = GetValue("<% =txtRecEmail.ClientID %>");
  2755. var accountNo = GetValue("<% =txtRecDepAcNo.ClientID %>");
  2756. var pLocation = GetValue("<% =locationDDL.ClientID %>");
  2757. var pLocationText = $("#<%=locationDDL.ClientID %> option:selected").text();
  2758. var pSubLocation = $("#<% =subLocationDDL.ClientID %>").val();
  2759. var pSubLocationText = $("#<%=subLocationDDL.ClientID %> option:selected").text();
  2760. var tpExRate = $('#<%=hddTPExRate.ClientID%>').val();
  2761. var isManualSC = 'N';
  2762. var manualSC = $('#<%=lblServiceChargeAmt.ClientID%>').val();
  2763. var enrollCustomer = "N";
  2764. var collModeFrmCustomer = $("input[name='chkCollMode']:checked").val();
  2765. if (collModeFrmCustomer == undefined || collModeFrmCustomer == '') {
  2766. alert('Please choose collect mode first!');
  2767. return false;
  2768. }
  2769. //New params added
  2770. var sCustStreet = $('#<%=sCustStreet.ClientID%>').val();
  2771. var sCustLocation = $('#<%=custLocationDDL.ClientID%>').val();
  2772. var sCustomerType = $('#<%=ddlSendCustomerType.ClientID%>').val();
  2773. var company = GetValue("<% =companyName.ClientID %>");
  2774. if (sCustomerType === "4701") {
  2775. sfName = company;
  2776. }
  2777. var sCustBusinessType = $('#<%=ddlEmpBusinessType.ClientID%>').val();
  2778. var sCustIdIssuedCountry = $('#<%=ddlIdIssuedCountry.ClientID%>').val();
  2779. var sCustIdIssuedDate = $('#<%=txtSendIdExpireDate.ClientID%>').val();
  2780. var receiverId = $('#<%=ddlReceiver.ClientID%>').val();
  2781. var payoutPartnerId = $('#<%=hddPayoutPartner.ClientID%>').val();
  2782. var cashCollMode = collModeFrmCustomer;
  2783. var introducerTxt = $('#introducerTxt').val();
  2784. var rel = $("#<%=relationship.ClientID %> option:selected").text().replace("Select", "");
  2785. rel = rel.replace("Select", "");
  2786. var occupation = $("#<%=occupation.ClientID %> option:selected").val();
  2787. var payMsg = escape(GetValue("<% = txtPayMsg.ClientID %>"));
  2788. var cancelrequestId = '<%=GetResendId()%>';
  2789. var salary = $("#<%=ddlSalary.ClientID %> option:selected").val();
  2790. if (salary == "Select" || rIdType == "undefined")
  2791. salary = "";
  2792. var payerId = "";
  2793. var payerBranchId = "";
  2794. if ((payoutPartnerId === apiPartnerIds[0]) && collModeId === "2") {
  2795. payerId = $("#<%=ddlPayer.ClientID%>").val();
  2796. payerBranchId = $("#<%=ddlPayerBranch.ClientID%>").val();
  2797. if (payerBranchId === null || payerBranchId === "") {
  2798. alert("Payer Branch Data Not Selected Please Choose Payer Branch Information ");
  2799. return;
  2800. }
  2801. }
  2802. <%--var txnPwd = $("#<% =txnPassword.ClientID %>").val();--%>
  2803. var invoicePrint = $('#ContentPlaceHolder1_invoicePrintMode :checked').val();
  2804. var customerSignature = $('#<%=hddImgURL.ClientID%>').val();
  2805. if (type === "S") {
  2806. CheckSignatureCustomer();
  2807. <%--if (txnPwd === "") {
  2808. $("#<% =txnPassword.ClientID %>").focus();
  2809. alert("Txn Password Is Required");
  2810. return false;
  2811. }--%>
  2812. }
  2813. var customerPassword = $('#<%=customerPassword.ClientID%>').val();
  2814. var verifyTxnData = {
  2815. MethodName: "Verifytxn",
  2816. type: type, senderId: senderId, sfName: sfName, smName: smName, slName: slName, sIdType: sIdType, sIdNo: sIdNo, sIdValid: sIdValid, sGender: sGender,
  2817. sdob: sdob, sTel: sTel, sMobile: sMobile, sNaCountry: sNaCountry, sCity: sCity, sPostCode: sPostCode, sEmail: sEmail, sCompany: sCompany, benId: benId,
  2818. rfName: rfName, rmName: rmName, rlName: rlName, rIdType: rIdType, rIdNo: rIdNo, rGender: rGender, rTel: rTel, rMobile: rMobile,
  2819. rCity: rCity, rAdd1: rAdd1, rEmail: rEmail, accountNo: accountNo, pCountry: pCountry, payCountryId: pCountryId, collMode: collMode, collModeId: collModeId,
  2820. pBank: pBank, pBankText: pBankText, pBankBranch: pBankBranch, pBankBranchText: pBankBranchText, pAgent: pAgent, pAgentName: pAgentName, pBankType: pBankType,
  2821. pCurr: pCurr, collCurr: collCurr, collAmt: collAmt, payAmt: payAmt, sendAmt: sendAmt, scharge: scharge, customerTotalAmt: customerTotalAmt, discount: discount,
  2822. scDiscount: scDiscount, exRateOffer: exRateOffer, exRate: exRate, por: por, sof: sof, rel: rel, occupation: occupation, payMsg: payMsg, company: company,
  2823. newCustomer: newCustomer, EnrollCustomer: enrollCustomer, cancelrequestId: cancelrequestId, hdnreqAgent: hdnreqAgent, hdnreqBranch: hdnreqBranch, salary: salary,
  2824. pLocation: pLocation, pLocationText: pLocationText, pSubLocation: pSubLocation, tpExRate: tpExRate, manualSC: manualSC, isManualSC: isManualSC, sCustStreet: sCustStreet,
  2825. sCustLocation: sCustLocation, sCustomerType: sCustomerType, sCustBusinessType: sCustBusinessType, sCustIdIssuedCountry: sCustIdIssuedCountry,
  2826. sCustIdIssuedDate: sCustIdIssuedDate, receiverId: receiverId, payoutPartnerId: payoutPartnerId, cashCollMode: cashCollMode, invoicePrint: invoicePrint,
  2827. introducerTxt: introducerTxt, pSubLocationText: pSubLocationText, payerId: payerId, payerBranchId: payerBranchId/*, txnPwd: txnPwd*/, customerSignature: customerSignature,
  2828. customerPassword: customerPassword
  2829. };
  2830. $.post('<%=ResolveUrl("SendV2.aspx") %>?', verifyTxnData, function (responses) {
  2831. var response = JSON.parse(responses);
  2832. if (type == 'V') {
  2833. PopulateTxnDetails(response);
  2834. }
  2835. else if (type == 'S') {
  2836. var resultData = response[0].split(',');
  2837. alert(resultData[1]);
  2838. if (resultData[0] == "0" || resultData[0] == "100" || resultData[0] == "101") {
  2839. url = "/AgentNew/SendTxn/SendIntlReceipt.aspx?controlNo=" + resultData[2];
  2840. location.href = url;
  2841. return true;
  2842. }
  2843. else {
  2844. return false;
  2845. }
  2846. }
  2847. }).fail(function () {
  2848. alert("Due to unexpected errors we were unable to load data");
  2849. });
  2850. }
  2851. function SetVerifyTxnData() {
  2852. var sName = $('#<%=txtSendFirstName.ClientID%>').val();
  2853. if ($('#<%=txtSendFirstName.ClientID%>').val() != '') {
  2854. sName += ' ' + $('#<%=txtSendMidName.ClientID%>').val();
  2855. }
  2856. sName += ' ' + $('#<%=txtSendLastName.ClientID%>').val();
  2857. if ($('#<%=ddlSendCustomerType.ClientID%> option:selected').val() === "4701") {
  2858. sName = $("#<%=companyName.ClientID%>").val();
  2859. }
  2860. var sIdType = $("#<% =ddSenIdType.ClientID %> option:selected").text();
  2861. if (sIdType == "SELECT" || sIdType == undefined || sIdType == "")
  2862. sIdType = "";
  2863. else
  2864. sIdType = sIdType.split('|')[0];
  2865. $('#txtSenderName').html(GetFieldVaule(sName));
  2866. $('#txtSenderAddress').html(GetFieldVaule($('#<%=custLocationDDL.ClientID %> option:selected').text()));
  2867. $('#senderIdType').html(GetFieldVaule(sIdType));
  2868. $('#txtSenderIdNumber').html(GetFieldVaule($('#<%=txtSendIdNo.ClientID%>').val()));
  2869. $('#txtSenderIdExpiryDate').html(GetFieldVaule($('#<%=txtSendIdExpireDate.ClientID%>').val()));
  2870. $('#txtSenderDob').html(GetFieldVaule($('#<%=txtSendDOB.ClientID%>').val()));
  2871. $('#txtSenderCity').html(GetFieldVaule($('#<%=txtSendCity.ClientID%>').val()));
  2872. $('#txtSenderCountry').html(GetFieldVaule($('#<%=txtSendNativeCountry.ClientID %> option:selected').text()));
  2873. $('#txtSenderEmail').html(GetFieldVaule($('#<%=txtSendEmail.ClientID%>').val()));
  2874. $('#txtSenderContactNo').html(GetFieldVaule($('#<%=txtSendMobile.ClientID%>').val()));
  2875. var rName = $('#<%=txtRecFName.ClientID%>').val();
  2876. if ($('#<%=txtRecMName.ClientID%>').val() != '') {
  2877. rName += ' ' + $('#<%=txtRecMName.ClientID%>').val();
  2878. }
  2879. rName += ' ' + $('#<%=txtRecLName.ClientID%>').val();
  2880. var rIdType = $("#<% =ddlRecIdType.ClientID %> option:selected").text();
  2881. if (rIdType == "SELECT" || rIdType == "undefined")
  2882. rIdType = "";
  2883. $('#txtReceiverName').html(GetFieldVaule(rName));
  2884. $('#txtReceiverAddress').html(GetFieldVaule($('#<%=txtRecAdd1.ClientID%>').val()));
  2885. $('#receiverIdType').html(GetFieldVaule(rIdType));
  2886. $('#txtReceiverIdNumber').html(GetFieldVaule($('#<%=txtRecIdNo.ClientID%>').val()));
  2887. $('#txtReceiverIdExpiryDate').html(GetFieldVaule(''));
  2888. $('#txtReceiverCity').html(GetFieldVaule($('#<%=txtRecCity.ClientID%>').val()));
  2889. $('#txtReceiverCountry').html(GetFieldVaule($("#<%=pCountry.ClientID %> option:selected").text()));
  2890. $('#txtReceiverEmail').html(GetFieldVaule($('#<%=txtRecEmail.ClientID%>').val()));
  2891. $('#txtReceiverContactNo').html(GetFieldVaule($('#<%=txtRecMobile.ClientID%>').val()));
  2892. $('#txtCollAmtJpy').html(GetFieldVaule($('#ContentPlaceHolder1_txtCollAmt').val()));
  2893. $('#txtSentAmtJpy').html(GetFieldVaule($('#ContentPlaceHolder1_lblSendAmt').val()));
  2894. $('#txtServiceCharge').html(GetFieldVaule($('#ContentPlaceHolder1_lblServiceChargeAmt').val()));
  2895. $('#txtCustomerRate').html(GetFieldVaule($('#ContentPlaceHolder1_lblExRate').val()));
  2896. $('#txtPayoutRate').html(GetFieldVaule($('#ContentPlaceHolder1_txtPayAmt').val()));
  2897. $('#txtPCountry').html(GetFieldVaule($("#<%=pCountry.ClientID %> option:selected").text()));
  2898. $('#txtModeOfPayment').html(GetFieldVaule($("#<%=pMode.ClientID %> option:selected").text()));
  2899. $('#txtPayoutAgent').html(GetFieldVaule($("#<%=pAgent.ClientID %> option:selected").text()));
  2900. $('#txnRelationship').html(GetFieldVaule($("#<%=relationship.ClientID %> option:selected").text()));
  2901. $('#txtReceiverCity').html(GetFieldVaule($("#<%=subLocationDDL.ClientID %> option:selected").text()));
  2902. $('#por').html(GetFieldVaule($("#<%=purpose.ClientID %> option:selected").text()));
  2903. var branchName = $("#<%=branch.ClientID %> option:selected").text();
  2904. if (branchName == "SELECT BANK" || branchName == undefined || branchName == "")
  2905. branchName = "N/A";
  2906. $('#txtCustomerBranch').html(GetFieldVaule(branchName));
  2907. }
  2908. function PopulateTxnDetails(response) {
  2909. var resultData = response[0].split(',');
  2910. var errorCode = resultData[0];
  2911. if (errorCode != "0") {
  2912. if (errorCode === "1") {
  2913. alert(resultData[1]);
  2914. var $active = $('.wizard .nav-tabs li.active');
  2915. $($active).prev().find('a[data-toggle="tab"]').click();
  2916. $active = $('.wizard .nav-tabs li.active');
  2917. $($active).prev().find('a[data-toggle="tab"]').click();
  2918. $('#tab4').addClass('disabled');
  2919. $('#tab5').addClass('disabled');
  2920. }
  2921. if (errorCode == "100") {
  2922. if (response[1] != "") {
  2923. var confirmText = "Confirmation:\n_____________________________________";
  2924. confirmText += "\n\nYou are confirming to send this OFAC/DJ suspicious transaction!!!";
  2925. confirmText += "\n\nPlease note if this customer is found to be valid person from OFAC/DJ List then Teller will be charged fine from management";
  2926. confirmText += "\n\n\nPlease make sure you have proper evidence that show this customer is not from OFAC/DJ List";
  2927. document.getElementById("ofacData").innerHTML = response[1];
  2928. $("#ofacField").show();
  2929. $("#sendTxncc").text(confirmText);
  2930. }
  2931. var complainData = response[2];
  2932. if (complainData != "") {
  2933. document.getElementById("complinceData").innerHTML = response[1];
  2934. $("#complinceField").show();
  2935. }
  2936. }
  2937. if (errorCode == "101") {
  2938. var complainData = response[2];
  2939. if (complainData != "") {
  2940. document.getElementById("complinceData").innerHTML = complainData;
  2941. $("#complinceField").show();
  2942. }
  2943. }
  2944. if (errorCode == "102") {
  2945. var complainData = response[2];
  2946. if (complainData != "") {
  2947. document.getElementById("complinceData").innerHTML = complainData;
  2948. $("#complinceField").show();
  2949. }
  2950. }
  2951. }
  2952. }
  2953. </script>
  2954. <!-- #endregion Functions-->
  2955. </asp:Content>