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.

3316 lines
164 KiB

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