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.

4815 lines
210 KiB

  1. <%@ Page Title="" Language="C#" MasterPageFile="~/AgentNew/AgentMain.Master" AutoEventWireup="true" CodeBehind="SendV2.aspx.cs" Inherits="Swift.web.AgentNew.SendOnBehalf.SendV2" %>
  2. <%@ Register Src="/Component/AutoComplete/SwiftTextBox.ascx" TagName="SwiftTextBox" TagPrefix="uc1" %>
  3. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
  4. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  5. <style>
  6. #divStep1 .panel-body {
  7. background: rgba(236, 28, 28, 0.2);
  8. }
  9. .error {
  10. color: red;
  11. }
  12. #divStep1 .panel-body td {
  13. color: #212121;
  14. font-size: 12px !important;
  15. }
  16. #divStep1 .panel-body td .form-control {
  17. font-size: 12px !important;
  18. }
  19. input, textarea {
  20. text-transform: uppercase;
  21. }
  22. @media (max-width: 986px) {
  23. #msgRecDiv {
  24. width: 27%;
  25. }
  26. }
  27. @media (min-width: 1024px) {
  28. #msgRecDiv {
  29. width: 13%;
  30. }
  31. }
  32. </style>
  33. <script type="text/javascript">
  34. function AddNewReceiver(senderId) {
  35. url = "" + "/Remit/Administration/CustomerSetup/Benificiar/Manage.aspx?customerId=" + senderId + "&AddType=s";
  36. var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
  37. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  38. if (isChrome) {
  39. PopUpWindow(url, param);
  40. return true;
  41. }
  42. var id = PopUpWindow(url, param);
  43. if (id == "undefined" || id == null || id == "") {
  44. }
  45. else {
  46. PopulateReceiverDDL(senderId);
  47. SearchReceiverDetails(id);
  48. }
  49. };
  50. function PostMessageToParentAddReceiver(id) {
  51. var senderId = $("#txtSearchData_aValue").val();
  52. PopulateReceiverDDL(senderId);
  53. SearchReceiverDetails(id);
  54. };
  55. $(document).ready(function () {
  56. var customerIdFromMapping = '<%=GetCustomerId()%>';
  57. if (customerIdFromMapping !== null && customerIdFromMapping !== '') {
  58. //$('#NewCust').propAttr('checked', false);
  59. $('#ExistCust').propAttr('checked', true);
  60. ExistingData();
  61. PopulateReceiverDDL(customerIdFromMapping);
  62. SearchCustomerDetails(customerIdFromMapping, 'mapping');
  63. }
  64. CheckAvailableBalance('Cash Collect');
  65. $('.trScheme').hide();
  66. //$('.locationRow').hide();
  67. $("#editServiceCharge").attr("disabled", true);
  68. $("#lblServiceChargeAmt").attr("readonly", true);
  69. $("#ddlCustomerType").change(function () {
  70. var d = ["", ""];
  71. SetItem("<% =txtSearchData.ClientID%>", d);
  72. <% = txtSearchData.InitFunction() %>;
  73. });
  74. $("#editServiceCharge").change(function () {
  75. if ($('#allowEditSC').val() == 'N') {
  76. alert('You are not allowed to edit Service Charge!');
  77. $("#editServiceCharge").propAttr("checked", false);
  78. return false;
  79. }
  80. var ischecked = $(this).is(':checked');
  81. if (ischecked) {
  82. $('#lblServiceChargeAmt').removeAttr('disabled');
  83. $('#lblServiceChargeAmt').removeAttr('readonly');
  84. }
  85. else {
  86. $('#lblServiceChargeAmt').attr('disabled', true);
  87. $('#lblServiceChargeAmt').attr('readonly', true);
  88. }
  89. });
  90. });
  91. function ChangeCalcBy() {
  92. $("#txtPayAmt").val('0.00');
  93. $("#txtCollAmt").val('0.00');
  94. $('#lblServiceChargeAmt').val('0');
  95. $('#lblSendAmt').text('0');
  96. if ($("#txtPayAmt").is(":disabled")) {
  97. $('#txtCollAmt').attr('disabled', true);
  98. $('#txtPayAmt').attr('disabled', false);
  99. } else {
  100. $('#txtPayAmt').attr('disabled', true);
  101. $('#txtCollAmt').attr('disabled', false);
  102. }
  103. };
  104. function PostMessageToParent(id) {
  105. if (id == "undefined" || id == null || id == "") {
  106. }
  107. else {
  108. debugger
  109. var res = id.split('-:::-');
  110. if (res[0] == "1") {
  111. var errMsgArr = res[1].split('\n');
  112. for (var i = 0; i < errMsgArr.length; i++) {
  113. alert(errMsgArr[i]);
  114. }
  115. }
  116. else {
  117. //alert('called');
  118. ClearAllCustomerInfo();
  119. //window.location.replace("/Remit/Transaction/Agent/ReprintReceipt/SendIntlReceipt.aspx?controlNo=" + res[2]);
  120. window.location.replace("/AgentPanel/International/SendOnBehalf/SendIntlReceipt.aspx?controlNo=" + res[2] + "&invoicePrint=" + res[3]);
  121. }
  122. }
  123. };
  124. function ReCalculate() {
  125. if (!$("#lblServiceChargeAmt").attr("readonly")) {
  126. if (parseFloat($('#lblServiceChargeAmt').val()) >= 0) {
  127. CalculateTxn($("#txtCollAmt").val(), 'cAmt', 'Y');
  128. }
  129. else {
  130. alert('Service charge can not be negative!');
  131. $('#lblServiceChargeAmt').val('0');
  132. $('#lblServiceChargeAmt').focus();
  133. }
  134. }
  135. };
  136. function PostMessageToParentNew(id) {
  137. if (id == "undefined" || id == null || id == "") {
  138. alert('No customer selected!');
  139. }
  140. else {
  141. ClearSearchField();
  142. PopulateReceiverDDL(id);
  143. SearchCustomerDetails(id);
  144. }
  145. }
  146. function PickSenderData(obj) {
  147. var url = "";
  148. if (obj == "a") {
  149. url = "" + "TxnHistory/SenderAdvanceSearch.aspx";
  150. }
  151. if (obj == "s") {
  152. url = "" + "TxnHistory/SenderTxnHistory.aspx";
  153. }
  154. var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
  155. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  156. if (isChrome) {
  157. PopUpWindow(url, param);
  158. return true;
  159. }
  160. var id = PopUpWindow(url, param);
  161. if (id == "undefined" || id == null || id == "") {
  162. }
  163. else {
  164. ClearSearchField();
  165. PopulateReceiverDDL(id);
  166. SearchCustomerDetails(id);
  167. }
  168. };
  169. function PickReceiverFromSender(obj) {
  170. //var urlRoot = "%=GetStatic.GetUrlRoot() %>";PickReceiverFromSender
  171. var senderId = $('#finalSenderId').text();
  172. var sName = $('#senderName').text();
  173. if (senderId == "" || senderId == "undefined") {
  174. alert('Please select the Sender`s Details');
  175. return;
  176. }
  177. var url = "";
  178. if (obj === "a") {
  179. return AddNewReceiver(senderId);
  180. }
  181. if (obj == "r") {
  182. url = "" + "TxnHistory/ReceiverHistoryBySender.aspx?sname=" + sName + "&senderId=" + senderId;
  183. }
  184. if (obj == "s") {
  185. url = "" + "TxnHistory/SenderTxnHistory.aspx?senderId=" + senderId;
  186. }
  187. //var url = "" + "TxnHistory/ReceiverHistoryBySender.aspx?senderId=" + senderId;
  188. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  189. var res = PopUpWindow(url, param);
  190. if (res == "undefined" || res == null || res == "") {
  191. }
  192. else {
  193. //PickDataFromSender(res);
  194. SearchReceiverDetails(res);
  195. }
  196. };
  197. function PostMessageToParentNewFromCalculator(collAmt) {
  198. if (collAmt == "undefined" || collAmt == null || collAmt == "") {
  199. alert('No Amount selected!');
  200. }
  201. else {
  202. <%-- GetElement("<%=txtCollAmt.ClientID %>").value = collAmt;--%>
  203. SetValueById("<%=txtCollAmt.ClientID %>", collAmt, "");
  204. CalculateTxn();
  205. }
  206. }
  207. function PostMessageToParentNewForReceiver(id) {
  208. if (id == "undefined" || id == null || id == "") {
  209. alert('No customer selected!');
  210. }
  211. else {
  212. SearchReceiverDetails(id);
  213. }
  214. }
  215. function DDLReceiverOnChange() {
  216. var receiverId = $("#ddlReceiver").val();
  217. if (receiverId != '' && receiverId != undefined && receiverId != "0") {
  218. SearchReceiverDetails(receiverId);
  219. }
  220. else if (receiverId == "0") {
  221. PickReceiverFromSender('a');
  222. }
  223. else if (receiverId == null || receiverId == "") {
  224. $('.readonlyOnReceiverSelect').removeAttr("disabled");
  225. ClearReceiverData();
  226. }
  227. };
  228. function SearchReceiverDetails(customerId) {
  229. if (customerId == "" || customerId == null) {
  230. ClearReceiverData();
  231. alert('Invalid receiver selected!');
  232. }
  233. var dataToSend = { MethodName: 'SearchReceiver', customerId: customerId };
  234. var options =
  235. {
  236. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  237. data: dataToSend,
  238. dataType: 'JSON',
  239. type: 'POST',
  240. success: function (response) {
  241. ParseResponseForReceiverData(response);
  242. }
  243. };
  244. $.ajax(options);
  245. return true;
  246. }
  247. function ParseResponseForReceiverData(response) {
  248. $('.readonlyOnReceiverSelect').attr("disabled", "disabled");
  249. var data = jQuery.parseJSON(response);
  250. CheckSession(data);
  251. if (data[0].errorCode != "0") {
  252. alert(data[0].msg);
  253. return;
  254. }
  255. if (data.length > 0) {
  256. //****Transaction Detail****
  257. $("#receiverName").text(data[0].firstName + ' ' + data[0].middleName + ' ' + data[0].lastName1);
  258. $("#txtRecFName").val(data[0].firstName);
  259. $("#txtRecMName").val(data[0].middleName);
  260. $("#txtRecLName").val(data[0].lastName1);
  261. $("#txtRecAdd1").val(data[0].address);
  262. $("#txtRecCity").val(data[0].city);
  263. $("#txtRecMobile").val(data[0].mobile);
  264. $("#txtRecTel").val(data[0].homePhone);
  265. $("#txtRecIdNo").val(data[0].idNumber);
  266. $("#txtRecEmail").val(data[0].email);
  267. $("#ddlRecGender").val(data[0].gender);
  268. SetDDLValueSelected("ddlRecIdType", data[0].idType);
  269. SetDDLTextSelected("ddlRecGender", data[0].gender);
  270. SetDDLValueSelected("ddlReceiver", data[0].receiverId);
  271. //****Transaction Detail****
  272. ClearTxnData();
  273. SetDDLTextSelected("pCountry", data[0].country.toUpperCase());
  274. PcountryOnChange('c', data[0].paymentMethod.toUpperCase(), data[0].AGENTID);
  275. //$('#lblPayCurr').text(data[0].payoutCurr);
  276. //select bank branch
  277. if (data[0].paymentMethod.toUpperCase() == 'BANK DEPOSIT') {
  278. var isBranchByName = 'N';
  279. var branch = '';
  280. PopulateBankDetails(data[0].AGENTID, data[0].paymentMethod.toUpperCase(), isBranchByName, branch);
  281. }
  282. SetPayCurrency(data[0].COUNTRYID);
  283. PAgentChange();
  284. $('#txtRecDepAcNo').val(data[0].receiverAccountNo);
  285. ManageHiddenFields(data[0].paymentMethod.toUpperCase());
  286. $(".readonlyOnCustomerSelect").attr("disabled", "disabled");
  287. $("#txtpBranch_aValue").val('');
  288. $("#txtpBranch_aText").val('');
  289. }
  290. }
  291. function CallBackAutocomplete(id) {
  292. var d = [GetItem("<%=txtSearchData.ClientID %>")[0], GetItem("<%=txtSearchData.ClientID %>")[1].split('|')[0]];
  293. SetItem("<% =txtSearchData.ClientID%>", d);
  294. PopulateReceiverDDL(GetItem("<%=txtSearchData.ClientID %>")[0]);
  295. SearchCustomerDetails(GetItem("<%=txtSearchData.ClientID %>")[0]);
  296. }
  297. function PopulateReceiverDDL(customerId) {
  298. if (customerId == "" || customerId == null) {
  299. alert('Invalid customer selected!');
  300. }
  301. var dataToSend = { MethodName: 'PopulateReceiverDDL', customerId: customerId };
  302. var options =
  303. {
  304. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  305. data: dataToSend,
  306. dataType: 'JSON',
  307. type: 'POST',
  308. success: function (response) {
  309. PopulateReceiverDataDDL(response);
  310. }
  311. };
  312. $.ajax(options);
  313. return true;
  314. }
  315. function PopulateReceiverDataDDL(response) {
  316. var data = jQuery.parseJSON(response);
  317. var ddl = GetElement("ddlReceiver");
  318. $(ddl).empty();
  319. var option = document.createElement("option");
  320. option.text = 'Select Receiver';
  321. option.value = '';
  322. ddl.options.add(option);
  323. for (var i = 0; i < data.length; i++) {
  324. option = document.createElement("option");
  325. option.text = data[i].fullName.toUpperCase();
  326. option.value = data[i].receiverId;
  327. try {
  328. ddl.options.add(option);
  329. }
  330. catch (e) {
  331. alert(e);
  332. }
  333. }
  334. option = document.createElement("option");
  335. option.text = 'New Receiver';
  336. option.value = '0';
  337. ddl.options.add(option);
  338. }
  339. function GetCustomerSearchType() {
  340. return $('#ddlCustomerType').val();
  341. }
  342. function ClearSearchField() {
  343. var d = ["", ""];
  344. SetItem("<% =txtSearchData.ClientID%>", d);
  345. <% = txtSearchData.InitFunction() %>;
  346. }
  347. function CheckForMobileNumber(nField, fieldName) {
  348. var userInput = nField.value;
  349. if (userInput == "" || userInput == undefined) {
  350. return;
  351. }
  352. if (/^[0-9 ./\\()]*$/.test(userInput) == false) {
  353. alert('Special Character(e.g. !@#$%^&*) and alphabets are not allowed in field : ' + fieldName);
  354. setTimeout(function () { nField.focus(); }, 1);
  355. }
  356. }
  357. function LoadCalendars() {
  358. ShowCalDefault("#<% =txtSendIdValidDate.ClientID%>");
  359. CalIDIssueDate("#<% =txtSendIdExpireDate.ClientID%>");
  360. CalSenderDOB("#<% =txtSendDOB.ClientID%>");
  361. CalReceiverDOB("#<% =txtRecDOB.ClientID%>");
  362. VisaValidDateRec("#<% =txtRecValidDate.ClientID%>");
  363. }
  364. LoadCalendars();
  365. </script>
  366. <script type="text/javascript" language="javascript">
  367. $.validator.messages.required = "Required!";
  368. $(document).ready(function () {
  369. $("#form2").validate();
  370. });
  371. $(document).ajaxStart(function () {
  372. $("#DivLoad").show();
  373. });
  374. $(document).ajaxComplete(function (event, request, settings) {
  375. $("#DivLoad").hide();
  376. });
  377. function CheckSession(data) {
  378. if (data == undefined || data == "" || data == null)
  379. return;
  380. if (data[0].session_end == "1") {
  381. document.location = "../../../Logout.aspx";
  382. }
  383. }
  384. function GetpAgentId() {
  385. var pagent = $("#<%=pAgent.ClientID %> option:selected").val();
  386. return pagent;
  387. }
  388. function ResetAmountFields() {
  389. //Reset Fields
  390. $("#txtPayAmt").val('0');
  391. $('#txtPayAmt').attr("readonly", false);
  392. $("#lblSendAmt").text('0.00');
  393. $("#lblServiceChargeAmt").val('0');
  394. $("#lblExRate").text('0.00');
  395. $("#lblDiscAmt").text('0.00');
  396. $("#lblPayCurr").text('');
  397. GetElement("spnSchemeOffer").innerHTML = "";
  398. GetElement("spnWarningMsg").innerHTML = "";
  399. }
  400. function checkdata(amt, obj) {
  401. if (amt > 0)
  402. CalculateTxn(amt, obj);
  403. }
  404. function CalcOnEnter(e) {
  405. var evtobj = window.event ? event : e;
  406. var charCode = e.which || e.keyCode;
  407. // alert(charCode);
  408. if (charCode == 13) {
  409. // CollAmtOnChange();
  410. $("#btnCalculate").focus();
  411. }
  412. }
  413. function ManageSendIdValidity() {
  414. var senIdType = $("#ddSenIdType").val();
  415. if (senIdType == "") {
  416. $("#tdSenExpDateLbl").show();
  417. $("#tdSenExpDateTxt").show();
  418. $("#txtSendIdValidDate").attr("class", "required readonlyOnCustomerSelect form-control");
  419. }
  420. else {
  421. var senIdTypeArr = senIdType.split('|');
  422. if (senIdTypeArr[1] == "E") {
  423. $("#tdSenExpDateLbl").show();
  424. $("#tdSenExpDateTxt").show();
  425. $("#txtSendIdValidDate").attr("class", "required readonlyOnCustomerSelect form-control");
  426. }
  427. else {
  428. $("#tdSenExpDateLbl").hide();
  429. $("#tdSenExpDateTxt").hide();
  430. $("#txtSendIdValidDate").attr("class", "readonlyOnCustomerSelect form-control");
  431. }
  432. }
  433. }
  434. function CheckSenderIdOnKeyUp(me) {
  435. var sIdNo = me.value;
  436. if (sIdNo == "" || sIdNo == null || sIdNo == undefined) {
  437. return;
  438. }
  439. var dataToSend = { MethodName: "CheckSenderIdNumber", sIdNo: sIdNo };
  440. var options =
  441. {
  442. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  443. data: dataToSend,
  444. dataType: 'JSON',
  445. type: 'POST',
  446. success: function (response) {
  447. var data = jQuery.parseJSON(response);
  448. if (data[0].errorCode != "0") {
  449. GetElement("spnIdNumber").innerHTML = data[0].msg;
  450. GetElement("spnIdNumber").style.display = "block";
  451. }
  452. else {
  453. GetElement("spnIdNumber").innerHTML = "";
  454. GetElement("spnIdNumber").style.display = "none";
  455. }
  456. }
  457. };
  458. $.ajax(options);
  459. }
  460. function CheckSenderIdNumber(me) {
  461. if (me.readOnly) {
  462. GetElement("spnIdNumber").innerHTML = "";
  463. GetElement("spnIdNumber").style.display = "none";
  464. return;
  465. }
  466. CheckForSpecialCharacter(me, 'Sender ID Number');
  467. var sIdNo = me.value;
  468. var dataToSend = { MethodName: "CheckSenderIdNumber", sIdNo: sIdNo };
  469. var options =
  470. {
  471. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  472. data: dataToSend,
  473. dataType: 'JSON',
  474. type: 'POST',
  475. success: function (response) {
  476. var data = jQuery.parseJSON(response);
  477. if (data[0].errorCode != "0") {
  478. GetElement("spnIdNumber").innerHTML = data[0].msg;
  479. GetElement("spnIdNumber").style.display = "block";
  480. }
  481. else {
  482. GetElement("spnIdNumber").innerHTML = "";
  483. GetElement("spnIdNumber").style.display = "none";
  484. }
  485. }
  486. };
  487. $.ajax(options);
  488. };
  489. function LoadCustomerRate() {
  490. var pCountry = $("#pCountry option:selected").val();
  491. var pMode = $('#<%=pMode.ClientID %> option:selected').val();
  492. var pModeTxt = $('#<%=pMode.ClientID %> option:selected').text();
  493. var pAgent = $("#pAgent option:selected").val();
  494. if (pAgent === "undefined")
  495. pAgent = null;
  496. if (pModeTxt == "CASH PAYMENT TO OTHER BANK")
  497. pAgent = $("#paymentThrough option:selected").val();
  498. var collCurr = $('#lblCollCurr').text();
  499. var dataToSend = {
  500. MethodName: 'LoadCustomerRate', pCountry: pCountry, pMode: pMode, pAgent: pAgent, collCurr: collCurr
  501. };
  502. var options =
  503. {
  504. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  505. data: dataToSend,
  506. dataType: 'JSON',
  507. type: 'POST',
  508. success: function (response) {
  509. var data = jQuery.parseJSON(response);
  510. if (data == null || data == undefined || data == "")
  511. return;
  512. if (data[0].ErrCode != "0") {
  513. $("#lblExRate").text(data[0].Msg);
  514. return;
  515. }
  516. var exRate = data[0].exRate;
  517. var pCurr = data[0].pCurr;
  518. var limit = data[0].limit;
  519. var limitCurr = data[0].limitCurr;
  520. exRate = roundNumber(exRate, 10);
  521. $("#lblExRate").text(exRate);
  522. $("#lblExCurr").text(pCurr);
  523. $("#lblPerTxnLimit").text(limit);
  524. $("#lblPerTxnLimitCurr").text(limitCurr);
  525. return;
  526. }
  527. };
  528. $.ajax(options);
  529. return true;
  530. }
  531. function CollAmtOnChange() {
  532. var collAmt = $("#txtCollAmt").val();
  533. if (collAmt == "")
  534. collAmt = "0";
  535. var collAmtFormatted = CurrencyFormatted(collAmt); //collAmt;
  536. collAmtFormatted = CommaFormatted(collAmtFormatted);
  537. var collCurr = $('#lblCollCurr').text();
  538. if (collAmt == "0")
  539. return;
  540. //if (confirm("You have entered " + collAmtFormatted + " " + collCurr + " as collection amount")) {
  541. // checkdata(collAmt, 'cAmt');
  542. //}
  543. checkdata(collAmt, 'cAmt');
  544. }
  545. function ClearAllCustomerInfo() {
  546. $(".readonlyOnCustomerSelect").removeAttr("disabled");
  547. $('.readonlyOnReceiverSelect').removeAttr("disabled");
  548. ClearSearchSection();
  549. ClearAmountFields();
  550. ClearCollModeAndAvailableBal();
  551. };
  552. function ClearCollModeAndAvailableBal() {
  553. $('#availableBal').text('0');
  554. $('#11063').removeAttr('checked');
  555. $('#11062').propAttr('checked', true);
  556. $('.deposited-bank').hide();
  557. $('.deposited-bank-hide').show();
  558. };
  559. $(document).ready(function () {
  560. $('#txtpBranch_aText').attr("readonly", true);
  561. $("#txtCollAmt").blur(function () {
  562. CollAmtOnChange();
  563. });
  564. $("#txtPayAmt").blur(function () {
  565. checkdata($("#txtPayAmt").val(), 'pAmt');
  566. });
  567. //btnDepositDetail
  568. $('#btnDepositDetail').click(function () {
  569. var collAmt = PopUpWindow("CollectionDetail.aspx", "");
  570. if (collAmt == "undefined" || collAmt == null || collAmt == "") {
  571. collAmt = $('#txtCollAmt').text();
  572. }
  573. else {
  574. if ((collAmt) > 0) {
  575. SetValueById("<%=txtCollAmt.ClientID %>", collAmt, "");
  576. $('#txtCollAmt').attr("readonly", true);
  577. $('#txtPayAmt').attr("readonly", true);
  578. }
  579. else {
  580. SetValueById("<%=txtCollAmt.ClientID %>", "", "");
  581. SetValueById("<%=txtPayAmt.ClientID %>", "", "");
  582. $('#txtCollAmt').attr("readonly", false);
  583. $('#txtPayAmt').attr("readonly", false);
  584. }
  585. CalculateTxn(collAmt);
  586. }
  587. });
  588. $("#ddSenIdType").change(function () {
  589. ManageSendIdValidity();
  590. });
  591. $("#locationDDL").change(function () {
  592. LoadSublocation();
  593. });
  594. $("#subLocationDDL").change(function () {
  595. LoadTownSublocation();
  596. });
  597. $("#pCountry").change(function () {
  598. ResetAmountFields();
  599. $("#<%=pMode.ClientID %>").empty();
  600. $("#<%=pAgent.ClientID %>").empty();
  601. $("#tdLblBranch").hide();
  602. $("#tdTxtBranch").hide();
  603. $("#tdItelCouponIdLbl").hide();
  604. $("#tdItelCouponIdTxt").hide();
  605. $('#txtpBranch_aText').attr("class", "disabled form-control");
  606. $("#txtpBranch_err").hide();
  607. $("#txtpBranch_aValue").val('');
  608. $("#txtpBranch_aText").val('');
  609. $("#txtRecDepAcNo").val('');
  610. $("#lblExCurr").text('');
  611. $("#lblPayCurr").text('');
  612. GetElement("spnPayoutLimitInfo").innerHTML = "";
  613. if ($("#pCountry option:selected").val() != "") {
  614. PcountryOnChange('c', "");
  615. SetPayCurrency($("#pCountry").val());
  616. ManageLocationData();
  617. }
  618. });
  619. $("#pMode").change(function () {
  620. ManageHiddenFields();
  621. $("#txtRecDepAcNo").val('');
  622. $("#tdLblBranch").hide();
  623. $("#tdTxtBranch").hide();
  624. $('#txtpBranch_aText').attr("class", "disabled form-control");
  625. $("#txtpBranch_err").hide();
  626. $("#txtpBranch_aValue").val('');
  627. $("#txtpBranch_aText").val('');
  628. ReceivingModeOnChange();
  629. GetPayoutPartner();
  630. });
  631. //function GetPayoutPartner() {
  632. // GetPayoutPartner('');
  633. //};
  634. $("#paymentThrough").change(function () {
  635. ResetAmountFields();
  636. LoadCustomerRate();
  637. });
  638. $("#<%=ddlScheme.ClientID %>").change(function () {
  639. ResetAmountFields();
  640. $("#tdItelCouponIdLbl").hide();
  641. $("#tdItelCouponIdTxt").hide();
  642. if ($("#ddlScheme option:selected").text().toUpperCase() == "ITEL COUPON SCHEME") {
  643. $("#tdItelCouponIdLbl").show();
  644. $("#tdItelCouponIdTxt").show();
  645. }
  646. });
  647. });
  648. function LoadSublocation() {
  649. var pLocation = $('#locationDDL').val();
  650. var dataToSend = { MethodName: 'getSubLocation', PLocation: pLocation };
  651. var options = {
  652. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  653. data: dataToSend,
  654. dataType: 'JSON',
  655. type: 'POST',
  656. success:
  657. function (response) {
  658. LoadSubLocationDDL(response);
  659. },
  660. error: function (result) {
  661. alert("Due to unexpected errors we were unable to load data");
  662. }
  663. };
  664. $.ajax(options);
  665. }
  666. function LoadSubLocationDDL(response) {
  667. var data = jQuery.parseJSON(response);
  668. var ddl = GetElement("<%=subLocationDDL.ClientID %>");
  669. $(ddl).empty();
  670. var option;
  671. option = document.createElement("option");
  672. option.text = "Select City";
  673. option.value = "";
  674. ddl.options.add(option);
  675. for (var i = 0; i < data.length; i++) {
  676. option = document.createElement("option");
  677. option.text = data[i].LOCATIONNAME;
  678. option.value = data[i].LOCATIONID;
  679. try {
  680. ddl.options.add(option);
  681. }
  682. catch (e) {
  683. alert(e);
  684. }
  685. }
  686. }
  687. function LoadTownSublocation() {
  688. var subLocation = $('#ddlTown').val();
  689. if (subLocation === null && subLocation === "") {
  690. return alert("Select City Name");
  691. }
  692. var dataToSend = { MethodName: 'getTownLocation', subLocation: subLocation };
  693. var options = {
  694. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  695. data: dataToSend,
  696. dataType: 'JSON',
  697. type: 'POST',
  698. success:
  699. function (response) {
  700. LoadTownLocationDDL(response);
  701. },
  702. error: function (result) {
  703. alert("Due to unexpected errors we were unable to load data");
  704. }
  705. };
  706. $.ajax(options);
  707. }
  708. function LoadTownLocationDDL(response) {
  709. var data = jQuery.parseJSON(response);
  710. var ddl = GetElement("<%=ddlTown.ClientID %>");
  711. $(ddl).empty();
  712. var option;
  713. option = document.createElement("option");
  714. option.text = "Select Town";
  715. option.value = "";
  716. ddl.options.add(option);
  717. for (var i = 0; i < data.length; i++) {
  718. option = document.createElement("option");
  719. option.text = data[i].LOCATIONNAME;
  720. option.value = data[i].LOCATIONID;
  721. try {
  722. ddl.options.add(option);
  723. }
  724. catch (e) {
  725. alert(e);
  726. }
  727. }
  728. }
  729. $(function () {
  730. $('#btnCalcClean').click(function () {
  731. ClearTxnData();
  732. });
  733. });
  734. //function to clear transaction
  735. function ClearTxnData() {
  736. $("#pAgent").empty();
  737. $("#pMode").empty();
  738. $("#txtpBranch_aValue").val("");
  739. $("#txtpBranch_aText").val("");
  740. $("#txtRecDepAcNo").val("");
  741. $("#txtCollAmt").val("0");
  742. $('#txtCollAmt').attr("readonly", false);
  743. $("#txtPayAmt").val("0");
  744. $('#txtPayAmt').attr("readonly", false);
  745. $("#lblSendAmt").text('0.00');
  746. $("#lblServiceChargeAmt").val('0');
  747. $("#lblExRate").text('0.00');
  748. $("#lblDiscAmt").text('0.00');
  749. $("#lblExRate").text('0.00');
  750. $("#scDiscount").val('0.00');
  751. $("#exRateOffer").val('0.00');
  752. $("#lblPayCurr").text("");
  753. $("#lblPerTxnLimit").text('0.00');
  754. SetDDLValueSelected("pCountry", "");
  755. SetDDLValueSelected("ddlSalary", "");
  756. SetDDLTextSelected("ddlScheme", "");
  757. GetElement("spnWarningMsg").innerHTML = "";
  758. }
  759. function SearchCustomerDetails(customerId, type) {
  760. if (customerId == "" || customerId == null) {
  761. alert('Search value is missing');
  762. $('#txtSearchData').focus();
  763. return false;
  764. }
  765. var dataToSend = { MethodName: 'SearchCustomer', customerId: customerId };
  766. var options =
  767. {
  768. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  769. data: dataToSend,
  770. dataType: 'JSON',
  771. type: 'POST',
  772. success: function (response) {
  773. ParseResponseData(response);
  774. if (type == 'mapping') {
  775. var data = jQuery.parseJSON(response);
  776. var d = [customerId, data[0].senderName];
  777. SetItem("<% =txtSearchData.ClientID%>", d);
  778. }
  779. }
  780. };
  781. $.ajax(options);
  782. return true;
  783. }
  784. ////calculation part
  785. $(function () {
  786. $('#btnCalculate').click(function () {
  787. CalculateTxn();
  788. });
  789. });
  790. function CalculateTxn(amt, obj, isManualSc) {
  791. //check available balance in case of existing customer
  792. var collAmt = parseFloat($('#txtCollAmt').val());
  793. var availableBal = parseFloat($('#availableBal').text());
  794. var customerId = $('#txtSearchData_aValue').val();
  795. if ($('#11063').is(':checked')) {
  796. if (!$('#NewCust').is(':checked')) {
  797. if (collAmt > availableBal) {
  798. alert('Collection amount can not be greated then Available Balance!');
  799. ClearAmountFields();
  800. return false;
  801. }
  802. }
  803. }
  804. if (isManualSc == '' || isManualSc == undefined) {
  805. isManualSc = 'N';
  806. }
  807. $("#DivLoad").show();
  808. var pCountry = GetValue("<%=pCountry.ClientID %>");
  809. var pCountrytxt = $("#<%=pCountry.ClientID %> option:selected").text();
  810. var pMode = GetValue("<%=pMode.ClientID %>");
  811. var pModetxt = $("#<%=pMode.ClientID %> option:selected").text();
  812. if (pCountry == "" || pCountry == null || pCountry == undefined) {
  813. alert("Please choose payout country");
  814. GetElement("<%=pCountry.ClientID %>").focus();
  815. return false;
  816. }
  817. if (pMode == "" || pMode == null || pMode == undefined) {
  818. alert("Please choose payment mode");
  819. GetElement("<%=pMode.ClientID %>").focus();
  820. return false;
  821. }
  822. var pAgent = Number(GetValue("<%=pAgent.ClientID %>"));
  823. var pAgentBranch = GetValue("txtpBranch_aValue");
  824. if (pModetxt == "CASH PAYMENT TO OTHER BANK") {
  825. pAgent = $("#<%=paymentThrough.ClientID %> option:selected").val();
  826. pAgentBranch = "";
  827. if (pAgent == "" || pAgent == undefined)
  828. pAgent = "";
  829. }
  830. var collAmt = GetValue("<%=txtCollAmt.ClientID %>");
  831. var txtCustomerLimit = GetValue("txtCustomerLimit");
  832. var txnPerDayCustomerLimit = GetValue("<%=txnPerDayCustomerLimit.ClientID %>");
  833. var schemeCode = GetValue("<%=ddlScheme.ClientID %>");
  834. if (obj == "cAmt")
  835. collAmt = amt;
  836. if (parseFloat(txtCustomerLimit) + parseFloat(collAmt) > txnPerDayCustomerLimit) {
  837. alert('Transaction cannot be proceed. Customer limit exceeded ' + parseFloat(txnPerDayCustomerLimit));
  838. ClearAmountFields();
  839. return false;
  840. }
  841. var payAmt = GetValue("<%=txtPayAmt.ClientID %>");
  842. if (obj == "pAmt")
  843. payAmt = amt;
  844. var payCurr = $('#pCurrDdl').val();
  845. var collCurr = $('#lblCollCurr').text();
  846. var senderId = $('#finalSenderId').text();
  847. var couponId = $("#iTelCouponId").val();
  848. var sc = $("#lblServiceChargeAmt").val();
  849. if (pCountry == "203" && payCurr == "USD") {
  850. if ((pMode == "1" && pAgent != "2091") || (pMode != "12" && pAgent != "2091")) {
  851. alert('USD receiving is only allow for Door to Door');
  852. ClearAmountFields();
  853. return false;
  854. }
  855. }
  856. var dataToSend = {
  857. MethodName: 'CalculateTxn', pCountry: pCountry, pCountrytxt: pCountrytxt, pMode: pMode, pAgent: pAgent
  858. , pAgentBranch: pAgentBranch, collAmt: collAmt, payAmt: payAmt, payCurr: payCurr, collCurr: collCurr
  859. , pModetxt: pModetxt, senderId: senderId, schemeCode: schemeCode, couponId: couponId, isManualSc: isManualSc
  860. , sc: sc
  861. };
  862. var options =
  863. {
  864. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  865. data: dataToSend,
  866. dataType: 'JSON',
  867. type: 'POST',
  868. success: function (response) {
  869. ParseCalculateData(response, obj);
  870. }
  871. };
  872. $.ajax(options);
  873. $("#DivLoad").hide();
  874. return true;
  875. };
  876. function ClearAmountFields() {
  877. $('#lblSendAmt').text('0.00');
  878. $('#lblExRate').text('0.00');
  879. $('#lblPerTxnLimit').text('0.00');
  880. $('#lblServiceChargeAmt').val('0');
  881. $('#lblDiscAmt').text('0.00');
  882. SetValueById("<%=txtCollAmt.ClientID %>", '0.00', "");
  883. SetValueById("<%=txtPayAmt.ClientID %>", '0.00', "");
  884. GetElement("spnSchemeOffer").innerHTML = "";
  885. }
  886. //original code comment by gagan
  887. //Calculate Button Pressed and Json return;
  888. function ParseCalculateData(response, amtType) {
  889. var data = jQuery.parseJSON(response);
  890. CheckSession1(data);
  891. if (data[0].ErrCode == "1") {
  892. alert(data[0].Msg);
  893. ClearAmountFields();
  894. return;
  895. }
  896. if (data[0].ErrCode == "101") {
  897. SetValueById("spnWarningMsg", "", data[0].Msg);
  898. }
  899. $('#lblSendAmt').text(parseFloat(Number(data[0].sAmt).toFixed(3))); //
  900. $('#lblExRate').text(roundNumber(data[0].exRate, 8));
  901. $('#lblPayCurr').text(data[0].pCurr);
  902. $('#lblExCurr').text(data[0].pCurr);
  903. if ($('#allowEditSC').val() == 'Y') {
  904. $("#editServiceCharge").attr("disabled", false);
  905. }
  906. $('#lblPerTxnLimit').text(data[0].limit);
  907. $('#lblPerTxnLimitCurr').text(data[0].limitCurr);
  908. if (!$("#editServiceCharge").is(':checked')) {
  909. $('#lblServiceChargeAmt').attr('disabled', 'disabled');
  910. }
  911. $('#lblServiceChargeAmt').val(parseFloat(data[0].scCharge).toFixed(0));
  912. if (data[0].tpExRate != '' || data[0].tpExRate != undefined) {
  913. $('#hddTPExRate').val(data[0].tpExRate)
  914. }
  915. SetValueById("<%=txtCollAmt.ClientID %>", parseFloat(Number(data[0].collAmt).toFixed(3)), ""); //
  916. SetValueById("<%=lblSendAmt.ClientID %>", parseFloat(Number(data[0].sAmt).toFixed(3)), ""); //
  917. SetValueById("<%=txtPayAmt.ClientID %>", parseFloat(Number(data[0].pAmt).toFixed(2)), "");
  918. var exRateOffer = data[0].exRateOffer;
  919. var scOffer = data[0].scOffer;
  920. var scDiscount = data[0].scDiscount;
  921. SetValueById("scDiscount", data[0].scDiscount, "");
  922. SetValueById("exRateOffer", data[0].exRateOffer, "");
  923. var html = "<span style='color: red;'>" + exRateOffer + "</span> (Exchange Rate)<br />";
  924. html += "<span style='color: red;'>" + scDiscount + "</span> (Service Charge)";
  925. SetValueById("spnSchemeOffer", "", html);
  926. // CheckThriK(parseFloat(data[0].collAmt).toFixed(2));
  927. }
  928. //edited by gagan
  929. //Calculate Button Pressed and Json return;
  930. <%--function ParseCalculateData(response, amtType) {
  931. var data = jQuery.parseJSON(response);
  932. CheckSession1(data);
  933. if (data.ResponseCode== "1") {
  934. alert(data.Msg);
  935. ClearAmountFields();
  936. return;
  937. }
  938. if (data.ResponseCode == "101") {
  939. SetValueById("spnWarningMsg", "", data.Msg);
  940. }
  941. $('#lblSendAmt').text(parseFloat(Number(data.Data.sAmt).toFixed(3))); //
  942. $('#lblExRate').text(roundNumber(data.Data.exRate, 8));
  943. $('#lblPayCurr').text(data.Data.pCurr);
  944. $('#lblExCurr').text(data.Data.pCurr);
  945. if ($('#allowEditSC').val() == 'Y') {
  946. $("#editServiceCharge").attr("disabled", false);
  947. }
  948. $('#lblPerTxnLimit').text(data.Data.limit);
  949. $('#lblPerTxnLimitCurr').text(data.Data.limitCurr);
  950. if (!$("#editServiceCharge").is(':checked')) {
  951. $('#lblServiceChargeAmt').attr('disabled', 'disabled');
  952. }
  953. $('#lblServiceChargeAmt').val(parseFloat(data.Data.scCharge).toFixed(0));
  954. if (data.Data.tpExRate != '' || data.Data.tpExRate != undefined) {
  955. $('#hddTPExRate').val(data.Data.tpExRate)
  956. }
  957. SetValueById("<%=txtCollAmt.ClientID %>", parseFloat(Number(data.Data.collAmt).toFixed(3)), ""); //
  958. SetValueById("<%=lblSendAmt.ClientID %>", parseFloat(Number(data.Data.sAmt).toFixed(3)), ""); //
  959. SetValueById("<%=txtPayAmt.ClientID %>", parseFloat(Number(data.Data.pAmt).toFixed(2)), "");
  960. var exRateOffer = data.Data.exRateOffer;
  961. var scOffer = data.Data.scOffer;
  962. var scDiscount = data.Data.scDiscount;
  963. SetValueById("scDiscount", data.Data.scDiscount, "");
  964. SetValueById("exRateOffer", data.Data.exRateOffer, "");
  965. var html = "<span style='color: red;'>" + exRateOffer + "</span> (Exchange Rate)<br />";
  966. html += "<span style='color: red;'>" + scDiscount + "</span> (Service Charge)";
  967. SetValueById("spnSchemeOffer", "", html);
  968. // CheckThriK(parseFloat(data[0].collAmt).toFixed(2));
  969. }--%>
  970. var eddval = "<%=Swift.web.Library.GetStatic.ReadWebConfig("cddEddBal","300000") %>";
  971. function CheckThriK(sAmt) {
  972. GetElement("<%=sourceOfFund.ClientID %>").className = "";
  973. GetElement("<%=purpose.ClientID %>").className = "";
  974. $('#sourceOfFund_err').html("");
  975. $('#purpose_err').html("");
  976. if (sAmt >= parseInt(eddval)) {
  977. GetElement("<%=sourceOfFund.ClientID %>").className = "required";
  978. GetElement("<%=purpose.ClientID %>").className = "required";
  979. $('#sourceOfFund_err').html("*");
  980. $('#purpose_err').html("*");
  981. }
  982. }
  983. function CheckSession1(data) {
  984. if (data == undefined || data == "" || data == null)
  985. return;
  986. if (data.session_end == "1") {
  987. document.location = "../../../Logout.aspx";
  988. }
  989. }
  990. //load payement mode
  991. function LoadPayMode(response, myDDL, recall, selectField, obj) {
  992. var data = jQuery.parseJSON(response);
  993. CheckSession(data);
  994. $(myDDL).empty();
  995. var option;
  996. if (selectField != "" && selectField != undefined) {
  997. option = document.createElement("option");
  998. option.text = selectField;
  999. option.value = "";
  1000. myDDL.options.add(option);
  1001. }
  1002. for (var i = 0; i < data.length; i++) {
  1003. option = document.createElement("option");
  1004. option.text = data[i].typeTitle;
  1005. option.value = data[i].serviceTypeId;
  1006. try {
  1007. myDDL.options.add(option);
  1008. }
  1009. catch (e) {
  1010. alert(e);
  1011. }
  1012. }
  1013. if (recall == 'pcurr') {
  1014. SetDDLTextSelected("pMode", obj);
  1015. //PcountryOnChange(recall);
  1016. }
  1017. //ManageLocationData();
  1018. }
  1019. function ParseLoadDDl(response, myDDL, recall, selectField) {
  1020. //alert(recall);
  1021. var data = jQuery.parseJSON(response);
  1022. CheckSession(data);
  1023. var ddl2 = GetElement("<%=pAgentDetail.ClientID %>");
  1024. var ddl3 = GetElement("<%=pAgentMaxPayoutLimit.ClientID %>");
  1025. $(ddl2).empty();
  1026. $(ddl3).empty();
  1027. $(myDDL).empty();
  1028. GetElement("spnPayoutLimitInfo").innerHTML = "";
  1029. if ($("#pMode option:selected").val() != "" && recall == "agentSelection") {
  1030. $('#hdnreqAgent').text(data[0].agentSelection);
  1031. }
  1032. var option;
  1033. if (selectField != "" && selectField != undefined) {
  1034. option = document.createElement("option");
  1035. option.text = selectField;
  1036. option.value = "";
  1037. myDDL.options.add(option);
  1038. }
  1039. for (var i = 0; i < data.length; i++) {
  1040. option = document.createElement("option");
  1041. option.text = data[i].AGENTNAME.toUpperCase();
  1042. option.value = data[i].bankId;
  1043. var option2 = document.createElement("option");
  1044. option2.value = data[i].bankId;
  1045. option2.text = data[i].FLAG;
  1046. var option3 = document.createElement("option");
  1047. option3.value = data[i].bankId;
  1048. option3.text = data[i].maxPayoutLimit;
  1049. try {
  1050. myDDL.options.add(option);
  1051. ddl2.options.add(option2);
  1052. ddl3.options.add(option3);
  1053. }
  1054. catch (e) {
  1055. alert(e);
  1056. }
  1057. }
  1058. if (data[0].AGENTNAME == "[SELECT BANK]") {
  1059. $('#pAgent_err').show();
  1060. GetElement("pAgent_err").innerHTML = "*";
  1061. GetElement("<%=pAgent.ClientID %>").className = "required form-control";
  1062. }
  1063. else {
  1064. $('#pAgent_err').hide();
  1065. GetElement("pAgent_err").innerHTML = "";
  1066. GetElement("<%=pAgent.ClientID %>").className = "form-control";
  1067. }
  1068. var pCountry = $("#pCountry option:selected").text();
  1069. var pCurr = $("#lblPayCurr").text();
  1070. GetElement("spnPayoutLimitInfo").innerHTML = "Payout Limit for " + pCountry + " : " + data[0].maxPayoutLimit;
  1071. }
  1072. function SetDDLTextSelected(ddl, selectText) {
  1073. $("#" + ddl + " option").each(function () {
  1074. if ($(this).text() == selectText) {
  1075. $(this).attr("selected", "selected");
  1076. return;
  1077. }
  1078. });
  1079. }
  1080. function SetDDLValueSelected(ddl, selectText) {
  1081. $("#" + ddl + " option").each(function () {
  1082. if ($(this).val() == selectText) {
  1083. $(this).attr("selected", "selected");
  1084. return;
  1085. }
  1086. });
  1087. }
  1088. function ClickEnroll() {
  1089. if ($('#EnrollCust').is(':checked')) {
  1090. if ($('#NewCust').is(':checked') == false && $('#senderName').text() == "" || $('#senderName').text() == null) {
  1091. ClearSearchSection();
  1092. ClearData();
  1093. }
  1094. $('#lblMem').show();
  1095. $('#valMem').show();
  1096. $('#memberCode_err').html("*");
  1097. return;
  1098. }
  1099. $('#NewCust').attr("checked", false);
  1100. $('#lblMem').hide();
  1101. $('#valMem').hide();
  1102. $('#memberCode_err').html("");
  1103. }
  1104. function ExistingData() {
  1105. if ($('#ExistCust').is(':checked')) {
  1106. GetElement("<%=NewCust.ClientID %>").checked = false;
  1107. ClearData();
  1108. }
  1109. else {
  1110. GetElement("<%=NewCust.ClientID %>").checked = true;
  1111. ClearData();
  1112. }
  1113. }
  1114. //clear data btnClear
  1115. function ClearData() {
  1116. var a = false;
  1117. var b = false;
  1118. if ($('#NewCust').is(':checked')) {
  1119. $(".readonlyOnCustomerSelect").removeAttr("disabled");
  1120. $('.readonlyOnReceiverSelect').removeAttr("disabled");
  1121. $(".showOnCustomerSelect").addClass("hidden");
  1122. a = false;
  1123. b = true;
  1124. ClearSearchSection();
  1125. HideElement('tblSearch');
  1126. $('#divHideShow').hide();
  1127. GetElement("<%=ExistCust.ClientID %>").checked = false;
  1128. }
  1129. else {
  1130. $(".readonlyOnCustomerSelect").attr("disabled", "disabled");
  1131. $(".showOnCustomerSelect").removeClass("hidden");
  1132. ShowElement('tblSearch');
  1133. $('#divHideShow').show();
  1134. GetElement("<%=ExistCust.ClientID %>").checked = true;
  1135. }
  1136. $('#txtSendFirstName').attr("readonly", a);
  1137. $('#txtSendMidName').attr("readonly", a);
  1138. $('#txtSendLastName').attr("readonly", a);
  1139. $('#txtSendSecondLastName').attr("readonly", a);
  1140. <%-- GetElement("<%=ddSenIdType.ClientID %>").disabled = a;--%>
  1141. $('#txtSendIdNo').attr("readonly", a);
  1142. // $('#txtSendDOB').attr("readonly", a);
  1143. $('#txtSendNativeCountry').attr("readonly", a);
  1144. //$('#btnSearchCustomer').attr("disabled", b);
  1145. //EnableDisableBtn("btnSearchCustomer", b);
  1146. $('#btnAdvSearch').attr("disabled", b);
  1147. EnableDisableBtn("btnAdvSearch", b);
  1148. $('#availableBal').text('0');
  1149. }
  1150. function SchemeByPCountry() {
  1151. var pCountry = GetValue("<%=pCountry.ClientID %>");
  1152. var pAgent = GetValue("<%=pAgent.ClientID %>");
  1153. var sCustomerId = $('#finalSenderId').text();
  1154. if (pCountry == "" || pCountry == null)
  1155. return;
  1156. var dataToSend = { MethodName: 'LoadSchemeByRcountry', pCountry: pCountry, pAgent: pAgent, sCustomerId: sCustomerId };
  1157. var option;
  1158. var options =
  1159. {
  1160. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  1161. data: dataToSend,
  1162. dataType: 'JSON',
  1163. type: 'POST',
  1164. success: function (response) {
  1165. var myDDL = document.getElementById("<%=ddlScheme.ClientID %>");
  1166. $(myDDL).empty();
  1167. option = document.createElement("option");
  1168. option.text = "Select";
  1169. option.value = "";
  1170. myDDL.options.add(option);
  1171. var data = jQuery.parseJSON(response);
  1172. CheckSession(data);
  1173. if (response == "") {
  1174. $(".trScheme").hide();
  1175. $("#tdScheme").hide();
  1176. $("#tdSchemeVal").hide();
  1177. return false;
  1178. }
  1179. $(".trScheme").show();
  1180. $("#tdScheme").show();
  1181. $("#tdSchemeVal").show();
  1182. for (var i = 0; i < data.length; i++) {
  1183. option = document.createElement("option");
  1184. option.text = data[i].schemeName;
  1185. option.value = data[i].schemeCode;
  1186. try {
  1187. myDDL.options.add(option);
  1188. }
  1189. catch (e) {
  1190. alert(e);
  1191. }
  1192. }
  1193. return true;
  1194. }
  1195. };
  1196. $.ajax(options);
  1197. };
  1198. // pcountryn onchange
  1199. function PcountryOnChange(obj, pmode) {
  1200. PcountryOnChange(obj, pmode, "");
  1201. };
  1202. function PcountryOnChange(obj, pmode, pAgentSelected) {
  1203. var pCountry = GetValue("<%=pCountry.ClientID %>"); //"MobileNo";
  1204. if (pCountry == "" || pCountry == null)
  1205. return;
  1206. var method = "";
  1207. if (obj == 'c') {
  1208. method = "PaymentModePcountry";
  1209. }
  1210. if (obj == 'pcurr') {
  1211. method = "PCurrPcountry";
  1212. }
  1213. var dataToSend = { MethodName: method, pCountry: pCountry };
  1214. var options =
  1215. {
  1216. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  1217. data: dataToSend,
  1218. dataType: 'JSON',
  1219. type: 'POST',
  1220. async: false,
  1221. success: function (response) {
  1222. //SchemeByPCountry();
  1223. if (obj == 'c') {
  1224. var data = jQuery.parseJSON(response);
  1225. LoadPayMode(response, document.getElementById("<%=pMode.ClientID %>"), 'pcurr', "", pmode);
  1226. ReceivingModeOnChange("", pAgentSelected);
  1227. GetPayoutPartner(data[0].serviceTypeId);
  1228. }
  1229. else if (obj == 'pcurr') {
  1230. var data = jQuery.parseJSON(response);
  1231. if (response == "")
  1232. return false;
  1233. $('#lblPayCurr').text(data[0].currencyCode);
  1234. $('#lblExCurr').text(data[0].currencyCode);
  1235. return true;
  1236. }
  1237. return true;
  1238. },
  1239. error: function (result) {
  1240. alert("Due to unexpected errors we were unable to load data");
  1241. }
  1242. };
  1243. $.ajax(options);
  1244. };
  1245. function ReceivingModeOnChange(pModeSelected, pAgentSelected) {
  1246. ResetAmountFields();
  1247. $("#<%=pAgent.ClientID %>").empty();
  1248. PaymentModeChange(pModeSelected, pAgentSelected);
  1249. };
  1250. // WHILE CLICKING COLL MODE POPULATE AGENT/BANK
  1251. function PaymentModeChange(pModeSelected, pAgentSelected) {
  1252. var pMode = "";
  1253. if (pModeSelected == "" || pModeSelected == null)
  1254. pMode = $("#<%=pMode.ClientID %> option:selected").text();
  1255. else {
  1256. pMode = pModeSelected;
  1257. }
  1258. pCountry = GetValue("<%=pCountry.ClientID %>");
  1259. $('#trAccno').hide();
  1260. $("#txtRecDepAcNo").attr("class", "form-control");
  1261. $('#trForCPOB').hide();
  1262. GetElement("<%=paymentThrough.ClientID %>").className = "";
  1263. if (pMode == "BANK DEPOSIT") {
  1264. $('#trAccno').show();
  1265. $("#txtRecDepAcNo").attr("class", "required form-control");
  1266. $('#trAccno').show();
  1267. }
  1268. var dataToSend = { MethodName: "loadAgentBank", pMode: pMode, pCountry: pCountry };
  1269. var options =
  1270. {
  1271. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1272. data: dataToSend,
  1273. dataType: 'JSON',
  1274. type: 'POST',
  1275. success: function (response) {
  1276. LoadAgentSetting();
  1277. ParseLoadDDl(response, GetElement("<%=pAgent.ClientID %>"), 'agentSelection', "");
  1278. if (pAgentSelected != "" && pAgentSelected != null && pAgentSelected != undefined) {
  1279. SetDDLValueSelected("<%=pAgent.ClientID %>", pAgentSelected);
  1280. }
  1281. LoadCustomerRate();
  1282. }
  1283. };
  1284. $.ajax(options);
  1285. };
  1286. function LoadAgentSetting() {
  1287. var pCountry = $("#pCountry option:selected").val();
  1288. var pMode = $("#pMode option:selected").val();
  1289. var pModeTxt = $("#pMode option:selected").text();
  1290. var dataToSend = { MethodName: "PAgentChange", pCountry: pCountry, pMode: pMode };
  1291. var options =
  1292. {
  1293. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1294. data: dataToSend,
  1295. dataType: 'JSON',
  1296. type: 'POST',
  1297. success: function (response) {
  1298. ApplyAgentSetting(response, pModeTxt);
  1299. }
  1300. };
  1301. $.ajax(options);
  1302. };
  1303. function LoadPaymentThroughDdl(response, myDdl, label) {
  1304. var data = jQuery.parseJSON(response);
  1305. CheckSession(data);
  1306. $(myDdl).empty();
  1307. var option;
  1308. if (label != "") {
  1309. option = document.createElement("option");
  1310. option.text = label;
  1311. option.value = "";
  1312. myDdl.options.add(option);
  1313. }
  1314. for (var i = 0; i < data.length; i++) {
  1315. option = document.createElement("option");
  1316. option.text = data[i].agentName;
  1317. option.value = data[i].agentId;
  1318. try {
  1319. myDdl.options.add(option);
  1320. }
  1321. catch (e) {
  1322. alert(e);
  1323. }
  1324. }
  1325. };
  1326. function PBranchChange(pBranch) {
  1327. ResetAmountFields();
  1328. var dataToSend = { MethodName: "PBranchChange", pBranch: pBranch };
  1329. var options =
  1330. {
  1331. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1332. data: dataToSend,
  1333. dataType: 'JSON',
  1334. type: 'POST',
  1335. success: function (response) {
  1336. LoadPaymentThroughDdl(response, GetElement("<%=paymentThrough.ClientID %>"), "SELECT");
  1337. }
  1338. };
  1339. $.ajax(options);
  1340. };
  1341. function LoadAgentByExtAgent(pAgent) {
  1342. var dataToSend = { MethodName: "LoadAgentByExtAgent", pAgent: pAgent };
  1343. var options =
  1344. {
  1345. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1346. data: dataToSend,
  1347. dataType: 'JSON',
  1348. type: 'POST',
  1349. success: function (response) {
  1350. LoadPaymentThroughDdl(response, GetElement("<%=paymentThrough.ClientID %>"), "SELECT");
  1351. }
  1352. };
  1353. $.ajax(options);
  1354. };
  1355. // WHILE CLICKING Pagent POPULATE agent branch
  1356. function PAgentChange() {
  1357. var pAgent = GetValue("<%=pAgent.ClientID %>");
  1358. if (pAgent == null || pAgent == "" || pAgent == undefined)
  1359. return;
  1360. SetDDLValueSelected("<%=pAgentDetail.ClientID %>", pAgent);
  1361. var pBankType = $("#pAgentDetail option:selected").text();
  1362. var pCountry = $("#pCountry option:selected").val();
  1363. var pMode = $("#pMode option:selected").val();
  1364. var pModeTxt = $("#pMode option:selected").text();
  1365. var dataToSend = { MethodName: "PAgentChange", pCountry: pCountry, pAgent: pAgent, pMode: pMode, pBankType: pBankType };
  1366. var options =
  1367. {
  1368. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1369. data: dataToSend,
  1370. dataType: 'JSON',
  1371. type: 'POST',
  1372. success: function (response) {
  1373. ApplyAgentSetting(response, pModeTxt);
  1374. if (pModeTxt == "CASH PAYMENT TO OTHER BANK")
  1375. LoadAgentByExtAgent(pAgent);
  1376. LoadCustomerRate();
  1377. }
  1378. };
  1379. $.ajax(options);
  1380. };
  1381. function ApplyAgentSetting(response, pModeTxt) {
  1382. var data = jQuery.parseJSON(response);
  1383. CheckSession(data);
  1384. $("#btnPickBranch").show();
  1385. $("#divBranchMsg").hide();
  1386. if (data == "" || data == null) {
  1387. var defbeneficiaryIdReq = $("#hdnBeneficiaryIdReq").val();
  1388. var defbeneficiaryContactReq = $("hdnBeneficiaryContactReq").val();
  1389. var defrelationshipReq = $("hdnRelationshipReq").val();
  1390. if (defbeneficiaryIdReq == "H") {
  1391. $(".trRecId").hide();
  1392. $("#ddlRecIdType").attr("class", "form-control readonlyOnReceiverSelect");
  1393. $("#txtRecIdNo").attr("class", "form-control readonlyOnReceiverSelect");
  1394. $("#tdRecIdExpiryLbl").hide();
  1395. $("#tdRecIdExpiryTxt").hide();
  1396. }
  1397. else if (defbeneficiaryIdReq == "M") {
  1398. $(".trRecId").show();
  1399. $("#ddlRecIdType").attr("class", "required form-control readonlyOnReceiverSelect");
  1400. $("#txtRecIdNo").attr("class", "required form-control readonlyOnReceiverSelect");
  1401. $("#ddlRecIdType_err").show();
  1402. $("#txtRecIdNo_err").show();
  1403. $("#tdRecIdExpiryLbl").show();
  1404. $("#tdRecIdExpiryTxt").show();
  1405. }
  1406. else if (defbeneficiaryIdReq == "O") {
  1407. $(".trRecId").show();
  1408. $("#ddlRecIdType").attr("class", "form-control readonlyOnReceiverSelect");
  1409. $("#txtRecIdNo").attr("class", "form-control readonlyOnReceiverSelect");
  1410. $("#ddlRecIdType_err").hide();
  1411. $("#txtRecIdNo_err").hide();
  1412. $("#tdRecIdExpiryLbl").show();
  1413. $("#tdRecIdExpiryTxt").show();
  1414. }
  1415. if (defrelationshipReq == "H") {
  1416. $("#trRelWithRec").hide();
  1417. $("#relationship").attr("class", "form-control");
  1418. }
  1419. else if (defrelationshipReq == "M") {
  1420. $("#trRelWithRec").show();
  1421. $("#relationship").attr("class", "required form-control");
  1422. $("#relationship_err").show();
  1423. }
  1424. else if (defrelationshipReq == "O") {
  1425. $("#trRelWithRec").show();
  1426. $("#relationship").attr("class", "form-control");
  1427. $("#relationship_err").hide();
  1428. }
  1429. if (defbeneficiaryContactReq == "H") {
  1430. $("#trRecContactNo").hide();
  1431. $("#txtRecMobile").attr("class", "form-control readonlyOnReceiverSelect");
  1432. }
  1433. else if (defbeneficiaryContactReq == "M") {
  1434. $("#trRecContactNo").show();
  1435. $("#txtRecMobile").attr("class", "required form-control readonlyOnReceiverSelect");
  1436. $("#txtRecMobile_err").show();
  1437. }
  1438. else if (defbeneficiaryContactReq == "O") {
  1439. $("#trRecContactNo").show();
  1440. $("#txtRecMobile").attr("class", "form-control readonlyOnReceiverSelect");
  1441. $("#txtRecMobile_err").hide();
  1442. }
  1443. $("#tdLblBranch").show();
  1444. $("#tdTxtBranch").show();
  1445. if (pModeTxt == "BANK DEPOSIT") {
  1446. $('#txtpBranch_aText').attr("readonly", true);
  1447. $('#txtpBranch_aText').attr("class", "required disabled form-control");
  1448. $("#txtpBranch_err").show();
  1449. }
  1450. else {
  1451. $('#txtpBranch_aText').attr("readonly", true);
  1452. $('#txtpBranch_aText').attr("class", "disabled form-control");
  1453. $("#txtpBranch_err").hide();
  1454. }
  1455. return;
  1456. }
  1457. var branchSelection = data[0].branchSelection;
  1458. var maxLimitAmt = data[0].maxLimitAmt;
  1459. var agMaxLimitAmt = data[0].agMaxLimitAmt;
  1460. var beneficiaryIdReq = data[0].benificiaryIdReq;
  1461. var relationshipReq = data[0].relationshipReq;
  1462. var beneficiaryContactReq = data[0].benificiaryContactReq;
  1463. var acLengthFrom = data[0].acLengthFrom;
  1464. var acLengthTo = data[0].acLengthTo;
  1465. var acNumberType = data[0].acNumberType;
  1466. if (branchSelection == "Not Required") {
  1467. $("#tdLblBranch").hide();
  1468. $("#tdTxtBranch").hide();
  1469. $('#txtpBranch_aText').attr("class", "disabled form-control");
  1470. $("#txtpBranch_err").hide();
  1471. }
  1472. else if (branchSelection == "Manual Type") {
  1473. $("#tdLblBranch").show();
  1474. $("#tdTxtBranch").show();
  1475. $('#txtpBranch_aText').attr("readonly", false);
  1476. $('#txtpBranch_aText').attr("class", "required form-control");
  1477. $("#txtpBranch_err").show();
  1478. $("#divBranchMsg").show();
  1479. $("#btnPickBranch").hide();
  1480. }
  1481. else if (branchSelection == "SELECT") {
  1482. $("#tdLblBranch").show();
  1483. $("#tdTxtBranch").show();
  1484. $('#txtpBranch_aText').attr("readonly", true);
  1485. $('#txtpBranch_aText').attr("class", "required disabled form-control");
  1486. $("#txtpBranch_err").show();
  1487. }
  1488. else {
  1489. $("#tdLblBranch").show();
  1490. $("#tdTxtBranch").show();
  1491. $('#txtpBranch_aText').attr("readonly", true);
  1492. $('#txtpBranch_aText').attr("class", "disabled form-control");
  1493. $("#txtpBranch_err").hide();
  1494. }
  1495. if (beneficiaryIdReq == "H") {
  1496. $("#trRecId").hide();
  1497. $("#ddlRecIdType").attr("class", "form-control readonlyOnReceiverSelect");
  1498. $("#txtRecIdNo").attr("class", "form-control readonlyOnReceiverSelect");
  1499. $("#tdRecIdExpiryLbl").hide();
  1500. $("#tdRecIdExpiryTxt").hide();
  1501. }
  1502. else if (beneficiaryIdReq == "M") {
  1503. $("#trRecId").show();
  1504. $("#ddlRecIdType").attr("class", "required form-control readonlyOnReceiverSelect");
  1505. $("#txtRecIdNo").attr("class", "required form-control readonlyOnReceiverSelect");
  1506. $("#ddlRecIdType_err").show();
  1507. $("#txtRecIdNo_err").show();
  1508. $("#tdRecIdExpiryLbl").show();
  1509. $("#tdRecIdExpiryTxt").show();
  1510. }
  1511. else if (beneficiaryIdReq == "O") {
  1512. $("#trRecId").show();
  1513. $("#ddlRecIdType").attr("class", "form-control readonlyOnReceiverSelect");
  1514. $("#txtRecIdNo").attr("class", "form-control readonlyOnReceiverSelect");
  1515. $("#ddlRecIdType_err").hide();
  1516. $("#txtRecIdNo_err").hide();
  1517. $("#tdRecIdExpiryLbl").show();
  1518. $("#tdRecIdExpiryTxt").show();
  1519. }
  1520. if (relationshipReq == "H") {
  1521. $("#trRelWithRec").hide();
  1522. $("#relationship").attr("class", "form-control");
  1523. }
  1524. else if (relationshipReq == "M") {
  1525. $("#trRelWithRec").show();
  1526. $("#relationship").attr("class", "required form-control");
  1527. $("#relationship_err").show();
  1528. }
  1529. else if (relationshipReq == "O") {
  1530. $("#trRelWithRec").show();
  1531. $("#relationship").attr("class", "form-control");
  1532. $("#relationship_err").hide();
  1533. }
  1534. if (beneficiaryContactReq == "H") {
  1535. $("#trRecContactNo").hide();
  1536. $("#txtRecMobile").attr("class", "form-control readonlyOnReceiverSelect");
  1537. }
  1538. else if (beneficiaryContactReq == "M") {
  1539. $("#trRecContactNo").show();
  1540. $("#txtRecMobile").attr("class", "required form-control readonlyOnReceiverSelect");
  1541. $("#txtRecMobile_err").show();
  1542. }
  1543. else if (beneficiaryContactReq == "O") {
  1544. $("#trRecContactNo").show();
  1545. $("#txtRecMobile").attr("class", "form-control readonlyOnReceiverSelect");
  1546. $("#txtRecMobile_err").hide();
  1547. }
  1548. };
  1549. //PICK AGENT FROM SENDER HISTORY --SenderDetailById
  1550. function PickDataFromSender(obj) {
  1551. var dataToSend = { MethodName: "SearchCustomer", searchValue: obj, searchType: "customerId" };
  1552. var options =
  1553. {
  1554. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1555. data: dataToSend,
  1556. dataType: 'JSON',
  1557. type: 'POST',
  1558. success: function (response) {
  1559. ParseResponseData(response);
  1560. }
  1561. };
  1562. $.ajax(options);
  1563. };
  1564. //PICK receiveer FROM SENDER HISTORY
  1565. function SetReceiverFromSender(obj) {
  1566. var senderId = $('#finalSenderId').text();
  1567. var dataToSend = { MethodName: "ReceiverDetailBySender", id: obj, senderId: senderId };
  1568. var options =
  1569. {
  1570. url: '<%=ResolveUrl("SendV2.aspx") %>?x=' + new Date().getTime(),
  1571. data: dataToSend,
  1572. dataType: 'JSON',
  1573. type: 'POST',
  1574. success: function (response) {
  1575. ParseReceiverData(response);
  1576. }
  1577. };
  1578. $.ajax(options);
  1579. };
  1580. ////populate receiver data
  1581. function ParseReceiverData(response) {
  1582. var data = jQuery.parseJSON(response);
  1583. CheckSession(data);
  1584. // alert(response);
  1585. if (data.length > 0) {
  1586. alert(data[0].receiverName);
  1587. $('#receiverName').text(data[0].receiverName);
  1588. $('#finalBenId').text(data[0].id);
  1589. SetDDLTextSelected("pCountry", data[0].country.toUpperCase());
  1590. PcountryOnChange('c', data[0].paymentMethod, data[0].pBank);
  1591. $("#txtpBranch_aValue").val('');
  1592. $("#txtpBranch_aText").val('');
  1593. if (data[0].pBankBranch != "" && data[0].pBankBranch != undefined) {
  1594. $("#tdLblBranch").show();
  1595. $("#tdTxtBranch").show();
  1596. $('#txtpBranch_aText').attr("readonly", true);
  1597. $('#txtpBranch_aText').attr("class", "required disabled form-control");
  1598. $("#txtpBranch_err").show();
  1599. $("#txtpBranch_aValue").val(data[0].pBankBranch);
  1600. $("#txtpBranch_aText").val(data[0].pBankBranchName);
  1601. }
  1602. SetValueById("<%=txtRecFName.ClientID %>", data[0].firstName, "");
  1603. SetValueById("<%=txtRecMName.ClientID %>", data[0].middleName, "");
  1604. SetValueById("<%=txtRecLName.ClientID %>", data[0].lastName1, "");
  1605. SetValueById("<%=txtRecSLName.ClientID %>", data[0].lastName2, "");
  1606. SetDDLTextSelected("ddlRecIdType", data[0].idType);
  1607. SetValueById("<%=txtRecIdNo.ClientID %>", data[0].idNumber, "");
  1608. SetValueById("<%=txtRecValidDate.ClientID %>", data[0].validDate, "");
  1609. SetValueById("<%=txtRecDOB.ClientID %>", data[0].dob, "");
  1610. SetValueById("<%=txtRecTel.ClientID %>", data[0].homePhone, "");
  1611. SetValueById("<%=txtRecMobile.ClientID %>", data[0].mobile, "");
  1612. SetValueById("<%=txtRecAdd1.ClientID %>", data[0].address, "");
  1613. SetValueById("<%=txtRecAdd2.ClientID %>", data[0].state, "");
  1614. SetValueById("<%=txtRecCity.ClientID %>", data[0].state, "");
  1615. SetValueById("<%=txtRecPostal.ClientID %>", data[0].zipCode, "");
  1616. SetValueById("<%=txtRecEmail.ClientID %>", data[0].email, "");
  1617. SetValueById("<%=txtRecDepAcNo.ClientID %>", data[0].accountNo, "");
  1618. }
  1619. };
  1620. function ParseResponseData(response) {
  1621. var data = jQuery.parseJSON(response);
  1622. CheckSession(data);
  1623. if (data[0].errorCode != "0") {
  1624. alert(data[0].msg);
  1625. return;
  1626. }
  1627. $(".readonlyOnCustomerSelect").removeAttr("disabled");
  1628. $(".readonlyOnReceiverSelect").removeAttr("disabled");
  1629. if (data.length > 0) {
  1630. //****Transaction Detail****
  1631. ClearTxnData();
  1632. SetDDLTextSelected("pCountry", data[0].pCountry.toUpperCase());
  1633. PcountryOnChange('c', data[0].paymentMethod, data[0].pBank);
  1634. $('#lblPayCurr').text(data[0].payoutCurr);
  1635. //select bank branch
  1636. if (data[0].paymentMethod.toUpperCase() == 'BANK DEPOSIT') {
  1637. var isBranchByName = 'N';
  1638. var branch = '';
  1639. if (data[0].pBankBranch == '' || data[0].pBankBranch == undefined || data[0].pBankBranch == '0') {
  1640. isBranchByName = 'Y';
  1641. branch = data[0].pBankBranchName;
  1642. }
  1643. else {
  1644. branch = data[0].pBankBranch;
  1645. }
  1646. PopulateBankDetails(data[0].pBank, data[0].paymentMethod, isBranchByName, branch);
  1647. }
  1648. SetPayCurrency(data[0].pCountryId);
  1649. PAgentChange();
  1650. SetDDLTextSelected("ddlReceiver", data[0].receiverName.toUpperCase());
  1651. SetDDLTextSelected("ddlSalary", data[0].monthlyIncome);
  1652. $(".readonlyOnCustomerSelect").attr("disabled", "disabled");
  1653. $("#txtpBranch_aValue").val('');
  1654. $("#txtpBranch_aText").val('');
  1655. if (data[0].pBankBranch != "" && data[0].pBankBranch != undefined) {
  1656. $("#tdLblBranch").show();
  1657. $("#tdTxtBranch").show();
  1658. $('#txtpBranch_aText').attr("readonly", true);
  1659. $('#txtpBranch_aText').attr("class", "required disabled form-control");
  1660. $("#txtpBranch_err").show();
  1661. $("#txtpBranch_aValue").val(data[0].pBankBranch);
  1662. $("#txtpBranch_aText").val(data[0].pBankBranchName);
  1663. }
  1664. SetDDLTextSelected("paymentThrough", data[0].pAgent.toUpperCase());
  1665. $("#txtRecDepAcNo").val(data[0].accountNo);
  1666. $('#span_txnInfo').html("Today's Sent : #Txn(" + data[0].txnCount + "), Amount(" + data[0].txnSum + " " + data[0].collCurr + ")");
  1667. SetValueById("txtCustomerLimit", data[0].txnSum2, "");
  1668. SetValueById("<%=txnPerDayCustomerLimit.ClientID %>", data[0].txnPerDayCustomerLimit, "");
  1669. SetValueById("<%=hdntranCount.ClientID %>", data[0].txnCount, "");
  1670. //****End of Transaction Detail****
  1671. //****Sender Detail****
  1672. $('#senderName').text(data[0].senderName);
  1673. $('#finalSenderId').text(data[0].customerId);
  1674. //New data added
  1675. $('#txtSendPostal').val(data[0].szipCode);
  1676. $('#sCustStreet').val(data[0].street);
  1677. $('#txtSendCity').val(data[0].sCity);
  1678. $('#companyName').val(data[0].companyName);
  1679. $('#availableBal').text(data[0].AVAILABLEBALANCE);
  1680. $('#availableBalSpan').show();
  1681. $('#<%=custLocationDDL.ClientID %>').val(data[0].sState);
  1682. $('#<%=ddlEmpBusinessType.ClientID %>').val(data[0].organizationType);
  1683. <%--SetValueById("<%=custLocationDDL.ClientID %>", data[0].sState, "");
  1684. SetValueById("<%=ddlEmpBusinessType.ClientID %>", data[0].organizationType, "");
  1685. SetValueById("<%=ddlIdIssuedCountry.ClientID %>", data[0].sfirstName, "");--%>
  1686. SetValueById("<%=ddlSendCustomerType.ClientID %>", data[0].customerType, "");
  1687. SetValueById("<%=txtSendIdExpireDate.ClientID %>", data[0].idIssueDate, "");
  1688. SetValueById("<%=txtSendFirstName.ClientID %>", data[0].sfirstName, "");
  1689. SetValueById("<%=txtSendMidName.ClientID %>", data[0].smiddleName, "");
  1690. SetValueById("<%=txtSendLastName.ClientID %>", data[0].slastName1, "");
  1691. SetValueById("<%=txtSendSecondLastName.ClientID %>", data[0].slastName2, "");
  1692. SetValueById("<%=txtSendIdNo.ClientID %>", data[0].sidNumber, "");
  1693. if (data[0].sidNumber == "") {
  1694. $('#txtSendIdNo').attr("readonly", false);
  1695. //GetElement("<%=ddSenIdType.ClientID %>").disabled = false;
  1696. SetDDLValueSelected("<%=ddSenIdType.ClientID %>", "");
  1697. }
  1698. else {
  1699. $('#txtSendIdNo').attr("readonly", true);
  1700. <%--GetElement("<%=ddSenIdType.ClientID %>").disabled = false;--%>
  1701. }
  1702. SetValueById("<%=txtSendIdValidDate.ClientID %>", data[0].svalidDate, "");
  1703. SetValueById("<%=ddlIdIssuedCountry.ClientID %>", data[0].PLACEOFISSUE, "");
  1704. SetValueById("<%=txtSendDOB.ClientID %>", data[0].sdob, "");
  1705. SetValueById("<%=txtSendTel.ClientID %>", data[0].shomePhone, "");
  1706. if (data[0].shomePhone == "")
  1707. $('#txtSendTel').attr("readonly", false);
  1708. SetValueById("<%=txtSendMobile.ClientID %>", data[0].smobile, "");
  1709. if (data[0].smobile == "")
  1710. $('#txtSendMobile').attr("readonly", false);
  1711. SetValueById("<%=txtSendAdd1.ClientID %>", data[0].saddress, "");
  1712. if (data[0].saddress == "")
  1713. $('#txtSendAdd1').attr("readonly", false);
  1714. SetValueById("<%=txtSendAdd2.ClientID %>", data[0].saddress2, "");
  1715. if (data[0].saddress2 == "")
  1716. $('#txtSendAdd2').attr("readonly", false);
  1717. <%-- SetValueById("<%=txtSendCity.ClientID %>", data[0].sCity, "");
  1718. if (data[0].sCity == "")
  1719. $('#txtSendCity').attr("readonly", false);--%>
  1720. SetValueById("<%=txtSendPostal.ClientID %>", data[0].szipCode, "");
  1721. if (data[0].szipCode == "")
  1722. $('#txtSendPostal').attr("readonly", false);
  1723. SetDDLValueSelected("txtSendNativeCountry", data[0].scountry);
  1724. SetValueById("<%=txtSendEmail.ClientID %>", data[0].semail, "");
  1725. if (data[0].semail == "")
  1726. $('#txtSendEmail').attr("readonly", false);
  1727. SetValueById("<%=companyName.ClientID %>", data[0].companyName, "");
  1728. //if (data[0].companyName == "")
  1729. // $('#companyName').attr("readonly", false);
  1730. SetDDLValueSelected("ddlSenGender", data[0].sgender);
  1731. SetDDLTextSelected("ddSenIdType", data[0].idName);
  1732. ManageSendIdValidity();
  1733. GetElement("divSenderIdImage").innerHTML = data[0].SenderIDimage;
  1734. //****End of Sender Detail****
  1735. //****Receiver Detail****
  1736. $('#receiverName').text(data[0].receiverName);
  1737. $('#finalBenId').text(data[0].rID);
  1738. SetValueById("<%=txtRecFName.ClientID %>", data[0].rfirstName, "");
  1739. SetValueById("<%=txtRecMName.ClientID %>", data[0].rmiddleName, "");
  1740. SetValueById("<%=txtRecLName.ClientID %>", data[0].rlastName1, "");
  1741. SetValueById("<%=txtRecSLName.ClientID %>", data[0].rlastName2, "");
  1742. SetDDLTextSelected("ddlRecIdType", data[0].ridtype);
  1743. SetDDLValueSelected("ddlRecGender", data[0].rgender);
  1744. SetValueById("<%=txtRecIdNo.ClientID %>", data[0].ridNumber, "");
  1745. SetValueById("<%=txtRecValidDate.ClientID %>", data[0].rvalidDate, "");
  1746. SetValueById("<%=txtRecDOB.ClientID %>", data[0].rdob, "");
  1747. SetValueById("<%=txtRecTel.ClientID %>", data[0].rhomePhone, "");
  1748. SetValueById("<%=txtRecMobile.ClientID %>", data[0].rmobile, "");
  1749. SetValueById("<%=txtRecAdd1.ClientID %>", data[0].raddress, "");
  1750. SetValueById("<%=txtRecAdd2.ClientID %>", data[0].raddress2, "");
  1751. SetValueById("<%=txtRecCity.ClientID %>", data[0].rCity, "");
  1752. SetValueById("<%=txtRecPostal.ClientID %>", data[0].rzipCode, "");
  1753. SetValueById("<%=txtRecEmail.ClientID %>", data[0].remail, "");
  1754. //****END of Receiver Detail****
  1755. //****Customer Due Diligence Information****
  1756. SetDDLValueSelected("occupation", data[0].sOccupation);
  1757. SetDDLTextSelected("relationship", data[0].relWithSender);
  1758. //****End of CDDI****
  1759. if (data[0].rId != null && data[0].rId != "") {
  1760. $(".readonlyOnReceiverSelect").attr("disabled", "disabled");
  1761. }
  1762. /// Hide Input Fields Of Customer Type Organisation
  1763. ChangeCustomerType();
  1764. //CheckAvailableBalance($("input[name='chkCollMode']:checked").val());
  1765. }
  1766. ManageLocationData();
  1767. };
  1768. function ClearSearchSection() {
  1769. $('#senderName').text("");
  1770. $('#finalSenderId').text("");
  1771. ClearSearchField();
  1772. $("#ddlReceiver").empty();
  1773. //SetValueById("<%=txtSearchData.ClientID %>", "", "");
  1774. SetDDLTextSelected("<%=ddlCustomerType.ClientID %>", "Passport No.");
  1775. SetDDLValueSelected("<%=pCountry.ClientID %>", "");
  1776. $("#pMode").empty();
  1777. $("#pAgent").empty();
  1778. $("#tdLblBranch").hide();
  1779. $("#tdTxtBranch").hide();
  1780. $("#trAccno").hide();
  1781. $("#spnPayoutLimitInfo").hide();
  1782. $("#divSenderIdImage").hide();
  1783. SetValueById("<%=txtSendFirstName.ClientID %>", "", "");
  1784. SetValueById("<%=txtSendMidName.ClientID %>", "", "");
  1785. SetValueById("<%=txtSendLastName.ClientID %>", "", "");
  1786. SetValueById("<%=txtSendSecondLastName.ClientID %>", "", "");
  1787. SetDDLTextSelected("ddSenIdType", "SELECT");
  1788. SetDDLTextSelected("ddlSenGender", "SELECT");
  1789. SetValueById("<%=txtSendIdNo.ClientID %>", "", "");
  1790. SetValueById("<%=memberCode.ClientID %>", "", "");
  1791. SetValueById("<%=txtSendIdValidDate.ClientID %>", "", "");
  1792. SetValueById("<%=txtSendDOB.ClientID %>", "", "");
  1793. SetValueById("<%=txtSendTel.ClientID %>", "", "");
  1794. SetValueById("<%=txtSendMobile.ClientID %>", "", "");
  1795. SetValueById("<%=companyName.ClientID %>", "", "");
  1796. SetValueById("<%=txtSendAdd1.ClientID %>", "", "");
  1797. SetValueById("<%=txtSendAdd2.ClientID %>", "", "");
  1798. SetValueById("<%=txtSendCity.ClientID %>", "", "");
  1799. SetValueById("<%=txtSendPostal.ClientID %>", "", "");
  1800. SetValueById("<%=txtSendNativeCountry.ClientID %>", "", "");
  1801. SetValueById("<%=txtSendEmail.ClientID %>", "", "");
  1802. SetValueById("<%=sCustStreet.ClientID %>", "", "");
  1803. SetValueById("<%=txtSendCity.ClientID %>", "", "");
  1804. SetValueById("<%=txtSendIdExpireDate.ClientID %>", "", "");
  1805. SetValueById("<%=txtSendPostal.ClientID %>", "", "");
  1806. SetValueById("<%=txtSendPostal.ClientID %>", "", "");
  1807. SetValueById("<%=txtSendPostal.ClientID %>", "", "");
  1808. SetDDLValueSelected("<%=occupation.ClientID %>", "");
  1809. SetDDLValueSelected("<%=relationship.ClientID %>", "");
  1810. SetDDLValueSelected("<%=ddlSalary.ClientID %>", "");
  1811. SetDDLValueSelected("<%=ddlSendCustomerType.ClientID %>", "");
  1812. SetDDLValueSelected("<%=custLocationDDL.ClientID %>", "");
  1813. SetDDLValueSelected("<%=ddlSenGender.ClientID %>", "");
  1814. SetDDLValueSelected("<%=branch.ClientID %>", "");
  1815. SetDDLValueSelected("<%=pCurrDdl.ClientID %>", "");
  1816. $("#<%=branch.ClientID%>").empty();
  1817. $("#<%=pCurrDdl.ClientID%>").empty();
  1818. ClearReceiverData();
  1819. }
  1820. function ClearReceiverData() {
  1821. $('#receiverName').text('');
  1822. $('#finalBenId').text('');
  1823. SetDDLValueSelected("<%=ddlEmpBusinessType.ClientID %>", "11007");
  1824. //SetDDLValueSelected("<%=ddlIdIssuedCountry.ClientID %>", "");
  1825. SetDDLValueSelected("<%=ddlRecIdType.ClientID %>", "");
  1826. //SetDDLValueSelected("<%=custLocationDDL.ClientID %>", "");
  1827. SetDDLValueSelected("<%=ddlReceiver.ClientID %>", "");
  1828. SetValueById("<%=txtRecFName.ClientID %>", "", "");
  1829. SetValueById("<%=txtRecMName.ClientID %>", "", "");
  1830. SetValueById("<%=txtRecLName.ClientID %>", "", "");
  1831. SetValueById("<%=txtRecSLName.ClientID %>", "", "");
  1832. SetDDLTextSelected("ddlRecIdType", "SELECT");
  1833. SetDDLTextSelected("ddlRecGender", "SELECT");
  1834. SetValueById("<%=txtRecIdNo.ClientID %>", "", "");
  1835. SetValueById("<%=txtRecValidDate.ClientID %>", "", "");
  1836. SetValueById("<%=txtRecDOB.ClientID %>", "", "");
  1837. SetValueById("<%=txtRecTel.ClientID %>", "", "");
  1838. SetValueById("<%=txtRecMobile.ClientID %>", "", "");
  1839. SetValueById("<%=txtRecAdd1.ClientID %>", "", "");
  1840. SetValueById("<%=txtRecAdd2.ClientID %>", "", "");
  1841. SetValueById("<%=txtRecCity.ClientID %>", "", "");
  1842. SetValueById("<%=txtRecPostal.ClientID %>", "", "");
  1843. SetValueById("<%=txtRecEmail.ClientID %>", "", "");
  1844. SetDDLValueSelected("<%=relationship.ClientID %>", "");
  1845. };
  1846. //clear receiver dtaa
  1847. $(function () {
  1848. $('#btnReceiverClr').click(function () {
  1849. $('.readonlyOnReceiverSelect').removeAttr("disabled");
  1850. ClearReceiverData();
  1851. });
  1852. });
  1853. function ValidateDate(date) {
  1854. if (date == "") {
  1855. return true;
  1856. }
  1857. if (Date.parse(date)) {
  1858. return true;
  1859. } else {
  1860. return false;
  1861. }
  1862. };
  1863. ////send transacion calc
  1864. $(function () {
  1865. $('#calc').click(function () {
  1866. $(".readonlyOnCustomerSelect").each(function () {
  1867. if ($(this).is(":disabled")) {
  1868. $(this).addClass('abc').removeAttr("disabled");
  1869. }
  1870. });
  1871. $(".readonlyOnReceiverSelect").each(function () {
  1872. if ($(this).is(":disabled")) {
  1873. $(this).addClass('abc').removeAttr('disabled');
  1874. }
  1875. });
  1876. if ($("#form2").validate().form() == false) {
  1877. $(".required").each(function () {
  1878. if (!$.trim($(this).val())) {
  1879. $(this).focus();
  1880. }
  1881. });
  1882. $(".abc").each(function () {
  1883. $(this).removeClass('abc').attr('disabled', 'disabled');
  1884. });
  1885. return false;
  1886. }
  1887. $(".abc").each(function () {
  1888. $(this).removeClass('abc').attr('disabled', 'disabled');
  1889. });
  1890. //var pBankBranchText = $("#txtpBranch_aText").val();
  1891. var pBankBranchText = $("#branch option:selected").text();
  1892. var pBank = $("#<%=pAgent.ClientID %> option:selected").val();
  1893. if (pBank == "SELECT" || pBank == "undefined")
  1894. pBank = "";
  1895. var hdnreqAgent = $('#hdnreqAgent').html();
  1896. var hdnreqBranch = $('#hdnreqBranch').html();
  1897. var dm = $("#<%=pMode.ClientID %> option:selected").text();
  1898. if ($('#pMode').val() == '2') {
  1899. if (pBankBranchText == null || pBankBranchText == "" || pBankBranchText == "undefined" || pBankBranchText == "-1") {
  1900. alert("Branch is required ");
  1901. //$("txtpBranch_aText").focus();
  1902. return false;
  1903. }
  1904. if (hdnreqBranch == "Manual Type") {
  1905. if (pBankBranchText == null || pBankBranchText == "" || pBankBranchText == "undefined" || pBankBranchText == "-1") {
  1906. alert("Branch is required ");
  1907. //$("txtpBranch_aText").focus();
  1908. return false;
  1909. }
  1910. }
  1911. }
  1912. if (hdnreqAgent == "M") {
  1913. if (pBank == null || pBank == "" || pBank == "undefined") {
  1914. alert("Agent/Bank is required ");
  1915. $("#<%=pAgent.ClientID %>").focus();
  1916. return false;
  1917. }
  1918. }
  1919. var por = $("#<%=purpose.ClientID %> option:selected").text();
  1920. por = por.replace("SELECT", "");
  1921. var sof = $("#<%=sourceOfFund.ClientID %> option:selected").text().replace("SELECT", "");
  1922. sof = sof.replace("SELECT", "");
  1923. var sendAmt = $('#lblSendAmt').text();
  1924. if (sendAmt > parseInt(eddval)) {
  1925. if (por == "") {
  1926. alert("Purpose of Remittance is required for sending amount greater than " + eddval);
  1927. $("#<%=purpose.ClientID %>").focus();
  1928. return false;
  1929. }
  1930. if (sof == "") {
  1931. alert("Source of fund is required for sending amount greater than " + eddval);
  1932. $("#<%=sourceOfFund.ClientID %>").focus();
  1933. return false;
  1934. }
  1935. }
  1936. var pCountry = $("#<%=pCountry.ClientID %> option:selected").text();
  1937. if (pCountry == "SELECT" || pCountry == undefined)
  1938. pCountry = "";
  1939. var pCountryId = $("#<%=pCountry.ClientID %> option:selected").val();
  1940. var collMode = $("#<%=pMode.ClientID %> option:selected").text();
  1941. var collModeId = $("#<%=pMode.ClientID %> option:selected").val();
  1942. var pAgent = "";
  1943. var pAgentName = "";
  1944. if (collMode == "CASH PAYMENT TO OTHER BANK") {
  1945. pAgent = $("#<%=paymentThrough.ClientID %> option:selected").val();
  1946. pAgentName = $("#<%=paymentThrough.ClientID %> option:selected").text();
  1947. if (pAgentName == "SELECT" || pAgentName == undefined) {
  1948. pAgent = "";
  1949. pAgentName = "";
  1950. }
  1951. }
  1952. var pBankText = $("#<%=pAgent.ClientID %> option:selected").text();
  1953. if (pBankText == "[SELECT]" || pBankText == "[Any Where]" || pBankText == undefined)
  1954. pBankText = "";
  1955. //var pBankBranch = $("#txtpBranch_aValue").val();
  1956. var pBankBranch = $("#branch option:selected").val();
  1957. if (pBankBranch == "SELECT" || pBankBranch == undefined)
  1958. pBankBranch = "";
  1959. SetDDLValueSelected("<%=pAgentDetail.ClientID %>", pBank);
  1960. var pBankType = $("#pAgentDetail option:selected").text();
  1961. var pCurr = $('#lblPayCurr').text();
  1962. var collCurr = $('#lblCollCurr').text();
  1963. var collAmt = GetValue("<% =txtCollAmt.ClientID %>");
  1964. var customerTotalAmt = GetValue("txtCustomerLimit");
  1965. var payAmt = GetValue("<% =txtPayAmt.ClientID %>");
  1966. var scharge = $('#lblServiceChargeAmt').val();
  1967. var discount = $('#lblDiscAmt').text();
  1968. var handling = "0";
  1969. var exRate = $('#lblExRate').text();
  1970. var scDiscount = $('#scDiscount').val();
  1971. var exRateOffer = $('#exRateOffer').val();
  1972. var schemeName = $("#<%=ddlScheme.ClientID %> option:selected").text();
  1973. if (schemeName == "SELECT" || schemeName == "undefined")
  1974. schemeName = "";
  1975. var schemeType = $("#<%=ddlScheme.ClientID %> option:selected").val();
  1976. if (schemeType == "SELECT" || schemeType == "undefined")
  1977. schemeType = "";
  1978. var couponId = $("#iTelCouponId").val();
  1979. //sender values
  1980. var senderId = $('#finalSenderId').text();
  1981. var sfName = GetValue("<% =txtSendFirstName.ClientID %>");
  1982. var smName = GetValue("<% =txtSendMidName.ClientID %>");
  1983. var slName = GetValue("<% =txtSendLastName.ClientID %>");
  1984. var slName2 = GetValue("<% =txtSendSecondLastName.ClientID %>");
  1985. var sIdType = $("#<% =ddSenIdType.ClientID %> option:selected").text();
  1986. if (sIdType == "SELECT" || sIdType == undefined || sIdType == "")
  1987. sIdType = "";
  1988. else
  1989. sIdType = sIdType.split('|')[0];
  1990. var sGender = $("#<% =ddlSenGender.ClientID %> option:selected").val();
  1991. var sIdNo = GetValue("<% =txtSendIdNo.ClientID %>");
  1992. var sIdValid = GetValue("<% =txtSendIdValidDate.ClientID %>");
  1993. if (ValidateDate(sIdValid) == false) {
  1994. alert('Sender Id expiry date is invalid');
  1995. $('#txtSendIdValidDate').focus();
  1996. return false;
  1997. }
  1998. var sdob = GetValue("<% =txtSendDOB.ClientID %>");
  1999. var sTel = GetValue("<% =txtSendTel.ClientID %>");
  2000. var sMobile = GetValue("<% =txtSendMobile.ClientID %>");
  2001. var sCompany = GetValue("<%=companyName.ClientID %>");
  2002. var sNaCountry = $("#<%=txtSendNativeCountry.ClientID %> option:selected").text();
  2003. var sCity = $('#txtSendCity').val(); --GetItem("txtSendCity")[0];
  2004. var sPostCode = GetValue("<% =txtSendPostal.ClientID %>");
  2005. var sAdd1 = GetValue("<% =txtSendAdd1.ClientID %>");
  2006. var sAdd2 = GetValue("<% =txtSendAdd2.ClientID %>");
  2007. var sEmail = GetValue("<% =txtSendEmail.ClientID %>");
  2008. var memberCode = GetValue("<% =memberCode.ClientID %>");
  2009. var smsSend = "N";
  2010. if ($('#ChkSMS').is(":checked"))
  2011. smsSend = "Y";
  2012. var newCustomer = "N";
  2013. var benId = $('#finalBenId').text();
  2014. var rfName = GetValue("<% =txtRecFName.ClientID %>");
  2015. var rmName = GetValue("<% =txtRecMName.ClientID %>");
  2016. var rlName = GetValue("<% =txtRecLName.ClientID %>");
  2017. var rlName2 = GetValue("<% =txtRecSLName.ClientID %>");
  2018. var rIdType = $("#<% =ddlRecIdType.ClientID %> option:selected").text();
  2019. if (rIdType == "SELECT" || rIdType == "undefined")
  2020. rIdType = "";
  2021. var rGender = $("#<% =ddlRecGender.ClientID %> option:selected").val();
  2022. var rIdNo = GetValue("<% =txtRecIdNo.ClientID %>");
  2023. var rIdValid = GetValue("<% =txtRecValidDate.ClientID %>");
  2024. var rdob = GetValue("<% =txtRecDOB.ClientID %>");
  2025. var rTel = GetValue("<% =txtRecTel.ClientID %>");
  2026. var rMobile = GetValue("<% =txtRecMobile.ClientID %>");
  2027. var rCity = GetValue("<% =txtRecCity.ClientID %>");
  2028. var rPostCode = GetValue("<% =txtRecPostal.ClientID %>");
  2029. var rAdd1 = GetValue("<% =txtRecAdd1.ClientID %>");
  2030. var rAdd2 = GetValue("<% =txtRecAdd2.ClientID %>");
  2031. var rEmail = GetValue("<% =txtRecEmail.ClientID %>");
  2032. var accountNo = GetValue("<% =txtRecDepAcNo.ClientID %>");
  2033. var pLocation = GetValue("<% =locationDDL.ClientID %>");
  2034. var pLocationText = $("#<%=locationDDL.ClientID %> option:selected").text();
  2035. var pSubLocation = GetValue("<% =subLocationDDL.ClientID %>");
  2036. var pSubLocationText = $("#<%=subLocationDDL.ClientID %> option:selected").text();
  2037. var tpExRate = $('#hddTPExRate').val();
  2038. var isManualSC = 'N';
  2039. if ($('#editServiceCharge').is(":checked"))
  2040. isManualSC = "Y";
  2041. var manualSC = $('#lblServiceChargeAmt').val();
  2042. //********IF NEW CUSTOMER CHECK REQUIRED FIELD******
  2043. if ($('#NewCust').is(":checked")) {
  2044. newCustomer = "Y";
  2045. if (sfName == "" || sfName == null) {
  2046. alert('Sender First Name missing');
  2047. $('#txtSendFirstName').focus();
  2048. return false;
  2049. }
  2050. }
  2051. if ($('#NewCust').is(":checked") == false) {
  2052. if (senderId == "" || senderId == null) {
  2053. alert('Please Choose Existing Sender ');
  2054. return false;
  2055. }
  2056. }
  2057. var enrollCustomer = "N";
  2058. if ($('#EnrollCust').is(":checked")) {
  2059. enrollCustomer = "Y";
  2060. if (memberCode == "" || memberCode == null) {
  2061. alert('MemberCode is missing for Customer Enrollment');
  2062. $('#memberCode').focus();
  2063. return false;
  2064. }
  2065. }
  2066. var collModeFrmCustomer = $("input[name='chkCollMode']:checked").val();
  2067. if (collModeFrmCustomer == undefined || collModeFrmCustomer == '') {
  2068. alert('Please choose collect mode first!');
  2069. return false;
  2070. }
  2071. //New params added
  2072. var sCustStreet = $('#sCustStreet').val();
  2073. var sCustLocation = $('#custLocationDDL').val();
  2074. var sCustomerType = $('#ddlSendCustomerType').val();
  2075. var sCustBusinessType = $('#ddlEmpBusinessType').val();
  2076. var sCustIdIssuedCountry = $('#ddlIdIssuedCountry').val();
  2077. var sCustIdIssuedDate = $('#txtSendIdExpireDate').val();
  2078. var receiverId = $('#ddlReceiver').val();
  2079. var payoutPartnerId = $('#hddPayoutPartner').val();
  2080. var cashCollMode = collModeFrmCustomer;
  2081. var customerDepositedBank = $('#depositedBankDDL').val();
  2082. var introducerTxt = $('#introducerTxt').val();
  2083. var townId = $('#ddlTown').val();
  2084. var rel = $("#<%=relationship.ClientID %> option:selected").text().replace("Select", "");
  2085. rel = rel.replace("Select", "");
  2086. var occupation = $("#<%=occupation.ClientID %> option:selected").val();
  2087. var payMsg = escape(GetValue("<% = txtPayMsg.ClientID %>"));
  2088. var company = GetValue("<% =companyName.ClientID %>");
  2089. var cancelrequestId = '<%=GetResendId()%>';
  2090. var salary = $("#<%=ddlSalary.ClientID %> option:selected").val();
  2091. if (salary == "Select" || rIdType == "undefined")
  2092. salary = "";
  2093. var branchId = $("#<%=ddLBranch.ClientID%>").val();
  2094. var branchName = $("#<%=ddLBranch.ClientID%> :selected").text();
  2095. var url = "Confirm.aspx?senderId=" + senderId +
  2096. "&sfName=" + sfName +
  2097. "&smName=" + smName +
  2098. "&slName=" + slName +
  2099. "&slName2=" + slName2 +
  2100. "&sIdType=" + sIdType +
  2101. "&sIdNo=" + sIdNo +
  2102. "&sIdValid=" + sIdValid +
  2103. "&sGender=" + sGender +
  2104. "&sdob=" + sdob +
  2105. "&sTel=" + sTel +
  2106. "&sMobile=" + sMobile +
  2107. "&sNaCountry=" + FilterString(sNaCountry) +
  2108. "&sCity=" + FilterString(sCity) +
  2109. "&sPostCode=" + FilterString(sPostCode) +
  2110. "&sAdd1=" + FilterString(sAdd1) +
  2111. "&sAdd2=" + FilterString(sAdd2) +
  2112. "&sEmail=" + sEmail +
  2113. "&smsSend=" + FilterString(smsSend) +
  2114. "&memberCode=" + FilterString(memberCode) +
  2115. "&sCompany=" + FilterString(sCompany) +
  2116. "&benId=" + FilterString(benId) +
  2117. "&rfName=" + FilterString(rfName) +
  2118. "&rmName=" + FilterString(rmName) +
  2119. "&rlName=" + FilterString(rlName) +
  2120. "&rlName2=" + FilterString(rlName2) +
  2121. "&rIdType=" + FilterString(rIdType) +
  2122. "&rIdNo=" + FilterString(rIdNo) +
  2123. "&rIdValid=" + rIdValid +
  2124. "&rGender=" + FilterString(rGender) +
  2125. "&rdob=" + rdob +
  2126. "&rTel=" + FilterString(rTel) +
  2127. "&rMobile=" + FilterString(rMobile) +
  2128. "&rCity=" + FilterString(rCity) +
  2129. "&rPostCode=" + FilterString(rPostCode) +
  2130. "&rAdd1=" + FilterString(rAdd1) +
  2131. "&rAdd2=" + FilterString(rAdd2) +
  2132. "&rEmail=" + rEmail +
  2133. "&accountNo=" + FilterString(accountNo) +
  2134. "&pCountry=" + FilterString(pCountry) +
  2135. "&payCountryId=" + FilterString(pCountryId) +
  2136. "&collMode=" + FilterString(collMode) +
  2137. "&collModeId=" + FilterString(collModeId) +
  2138. "&pBank=" + FilterString(pBank) +
  2139. "&pBankText=" + FilterString(pBankText) +
  2140. "&pBankBranch=" + FilterString(pBankBranch) +
  2141. "&pBankBranchText=" + FilterString(pBankBranchText) +
  2142. "&pAgent=" + FilterString(pAgent) +
  2143. "&pAgentName=" + FilterString(pAgentName) +
  2144. "&pBankType=" + pBankType +
  2145. "&pCurr=" + FilterString(pCurr) +
  2146. "&collCurr=" + FilterString(collCurr) +
  2147. "&collAmt=" + FilterString(collAmt) +
  2148. "&payAmt=" + FilterString(payAmt) +
  2149. "&sendAmt=" + FilterString(sendAmt) +
  2150. "&scharge=" + FilterString(scharge) +
  2151. "&customerTotalAmt=" + FilterString(customerTotalAmt) +
  2152. "&discount=" + FilterString(discount) +
  2153. "&scDiscount=" + FilterString(scDiscount) +
  2154. "&exRateOffer=" + FilterString(exRateOffer) +
  2155. //"&schemeName=" + FilterString(schemeName) +
  2156. "&exRate=" + FilterString(exRate) +
  2157. //"&schemeType=" + FilterString(schemeType) +
  2158. //"&couponId=" + FilterString(couponId) +
  2159. "&por=" + FilterString(por) +
  2160. "&sof=" + FilterString(sof) +
  2161. "&rel=" + FilterString(rel) +
  2162. "&occupation=" + FilterString(occupation) +
  2163. "&payMsg=" + payMsg +
  2164. "&company=" + FilterString(company) +
  2165. "&newCustomer=" + FilterString(newCustomer) +
  2166. "&EnrollCustomer=" + FilterString(enrollCustomer) +
  2167. "&cancelrequestId=" + FilterString(cancelrequestId) +
  2168. "&hdnreqAgent=" + FilterString(hdnreqAgent) +
  2169. "&hdnreqBranch = " + FilterString(hdnreqBranch) +
  2170. "&salary=" + salary +
  2171. "&pLocation=" + pLocation +
  2172. "&pLocationText=" + pLocationText +
  2173. "&pSubLocation=" + pSubLocation +
  2174. "&tpExRate=" + tpExRate +
  2175. "&manualSC=" + manualSC +
  2176. "&isManualSC=" + isManualSC +
  2177. //new fields
  2178. "&sCustStreet=" + sCustStreet +
  2179. "&sCustLocation=" + sCustLocation +
  2180. "&sCustomerType=" + sCustomerType +
  2181. "&sCustBusinessType=" + sCustBusinessType +
  2182. "&sCustIdIssuedCountry=" + sCustIdIssuedCountry +
  2183. "&sCustIdIssuedDate=" + sCustIdIssuedDate +
  2184. "&receiverId=" + receiverId +
  2185. "&payoutPartnerId=" + payoutPartnerId +
  2186. "&cashCollMode=" + cashCollMode +
  2187. "&customerDepositedBank=" + customerDepositedBank +
  2188. "&introducerTxt=" + introducerTxt +
  2189. "&townId=" + townId +
  2190. "&branchId=" + branchId +
  2191. "&branchName=" + branchName +
  2192. //new fields added end
  2193. "&pSubLocationText=" + pSubLocationText;
  2194. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  2195. var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
  2196. if (isChrome) {
  2197. PopUpWindow(url, param);
  2198. return true;
  2199. }
  2200. var id = PopUpWindow(url, param);
  2201. if (id == "undefined" || id == null || id == "") {
  2202. }
  2203. else {
  2204. var res = id.split('-:::-');
  2205. if (res[0] == "1") {
  2206. var errMsgArr = res[1].split('\n');
  2207. for (var i = 0; i < errMsgArr.length; i++) {
  2208. alert(errMsgArr[i]);
  2209. }
  2210. }
  2211. else {
  2212. window.location.replace("/AgentPanel/International/SendOnBehalf/SendIntlReceipt.aspx?controlNo=" + res[2] + "&invoicePrint=" + res[3]);
  2213. }
  2214. }
  2215. return true;
  2216. });
  2217. });
  2218. $(document).unbind('keydown').bind('keydown', function (event) {
  2219. var doPrevent = false;
  2220. if (event.keyCode === 8) {
  2221. var d = event.srcElement || event.target;
  2222. if ((d.tagName.toUpperCase() === 'INPUT' && (d.type.toUpperCase() === 'TEXT' || d.type.toUpperCase() === 'PASSWORD'))
  2223. || d.tagName.toUpperCase() === 'TEXTAREA') {
  2224. doPrevent = d.readOnly || d.disabled;
  2225. }
  2226. else {
  2227. doPrevent = true;
  2228. }
  2229. }
  2230. if (doPrevent) {
  2231. event.preventDefault();
  2232. if (confirm("You have pressed back button. Are you sure you want to leave this page?")) {
  2233. window.history.back();
  2234. }
  2235. }
  2236. });
  2237. function SetPayCurrency(pCountry) {
  2238. var dataToSend = { MethodName: 'PCurrPcountry', pCountry: pCountry };
  2239. var options = {
  2240. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  2241. data: dataToSend,
  2242. dataType: 'JSON',
  2243. type: 'POST',
  2244. async: false,
  2245. success:
  2246. function (response) {
  2247. var data = jQuery.parseJSON(response);
  2248. var ddl = GetElement("pCurrDdl");
  2249. $(ddl).empty();
  2250. var option;
  2251. for (var i = 0; i < data.length; i++) {
  2252. option = document.createElement("option");
  2253. if (data[i].isDefault == "Y") {
  2254. option.setAttribute("selected", "selected");
  2255. }
  2256. option.text = data[i].currencyCode;
  2257. option.value = data[i].currencyCode;
  2258. try {
  2259. ddl.options.add(option);
  2260. }
  2261. catch (e) {
  2262. alert(e);
  2263. }
  2264. }
  2265. },
  2266. error: function (result) {
  2267. alert("Due to unexpected errors we were unable to load data");
  2268. }
  2269. };
  2270. $.ajax(options);
  2271. };
  2272. $(document).ready(function () {
  2273. $('.collMode-chk').click(function () {
  2274. if (!$(this).is(':checked')) {
  2275. return false;
  2276. }
  2277. if ($(this).val() == 'Bank Deposit') {
  2278. var customerId = $('#txtSearchData_aValue').val();
  2279. if (customerId == "" || customerId == null || customerId == undefined) {
  2280. alert('Please Choose Existing Sender for Coll Mode: Bank Deposit');
  2281. return false;
  2282. }
  2283. $('.deposited-bank').css('display', '');
  2284. $('.deposited-bank-hide').hide();
  2285. $('#depositedBankDDL').addClass('required');
  2286. }
  2287. else {
  2288. $('.deposited-bank').css('display', 'none');
  2289. $('.deposited-bank-hide').show();
  2290. $('#depositedBankDDL').removeClass('required');
  2291. $('#depositedBankDDL').removeClass('error');
  2292. }
  2293. $('.collMode-chk').not(this).propAttr('checked', false);
  2294. CheckAvailableBalance($(this).val());
  2295. });
  2296. });
  2297. function ChangeCustomerType() {
  2298. //if customer type is individual
  2299. customerTypeId = $("#ddlSendCustomerType").val();
  2300. if (customerTypeId == "4700") {
  2301. $(".hideOnIndividual").hide();
  2302. $(".showOnIndividual").show();
  2303. $("#companyName").removeClass("Required");
  2304. $("#ddlEmpBusinessType").removeClass("required");
  2305. $("#occupation").addClass("required");
  2306. }
  2307. else if (customerTypeId == "4701") {
  2308. $(".hideOnIndividual").show();
  2309. $(".showOnIndividual").hide();
  2310. $("#ddlEmpBusinessType").addClass("required");
  2311. $("#occupation").removeClass("required");
  2312. }
  2313. }
  2314. function CheckAvailableBalance(collectionMode) {
  2315. var customerId = $("#txtSearchData_aValue").val();
  2316. var branchId = $("#<%=ddLBranch.ClientID%>").val();
  2317. if ((branchId === null || branchId === ""))
  2318. {
  2319. return;
  2320. }
  2321. var dataToSend = { MethodName: 'CheckAvialableBalance', collectionMode: collectionMode, customerId: customerId, branchId: branchId };
  2322. var options = {
  2323. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  2324. data: dataToSend,
  2325. dataType: 'JSON',
  2326. type: 'POST',
  2327. success:
  2328. function (response) {
  2329. $('#availableBalSpan').show();
  2330. $("#availableBalSpan").html(response);
  2331. },
  2332. error: function (result) {
  2333. alert("Due to unexpected errors we were unable to load data");
  2334. }
  2335. };
  2336. $.ajax(options);
  2337. }
  2338. </script>
  2339. <style type="text/css">
  2340. .amountDiv {
  2341. background: none repeat scroll 0 0 black;
  2342. clear: both;
  2343. color: white;
  2344. float: right;
  2345. font-size: 12px;
  2346. font-weight: 600;
  2347. padding: 2px 8px;
  2348. margin-right: 15px;
  2349. margin-bottom: 10px;
  2350. width: auto;
  2351. }
  2352. /*.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
  2353. padding: 0px !important;
  2354. }*/
  2355. </style>
  2356. <style type="text/css">
  2357. .ErrMsg {
  2358. color: red !important;
  2359. }
  2360. td:empty:after {
  2361. content: "\00a0";
  2362. }
  2363. </style>
  2364. </asp:Content>
  2365. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  2366. <input type="hidden" id="hdnPayMode" runat="server" />
  2367. <input type="hidden" id="hdntranCount" runat="server" />
  2368. <asp:HiddenField ID="hdnLimitAmount" runat="server" />
  2369. <asp:HiddenField ID="hdnBeneficiaryIdReq" runat="server" />
  2370. <asp:HiddenField ID="hdnBeneficiaryContactReq" runat="server" />
  2371. <asp:HiddenField ID="hdnRelationshipReq" runat="server" />
  2372. <input type="hidden" id="confirmHidden" />
  2373. <input type="hidden" id="confirmHiddenChrome" />
  2374. <asp:HiddenField ID="hddTPExRate" runat="server" />
  2375. <asp:HiddenField ID="hddPayoutPartner" runat="server" />
  2376. <div class="page-wrapper">
  2377. <div class="row">
  2378. <div class="col-sm-12">
  2379. <div class="page-title">
  2380. <h1></h1>
  2381. <asp:HiddenField ID="hideCustomerId" runat="server" />
  2382. <ol class="breadcrumb">
  2383. <li><a href="/AgentNew/Dashboard.aspx"><i class="fa fa-home"></i></a></li>
  2384. <li><a href="#">Transaction </a></li>
  2385. <li><a href="#">Send Transaction</a></li>
  2386. <span style="float: right;">
  2387. <div class="row" style="float: right;">
  2388. <div class="amountDiv">
  2389. Limit :&nbsp;
  2390. <asp:Label ID="availableAmt" runat="server"></asp:Label>
  2391. <asp:Label ID="balCurrency" runat="server" Text="JPY"></asp:Label>
  2392. </div>
  2393. </div>
  2394. </span>
  2395. </ol>
  2396. </div>
  2397. </div>
  2398. </div>
  2399. <div id="divLoad" style="position: absolute; left: 450px; top: 250px; background-color: black; border: 1px solid black; display: none;">
  2400. Processing...
  2401. </div>
  2402. <div class="row">
  2403. <div class="col-md-12">
  2404. <div class="panel panel-default">
  2405. <div class="panel-heading">
  2406. <div class="row">
  2407. <div class="col-md-12">
  2408. <div class="panel-title" style="margin-left: 10px">Branch Details</div>
  2409. </div>
  2410. <div>
  2411. <div class="col-md-4">
  2412. <label style="margin-left: 40px">Branch:</label>
  2413. </div>
  2414. <div class="col-md-5">
  2415. <asp:DropDownList ID="ddLBranch" AutoPostBack="true" runat="server" CssClass="form-control required" OnSelectedIndexChanged="ddLBranch_SelectedIndexChanged">
  2416. </asp:DropDownList>
  2417. </div>
  2418. </div>
  2419. </div>
  2420. </div>
  2421. </div>
  2422. </div>
  2423. </div>
  2424. <div class="wizard" id="divStep1">
  2425. <div class="wizard-inner">
  2426. <div class="connecting-line"></div>
  2427. <ul class="nav nav-tabs" role="tablist">
  2428. <li role="presentation" class="active" id="tab1">
  2429. <a href="#step1" data-toggle="tab" aria-controls="step1" role="tab" title="">
  2430. <span class="round-tab">
  2431. <i class="fa fa-user" aria-hidden="true"></i>
  2432. </span>
  2433. </a>
  2434. </li>
  2435. <li role="presentation" class="disabled" id="tab2">
  2436. <a href="#step2" data-toggle="tab" aria-controls="step2" role="tab" title="">
  2437. <span class="round-tab">
  2438. <i class="fa fa-user" aria-hidden="true"></i>
  2439. </span>
  2440. </a>
  2441. </li>
  2442. <li role="presentation" class="disabled" id="tab3">
  2443. <a href="#step3" data-toggle="tab" aria-controls="step3" role="tab" title="">
  2444. <span class="round-tab">
  2445. <i class="fa fa-file-text-o" aria-hidden="true"></i>
  2446. </span>
  2447. </a>
  2448. </li>
  2449. <li role="presentation" class="disabled" id="tab4">
  2450. <a href="#step4" data-toggle="tab" aria-controls="step4" role="tab" title="">
  2451. <span class="round-tab">
  2452. <i class="fa fa-check" aria-hidden="true"></i>
  2453. </span>
  2454. </a>
  2455. </li>
  2456. <li role="presentation" class="disabled">
  2457. <a href="#complete" data-toggle="tab" aria-controls="complete" role="tab" title="">
  2458. <span class="round-tab">
  2459. <i class="fa fa-check" aria-hidden="true"></i>
  2460. </span>
  2461. </a>
  2462. </li>
  2463. </ul>
  2464. </div>
  2465. <div class="tab-content">
  2466. <div class="panel panel-default">
  2467. <div class="panel-heading">
  2468. <div class="row" style="display: none;">
  2469. <div class="col-xs-4 col-sm-2">
  2470. <asp:CheckBox ID="NewCust" runat="server" Checked="true" Text="New Customer" onclick="ClearData();" />
  2471. </div>
  2472. <div class="col-sm-2 col-xs-4">
  2473. <asp:CheckBox ID="ExistCust" runat="server" Text="Existing Customer" onclick="ExistingData();" />
  2474. </div>
  2475. <div class="col-sm-2" style="display: none;">
  2476. <asp:CheckBox ID="EnrollCust" runat="server" Text="Issue Membership Card" onclick="ClickEnroll();" />
  2477. </div>
  2478. </div>
  2479. <div class="row">
  2480. <div class="col-xs-12">
  2481. <h4 class="panel-title">Choose Customer </h4>
  2482. </div>
  2483. </div>
  2484. <div class="panel-actions">
  2485. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  2486. </div>
  2487. </div>
  2488. <div class="panel-body">
  2489. <div class="row">
  2490. <div class="col-sm-2">
  2491. <asp:DropDownList ID="ddlCustomerType" runat="server" CssClass="form-control" Style="margin-bottom: 5px;">
  2492. <asp:ListItem Value="accountNo" Text="Account No."></asp:ListItem>
  2493. <asp:ListItem Value="email" Text="Email ID" Selected="True"></asp:ListItem>
  2494. </asp:DropDownList>
  2495. </div>
  2496. <div class="col-sm-6" style="margin-bottom: 5px;">
  2497. <uc1:SwiftTextBox ID="txtSearchData" runat="server" Category="remit-searchCustomer" CssClass="form-control" Param1="@GetCustomerSearchType()" Title="Blank for All" />
  2498. </div>
  2499. <div class="col-sm-2 col-xs-6">
  2500. <input name="button3" type="button" id="btnAdvSearch" onclick="PickSenderData('a');" class="btn btn-primary" value="Advance Search" style="margin-bottom: 2px;" />
  2501. </div>
  2502. <div class="col-sm-2 col-xs-6">
  2503. <input name="button4" type="button" id="btnClear" value="Clear" class="btn btn-primary" onclick="ClearAllCustomerInfo();" style="margin-bottom: 2px;" />
  2504. </div>
  2505. <div class="col-sm-2" style="display: none;">
  2506. <span>Country: </span>
  2507. <asp:DropDownList ID="sCountry" runat="server" CssClass="form-control"></asp:DropDownList>
  2508. </div>
  2509. </div>
  2510. </div>
  2511. </div>
  2512. <div class="tab-pane active" role="tabpanel" id="step1">
  2513. <div class="panel panel-default">
  2514. <div class="panel-heading">
  2515. <table class="table table-responsive">
  2516. <tr>
  2517. <td>
  2518. <h4 class="panel-title">Sender Information: <span id="senderName"></span></h4>
  2519. </td>
  2520. <td style="float: right; margin-right: 15px;">
  2521. <%--<a href="javascript:void(0);" class="button" onclick="PickReceiverFromSender('s');">View Transaction History</a>--%>
  2522. </td>
  2523. </tr>
  2524. </table>
  2525. <div class="panel-actions">
  2526. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  2527. </div>
  2528. </div>
  2529. <div class="panel-body">
  2530. <div class="row">
  2531. <div class="col-md-6">
  2532. <div class="table-responsive">
  2533. <table class="table">
  2534. <tr style="display: none;">
  2535. <td>&nbsp;</td>
  2536. <td>FIRST NAME</td>
  2537. <td>MIDDLE NAME</td>
  2538. <td>LAST NAME</td>
  2539. </tr>
  2540. <tr>
  2541. <td style="width: 27%;">Sender Name:
  2542. <span class="ErrMsg" id='txtSendFirstName_err'>*</span>
  2543. </td>
  2544. <td>
  2545. <asp:TextBox ID="txtSendFirstName" placeholder="First Name" runat="server" CssClass="required SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this,'Sender First Name');"></asp:TextBox>
  2546. </td>
  2547. <td>
  2548. <asp:TextBox ID="txtSendMidName" runat="server" placeholder="Middle Name" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Middle Name');"></asp:TextBox>
  2549. </td>
  2550. <td>
  2551. <asp:TextBox ID="txtSendLastName" runat="server" placeholder="Last Name" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Last Name');"></asp:TextBox>
  2552. <span class="ErrMsg" id='txtSendLastName_err'></span>
  2553. </td>
  2554. <td style="display: none;">
  2555. <asp:TextBox ID="txtSendSecondLastName" runat="server" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Second Last Name');"></asp:TextBox>
  2556. </td>
  2557. </tr>
  2558. <tr>
  2559. <td>Zip Code</td>
  2560. <td colspan="3">
  2561. <asp:TextBox ID="txtSendPostal" runat="server" placeholder="Postal Code" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Postal Code');"></asp:TextBox>
  2562. </td>
  2563. </tr>
  2564. <tr>
  2565. <td>Street
  2566. <span runat="server" class="ErrMsg" id='sCustStreet_err'>*</span>
  2567. </td>
  2568. <td colspan="3">
  2569. <asp:TextBox ID="sCustStreet" runat="server" placeholder="Street" CssClass="required SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Street Name');"></asp:TextBox>
  2570. </td>
  2571. </tr>
  2572. <tr>
  2573. <td id="tdSenCityLbl" runat="server">
  2574. <asp:Label runat="server" ID="lblsCity" Text="City:"></asp:Label>
  2575. <span runat="server" class="ErrMsg" id='txtSendCity_err'>*</span>
  2576. </td>
  2577. <td id="tdSenCityTxt" runat="server" colspan="3">
  2578. <%--<uc1:SwiftTextBox ID="txtSendCity" Category="remit-cityList" Param1="NotClear" runat="server" CssClass="form-control" />--%>
  2579. <asp:TextBox ID="txtSendCity" runat="server" placeholder="City" CssClass="required form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender City');"></asp:TextBox>
  2580. </td>
  2581. </tr>
  2582. <tr>
  2583. <td>State:<span class="ErrMsg">*</span></td>
  2584. <td colspan="2">
  2585. <asp:DropDownList ID="custLocationDDL" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  2586. </td>
  2587. <td>
  2588. <span id="lblSendCountryName"><b>JAPAN</b></span>
  2589. </td>
  2590. </tr>
  2591. <tr id="trSenContactNo" runat="server">
  2592. <td id="tdSenMobileNoLbl" runat="server">Mobile No:
  2593. <span runat="server" class="ErrMsg" id='txtSendMobile_err'>*</span>
  2594. </td>
  2595. <td id="tdSenMobileNoTxt" runat="server" colspan="2">
  2596. <asp:TextBox ID="txtSendMobile" runat="server" placeholder="Mobile Number" CssClass="required form-control readonlyOnCustomerSelect" MaxLength="13" onblur="CheckForMobileNumber(this, 'Receiver Mobile No.');"></asp:TextBox>
  2597. </td>
  2598. <td id="tdSenTelNoTxt" runat="server">
  2599. <asp:TextBox ID="txtSendTel" runat="server" placeholder="Phone Number" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckForMobileNumber(this);" MaxLength="17"></asp:TextBox>
  2600. </td>
  2601. </tr>
  2602. <tr>
  2603. <td>Gender:
  2604. </td>
  2605. <td>
  2606. <asp:DropDownList ID="ddlSenGender" runat="server" CssClass="form-control readonlyOnCustomerSelect">
  2607. <asp:ListItem Value="">Select</asp:ListItem>
  2608. <asp:ListItem Value="Male">Male</asp:ListItem>
  2609. <asp:ListItem Value="Female">Female</asp:ListItem>
  2610. </asp:DropDownList>
  2611. </td>
  2612. <td id="tdSenDobLbl" runat="server">
  2613. <asp:Label runat="server" ID="lblSDOB" Text="Date Of Birth:"></asp:Label>
  2614. <span runat="server" class="ErrMsg" id='txtSendDOB_err'>*</span>
  2615. </td>
  2616. <td id="tdSenDobTxt" runat="server" nowrap="nowrap">
  2617. <asp:TextBox ID="txtSendDOB" runat="server" ReadOnly="true" CssClass="form-control readonlyOnCustomerSelect" placeholder="YYYY/MM/DD"></asp:TextBox>
  2618. <asp:RangeValidator ID="RangeValidator1" runat="server"
  2619. ControlToValidate="txtSendDOB"
  2620. MaximumValue="12/31/2100"
  2621. MinimumValue="01/01/1900"
  2622. Type="Date"
  2623. ErrorMessage="Invalid date!"
  2624. ValidationGroup="customer"
  2625. CssClass="inv"
  2626. SetFocusOnError="true"
  2627. Display="Dynamic"> </asp:RangeValidator>
  2628. </td>
  2629. </tr>
  2630. <tr>
  2631. <td>Native Country:
  2632. <span class="ErrMsg" id='txtSendNativeCountry_err'>*</span>
  2633. </td>
  2634. <td colspan="3">
  2635. <asp:DropDownList ID="txtSendNativeCountry" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  2636. </td>
  2637. </tr>
  2638. <tr id="trSalaryRange" runat="server" class="showOnIndividual">
  2639. <td>
  2640. <asp:Label runat="server" ID="lblSalaryRange" Text="Monthly Income:"></asp:Label>
  2641. <span runat="server" id="ddlSalary_err" class="ErrMsg">*</span>
  2642. </td>
  2643. <td colspan="3">
  2644. <asp:DropDownList ID="ddlSalary" runat="server" CssClass="form-control readonlyOnCustomerSelect">
  2645. <asp:ListItem>Select</asp:ListItem>
  2646. <asp:ListItem>JPY 0 - JPY1,700,000</asp:ListItem>
  2647. <asp:ListItem>JPY1,700,000 - JPY3,400,000</asp:ListItem>
  2648. <asp:ListItem>JPY3,400,000 - JPY6,800,000</asp:ListItem>
  2649. <asp:ListItem>JPY6,800,000 - JPY13,000,000</asp:ListItem>
  2650. <asp:ListItem>Above JPY13,000,000</asp:ListItem>
  2651. </asp:DropDownList>
  2652. </td>
  2653. </tr>
  2654. </table>
  2655. </div>
  2656. </div>
  2657. <div class="col-md-6">
  2658. <div class="table-responsive">
  2659. <table class="table">
  2660. <tr>
  2661. <td style="width: 27%;">Email:</td>
  2662. <td colspan="3">
  2663. <asp:TextBox ID="txtSendEmail" runat="server" placeholder="Email" CssClass="LargeTextBox form-control readonlyOnCustomerSelect"></asp:TextBox>
  2664. <asp:RegularExpressionValidator ID="rev1" runat="server" Display="Dynamic"
  2665. ErrorMessage="Invalid Email Id!" ForeColor="Red" SetFocusOnError="True" ValidationGroup="send"
  2666. ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="inv"
  2667. ControlToValidate="txtSendEmail"></asp:RegularExpressionValidator>
  2668. </td>
  2669. </tr>
  2670. <tr>
  2671. <td>Customer Type:</td>
  2672. <td colspan="3">
  2673. <asp:DropDownList ID="ddlSendCustomerType" runat="server" onchange="ChangeCustomerType()" CssClass="SmallTextBox form-control readonlyOnCustomerSelect">
  2674. </asp:DropDownList>
  2675. </td>
  2676. </tr>
  2677. <tr id="trSenCompany" runat="server" class="hideOnIndividual">
  2678. <td>
  2679. <asp:Label runat="server" ID="lblCompName" Text="Company Name:"></asp:Label>
  2680. <span runat="server" class="ErrMsg" id='companyName_err'>*</span>
  2681. </td>
  2682. <td colspan="3">
  2683. <asp:TextBox ID="companyName" runat="server" placeholder="Company Name" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Company Name');"></asp:TextBox>
  2684. </td>
  2685. </tr>
  2686. <tr class="hideOnIndividual">
  2687. <td>Business Type
  2688. <span runat="server" class="ErrMsg" id='Span2'>*</span>
  2689. </td>
  2690. <td colspan="3">
  2691. <asp:DropDownList ID="ddlEmpBusinessType" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  2692. </td>
  2693. </tr>
  2694. <tr id="trSenId" runat="server" valign="bottom">
  2695. <td>
  2696. <asp:Label runat="server" ID="lblsIdtype" Text="ID Type:"></asp:Label>
  2697. <span runat="server" class="ErrMsg" id='ddSenIdType_err'>*</span>
  2698. </td>
  2699. <td>
  2700. <asp:DropDownList ID="ddSenIdType" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  2701. </td>
  2702. <td>
  2703. <asp:Label runat="server" ID="lblSidNo" Text="ID Number:"></asp:Label>
  2704. <span runat="server" class="ErrMsg" id='txtSendIdNo_err'>*</span>
  2705. </td>
  2706. <td>
  2707. <asp:TextBox ID="txtSendIdNo" placeholder="ID Number" MaxLength="14" runat="server" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckSenderIdNumber(this);" Style="width: 100%;"></asp:TextBox>
  2708. <br />
  2709. <span id="spnIdNumber" style="color: red; font-size: 10px; font-family: verdana; font-weight: bold; display: none;"></span>
  2710. </td>
  2711. </tr>
  2712. <tr>
  2713. <td>Place Of Issue</td>
  2714. <td colspan="3">
  2715. <asp:DropDownList ID="ddlIdIssuedCountry" runat="server" CssClass="form-control readonlyOnCustomerSelect"></asp:DropDownList>
  2716. </td>
  2717. </tr>
  2718. <tr id="trIdExpirenDob" runat="server">
  2719. <td id="tdSenIssuedDateLbl" runat="server" class="showHideIDIssuedDate" nowrap="nowrap">
  2720. <asp:Label runat="server" ID="lblsIssuedDate" Text="Issued Date:"></asp:Label>
  2721. <span runat="server" class="ErrMsg" id='Span1'>*</span>
  2722. </td>
  2723. <td id="td2" runat="server" nowrap="nowrap" class="showHideIDIssuedDate">
  2724. <asp:TextBox ID="txtSendIdExpireDate" onchange="return DateValidation('txtSendIdExpireDate','i')" MaxLength="10" runat="server" placeholder="YYYY/MM/DD" CssClass="required form-control readonlyOnCustomerSelect"></asp:TextBox>
  2725. <%--<cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtSendIdExpireDate"
  2726. Mask="9999/99/99" MessageValidatorTip="true" MaskType="Date" InputDirection="LeftToRight"
  2727. ErrorTooltipEnabled="True" />--%>
  2728. <asp:RangeValidator ID="RangeValidator3" runat="server"
  2729. ControlToValidate="txtSendIdExpireDate"
  2730. MaximumValue="12/31/2100"
  2731. MinimumValue="01/01/1900"
  2732. Type="Date"
  2733. ForeColor="Red"
  2734. ErrorMessage="Invalid date!"
  2735. ValidationGroup="customer"
  2736. CssClass="inv"
  2737. SetFocusOnError="true"
  2738. Display="Dynamic"> </asp:RangeValidator>
  2739. </td>
  2740. <td id="tdSenExpDateLbl" runat="server" class="showHideIDExpDate" nowrap="nowrap">
  2741. <asp:Label runat="server" ID="lblsExpDate" Text="Expire Date:"></asp:Label>
  2742. <span runat="server" class="ErrMsg" id='txtSendIdValidDate_err'>*</span>
  2743. </td>
  2744. <td id="tdSenExpDateTxt" runat="server" nowrap="nowrap" class="showHideIDExpDate" width="170">
  2745. <asp:TextBox ID="txtSendIdValidDate" onchange="return DateValidation('txtSendIdValidDate')" MaxLength="10" runat="server" placeholder="YYYY/MM/DD" CssClass="form-control readonlyOnCustomerSelect"></asp:TextBox>
  2746. <%-- <cc1:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtSendIdValidDate"
  2747. Mask="9999/99/99" MessageValidatorTip="true" MaskType="Date" InputDirection="LeftToRight"
  2748. ErrorTooltipEnabled="True" />--%>
  2749. <asp:RangeValidator ID="RangeValidator2" runat="server"
  2750. ControlToValidate="txtSendIdValidDate"
  2751. MaximumValue="12/31/2100"
  2752. MinimumValue="01/01/1900"
  2753. Type="Date"
  2754. ForeColor="Red"
  2755. ErrorMessage="Invalid date!"
  2756. ValidationGroup="customer"
  2757. CssClass="inv"
  2758. SetFocusOnError="true"
  2759. Display="Dynamic"> </asp:RangeValidator>
  2760. </td>
  2761. </tr>
  2762. <br />
  2763. <tr id="trOccupation" runat="server" class="showOnIndividual">
  2764. <td>
  2765. <asp:Label runat="server" ID="lblOccupation" Text="Occupation:"></asp:Label>
  2766. <span runat="server" class="ErrMsg" id='occupation_err'>*</span>
  2767. </td>
  2768. <td colspan="3">
  2769. <asp:DropDownList ID="occupation" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  2770. </td>
  2771. </tr>
  2772. </table>
  2773. </div>
  2774. </div>
  2775. </div>
  2776. <table class="table table-responsive" style="display: none;">
  2777. <tr id="trSenAddress1" runat="server" style="display: none;">
  2778. <td>Address1:
  2779. <span runat="server" class="ErrMsg" id='txtSendAdd1_err'>*</span>
  2780. </td>
  2781. <td colspan="3">
  2782. <asp:TextBox ID="txtSendAdd1" runat="server" CssClass="form-control"></asp:TextBox>
  2783. </td>
  2784. </tr>
  2785. <tr id="trSenAddress2" runat="server" style="display: none;">
  2786. <td>Address2:</td>
  2787. <td colspan="3">
  2788. <asp:TextBox ID="txtSendAdd2" runat="server" CssClass="LargeTextBox form-control"></asp:TextBox></td>
  2789. </tr>
  2790. <tr style="display: none">
  2791. <td>Send SMS To Sender:</td>
  2792. <td nowrap="nowrap">
  2793. <asp:CheckBox ID="ChkSMS" runat="server" />
  2794. </td>
  2795. <td></td>
  2796. <td></td>
  2797. </tr>
  2798. <tr>
  2799. <td id="lblMem" style="display: none">Membership ID:</td>
  2800. <td id="valMem" style="display: none">
  2801. <asp:TextBox ID="memberCode" runat="server" CssClass="form-control"></asp:TextBox>
  2802. <span id="memberCode_err" class="ErrMsg"></span>
  2803. </td>
  2804. </tr>
  2805. <tr>
  2806. <td colspan="4">
  2807. <div id="divSenderIdImage"></div>
  2808. </td>
  2809. </tr>
  2810. </table>
  2811. </div>
  2812. </div>
  2813. <ul class="list-inline pull-right">
  2814. <li>
  2815. <button type="button" onclick="checkValidationByTab('step1')" class="btn btn-primary">Save and continue</button>
  2816. </li>
  2817. </ul>
  2818. </div>
  2819. <div class="tab-pane" role="tabpanel" id="step2">
  2820. <div class="panel panel-default">
  2821. <div class="panel-heading">
  2822. <table class="table table-responsive">
  2823. <tr>
  2824. <td>
  2825. <h4 class="panel-title">Receiver Information: <span id="receiverName"></span></h4>
  2826. </td>
  2827. <td style="float: right; margin-right: 15px;">
  2828. <a href="javascript:void(0);" class="btn btn-sm btn-primary showOnCustomerSelect hidden" onclick="PickReceiverFromSender('a');" title="Add New Receiver"><i class="fa fa-plus"></i></a>
  2829. <a href="javascript:void(0);" class="btn btn-sm btn-primary" onclick="PickReceiverFromSender('r');" title="Pick Receiver"><i class="fa fa-file-archive-o"></i></a>
  2830. <a href="javascript:void(0);" id="btnReceiverClr" class="btn btn-sm btn-primary" title="Clear"><i class="fa fa-eraser"></i></a>
  2831. <%--<a href="javascript:void(0);" style="margin-left: 10px; margin-right: 10px; margin-top: -10px;">Clear</a>--%>
  2832. <%--<input id="btnReceiverClr" type="button" value="Clear" class="btn btn-primary" style="margin-left: 10px; margin-right: 10px;" />--%>
  2833. </td>
  2834. </tr>
  2835. </table>
  2836. <div class="panel-actions">
  2837. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  2838. </div>
  2839. </div>
  2840. <div class="panel-body">
  2841. <div class="row">
  2842. <div class="col-md-6">
  2843. <div class="table-responsive">
  2844. <table class="table">
  2845. <tr>
  2846. <td style="width: 27%;">Choose Receiver:
  2847. </td>
  2848. <td colspan="3">
  2849. <asp:DropDownList ID="ddlReceiver" runat="server" onchange="DDLReceiverOnChange();" CssClass="form-control"></asp:DropDownList>
  2850. </td>
  2851. </tr>
  2852. <tr>
  2853. <td>Receiver Name:
  2854. <span class="ErrMsg" id='txtRecFName_err'>*</span>
  2855. </td>
  2856. <td>
  2857. <asp:TextBox ID="txtRecFName" runat="server" placeholder="First Name" CssClass="required SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver First Name');"></asp:TextBox>
  2858. </td>
  2859. <td>
  2860. <asp:TextBox ID="txtRecMName" runat="server" placeholder="Middle Name" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Middle Name');"></asp:TextBox>
  2861. </td>
  2862. <td>
  2863. <asp:TextBox ID="txtRecLName" runat="server" placeholder="Last Name" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Last Name');"></asp:TextBox>
  2864. <span class="ErrMsg" id='txtRecLName_err'></span>
  2865. </td>
  2866. <td style="display: none;">
  2867. <asp:TextBox ID="txtRecSLName" runat="server" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Second Last Name');"></asp:TextBox>
  2868. </td>
  2869. </tr>
  2870. <tr id="trRecAddress1" runat="server">
  2871. <td>Address1:
  2872. <span runat="server" class="ErrMsg" id='txtRecAdd1_err'>*</span>
  2873. </td>
  2874. <td colspan="3">
  2875. <asp:TextBox ID="txtRecAdd1" runat="server" placeholder="Receiver Address" CssClass="required form-control readonlyOnReceiverSelect"></asp:TextBox>
  2876. </td>
  2877. </tr>
  2878. <tr id="trRecAddress2" runat="server" style="display: none;">
  2879. <td>
  2880. <asp:Label runat="server" ID="lblrAdd" Text="Address2:"></asp:Label></td>
  2881. <td colspan="3">
  2882. <asp:TextBox ID="txtRecAdd2" runat="server" CssClass="LargeTextBox form-control readonlyOnReceiverSelect"></asp:TextBox>
  2883. </td>
  2884. </tr>
  2885. <tr>
  2886. <td id="tdRecCityLbl" runat="server">
  2887. <asp:Label runat="server" ID="lblrCity" Text="City:"></asp:Label>
  2888. <span runat="server" class="ErrMsg" id='txtRecCity_err'>*</span>
  2889. </td>
  2890. <td id="tdRecCityTxt" runat="server" colspan="3">
  2891. <asp:TextBox ID="txtRecCity" placeholder="Receiver City" runat="server" CssClass="form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver City');"></asp:TextBox>
  2892. </td>
  2893. <asp:TextBox Style="display: none" ID="txtRecPostal" runat="server" CssClass="form-control" onblur="CheckForSpecialCharacter(this, 'Receiver Postal Code');"></asp:TextBox>
  2894. </tr>
  2895. <tr id="trRecContactNo" runat="server">
  2896. <td id="tdRecMobileNoLbl" runat="server">Mobile No: <span runat="server" class="ErrMsg" id='txtRecMobile_err'>*</span>
  2897. </td>
  2898. <td id="tdRecMobileNoTxt" runat="server" colspan="2">
  2899. <asp:TextBox ID="txtRecMobile" runat="server" placeholder="Mobile Number" CssClass="required form-control readonlyOnReceiverSelect" onblur="CheckForMobileNumber(this, 'Receiver Mobile No.');"></asp:TextBox>
  2900. </td>
  2901. <td id="tdRecTelNoTxt" runat="server">
  2902. <asp:TextBox ID="txtRecTel" runat="server" placeholder="Phone Number" CssClass="form-control readonlyOnReceiverSelect" onblur="CheckForMobileNumber(this, 'Receiver Tel. No.');"></asp:TextBox>
  2903. </td>
  2904. </tr>
  2905. </table>
  2906. </div>
  2907. </div>
  2908. <div class="col-md-6">
  2909. <div class="table-responsive">
  2910. <table class="table">
  2911. <tr>
  2912. <td style="width: 27%;">&nbsp;</td>
  2913. <td>&nbsp;</td>
  2914. </tr>
  2915. <tr id="trRecId" runat="server" class="trRecId">
  2916. <td>
  2917. <asp:Label runat="server" ID="lblRidType" Text="ID Type:"></asp:Label>
  2918. <span runat="server" class="ErrMsg" id='ddlRecIdType_err'>*</span>
  2919. </td>
  2920. <td colspan="3">
  2921. <asp:DropDownList ID="ddlRecIdType" runat="server" CssClass="form-control readonlyOnReceiverSelect"></asp:DropDownList>
  2922. </td>
  2923. </tr>
  2924. <tr id="trRecId1" runat="server" class="trRecId">
  2925. <td>
  2926. <asp:Label runat="server" ID="lblRidNo" Text="ID Number:"></asp:Label>
  2927. <span runat="server" class="ErrMsg" id='txtRecIdNo_err'>*</span>
  2928. </td>
  2929. <td colspan="3">
  2930. <asp:TextBox ID="txtRecIdNo" runat="server" placeholder="ID Number" CssClass="form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver ID Number');"></asp:TextBox>
  2931. </td>
  2932. </tr>
  2933. <tr id="trRecIdExpirynDob" runat="server">
  2934. <td id="tdRecIdExpiryLbl" runat="server" class="recIdDateValidate" nowrap="nowrap">
  2935. <asp:Label runat="server" ID="lblrExpDate" Text="ID Expiry Date:"></asp:Label>
  2936. <span runat="server" class="ErrMsg" id='txtRecValidDate_err'>*</span>
  2937. </td>
  2938. <td id="tdRecIdExpiryTxt" runat="server" nowrap="nowrap" class="recIdDateValidate">
  2939. <asp:TextBox ID="txtRecValidDate" runat="server" placeholder="YYYY/MM/DD" CssClass="form-control readonlyOnReceiverSelect" ReadOnly="true"></asp:TextBox>
  2940. <%--<cc1:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtRecValidDate"
  2941. Mask="9999/99/99" MessageValidatorTip="true" MaskType="Date" InputDirection="LeftToRight"
  2942. ErrorTooltipEnabled="True" />--%>
  2943. <asp:RangeValidator ID="RangeValidator4" runat="server"
  2944. ControlToValidate="txtSendIdValidDate"
  2945. MaximumValue="12/31/2100"
  2946. MinimumValue="01/01/1900"
  2947. Type="Date"
  2948. ForeColor="Red"
  2949. ErrorMessage="Invalid date!"
  2950. ValidationGroup="customer"
  2951. CssClass="inv"
  2952. SetFocusOnError="true"
  2953. Display="Dynamic"> </asp:RangeValidator>
  2954. </td>
  2955. <td id="tdRecDobLbl" runat="server">
  2956. <asp:Label runat="server" ID="lblDOB" Text="DOB:"></asp:Label>
  2957. <span runat="server" class="ErrMsg" id='txtRecDOB_err'>*</span>
  2958. </td>
  2959. <td id="tdRecDobTxt" runat="server" nowrap="nowrap">
  2960. <asp:TextBox ID="txtRecDOB" runat="server" CssClass="form-control" ReadOnly="true" placeholder="YYYY/MM/DD"></asp:TextBox>
  2961. </td>
  2962. </tr>
  2963. <tr>
  2964. <td>Gender:
  2965. </td>
  2966. <td>
  2967. <asp:DropDownList ID="ddlRecGender" runat="server" CssClass="form-control readonlyOnReceiverSelect">
  2968. <asp:ListItem Value="">SELECT</asp:ListItem>
  2969. <asp:ListItem Value="Male">Male</asp:ListItem>
  2970. <asp:ListItem Value="Female">Female</asp:ListItem>
  2971. </asp:DropDownList>
  2972. </td>
  2973. </tr>
  2974. <tr>
  2975. <td>Email:</td>
  2976. <td colspan="3">
  2977. <asp:TextBox ID="txtRecEmail" runat="server" placeholder="Email" CssClass="LargeTextBox form-control readonlyOnReceiverSelect"></asp:TextBox>
  2978. <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
  2979. ErrorMessage="Invalid Email Id!" ForeColor="Red" SetFocusOnError="True" ValidationGroup="send"
  2980. ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="inv"
  2981. ControlToValidate="txtRecEmail"></asp:RegularExpressionValidator>
  2982. </td>
  2983. </tr>
  2984. </table>
  2985. </div>
  2986. </div>
  2987. </div>
  2988. </div>
  2989. </div>
  2990. <ul class="list-inline pull-right">
  2991. <li>
  2992. <button type="button" class="btn btn-default prev-step">Previous</button>
  2993. </li>
  2994. <li>
  2995. <button type="button" class="btn btn-primary" onclick="checkValidationByTab('step2')">Save and continue</button>
  2996. </li>
  2997. </ul>
  2998. </div>
  2999. <div class="tab-pane" role="tabpanel" id="step3">
  3000. <div class="panel panel-default">
  3001. <div class="panel-heading">
  3002. <h4 class="panel-title">Transaction Information:</h4>
  3003. <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:
  3004. <asp:Label ID="lblPerDayLimit" runat="server"></asp:Label>&nbsp;<asp:Label ID="lblPerDayCustomerCurr" runat="server"></asp:Label>
  3005. ]
  3006. </span>
  3007. <div class="panel-actions">
  3008. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  3009. </div>
  3010. </div>
  3011. <div class="panel-body">
  3012. <div class="row">
  3013. <div class="col-md-6">
  3014. <div class="table-responsive">
  3015. <table class="table">
  3016. <tr>
  3017. <td style="width: 27%;">Collection Mode: <span class="ErrMsg">*</span></td>
  3018. <td id="collModeTd" runat="server"></td>
  3019. </tr>
  3020. <tr style="">
  3021. <td style="vertical-align: top;">Receiving Country:
  3022. <span class="ErrMsg" id="pCountry_err">*</span>
  3023. </td>
  3024. <td>
  3025. <asp:DropDownList ID="pCountry" runat="server" CssClass="required form-control"></asp:DropDownList>
  3026. </td>
  3027. </tr>
  3028. <tr>
  3029. <td>
  3030. <span id="lblPayoutAgent">Agent / Bank:</span>
  3031. <span class="ErrMsg" id="pAgent_err">*</span>
  3032. </td>
  3033. <td>
  3034. <asp:DropDownList ID="pAgent" runat="server" CssClass="required form-control"></asp:DropDownList>
  3035. <asp:DropDownList ID="pAgentDetail" runat="server" CssClass="form-control" Style="display: none;"></asp:DropDownList>
  3036. <asp:DropDownList ID="pAgentMaxPayoutLimit" runat="server" CssClass="form-control" Style="display: none;"></asp:DropDownList>
  3037. <span id="hdnreqAgent" style="display: none"></span>
  3038. <input type="hidden" id="hdnBankType" />
  3039. </td>
  3040. </tr>
  3041. <tr id="trForCPOB" style="display: none;">
  3042. <td>Payment through:
  3043. <span class="ErrMsg">*</span>
  3044. </td>
  3045. <td colspan="3">
  3046. <asp:DropDownList ID="paymentThrough" runat="server" CssClass="form-control"></asp:DropDownList>
  3047. </td>
  3048. </tr>
  3049. <tr class="trScheme">
  3050. <td>Scheme/Offer:</td>
  3051. <td>
  3052. <asp:DropDownList ID="ddlScheme" runat="server" CssClass="form-control"></asp:DropDownList>
  3053. </td>
  3054. </tr>
  3055. <tr class="locationRow">
  3056. <td>State:<span class="ErrMsg">*</span></td>
  3057. <td>
  3058. <asp:DropDownList ID="locationDDL" runat="server" CssClass="required form-control"></asp:DropDownList>
  3059. </td>
  3060. </tr>
  3061. <tr class="locationRow">
  3062. <td>Town:<%--<span class="ErrMsg">*</span>--%></td>
  3063. <td>
  3064. <asp:DropDownList ID="ddlTown" runat="server" CssClass="form-control <%--required--%>"></asp:DropDownList>
  3065. </td>
  3066. </tr>
  3067. <tr>
  3068. <td valign="top">Collection Amount:
  3069. <span class="ErrMsg" id='txtCollAmt_err'>*</span>
  3070. </td>
  3071. <td>
  3072. <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>
  3073. <asp:Label ID="lblCollCurr" runat="server" Text="MYR" class="amountLabel"></asp:Label><br />
  3074. (Max Limit: <u><b>
  3075. <asp:Label ID="lblPerTxnLimit" runat="server" Text="0.00"></asp:Label></b></u>)&nbsp;
  3076. <asp:Label ID="lblPerTxnLimitCurr" runat="server"></asp:Label>
  3077. </td>
  3078. </tr>
  3079. <tr>
  3080. <td>Service Charge:&nbsp;
  3081. <input type="checkbox" id="editServiceCharge" runat="server" /><label for="editServiceCharge">EDIT</label>
  3082. <asp:HiddenField ID="allowEditSC" runat="server" />
  3083. </td>
  3084. <td>
  3085. <asp:TextBox ID="lblServiceChargeAmt" runat="server" Text="0" class="form-control" Width="20%" Style="display: inherit !important;" onblur="return ReCalculate();"></asp:TextBox>
  3086. <asp:Label ID="lblServiceChargeCurr" runat="server" Text="MYR" class="amountLabel"></asp:Label>
  3087. </td>
  3088. </tr>
  3089. <tr>
  3090. <td>Customer Rate:</td>
  3091. <td>
  3092. <asp:Label ID="lblExRate" runat="server" Text="0.00" class="amountLabel"></asp:Label>
  3093. <asp:Label ID="lblExCurr" runat="server" Text="" class="amountLabel"></asp:Label>
  3094. </td>
  3095. </tr>
  3096. <tr>
  3097. <td>Payout Amount: <span class="ErrMsg" id='txtPayAmt_err'>*</span></td>
  3098. <td>
  3099. <asp:TextBox ID="txtPayAmt" runat="server" Enabled="false" Style="width: 80%; display: inherit;" CssClass="required BigAmountField disabled form-control"></asp:TextBox>
  3100. <asp:Label ID="lblPayCurr" runat="server" Text="" class="amountLabel"></asp:Label>
  3101. <i class="fa fa-refresh btn btn-sm btn-primary" onclick="ChangeCalcBy()"></i>
  3102. </td>
  3103. </tr>
  3104. <%-- <tr>
  3105. <td>
  3106. <span id="amlMessage" style="display:none; font-size: 16px; font-family: Verdana; font-weight: bold; color: Red;"></span>
  3107. </td>
  3108. </tr>--%>
  3109. </table>
  3110. </div>
  3111. </div>
  3112. <div class="col-md-6">
  3113. <div class="table-responsive">
  3114. <table class="table">
  3115. <tr class="deposited-bank-hide">
  3116. <td style="width: 27%;">&nbsp;</td>
  3117. <td>&nbsp;</td>
  3118. </tr>
  3119. <tr class="deposited-bank" style="display: none;">
  3120. <td>Deposited Bank: <span class="ErrMsg">*</span></td>
  3121. <td>
  3122. <asp:DropDownList ID="depositedBankDDL" runat="server" CssClass="form-control"></asp:DropDownList>
  3123. </td>
  3124. </tr>
  3125. <tr style="">
  3126. <td style="vertical-align: top;">Receiving Mode:<span class="ErrMsg">*</span>
  3127. </td>
  3128. <td>
  3129. <asp:DropDownList ID="pMode" runat="server" CssClass="required form-control"></asp:DropDownList>
  3130. </td>
  3131. </tr>
  3132. <tr>
  3133. <%--<td colspan="2" class="hide-col-branch"></td>--%>
  3134. <td style="display: none" class="same">Branch:<span class="ErrMsg">*</span>
  3135. </td>
  3136. <td style="display: none" class="same">
  3137. <div id="divBankBranch">
  3138. <select id="branch" runat="server" class="form-control">
  3139. <option value="">SELECT BANK</option>
  3140. </select>
  3141. </div>
  3142. <input type="hidden" id="txtpBranch_aValue" class="form-control" />
  3143. <span id="hdnreqBranch" style="display: none"></span><span class="ErrMsg" id="reqBranch" style="display: none"></span>
  3144. <div id="divBranchMsg" style="display: none;" class="note"></div>
  3145. </td>
  3146. </tr>
  3147. <tr id="trAccno" style="display: none;">
  3148. <td>Bank Account No:
  3149. <span id="txtRecDepAcNo_err" class="ErrMsg">*</span>
  3150. </td>
  3151. <td>
  3152. <asp:TextBox ID="txtRecDepAcNo" runat="server" CssClass="form-control" onblur="CheckForSpecialCharacter(this, 'Receiver Acc No.');"></asp:TextBox>
  3153. </td>
  3154. </tr>
  3155. <tr class="locationRow">
  3156. <td>City:<span class="ErrMsg">*</span></td>
  3157. <td>
  3158. <asp:DropDownList ID="subLocationDDL" runat="server" CssClass="form-control"></asp:DropDownList>
  3159. </td>
  3160. </tr>
  3161. <tr class="trScheme">
  3162. <td id="tdItelCouponIdLbl" style="display: none;">ITEL Coupon ID:</td>
  3163. <td id="tdItelCouponIdTxt" style="display: none;">
  3164. <asp:TextBox ID="iTelCouponId" runat="server" CssClass="form-control"></asp:TextBox>
  3165. </td>
  3166. </tr>
  3167. <tr>
  3168. <td id="tdLblPCurr">Payout Currency:<span class="ErrMsg">*</span></td>
  3169. <td id="tdTxtPCurr">
  3170. <select id="pCurrDdl" runat="server" class="required form-control" onchange="CalculateTxn();"></select>
  3171. </td>
  3172. </tr>
  3173. <tr>
  3174. <td>Sending Amount: </td>
  3175. <td>
  3176. <asp:Label ID="lblSendAmt" runat="server" Text="0.00" class="amountLabel"></asp:Label>
  3177. <asp:Label ID="lblSendCurr" runat="server" Text="MYR" class="amountLabel"></asp:Label>
  3178. </td>
  3179. </tr>
  3180. <tr>
  3181. <td id="tdScheme" style="display: none;" valign="top">Scheme/Offer:</td>
  3182. <td id="tdSchemeVal" style="display: none;">
  3183. <span id="spnSchemeOffer" style="font-weight: bold; font-family: Verdana; color: black; font-size: 10px;"></span>
  3184. <input type="hidden" id="scDiscount" name="scDiscount" />
  3185. <input type="hidden" id="exRateOffer" value="exRateOffer" />
  3186. </td>
  3187. </tr>
  3188. <tr>
  3189. <td>Introducer (If Any):
  3190. </td>
  3191. <td>
  3192. <input type="text" class="form-control" id="introducerTxt" placeholder="Introducer (If Any)" />
  3193. </td>
  3194. <td colspan="2" rowspan="4">
  3195. <span id="spnPayoutLimitInfo" style="color: red; font-size: 16px; font-weight: bold;"></span></td>
  3196. </tr>
  3197. </table>
  3198. </div>
  3199. </div>
  3200. <div class="col-md-12">
  3201. <div class="table-responsive">
  3202. <table class="table">
  3203. <tr>
  3204. <td style="width: 13%;">&nbsp;</td>
  3205. <td>
  3206. <br />
  3207. <input type="button" id="btnCalculate" value="Calculate" class="btn btn-primary" />&nbsp;
  3208. <input type="button" id="btnCalcClean" value="Clear" class="btn btn-primary" />&nbsp;
  3209. <input name="button" type="button" id="btnCalcPopUp" value="Calculator" class="btn btn-primary" />
  3210. <span id="finalSenderId" style="display: none"></span>
  3211. <span id="finalBenId" style="display: none"></span>
  3212. <input type="hidden" id="finalAgentId" />
  3213. <input type="hidden" id="txtCustomerLimit" value="0" />
  3214. <asp:HiddenField ID="txnPerDayCustomerLimit" runat="server" Value="0" />
  3215. <input type="hidden" id="hdnInvoicePrintMethod" />
  3216. </td>
  3217. </tr>
  3218. <tr>
  3219. <td colspan="2" align="center">
  3220. <div align="center">
  3221. <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>
  3222. </div>
  3223. </td>
  3224. </tr>
  3225. <tr>
  3226. <td colspan="2">
  3227. <span id="spnWarningMsg" style="font-size: 13px; font-family: Verdana; font-weight: bold; color: Red;"></span></td>
  3228. </tr>
  3229. </table>
  3230. </div>
  3231. </div>
  3232. </div>
  3233. </div>
  3234. </div>
  3235. <ul class="list-inline pull-right">
  3236. <li>
  3237. <button type="button" class="btn btn-default prev-step">Previous</button>
  3238. </li>
  3239. <!-- <li>
  3240. <button type="button" class="btn btn-default next-step">Skip</button>
  3241. </li> -->
  3242. <li>
  3243. <button type="button" class="btn btn-primary btn-info-full" onclick="checkValidationByTab('step3')">Save and continue</button>
  3244. </li>
  3245. </ul>
  3246. </div>
  3247. <div class="tab-pane" role="tabpanel" id="step4">
  3248. <div class="panel panel-default">
  3249. <div class="panel-heading">
  3250. <h4 class="panel-title">Customer Due Diligence Information -(CDDI)</h4>
  3251. <div class="panel-actions">
  3252. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  3253. </div>
  3254. </div>
  3255. <div class="panel-body">
  3256. <div class="col-md-6">
  3257. <div class="table-responsive">
  3258. <table class="table">
  3259. <tr id="trPurposeOfRemittance" runat="server">
  3260. <td style="width: 27%;">
  3261. <asp:Label runat="server" ID="lblPoRemit" Text="Purpose of Remittance:"></asp:Label>
  3262. <span runat="server" class="ErrMsg" id='purpose_err'>*</span>
  3263. </td>
  3264. <td>
  3265. <asp:DropDownList ID="purpose" runat="server" CssClass="required form-control"></asp:DropDownList>
  3266. </td>
  3267. </tr>
  3268. <tr id="trRelWithRec" runat="server">
  3269. <td>
  3270. <asp:Label runat="server" ID="lblRelation" Text="Relationship with Receiver:"></asp:Label>
  3271. <span runat="server" class="ErrMsg" id='relationship_err'>*</span>
  3272. </td>
  3273. <td>
  3274. <asp:DropDownList ID="relationship" runat="server" CssClass="required form-control"></asp:DropDownList>
  3275. </td>
  3276. </tr>
  3277. </table>
  3278. </div>
  3279. </div>
  3280. <div class="col-md-6">
  3281. <div class="table-responsive">
  3282. <table class="table">
  3283. <tr id="trSourceOfFund" runat="server">
  3284. <td style="width: 27%;">
  3285. <asp:Label runat="server" ID="lblSof" Text="Source of Fund:"></asp:Label>
  3286. <span runat="server" class="ErrMsg" id='sourceOfFund_err'>*</span>
  3287. </td>
  3288. <td>
  3289. <asp:DropDownList ID="sourceOfFund" runat="server" CssClass="required form-control"></asp:DropDownList>
  3290. </td>
  3291. </tr>
  3292. </table>
  3293. </div>
  3294. </div>
  3295. <div class="col-md-12">
  3296. <div class="table-responsive">
  3297. <table class="table">
  3298. <tr>
  3299. <td id="msgRecDiv">Message to Receiver:</td>
  3300. <td>
  3301. <asp:TextBox ID="txtPayMsg" runat="server" CssClass="LargeTextBox form-control" TextMode="MultiLine" onblur="CheckForSpecialCharacter(this, 'Message to Receiver');"></asp:TextBox>
  3302. </td>
  3303. </tr>
  3304. <tr>
  3305. <td></td>
  3306. <td>
  3307. <br />
  3308. <%--<input type="button" name="calc" id="calc" value="Send Transaction" class="btn btn-primary" />--%>
  3309. </td>
  3310. </tr>
  3311. </table>
  3312. </div>
  3313. </div>
  3314. </div>
  3315. </div>
  3316. <ul class="list-inline pull-right">
  3317. <li>
  3318. <button type="button" class="btn btn-default prev-step">Previous</button>
  3319. </li>
  3320. <li>
  3321. <button type="button" name="calc" id="calc" class="btn btn-primary btn-info-full">Send Transaction</button>
  3322. </li>
  3323. </ul>
  3324. </div>
  3325. <div class="tab-pane" role="tabpanel" id="complete">
  3326. <div class="panel panel-default" style="margin-top: 10px;">
  3327. <div class="panel-heading">
  3328. Customer Due Diligence Information
  3329. </div>
  3330. <div class="panel-body">
  3331. </div>
  3332. </div>
  3333. <ul class="list-inline pull-right">
  3334. <li>
  3335. <button type="button" class="btn btn-default prev-step">Previous</button>
  3336. </li>
  3337. <li>
  3338. <button type="button" class="btn btn-primary btn-info-full">Save and continue</button>
  3339. </li>
  3340. </ul>
  3341. <div class="clearfix"></div>
  3342. </div>
  3343. </div>
  3344. </div>
  3345. <%--<div id="" class="mainContainer">
  3346. <div class="row">
  3347. <div class="col-md-12">
  3348. <div class="panel panel-default">
  3349. <div class="panel-heading">
  3350. <div class="row">
  3351. <div class="col-xs-4 col-sm-2">
  3352. <asp:CheckBox ID="NewCust" runat="server" Checked="true" Text="New Customer" onclick="ClearData();" />
  3353. </div>
  3354. <div class="col-sm-2 col-xs-4">
  3355. <asp:CheckBox ID="ExistCust" runat="server" Text="Existing Customer" onclick="ExistingData();" />
  3356. </div>
  3357. <div class="col-sm-2" style="display: none;">
  3358. <asp:CheckBox ID="EnrollCust" runat="server" Text="Issue Membership Card" onclick="ClickEnroll();" />
  3359. </div>
  3360. </div>
  3361. <div class="panel-actions">
  3362. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  3363. </div>
  3364. </div>
  3365. <div class="panel-body" id="divHideShow">
  3366. <div class="row">
  3367. <div class="col-sm-2">
  3368. <asp:DropDownList ID="ddlCustomerType" runat="server" CssClass="form-control" Style="margin-bottom: 5px;">
  3369. <asp:ListItem Value="accountNo" Text="Account No."></asp:ListItem>
  3370. <asp:ListItem Value="email" Text="Email ID" Selected="True"></asp:ListItem>
  3371. </asp:DropDownList>
  3372. </div>
  3373. <div class="col-sm-4" style="margin-bottom: 5px;">
  3374. <uc1:SwiftTextBox ID="txtSearchData" runat="server" Category="remit-searchCustomer" CssClass="form-control" Param1="@GetCustomerSearchType()" Title="Blank for All" />
  3375. </div>
  3376. <div class="col-sm-2 col-xs-6">
  3377. <input name="button3" type="button" id="btnAdvSearch" onclick="PickSenderData('a');" class="btn btn-primary" value="Advance Search" style="margin-bottom: 2px;" />
  3378. </div>
  3379. <div class="col-sm-2 col-xs-6">
  3380. <input name="button4" type="button" id="btnClear" value="Clear All Customer Info" class="btn btn-primary" onclick="ClearAllCustomerInfo();" style="margin-bottom: 2px;" />
  3381. </div>
  3382. <div class="col-sm-2" style="display: none;">
  3383. <span>Country: </span>
  3384. <asp:DropDownList ID="sCountry" runat="server" CssClass="form-control"></asp:DropDownList>
  3385. </div>
  3386. </div>
  3387. </div>
  3388. </div>
  3389. <input type="hidden" id="hdnPayMode" runat="server" />
  3390. <input type="hidden" id="hdntranCount" runat="server" />
  3391. <asp:HiddenField ID="hdnLimitAmount" runat="server" />
  3392. <asp:HiddenField ID="hdnBeneficiaryIdReq" runat="server" />
  3393. <asp:HiddenField ID="hdnBeneficiaryContactReq" runat="server" />
  3394. <asp:HiddenField ID="hdnRelationshipReq" runat="server" />
  3395. <div class="panel panel-default">
  3396. <div class="panel-heading">
  3397. <table class="table table-responsive">
  3398. <tr>
  3399. <td>
  3400. <h4 class="panel-title">Sender Information: <span id="senderName"></span></h4>
  3401. </td>
  3402. <td style="float: right; margin-right: 15px;">
  3403. </td>
  3404. </tr>
  3405. </table>
  3406. <div class="panel-actions">
  3407. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  3408. </div>
  3409. </div>
  3410. <div class="panel-body">
  3411. <div class="row">
  3412. <div class="col-md-6">
  3413. <div class="table-responsive">
  3414. <table class="table">
  3415. <tr style="display: none;">
  3416. <td>&nbsp;</td>
  3417. <td>FIRST NAME</td>
  3418. <td>MIDDLE NAME</td>
  3419. <td>LAST NAME</td>
  3420. </tr>
  3421. <tr>
  3422. <td style="width: 27%;">Sender Name:
  3423. <span class="ErrMsg" id='txtSendFirstName_err'>*</span>
  3424. </td>
  3425. <td>
  3426. <asp:TextBox ID="txtSendFirstName" placeholder="First Name" runat="server" CssClass="required SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this,'Sender First Name');"></asp:TextBox>
  3427. </td>
  3428. <td>
  3429. <asp:TextBox ID="txtSendMidName" runat="server" placeholder="Middle Name" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Middle Name');"></asp:TextBox>
  3430. </td>
  3431. <td>
  3432. <asp:TextBox ID="txtSendLastName" runat="server" placeholder="Last Name" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Last Name');"></asp:TextBox>
  3433. <span class="ErrMsg" id='txtSendLastName_err'></span>
  3434. </td>
  3435. <td style="display: none;">
  3436. <asp:TextBox ID="txtSendSecondLastName" runat="server" CssClass="SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Second Last Name');"></asp:TextBox>
  3437. </td>
  3438. </tr>
  3439. <tr>
  3440. <td>Zip Code</td>
  3441. <td colspan="3">
  3442. <asp:TextBox ID="txtSendPostal" runat="server" placeholder="Postal Code" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Postal Code');"></asp:TextBox>
  3443. </td>
  3444. </tr>
  3445. <tr>
  3446. <td>Street
  3447. <span runat="server" class="ErrMsg" id='sCustStreet_err'>*</span>
  3448. </td>
  3449. <td colspan="3">
  3450. <asp:TextBox ID="sCustStreet" runat="server" placeholder="Street" CssClass="required SmallTextBox form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Street Name');"></asp:TextBox>
  3451. </td>
  3452. </tr>
  3453. <tr>
  3454. <td id="tdSenCityLbl" runat="server">
  3455. <asp:Label runat="server" ID="lblsCity" Text="City:"></asp:Label>
  3456. <span runat="server" class="ErrMsg" id='txtSendCity_err'>*</span>
  3457. </td>
  3458. <td id="tdSenCityTxt" runat="server" colspan="3">
  3459. <asp:TextBox ID="txtSendCity" runat="server" placeholder="City" CssClass="required form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender City');"></asp:TextBox>
  3460. </td>
  3461. </tr>
  3462. <tr>
  3463. <td>State:<span class="ErrMsg">*</span></td>
  3464. <td colspan="2">
  3465. <asp:DropDownList ID="custLocationDDL" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  3466. </td>
  3467. <td>
  3468. <span id="lblSendCountryName"><b>JAPAN</b></span>
  3469. </td>
  3470. </tr>
  3471. <tr id="trSenContactNo" runat="server">
  3472. <td id="tdSenMobileNoLbl" runat="server">Mobile No:
  3473. <span runat="server" class="ErrMsg" id='txtSendMobile_err'>*</span>
  3474. </td>
  3475. <td id="tdSenMobileNoTxt" runat="server" colspan="2">
  3476. <asp:TextBox ID="txtSendMobile" runat="server" placeholder="Mobile Number" CssClass="required form-control readonlyOnCustomerSelect" MaxLength="13" onblur="CheckForMobileNumber(this, 'Receiver Mobile No.');"></asp:TextBox>
  3477. </td>
  3478. <td id="tdSenTelNoTxt" runat="server">
  3479. <asp:TextBox ID="txtSendTel" runat="server" placeholder="Phone Number" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckForMobileNumber(this);" MaxLength="17"></asp:TextBox>
  3480. </td>
  3481. </tr>
  3482. <tr>
  3483. <td>Gender:
  3484. </td>
  3485. <td>
  3486. <asp:DropDownList ID="ddlSenGender" runat="server" CssClass="form-control readonlyOnCustomerSelect">
  3487. <asp:ListItem Value="">Select</asp:ListItem>
  3488. <asp:ListItem Value="Male">Male</asp:ListItem>
  3489. <asp:ListItem Value="Female">Female</asp:ListItem>
  3490. </asp:DropDownList>
  3491. </td>
  3492. <td id="tdSenDobLbl" runat="server">
  3493. <asp:Label runat="server" ID="lblSDOB" Text="Date Of Birth:"></asp:Label>
  3494. <span runat="server" class="ErrMsg" id='txtSendDOB_err'>*</span>
  3495. </td>
  3496. <td id="tdSenDobTxt" runat="server" nowrap="nowrap">
  3497. <asp:TextBox ID="txtSendDOB" runat="server" ReadOnly="true" CssClass="form-control readonlyOnCustomerSelect" placeholder="YYYY/MM/DD"></asp:TextBox>
  3498. <asp:RangeValidator ID="RangeValidator1" runat="server"
  3499. ControlToValidate="txtSendDOB"
  3500. MaximumValue="12/31/2100"
  3501. MinimumValue="01/01/1900"
  3502. Type="Date"
  3503. ErrorMessage="Invalid date!"
  3504. ValidationGroup="customer"
  3505. CssClass="inv"
  3506. SetFocusOnError="true"
  3507. Display="Dynamic"> </asp:RangeValidator>
  3508. </td>
  3509. </tr>
  3510. <tr>
  3511. <td>Native Country:
  3512. <span class="ErrMsg" id='txtSendNativeCountry_err'>*</span>
  3513. </td>
  3514. <td colspan="3">
  3515. <asp:DropDownList ID="txtSendNativeCountry" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  3516. </td>
  3517. </tr>
  3518. <tr id="trSalaryRange" runat="server" class="showOnIndividual">
  3519. <td>
  3520. <asp:Label runat="server" ID="lblSalaryRange" Text="Monthly Income:"></asp:Label>
  3521. <span runat="server" id="ddlSalary_err" class="ErrMsg">*</span>
  3522. </td>
  3523. <td colspan="3">
  3524. <asp:DropDownList ID="ddlSalary" runat="server" CssClass="form-control readonlyOnCustomerSelect">
  3525. <asp:ListItem>Select</asp:ListItem>
  3526. <asp:ListItem>JPY 0 - JPY1,700,000</asp:ListItem>
  3527. <asp:ListItem>JPY1,700,000 - JPY3,400,000</asp:ListItem>
  3528. <asp:ListItem>JPY3,400,000 - JPY6,800,000</asp:ListItem>
  3529. <asp:ListItem>JPY6,800,000 - JPY13,000,000</asp:ListItem>
  3530. <asp:ListItem>Above JPY13,000,000</asp:ListItem>
  3531. </asp:DropDownList>
  3532. </td>
  3533. </tr>
  3534. </table>
  3535. </div>
  3536. </div>
  3537. <div class="col-md-6">
  3538. <div class="table-responsive">
  3539. <table class="table">
  3540. <tr>
  3541. <td style="width: 27%;">Email:</td>
  3542. <td colspan="3">
  3543. <asp:TextBox ID="txtSendEmail" runat="server" placeholder="Email" CssClass="LargeTextBox form-control readonlyOnCustomerSelect"></asp:TextBox>
  3544. <asp:RegularExpressionValidator ID="rev1" runat="server" Display="Dynamic"
  3545. ErrorMessage="Invalid Email Id!" ForeColor="Red" SetFocusOnError="True" ValidationGroup="send"
  3546. ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="inv"
  3547. ControlToValidate="txtSendEmail"></asp:RegularExpressionValidator>
  3548. </td>
  3549. </tr>
  3550. <tr>
  3551. <td>Customer Type:</td>
  3552. <td colspan="3">
  3553. <asp:DropDownList ID="ddlSendCustomerType" runat="server" onchange="ChangeCustomerType()" CssClass="SmallTextBox form-control readonlyOnCustomerSelect">
  3554. </asp:DropDownList>
  3555. </td>
  3556. </tr>
  3557. <tr id="trSenCompany" runat="server" class="hideOnIndividual">
  3558. <td>
  3559. <asp:Label runat="server" ID="lblCompName" Text="Company Name:"></asp:Label>
  3560. <span runat="server" class="ErrMsg" id='companyName_err'>*</span>
  3561. </td>
  3562. <td colspan="3">
  3563. <asp:TextBox ID="companyName" runat="server" placeholder="Company Name" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckForSpecialCharacter(this, 'Sender Company Name');"></asp:TextBox>
  3564. </td>
  3565. </tr>
  3566. <tr class="hideOnIndividual">
  3567. <td>Business Type
  3568. <span runat="server" class="ErrMsg" id='Span2'>*</span>
  3569. </td>
  3570. <td colspan="3">
  3571. <asp:DropDownList ID="ddlEmpBusinessType" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  3572. </td>
  3573. </tr>
  3574. <tr id="trSenId" runat="server" valign="bottom">
  3575. <td>
  3576. <asp:Label runat="server" ID="lblsIdtype" Text="ID Type:"></asp:Label>
  3577. <span runat="server" class="ErrMsg" id='ddSenIdType_err'>*</span>
  3578. </td>
  3579. <td>
  3580. <asp:DropDownList ID="ddSenIdType" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  3581. </td>
  3582. <td>
  3583. <asp:Label runat="server" ID="lblSidNo" Text="ID Number:"></asp:Label>
  3584. <span runat="server" class="ErrMsg" id='txtSendIdNo_err'>*</span>
  3585. </td>
  3586. <td>
  3587. <asp:TextBox ID="txtSendIdNo" placeholder="ID Number" MaxLength="14" runat="server" CssClass="form-control readonlyOnCustomerSelect" onblur="CheckSenderIdNumber(this);" Style="width: 100%;"></asp:TextBox>
  3588. <br />
  3589. <span id="spnIdNumber" style="color: red; font-size: 10px; font-family: verdana; font-weight: bold; display: none;"></span>
  3590. </td>
  3591. </tr>
  3592. <tr>
  3593. <td>Place Of Issue</td>
  3594. <td colspan="3">
  3595. <asp:DropDownList ID="ddlIdIssuedCountry" runat="server" CssClass="form-control readonlyOnCustomerSelect"></asp:DropDownList>
  3596. </td>
  3597. </tr>
  3598. <tr id="trIdExpirenDob" runat="server">
  3599. <td id="tdSenIssuedDateLbl" runat="server" class="showHideIDIssuedDate" nowrap="nowrap">
  3600. <asp:Label runat="server" ID="lblsIssuedDate" Text="Issued Date:"></asp:Label>
  3601. <span runat="server" class="ErrMsg" id='Span1'>*</span>
  3602. </td>
  3603. <td id="td2" runat="server" nowrap="nowrap" class="showHideIDIssuedDate">
  3604. <asp:TextBox ID="txtSendIdExpireDate" onchange="return DateValidation('txtSendIdExpireDate','i')" MaxLength="10" runat="server" placeholder="YYYY/MM/DD" CssClass="required form-control readonlyOnCustomerSelect"></asp:TextBox>
  3605. <asp:RangeValidator ID="RangeValidator3" runat="server"
  3606. ControlToValidate="txtSendIdExpireDate"
  3607. MaximumValue="12/31/2100"
  3608. MinimumValue="01/01/1900"
  3609. Type="Date"
  3610. ForeColor="Red"
  3611. ErrorMessage="Invalid date!"
  3612. ValidationGroup="customer"
  3613. CssClass="inv"
  3614. SetFocusOnError="true"
  3615. Display="Dynamic"> </asp:RangeValidator>
  3616. </td>
  3617. <td id="tdSenExpDateLbl" runat="server" class="showHideIDExpDate" nowrap="nowrap">
  3618. <asp:Label runat="server" ID="lblsExpDate" Text="Expire Date:"></asp:Label>
  3619. <span runat="server" class="ErrMsg" id='txtSendIdValidDate_err'>*</span>
  3620. </td>
  3621. <td id="tdSenExpDateTxt" runat="server" nowrap="nowrap" class="showHideIDExpDate" width="170">
  3622. <asp:TextBox ID="txtSendIdValidDate" onchange="return DateValidation('txtSendIdValidDate')" MaxLength="10" runat="server" placeholder="YYYY/MM/DD" CssClass="form-control readonlyOnCustomerSelect"></asp:TextBox>
  3623. <asp:RangeValidator ID="RangeValidator2" runat="server"
  3624. ControlToValidate="txtSendIdValidDate"
  3625. MaximumValue="12/31/2100"
  3626. MinimumValue="01/01/1900"
  3627. Type="Date"
  3628. ForeColor="Red"
  3629. ErrorMessage="Invalid date!"
  3630. ValidationGroup="customer"
  3631. CssClass="inv"
  3632. SetFocusOnError="true"
  3633. Display="Dynamic"> </asp:RangeValidator>
  3634. </td>
  3635. </tr>
  3636. <br />
  3637. <tr id="trOccupation" runat="server" class="showOnIndividual">
  3638. <td>
  3639. <asp:Label runat="server" ID="lblOccupation" Text="Occupation:"></asp:Label>
  3640. <span runat="server" class="ErrMsg" id='occupation_err'>*</span>
  3641. </td>
  3642. <td colspan="3">
  3643. <asp:DropDownList ID="occupation" runat="server" CssClass="required form-control readonlyOnCustomerSelect"></asp:DropDownList>
  3644. </td>
  3645. </tr>
  3646. </table>
  3647. </div>
  3648. </div>
  3649. </div>
  3650. <table class="table table-responsive" style="display: none;">
  3651. <tr id="trSenAddress1" runat="server" style="display: none;">
  3652. <td>Address1:
  3653. <span runat="server" class="ErrMsg" id='txtSendAdd1_err'>*</span>
  3654. </td>
  3655. <td colspan="3">
  3656. <asp:TextBox ID="txtSendAdd1" runat="server" CssClass="form-control"></asp:TextBox>
  3657. </td>
  3658. </tr>
  3659. <tr id="trSenAddress2" runat="server" style="display: none;">
  3660. <td>Address2:</td>
  3661. <td colspan="3">
  3662. <asp:TextBox ID="txtSendAdd2" runat="server" CssClass="LargeTextBox form-control"></asp:TextBox></td>
  3663. </tr>
  3664. <tr style="display: none">
  3665. <td>Send SMS To Sender:</td>
  3666. <td nowrap="nowrap">
  3667. <asp:CheckBox ID="ChkSMS" runat="server" />
  3668. </td>
  3669. <td></td>
  3670. <td></td>
  3671. </tr>
  3672. <tr>
  3673. <td id="lblMem" style="display: none">Membership ID:</td>
  3674. <td id="valMem" style="display: none">
  3675. <asp:TextBox ID="memberCode" runat="server" CssClass="form-control"></asp:TextBox>
  3676. <span id="memberCode_err" class="ErrMsg"></span>
  3677. </td>
  3678. </tr>
  3679. <tr>
  3680. <td colspan="4">
  3681. <div id="divSenderIdImage"></div>
  3682. </td>
  3683. </tr>
  3684. </table>
  3685. </div>
  3686. </div>
  3687. <div class="panel panel-default">
  3688. <div class="panel-heading">
  3689. <table class="table table-responsive">
  3690. <tr>
  3691. <td>
  3692. <h4 class="panel-title">Receiver Information: <span id="receiverName"></span></h4>
  3693. </td>
  3694. <td style="float: right; margin-right: 15px;">
  3695. <a href="javascript:void(0);" class="btn btn-sm btn-primary showOnCustomerSelect hidden" onclick="PickReceiverFromSender('a');" title="Add New Receiver"><i class="fa fa-plus"></i></a>
  3696. <a href="javascript:void(0);" class="btn btn-sm btn-primary" onclick="PickReceiverFromSender('r');" title="Pick Receiver"><i class="fa fa-file-archive-o"></i></a>
  3697. <a href="javascript:void(0);" id="btnReceiverClr" class="btn btn-sm btn-primary" title="Clear"><i class="fa fa-eraser"></i></a>
  3698. </td>
  3699. </tr>
  3700. </table>
  3701. <div class="panel-actions">
  3702. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  3703. </div>
  3704. </div>
  3705. <div class="panel-body">
  3706. <div class="row">
  3707. <div class="col-md-6">
  3708. <div class="table-responsive">
  3709. <table class="table">
  3710. <tr>
  3711. <td>Choose Receiver:
  3712. </td>
  3713. <td colspan="3">
  3714. <asp:DropDownList ID="ddlReceiver" runat="server" onchange="DDLReceiverOnChange();" CssClass="form-control"></asp:DropDownList>
  3715. </td>
  3716. </tr>
  3717. <tr>
  3718. <td style="width: 27%;">Receiver Name:
  3719. <span class="ErrMsg" id='txtRecFName_err'>*</span>
  3720. </td>
  3721. <td>
  3722. <asp:TextBox ID="txtRecFName" runat="server" placeholder="First Name" CssClass="required SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver First Name');"></asp:TextBox>
  3723. </td>
  3724. <td>
  3725. <asp:TextBox ID="txtRecMName" runat="server" placeholder="Middle Name" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Middle Name');"></asp:TextBox>
  3726. </td>
  3727. <td>
  3728. <asp:TextBox ID="txtRecLName" runat="server" placeholder="Last Name" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Last Name');"></asp:TextBox>
  3729. <span class="ErrMsg" id='txtRecLName_err'></span>
  3730. </td>
  3731. <td style="display: none;">
  3732. <asp:TextBox ID="txtRecSLName" runat="server" CssClass="SmallTextBox form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver Second Last Name');"></asp:TextBox>
  3733. </td>
  3734. </tr>
  3735. <tr id="trRecAddress1" runat="server">
  3736. <td>Address1:
  3737. <span runat="server" class="ErrMsg" id='txtRecAdd1_err'>*</span>
  3738. </td>
  3739. <td colspan="3">
  3740. <asp:TextBox ID="txtRecAdd1" runat="server" placeholder="Receiver Address" CssClass="required form-control readonlyOnReceiverSelect"></asp:TextBox>
  3741. </td>
  3742. </tr>
  3743. <tr id="trRecAddress2" runat="server" style="display: none;">
  3744. <td>
  3745. <asp:Label runat="server" ID="lblrAdd" Text="Address2:"></asp:Label></td>
  3746. <td colspan="3">
  3747. <asp:TextBox ID="txtRecAdd2" runat="server" CssClass="LargeTextBox form-control readonlyOnReceiverSelect"></asp:TextBox>
  3748. </td>
  3749. </tr>
  3750. <tr>
  3751. <td id="tdRecCityLbl" runat="server">
  3752. <asp:Label runat="server" ID="lblrCity" Text="City:"></asp:Label>
  3753. <span runat="server" class="ErrMsg" id='txtRecCity_err'>*</span>
  3754. </td>
  3755. <td id="tdRecCityTxt" runat="server" colspan="3">
  3756. <asp:TextBox ID="txtRecCity" placeholder="Receiver City" runat="server" CssClass="form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver City');"></asp:TextBox>
  3757. </td>
  3758. <asp:TextBox Style="display: none" ID="txtRecPostal" runat="server" CssClass="form-control" onblur="CheckForSpecialCharacter(this, 'Receiver Postal Code');"></asp:TextBox>
  3759. </tr>
  3760. <tr id="trRecContactNo" runat="server">
  3761. <td id="tdRecMobileNoLbl" runat="server">Mobile No: <span runat="server" class="ErrMsg" id='txtRecMobile_err'>*</span>
  3762. </td>
  3763. <td id="tdRecMobileNoTxt" runat="server" colspan="2">
  3764. <asp:TextBox ID="txtRecMobile" runat="server" placeholder="Mobile Number" CssClass="required form-control readonlyOnReceiverSelect" onblur="CheckForMobileNumber(this, 'Receiver Mobile No.');"></asp:TextBox>
  3765. </td>
  3766. <td id="tdRecTelNoTxt" runat="server">
  3767. <asp:TextBox ID="txtRecTel" runat="server" placeholder="Phone Number" CssClass="form-control readonlyOnReceiverSelect" onblur="CheckForMobileNumber(this, 'Receiver Tel. No.');"></asp:TextBox>
  3768. </td>
  3769. </tr>
  3770. </table>
  3771. </div>
  3772. </div>
  3773. <div class="col-md-6">
  3774. <div class="table-responsive">
  3775. <table class="table">
  3776. <tr>
  3777. <td>&nbsp;</td>
  3778. <td>&nbsp;</td>
  3779. </tr>
  3780. <tr id="trRecId" runat="server" class="trRecId">
  3781. <td>
  3782. <asp:Label runat="server" ID="lblRidType" Text="ID Type:"></asp:Label>
  3783. <span runat="server" class="ErrMsg" id='ddlRecIdType_err'>*</span>
  3784. </td>
  3785. <td colspan="3">
  3786. <asp:DropDownList ID="ddlRecIdType" runat="server" CssClass="form-control readonlyOnReceiverSelect"></asp:DropDownList>
  3787. </td>
  3788. </tr>
  3789. <tr id="trRecId1" runat="server" class="trRecId">
  3790. <td>
  3791. <asp:Label runat="server" ID="lblRidNo" Text="ID Number:"></asp:Label>
  3792. <span runat="server" class="ErrMsg" id='txtRecIdNo_err'>*</span>
  3793. </td>
  3794. <td colspan="3">
  3795. <asp:TextBox ID="txtRecIdNo" runat="server" placeholder="ID Number" CssClass="form-control readonlyOnReceiverSelect" onblur="CheckForSpecialCharacter(this, 'Receiver ID Number');"></asp:TextBox>
  3796. </td>
  3797. </tr>
  3798. <tr id="trRecIdExpirynDob" runat="server">
  3799. <td id="tdRecIdExpiryLbl" runat="server" class="recIdDateValidate" nowrap="nowrap">
  3800. <asp:Label runat="server" ID="lblrExpDate" Text="ID Expiry Date:"></asp:Label>
  3801. <span runat="server" class="ErrMsg" id='txtRecValidDate_err'>*</span>
  3802. </td>
  3803. <td id="tdRecIdExpiryTxt" runat="server" nowrap="nowrap" class="recIdDateValidate">
  3804. <asp:TextBox ID="txtRecValidDate" runat="server" placeholder="YYYY/MM/DD" CssClass="form-control readonlyOnReceiverSelect" ReadOnly="true"></asp:TextBox>
  3805. <asp:RangeValidator ID="RangeValidator4" runat="server"
  3806. ControlToValidate="txtSendIdValidDate"
  3807. MaximumValue="12/31/2100"
  3808. MinimumValue="01/01/1900"
  3809. Type="Date"
  3810. ForeColor="Red"
  3811. ErrorMessage="Invalid date!"
  3812. ValidationGroup="customer"
  3813. CssClass="inv"
  3814. SetFocusOnError="true"
  3815. Display="Dynamic"> </asp:RangeValidator>
  3816. </td>
  3817. <td id="tdRecDobLbl" runat="server">
  3818. <asp:Label runat="server" ID="lblDOB" Text="DOB:"></asp:Label>
  3819. <span runat="server" class="ErrMsg" id='txtRecDOB_err'>*</span>
  3820. </td>
  3821. <td id="tdRecDobTxt" runat="server" nowrap="nowrap">
  3822. <asp:TextBox ID="txtRecDOB" runat="server" CssClass="form-control" ReadOnly="true" placeholder="YYYY/MM/DD"></asp:TextBox>
  3823. </td>
  3824. </tr>
  3825. <tr>
  3826. <td>Gender:
  3827. </td>
  3828. <td>
  3829. <asp:DropDownList ID="ddlRecGender" runat="server" CssClass="form-control readonlyOnReceiverSelect">
  3830. <asp:ListItem Value="">SELECT</asp:ListItem>
  3831. <asp:ListItem Value="Male">Male</asp:ListItem>
  3832. <asp:ListItem Value="Female">Female</asp:ListItem>
  3833. </asp:DropDownList>
  3834. </td>
  3835. </tr>
  3836. <tr>
  3837. <td>Email:</td>
  3838. <td colspan="3">
  3839. <asp:TextBox ID="txtRecEmail" runat="server" placeholder="Email" CssClass="LargeTextBox form-control readonlyOnReceiverSelect"></asp:TextBox>
  3840. <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
  3841. ErrorMessage="Invalid Email Id!" ForeColor="Red" SetFocusOnError="True" ValidationGroup="send"
  3842. ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="inv"
  3843. ControlToValidate="txtRecEmail"></asp:RegularExpressionValidator>
  3844. </td>
  3845. </tr>
  3846. </table>
  3847. </div>
  3848. </div>
  3849. </div>
  3850. </div>
  3851. </div>
  3852. <div class="panel panel-default margin-b-30">
  3853. <div class="panel-heading">
  3854. <h4 class="panel-title">Transaction Information:</h4>
  3855. <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:
  3856. <asp:Label ID="lblPerDayLimit" runat="server"></asp:Label>&nbsp;<asp:Label ID="lblPerDayCustomerCurr" runat="server"></asp:Label>
  3857. ]
  3858. </span>
  3859. <div class="panel-actions">
  3860. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  3861. </div>
  3862. </div>
  3863. <div class="panel-body">
  3864. <div class="row">
  3865. <div class="col-md-6">
  3866. <div class="table-responsive">
  3867. <table class="table">
  3868. <tr>
  3869. <td>Collection Mode: <span class="ErrMsg">*</span></td>
  3870. <td id="collModeTd" runat="server"></td>
  3871. </tr>
  3872. <tr style="">
  3873. <td style="width: 13%; vertical-align: top;">Receiving Country:
  3874. <span class="ErrMsg" id="pCountry_err">*</span>
  3875. </td>
  3876. <td style="width: 37%;">
  3877. <asp:DropDownList ID="pCountry" runat="server" CssClass="required form-control"></asp:DropDownList>
  3878. </td>
  3879. </tr>
  3880. <tr>
  3881. <td>
  3882. <span id="lblPayoutAgent">Agent / Bank:</span>
  3883. <span class="ErrMsg" id="pAgent_err">*</span>
  3884. </td>
  3885. <td>
  3886. <asp:DropDownList ID="pAgent" runat="server" CssClass="required form-control"></asp:DropDownList>
  3887. <asp:DropDownList ID="pAgentDetail" runat="server" CssClass="form-control" Style="display: none;"></asp:DropDownList>
  3888. <asp:DropDownList ID="pAgentMaxPayoutLimit" runat="server" CssClass="form-control" Style="display: none;"></asp:DropDownList>
  3889. <span id="hdnreqAgent" style="display: none"></span>
  3890. <input type="hidden" id="hdnBankType" />
  3891. </td>
  3892. </tr>
  3893. <tr id="trForCPOB" style="display: none;">
  3894. <td>Payment through:
  3895. <span class="ErrMsg">*</span>
  3896. </td>
  3897. <td colspan="3">
  3898. <asp:DropDownList ID="paymentThrough" runat="server" CssClass="form-control"></asp:DropDownList>
  3899. </td>
  3900. </tr>
  3901. <tr class="trScheme">
  3902. <td>Scheme/Offer:</td>
  3903. <td>
  3904. <asp:DropDownList ID="ddlScheme" runat="server" CssClass="form-control"></asp:DropDownList>
  3905. </td>
  3906. </tr>
  3907. <tr class="locationRow">
  3908. <td>State:<span class="ErrMsg">*</span></td>
  3909. <td>
  3910. <asp:DropDownList ID="locationDDL" runat="server" CssClass="required form-control"></asp:DropDownList>
  3911. </td>
  3912. </tr>
  3913. <tr class="locationRow">
  3914. <td>Town:<%--<span class="ErrMsg">*</span>--</td>
  3915. <td>
  3916. <asp:DropDownList ID="ddlTown" runat="server" CssClass="form-control"></asp:DropDownList>
  3917. </td>
  3918. </tr>
  3919. <tr>
  3920. <td valign="top">Collection Amount:
  3921. <span class="ErrMsg" id='txtCollAmt_err'>*</span>
  3922. </td>
  3923. <td>
  3924. <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>
  3925. <asp:Label ID="lblCollCurr" runat="server" Text="MYR" class="amountLabel"></asp:Label><br />
  3926. (Max Limit: <u><b>
  3927. <asp:Label ID="lblPerTxnLimit" runat="server" Text="0.00"></asp:Label></b></u>)&nbsp;
  3928. <asp:Label ID="lblPerTxnLimitCurr" runat="server"></asp:Label>
  3929. </td>
  3930. </tr>
  3931. <tr>
  3932. <td>Service Charge:&nbsp;
  3933. <input type="checkbox" id="editServiceCharge" runat="server" /><label for="editServiceCharge">EDIT</label>
  3934. <asp:HiddenField ID="allowEditSC" runat="server" />
  3935. </td>
  3936. <td>
  3937. <asp:TextBox ID="lblServiceChargeAmt" runat="server" Text="0" class="form-control" Width="20%" Style="display: inherit !important;" onblur="return ReCalculate();"></asp:TextBox>
  3938. <asp:Label ID="lblServiceChargeCurr" runat="server" Text="MYR" class="amountLabel"></asp:Label>
  3939. </td>
  3940. </tr>
  3941. <tr>
  3942. <td>Customer Rate:</td>
  3943. <td>
  3944. <asp:Label ID="lblExRate" runat="server" Text="0.00" class="amountLabel"></asp:Label>
  3945. <asp:Label ID="lblExCurr" runat="server" Text="" class="amountLabel"></asp:Label>
  3946. </td>
  3947. </tr>
  3948. <tr>
  3949. <td>Payout Amount: <span class="ErrMsg" id='txtPayAmt_err'>*</span></td>
  3950. <td>
  3951. <asp:TextBox ID="txtPayAmt" runat="server" Enabled="false" Style="width: 80%; display: inherit;" CssClass="required BigAmountField disabled form-control"></asp:TextBox>
  3952. <asp:Label ID="lblPayCurr" runat="server" Text="" class="amountLabel"></asp:Label>
  3953. <i class="fa fa-refresh btn btn-sm btn-primary" onclick="ChangeCalcBy()"></i>
  3954. </td>
  3955. </tr>
  3956. <%-- <tr>
  3957. <td>
  3958. <span id="amlMessage" style="display:none; font-size: 16px; font-family: Verdana; font-weight: bold; color: Red;"></span>
  3959. </td>
  3960. </tr>
  3961. </table>
  3962. </div>
  3963. </div>
  3964. <div class="col-md-6">
  3965. <div class="table-responsive">
  3966. <table class="table">
  3967. <tr class="deposited-bank-hide">
  3968. <td colspan="2"></td>
  3969. </tr>
  3970. <tr class="deposited-bank" style="display: none;">
  3971. <td>Deposited Bank: <span class="ErrMsg">*</span></td>
  3972. <td>
  3973. <asp:DropDownList ID="depositedBankDDL" runat="server" CssClass="form-control"></asp:DropDownList>
  3974. </td>
  3975. </tr>
  3976. <tr style="">
  3977. <td style="width: 28%; vertical-align: top;">Receiving Mode:<span class="ErrMsg">*</span>
  3978. </td>
  3979. <td style="width: 72%;">
  3980. <asp:DropDownList ID="pMode" runat="server" CssClass="required form-control"></asp:DropDownList>
  3981. </td>
  3982. </tr>
  3983. <tr>
  3984. <%--<td colspan="2" class="hide-col-branch"></td>
  3985. <td style="display: none" class="same">Branch:<span class="ErrMsg">*</span>
  3986. </td>
  3987. <td style="display: none" class="same">
  3988. <div id="divBankBranch">
  3989. <select id="branch" runat="server" class="form-control">
  3990. <option value="">SELECT BANK</option>
  3991. </select>
  3992. </div>
  3993. <input type="hidden" id="txtpBranch_aValue" class="form-control" />
  3994. <span id="hdnreqBranch" style="display: none"></span><span class="ErrMsg" id="reqBranch" style="display: none"></span>
  3995. <div id="divBranchMsg" style="display: none;" class="note"></div>
  3996. </td>
  3997. </tr>
  3998. <tr id="trAccno" style="display: none;">
  3999. <td>Bank Account No:
  4000. <span id="txtRecDepAcNo_err" class="ErrMsg">*</span>
  4001. </td>
  4002. <td>
  4003. <asp:TextBox ID="txtRecDepAcNo" runat="server" CssClass="form-control" onblur="CheckForSpecialCharacter(this, 'Receiver Acc No.');"></asp:TextBox>
  4004. </td>
  4005. </tr>
  4006. <tr class="locationRow">
  4007. <td>City:<span class="ErrMsg">*</span></td>
  4008. <td>
  4009. <asp:DropDownList ID="subLocationDDL" runat="server" CssClass="form-control"></asp:DropDownList>
  4010. </td>
  4011. </tr>
  4012. <tr class="trScheme">
  4013. <td id="tdItelCouponIdLbl" style="display: none;">ITEL Coupon ID:</td>
  4014. <td id="tdItelCouponIdTxt" style="display: none;">
  4015. <asp:TextBox ID="iTelCouponId" runat="server" CssClass="form-control"></asp:TextBox>
  4016. </td>
  4017. </tr>
  4018. <tr>
  4019. <td id="tdLblPCurr">Payout Currency:<span class="ErrMsg">*</span></td>
  4020. <td id="tdTxtPCurr">
  4021. <select id="pCurrDdl" runat="server" class="required form-control" onchange="CalculateTxn();"></select>
  4022. </td>
  4023. </tr>
  4024. <tr>
  4025. <td>Sending Amount: </td>
  4026. <td>
  4027. <asp:Label ID="lblSendAmt" runat="server" Text="0.00" class="amountLabel"></asp:Label>
  4028. <asp:Label ID="lblSendCurr" runat="server" Text="MYR" class="amountLabel"></asp:Label>
  4029. </td>
  4030. </tr>
  4031. <tr>
  4032. <td id="tdScheme" style="display: none;" valign="top">Scheme/Offer:</td>
  4033. <td id="tdSchemeVal" style="display: none;">
  4034. <span id="spnSchemeOffer" style="font-weight: bold; font-family: Verdana; color: black; font-size: 10px;"></span>
  4035. <input type="hidden" id="scDiscount" name="scDiscount" />
  4036. <input type="hidden" id="exRateOffer" value="exRateOffer" />
  4037. </td>
  4038. </tr>
  4039. <tr>
  4040. <td>Introducer (If Any):
  4041. </td>
  4042. <td>
  4043. <input type="text" class="form-control" id="introducerTxt" placeholder="Introducer (If Any)" />
  4044. </td>
  4045. <td colspan="2" rowspan="4">
  4046. <span id="spnPayoutLimitInfo" style="color: red; font-size: 16px; font-weight: bold;"></span></td>
  4047. </tr>
  4048. </table>
  4049. </div>
  4050. </div>
  4051. <div class="col-md-12">
  4052. <div class="table-responsive">
  4053. <table class="table">
  4054. <tr>
  4055. <td style="width: 13%;">&nbsp;</td>
  4056. <td>
  4057. <br />
  4058. <input type="button" id="btnCalculate" value="Calculate" class="btn btn-primary" />&nbsp;
  4059. <input type="button" id="btnCalcClean" value="Clear" class="btn btn-primary" />&nbsp;
  4060. <input name="button" type="button" id="btnCalcPopUp" value="Calculator" class="btn btn-primary" />
  4061. <span id="finalSenderId" style="display: none"></span>
  4062. <span id="finalBenId" style="display: none"></span>
  4063. <input type="hidden" id="finalAgentId" />
  4064. <input type="hidden" id="txtCustomerLimit" value="0" />
  4065. <asp:HiddenField ID="txnPerDayCustomerLimit" runat="server" Value="0" />
  4066. <input type="hidden" id="hdnInvoicePrintMethod" />
  4067. </td>
  4068. </tr>
  4069. <tr>
  4070. <td colspan="2" align="center">
  4071. <div align="center">
  4072. <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>
  4073. </div>
  4074. </td>
  4075. </tr>
  4076. <tr>
  4077. <td colspan="2">
  4078. <span id="spnWarningMsg" style="font-size: 13px; font-family: Verdana; font-weight: bold; color: Red;"></span></td>
  4079. </tr>
  4080. </table>
  4081. </div>
  4082. </div>
  4083. </div>
  4084. </div>
  4085. </div>
  4086. <div class="panel panel-default">
  4087. <div class="panel-heading">
  4088. <h4 class="panel-title">Customer Due Diligence Information -(CDDI)</h4>
  4089. <div class="panel-actions">
  4090. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
  4091. </div>
  4092. </div>
  4093. <div class="panel-body">
  4094. <div class="col-md-6">
  4095. <div class="table-responsive">
  4096. <table class="table">
  4097. <tr id="trPurposeOfRemittance" runat="server">
  4098. <td style="width: 24%;">
  4099. <asp:Label runat="server" ID="lblPoRemit" Text="Purpose of Remittance:"></asp:Label>
  4100. <span runat="server" class="ErrMsg" id='purpose_err'>*</span>
  4101. </td>
  4102. <td>
  4103. <asp:DropDownList ID="purpose" runat="server" CssClass="required form-control"></asp:DropDownList>
  4104. </td>
  4105. </tr>
  4106. <tr id="trRelWithRec" runat="server">
  4107. <td>
  4108. <asp:Label runat="server" ID="lblRelation" Text="Relationship with Receiver:"></asp:Label>
  4109. <span runat="server" class="ErrMsg" id='relationship_err'>*</span>
  4110. </td>
  4111. <td>
  4112. <asp:DropDownList ID="relationship" runat="server" CssClass="required form-control"></asp:DropDownList>
  4113. </td>
  4114. </tr>
  4115. </table>
  4116. </div>
  4117. </div>
  4118. <div class="col-md-6">
  4119. <div class="table-responsive">
  4120. <table class="table">
  4121. <tr id="trSourceOfFund" runat="server">
  4122. <td style="width: 27%;">
  4123. <asp:Label runat="server" ID="lblSof" Text="Source of Fund:"></asp:Label>
  4124. <span runat="server" class="ErrMsg" id='sourceOfFund_err'>*</span>
  4125. </td>
  4126. <td style="width: 73%;">
  4127. <asp:DropDownList ID="sourceOfFund" runat="server" CssClass="required form-control"></asp:DropDownList>
  4128. </td>
  4129. </tr>
  4130. </table>
  4131. </div>
  4132. </div>
  4133. <div class="col-md-12">
  4134. <div class="table-responsive">
  4135. <table class="table">
  4136. <tr>
  4137. <td style="width: 12%;">Message to Receiver:</td>
  4138. <td>
  4139. <asp:TextBox ID="txtPayMsg" runat="server" CssClass="LargeTextBox form-control" TextMode="MultiLine" onblur="CheckForSpecialCharacter(this, 'Message to Receiver');"></asp:TextBox>
  4140. </td>
  4141. </tr>
  4142. <tr>
  4143. <td></td>
  4144. <td>
  4145. <br />
  4146. <input type="button" name="calc" id="calc" value="Send Transaction" class="btn btn-primary" />
  4147. </td>
  4148. </tr>
  4149. </table>
  4150. </div>
  4151. </div>
  4152. </div>
  4153. </div>
  4154. </div>
  4155. </div>
  4156. </div>--%>
  4157. </div>
  4158. <script type="text/javascript">
  4159. ClearData();
  4160. function Autocomplete() {
  4161. $(".searchinput").autocomplete({
  4162. source: function (request, response) {
  4163. $.ajax({
  4164. type: "POST",
  4165. contentType: "application/json; charset=utf-8",
  4166. url: "../../../Autocomplete.asmx/GetAllCountry",
  4167. data: "{'keywordStartsWith':'" + request.term + "'}",
  4168. dataType: "json",
  4169. async: true,
  4170. success: function (data) {
  4171. response(
  4172. $.map(data.d, function (item) {
  4173. return {
  4174. value: item.Value,
  4175. key: item.Key
  4176. };
  4177. }));
  4178. window.parent.resizeIframe();
  4179. },
  4180. error: function (result) {
  4181. alert("Due to unexpected errors we were unable to load data");
  4182. }
  4183. });
  4184. },
  4185. minLength: 2
  4186. });
  4187. }
  4188. Autocomplete();
  4189. </script>
  4190. <script type="text/javascript">
  4191. //PickLocation
  4192. function PickLocation() {
  4193. var pAgent = $('#<%=pAgent.ClientID %> option:selected').val();
  4194. $('#<%=pAgentDetail.ClientID %>').val(pAgent);
  4195. var pAgentType = $('#<%=pAgentDetail.ClientID %> option:selected').text();
  4196. if (pAgent == "" || pAgent == undefined || pAgent == 0) {
  4197. alert('First Select a Agent/Branch');
  4198. $('#<%=pAgent.ClientID %>').focus();
  4199. return;
  4200. }
  4201. var url = "TxnHistory/PickLocationByAgent.aspx?pAgent=" + pAgent;
  4202. var param = "dialogHeight:470px;dialogWidth:700px;dialogLeft:200;dialogTop:100;center:yes";
  4203. var res = PopUpWindow(url, param);
  4204. }
  4205. function PickpBranch() {
  4206. var pAgent = $('#<%=pAgent.ClientID %> option:selected').val();
  4207. $('#<%=pAgentDetail.ClientID %>').val(pAgent);
  4208. var pAgentType = $('#<%=pAgentDetail.ClientID %> option:selected').text();
  4209. if (pAgent == "" || pAgent == undefined || pAgent == 0) {
  4210. alert('First Select a Agent/Branch');
  4211. $('#<%=pAgent.ClientID %>').focus();
  4212. return;
  4213. }
  4214. var url = "TxnHistory/PickBranchByAgent.aspx?pAgent=" + pAgent + "&pAgentType=" + pAgentType;
  4215. var param = "dialogHeight:470px;dialogWidth:700px;dialogLeft:200;dialogTop:100;center:yes";
  4216. var res = PopUpWindow(url, param);
  4217. if (res == "undefined" || res == null || res == "") {
  4218. }
  4219. else {
  4220. var splitVal = res.split('|');
  4221. var pBranchValue = splitVal[0];
  4222. var pBranchText = splitVal[1];
  4223. $("#txtpBranch_aValue").val(splitVal[0]);
  4224. $("#txtpBranch_aText").val(splitVal[1]);
  4225. var pMode = $("#<%=pMode.ClientID%> option:selected").text();
  4226. if (pMode == "CASH PAYMENT TO OTHER BANK")
  4227. PBranchChange(pBranchValue);
  4228. }
  4229. }
  4230. function ShowHide(me, tbl) {
  4231. var text = me.value;
  4232. if (text == "+") {
  4233. me.value = "-";
  4234. me.title = "Hide";
  4235. ShowElement(tbl);
  4236. } else {
  4237. me.value = "+";
  4238. me.title = "Show";
  4239. HideElement(tbl);
  4240. }
  4241. }
  4242. function Show(me, tbl) {
  4243. me.value = "-";
  4244. me.title = "Hide";
  4245. ShowElement(tbl);
  4246. }
  4247. $('#txtSendDOB').blur(function () {
  4248. var CustomerDob = GetValue("<%=txtSendDOB.ClientID %>");
  4249. if (CustomerDob != "") {
  4250. var CustYears = datediff(CustomerDob, 'years');
  4251. if (parseInt(CustYears) < 18) {
  4252. alert('Customer age must be 18 or above !');
  4253. return;
  4254. }
  4255. }
  4256. });
  4257. $(function () {
  4258. $('#btnCalcPopUp').click(function () {
  4259. var pCountry = GetValue("<%=pCountry.ClientID %>");
  4260. var pMode = GetValue("<%=pMode.ClientID %>");
  4261. var pAgent = GetValue("<%=pAgent.ClientID %>");
  4262. if (pMode == "") {
  4263. alert("Please select receiving mode");
  4264. return;
  4265. }
  4266. var queryString = "?pMode=" + pMode + "&pCountry=" + pCountry + "&pAgent=" + pAgent;
  4267. var param = "dialogHeight:900px;dialogWidth:900px;dialogLeft:200;dialogTop:100;center:yes";
  4268. var res = PopUpWindow("Calculator.aspx" + queryString, param);
  4269. if (res == "undefined" || res == null || res == "") {
  4270. }
  4271. else {
  4272. //PickDataFromSender(res);
  4273. GetElement("<%=txtCollAmt.ClientID %>").value = res;
  4274. CalculateTxn();
  4275. }
  4276. });
  4277. });
  4278. //document.getElementById("NewCust").focus();
  4279. $(function () {
  4280. $('#ddlRecIdType').change(function () {
  4281. var idType = $("#ddlRecIdType option:selected").text();
  4282. if (idType == "Alien Registration Card") {
  4283. $(".recIdDateValidate").css("display", "");
  4284. }
  4285. else {
  4286. $(".recIdDateValidate").css("display", "none");
  4287. }
  4288. });
  4289. });
  4290. $(function () {
  4291. $("#<%= pAgent.ClientID %>").change(function () {
  4292. var bankId = $("#<%= pAgent.ClientID %> option:selected").val();
  4293. PopulateBankDetails(bankId);
  4294. });
  4295. });
  4296. function PopulateBankDetails(bankId, receiveMode, isBranchByName, branchSelected) {
  4297. debugger
  4298. ManageHiddenFields(receiveMode);
  4299. var dataToSend = '';
  4300. if (isBranchByName == '' || isBranchByName == undefined) {
  4301. dataToSend = { bankId: bankId, type: 'bb' };
  4302. }
  4303. else {
  4304. dataToSend = { bankId: bankId, type: 'bb', isBranchByName: isBranchByName, branchSelected: branchSelected };
  4305. }
  4306. $.get("/AgentPanel/International/SendOnBehalf/FormLoader.aspx", dataToSend, function (data) {
  4307. GetElement("divBankBranch").innerHTML = data;
  4308. });
  4309. };
  4310. function ManageHiddenFields(receiveMode) {
  4311. receiveMode = ($("#pMode option:selected").val() == '' || $("#pMode option:selected").val() == undefined) ? receiveMode : $("#pMode option:selected").val();
  4312. if (receiveMode == "2" || receiveMode.toUpperCase() == 'BANK DEPOSIT') {
  4313. $(".same").css("display", "");
  4314. }
  4315. else {
  4316. $(".same").css("display", "none");
  4317. }
  4318. };
  4319. function ManageLocationData() {
  4320. var pCountry = $('#pCountry :selected').text();
  4321. var pMode = $('#pMode').val();
  4322. var payoutPartnerId = $('#hddPayoutPartner').val();
  4323. if (pCountry == '151') {
  4324. GetElement("<%=locationDDL.ClientID %>").className = "form-control";
  4325. GetElement("<%=subLocationDDL.ClientID %>").className = "form-control";
  4326. //$('.locationRow').hide();
  4327. $('#locationDDL').empty();
  4328. $('#subLocationDDL').empty();
  4329. return;
  4330. }
  4331. GetElement("<%=locationDDL.ClientID %>").className = "required form-control";
  4332. GetElement("<%=subLocationDDL.ClientID %>").className = "required form-control";
  4333. $('.locationRow').show();
  4334. var dataToSend = { MethodName: 'getLocation', PCountry: pCountry, PMode: pMode, PartnerId: payoutPartnerId };
  4335. var options = {
  4336. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  4337. data: dataToSend,
  4338. dataType: 'JSON',
  4339. type: 'POST',
  4340. success:
  4341. function (response) {
  4342. LoadLocationDDL(response);
  4343. },
  4344. error: function (result) {
  4345. alert("Due to unexpected errors we were unable to load data");
  4346. }
  4347. };
  4348. $.ajax(options);
  4349. };
  4350. function LoadLocationDDL(response) {
  4351. var data = jQuery.parseJSON(response);
  4352. var ddl = GetElement("<%=locationDDL.ClientID %>");
  4353. $(ddl).empty();
  4354. $('#subLocationDDL').empty();
  4355. var option;
  4356. option = document.createElement("option");
  4357. option.text = "SELECT STATE";
  4358. option.value = '';
  4359. ddl.options.add(option);
  4360. for (var i = 0; i < data.length; i++) {
  4361. option = document.createElement("option");
  4362. option.text = data[i].LOCATIONNAME;
  4363. option.value = data[i].LOCATIONID;
  4364. try {
  4365. ddl.options.add(option);
  4366. }
  4367. catch (e) {
  4368. alert(e);
  4369. }
  4370. }
  4371. };
  4372. function GetPayoutPartner(payMode) {
  4373. var pCountry = $('#pCountry').val();
  4374. var pMode = $('#pMode').val();
  4375. var dataToSend = { MethodName: 'getPayoutPartner', PCountry: pCountry, PMode: pMode };
  4376. var options = {
  4377. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  4378. data: dataToSend,
  4379. dataType: 'JSON',
  4380. type: 'POST',
  4381. async: false,
  4382. success:
  4383. function (response) {
  4384. var datas = jQuery.parseJSON(response);
  4385. var agentId = "";
  4386. if (datas.length > 0) {
  4387. agentId = datas[0].agentId;
  4388. }
  4389. $('#hddPayoutPartner').val(agentId);
  4390. },
  4391. error: function (result) {
  4392. alert("Due to unexpected errors we were unable to load data");
  4393. }
  4394. };
  4395. $.ajax(options);
  4396. };
  4397. function GetAddressByZipCode() {
  4398. var zipCodeValue = $("#<%=txtSendPostal.ClientID%>").val();
  4399. $("#txtState").val('');
  4400. $("#txtStreet").val('');
  4401. $("#city").val('');
  4402. $("#txtsenderCityjapan").val('');
  4403. $("#txtstreetJapanese").val('');
  4404. var zipCodePattern = /^\d{3}(-\d{4})?$/;
  4405. test = zipCodePattern.test(zipCodeValue);
  4406. if (!test) {
  4407. $("#<%=txtSendPostal.ClientID%>").val('');
  4408. $("#<%=txtSendPostal.ClientID%>").focus();
  4409. $("#<%=txtSendPostal.ClientID%>").attr("style", "display:block; background:#FFCCD2");
  4410. return alert("Please Enter Valid Zip Code(XXX-XXXX)");
  4411. }
  4412. var dataToSend = { MethodName: 'GetAddressDetailsByZipCode', zipCode: zipCodeValue };
  4413. var options = {
  4414. url: '<%=ResolveUrl("SendV2.aspx") %>?',
  4415. data: dataToSend,
  4416. dataType: 'JSON',
  4417. type: 'POST',
  4418. success:
  4419. function (response) {
  4420. ShowAddress(response);
  4421. },
  4422. error: function (result) {
  4423. alert("Due to unexpected errors we were unable to load data");
  4424. }
  4425. };
  4426. $.ajax(options);
  4427. };
  4428. function ShowAddress(erd) {
  4429. if (erd !== null) {
  4430. if (erd == false) {
  4431. $("#<%=txtSendPostal.ClientID%>").val('');
  4432. $("#<%=txtSendPostal.ClientID%>").focus();
  4433. $("#<%=txtSendPostal.ClientID%>").attr("style", "display:block; background:#FFCCD2");
  4434. return alert("Please Enter Valid Zip Code(XXX-XXXX)");
  4435. }
  4436. $("#<%=txtSendPostal.ClientID%>").removeAttr("style");
  4437. $("#tempAddress").html(erd);
  4438. var fullAddress = $(".town div:first-child").text();
  4439. var newZipCode = $(".town a:first-child").text();
  4440. fullAddress = fullAddress.replace(newZipCode, '');
  4441. fullAddress = fullAddress.split('(')[0];
  4442. var fullAddressArr = fullAddress.split(",");
  4443. $("#zipCode").val(newZipCode);
  4444. fullAddressArr.reverse();
  4445. $("#txtState").val(fullAddressArr[0].trim());
  4446. $("#sCustStreet").val(fullAddressArr[1].trim());
  4447. $("#txtSendCity").val(fullAddressArr[2]);
  4448. $("#txtsenderCityjapan").val(fullAddressArr[3]);
  4449. $("#txtstreetJapanese").val(fullAddressArr[4]);
  4450. }
  4451. }
  4452. <%-- xhr.done(function (erd) {
  4453. });
  4454. xhr.fail(function (erd) {
  4455. alert('Oops!!! something went wrong, please try again.');
  4456. });--%>
  4457. function checkValidationByTab(tabId) {
  4458. $(".readonlyOnCustomerSelect").each(function () {
  4459. if ($(this).is(":disabled")) {
  4460. $(this).addClass('abc').removeAttr("disabled");
  4461. }
  4462. });
  4463. $(".readonlyOnReceiverSelect").each(function () {
  4464. if ($(this).is(":disabled")) {
  4465. $(this).addClass('abc').removeAttr('disabled');
  4466. }
  4467. });
  4468. if ($("#form1").validate().form() == false) {
  4469. $(tabId + ".required").each(function () {
  4470. if (!$.trim($(this).val())) {
  4471. $(this).focus();
  4472. }
  4473. });
  4474. $(".abc").each(function () {
  4475. $(this).removeClass('abc').attr('disabled', 'disabled');
  4476. });
  4477. return false;
  4478. }
  4479. $(".abc").each(function () {
  4480. $(this).removeClass('abc').attr('disabled', 'disabled');
  4481. });
  4482. var $active = $('.wizard .nav-tabs li.active');
  4483. $active.next().removeClass('disabled');
  4484. nextTab($active);
  4485. return true;
  4486. }
  4487. </script>
  4488. </asp:Content>