|
|
function LoadCompliance(dbResult, complianceTable, complianceType) { var dataToSend = { MethodName: 'complainceList', dbResult: JSON.stringify(dbResult), complianceTable: JSON.stringify(complianceTable), complianceType: complianceType }; $.ajax({ type: "POST", data: dataToSend, async: true, success: function (response) { var data = jQuery.parseJSON(response);
var c = data.ErrorCode; var a = c.split('|'); var errorCode = a[0]; var agentRefId = a[1];
ShowCddiData(errorCode, agentRefId, data.Msg, data.Id); }, fail: function () { alert("Error fetching data"); } }); }
function LoadOfacList(dbResult, ofacTable, receiverFullName) { var dataToSend = { MethodName: 'ofacList', dbResult: JSON.stringify(dbResult), ofacTable: JSON.stringify(ofacTable), receiverFullName: receiverFullName }; $.ajax({ type: "POST", data: dataToSend, async: true, success: function (response) {
}, fail: function () { alert("Error fetching data"); } }); }
function ShowDuplicateTxn(tranDetail, duplicateTran, receiverFullName) { var dataToSend = { MethodName: 'showDuplicateTransaction', dbResult: JSON.stringify(tranDetail), ofacTable: JSON.stringify(duplicateTran) }; $.ajax({ type: "POST", data: dataToSend, async: true, success: function (response) {
}, fail: function () { alert("Error fetching data"); } }); }
function ManageMessage(mes, invoicePrintMode) { alert("Manage"); debugger; if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { is_mobile = true; }
window.returnValue = mes + '-:::-' + invoicePrintMode; if (is_mobile) { var s = GetBrowserDetails(); if (s.osName == 'iPad' || s.osName == 'iPhone') { if (s.browserVersion != '0') { isSafari = true; isChrome = false; } else { isSafari = false; isChrome = true; } } if (isSafari) { window.opener.document.getElementById("confirmHidden").value = mes + '-:::-' + invoicePrintMode; window.opener.parent.focus(); } if (isChrome) { window.opener.document.getElementById("confirmHiddenChrome").value = mes + '-:::-' + invoicePrintMode; window.opener.document.getElementById("ContentPlaceHolder1_txtPayMsg").focus(); }
window.close(); return true; }
if (isChrome) { debugger; window.opener.focus(); window.opener.PostMessageToParent(window.returnValue); } else if (isSafari) { window.opener.document.getElementById("confirmHidden").value = mes + '-:::-' + invoicePrintMode; } window.close(); }
function GetAdditionalCDDIForm(isOnlyVisaStatusQuestionnaire) { //debugger;
var customerId = $("#" + mId + "hdnCustomerId").val(); $('#additionalCDDI').show(); $('#calc').attr('disabled', true); $('.infoDiv').css('pointer-events', 'none'); $('.notDisable').css('pointer-events', 'auto');
var dataToSend = { MethodName: 'getAdditionalCDDI', customerId: customerId, IsOnlyVisaStatusQuestionnaire: isOnlyVisaStatusQuestionnaire }; $.ajax({ type: "POST", data: dataToSend, async: true, success: function (response) { var table = $('#tblComplianceQsn'); table.find("tbody tr").remove();
var result = jQuery.parseJSON(response); //response;
var count = 1; $.each(result, function (i, d) { var isRequired = ''; if (d['isRequired'] === 'requiredCompliance') isRequired = '<span class="ErrMsg">*</span>'; var row = '<tr>'; row += '<td style="display:none">' + d['ID'] + '</td>'; row += '<td>' + count + '</td>'; row += '<td>' + d['QSN'] + ' ' + isRequired + '</td>'; row += '<td width="500px"><input type="text" placeholder="' + d['PlaceHolder'] + '" value="' + d['ANSWER_TEXT'] + '" id="complianceQuestionnare_' + d['ID'] + '" class="form-control ' + d['isRequired'] + '"/></td>'; row += '</tr>';
table.append(row); count++; }); }, fail: function () { $('#calc').attr('disabled', false); alert("Error fetching data"); } }); }
function ShowCddiData(errorCode, agentRefId, msg, documentRequired) {
var isOnlyVisaStatusQuestionnaire = 'N'; if (errorCode === "undefined" || errorCode === null || errorCode === "") { return; } else { // res = id.split('-:::-');
if (errorCode === '1') { errMsgArr = msg.split('\n'); for (i = 0; i < errMsgArr.length; i++) { alert(errMsgArr[i]); } } else if (errorCode === '102' || errorCode === '103') { // alert(res[2]);
alert(' Please fill up the Additional Customer Due Diligence Information (CDDI)');
$('#divHideForVisa').show(); $('#divHideForVisa1').show(); if (errorCode === '102') { $('#divHideForVisa').hide(); $('#divHideForVisa1').hide(); isOnlyVisaStatusQuestionnaire = 'Y'; } $("#" + mId + "hddIsAdditionalCDDI").val('Y'); $("#" + mId + "hddAgentRefId").val(agentRefId);
// additional document popup
$("#" + mId + "hdnIsAdditionalDocumentRequired").val(documentRequired); if (documentRequired === 'Y') { //IS DOCUMENT DEQUIRED
$("#modalAdditionalDocumentRequired").modal('show'); }
GetAdditionalCDDIForm(isOnlyVisaStatusQuestionnaire); } else { // window.location.replace("/AgentNew/SendTxn/SendIntlReceipt.aspx?controlNo=" + res[2] + "&invoicePrint=" + res[3]);
} } };
function GetXMLData() { // json data
var tableRows = $('#tblComplianceQsn tr'); var tableData = [];
tableRows.each(function () { var rowData = { id: this.cells[0].innerHTML, answer: $('#complianceQuestionnare_' + this.cells[0].innerHTML).val(), }; tableData.push(rowData); }); // console.log(tableData);
return (JSON.stringify(tableData, null, 4)); }
function PopUpWindow(url, param) { var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; if (param == undefined || param == "") { param = "dialogHeight:500px;dialogWidth:600px;dialogLeft:300;dialogTop:100;center:yes"; } if (isChrome) { window.open(url, "_blank", param); } else { return window.showModalDialog(url, window.self, param); } //return window.showModalDialog(url, window.self, param); //changed instead of showModalDialog()
}
|