|
@ -35,7 +35,6 @@ $(document).ready(function () { |
|
|
dataType: 'JSON', |
|
|
dataType: 'JSON', |
|
|
type: 'POST', |
|
|
type: 'POST', |
|
|
success: function (response) { |
|
|
success: function (response) { |
|
|
debugger |
|
|
|
|
|
$("#searchCustomer").removeAttr("disabled"); |
|
|
$("#searchCustomer").removeAttr("disabled"); |
|
|
if (response[0].errorCode === 0) { |
|
|
if (response[0].errorCode === 0) { |
|
|
$('#step2SendRemittance').show(); |
|
|
$('#step2SendRemittance').show(); |
|
@ -839,31 +838,46 @@ function ValidateDetails() { |
|
|
// $("#branchRequired").hide();
|
|
|
// $("#branchRequired").hide();
|
|
|
//}
|
|
|
//}
|
|
|
let purposeValue = $("#" + mId + "purpose option:selected").val(); |
|
|
let purposeValue = $("#" + mId + "purpose option:selected").val(); |
|
|
if (purposeValue == '11347') { |
|
|
|
|
|
|
|
|
if (purposeValue === '11347') { |
|
|
reqField += "purposeOther,"; |
|
|
reqField += "purposeOther,"; |
|
|
} |
|
|
} |
|
|
let relationValue = $("#" + mId + "relationship option:selected").val(); |
|
|
let relationValue = $("#" + mId + "relationship option:selected").val(); |
|
|
if (relationValue == '11339') { |
|
|
|
|
|
|
|
|
if (relationValue === '11339') { |
|
|
reqField += "otherRelationshipTextBox,"; |
|
|
reqField += "otherRelationshipTextBox,"; |
|
|
} |
|
|
} |
|
|
if (ValidRequiredFieldWithDoc(reqField) === false) { |
|
|
if (ValidRequiredFieldWithDoc(reqField) === false) { |
|
|
return false; |
|
|
return false; |
|
|
} else { |
|
|
} else { |
|
|
debugger |
|
|
|
|
|
var pMode = $("#" + mId + "pMode").val(); |
|
|
var pMode = $("#" + mId + "pMode").val(); |
|
|
var pAgent = $("#" + mId + "pAgent").val(); |
|
|
var pAgent = $("#" + mId + "pAgent").val(); |
|
|
var pbranch = $("#" + mId + "branch").val(); |
|
|
var pbranch = $("#" + mId + "branch").val(); |
|
|
if (pMode == "2") { |
|
|
|
|
|
if (pAgent == '' || pAgent == undefined || pAgent == null) { |
|
|
|
|
|
|
|
|
var accountNo = $("#" + mId + "accountNo").val(); |
|
|
|
|
|
if (pMode === "2") { |
|
|
|
|
|
if (pAgent === '' || pAgent === undefined || pAgent === null) { |
|
|
$("#" + mId + "pAgent").css('background-color', '#FFCCD2'); |
|
|
$("#" + mId + "pAgent").css('background-color', '#FFCCD2'); |
|
|
swal('Required Field(s)\n _____________________________ \n The red fields are required!'); |
|
|
swal('Required Field(s)\n _____________________________ \n The red fields are required!'); |
|
|
return false |
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if (accountNo === '' || accountNo === undefined || accountNo === null) { |
|
|
|
|
|
$("#" + mId + "accountNo").css('background-color', '#FFCCD2'); |
|
|
|
|
|
swal('Required Field(s)\n _____________________________ \n The red fields are required!'); |
|
|
|
|
|
return false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
debugger |
|
|
debugger |
|
|
$("#" + mId + "hddPmode").val(pMode); |
|
|
$("#" + mId + "hddPmode").val(pMode); |
|
|
$("#" + mId + "hddPagent").val(pAgent); |
|
|
$("#" + mId + "hddPagent").val(pAgent); |
|
|
$("#" + mId + "hddpBranch").val(pbranch); |
|
|
$("#" + mId + "hddpBranch").val(pbranch); |
|
|
|
|
|
|
|
|
|
|
|
var country = $("#" + mId + "pCountry option:selected ").text(); |
|
|
|
|
|
|
|
|
|
|
|
$("#" + mId + "hddPagentName").val($("#" + mId + "pAgent option:selected").text()); |
|
|
|
|
|
if (country.toUpperCase() === 'NEPAL' || country.toUpperCase() === 'VIETNAM') { |
|
|
|
|
|
$("#" + mId + "hddPBranchName").val($("#" + mId + "branch_manual").val()); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
$("#" + mId + "hddPBranchName").val($("#" + mId + "branch option:selected").text()); |
|
|
|
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|