@ -294,6 +294,7 @@ function CalculateTxn(amt, obj, isManualSc) {
var pCountrytxt = $ ( "#" + mId + "pCountry option:selected" ) . text ( ) ;
var pMode = GetValue ( mId + "pMode" ) ;
var pModetxt = $ ( "#" + mId + "pMode option:selected" ) . text ( ) ;
var tpExRate = $ ( "#" + mId + "ddlPaymentOption option:selected" ) . val ( ) ;
if ( pCountry === "" || pCountry === null || pCountry === undefined ) {
alert ( "Please choose payout country" ) ;
@ -306,12 +307,19 @@ function CalculateTxn(amt, obj, isManualSc) {
GetElement ( mId + "pMode" ) . focus ( ) ;
return false ;
}
var sAgent = $ ( "#" + mId + "sendingAgentOnBehalfDDL option:selected" ) . val ( ) ;
if ( sAgent === "" || sAgent === null || sAgent === undefined ) {
alert ( "Please choose Sending AgentBbranch" ) ;
GetElement ( mId + "sendingAgentOnBehalfDDL" ) . focus ( ) ;
return false ;
}
//if (tpExRate === "" || tpExRate === null || tpExRate === undefined) {
// alert("Please choose payment option");
// GetElement(mId + "pMode").focus();
// return false;
//}
//var sAgent = $("#" + mId + "sendingAgentOnBehalfDDL option:selected").val();
//if (sAgent === "" || sAgent === null || sAgent === undefined) {
// alert("Please choose Sending AgentBbranch");
// GetElement(mId + "sendingAgentOnBehalfDDL").focus();
// return false;
//}
//added by gagan
if ( $ ( "#" + mId + "introducerTxt_aSearch" ) . val ( ) !== "" ) {
var res = CheckReferralBalAndCamt ( ) ;
@ -382,19 +390,25 @@ function CalculateTxn(amt, obj, isManualSc) {
if ( pMode === '13' )
payerName = $ ( "#" + mId + "pAgent option:selected" ) . text ( ) ;
var introducerTxt = $ ( "#" + mId + "introducerTxt_aValue" ) . val ( ) ;
if ( introducerTxt == '' || introducerTxt == null || introducerTxt == undefined ) {
alert ( "Introducer value can not be empty" ) ;
ClearAmountFields ( ) ;
return false ;
}
//var introducerTxt = $("#" + mId + "introducerTxt_aValue").val();
//if (introducerTxt == '' || introducerTxt == null || introducerTxt == undefined) {
// alert("Introducer value can not be empty");
// ClearAmountFields();
// return false;
//}
//var tpExRate = $("#" + mId + "ddlPaymentOption").val();
//if (tpExRate == '' || tpExRate == null || tpExRate == undefined) {
// alert("Payment Option must be selected.");
// ClearAmountFields();
// return false;
//}
$ ( "#" + mId + "hddCalcBy" ) . val ( obj ) ;
var dataToSend = {
MethodName : 'CalculateTxn' , pCountry : pCountry , pCountrytxt : pCountrytxt , pMode : pMode , pAgent : pAgent
, pAgentBranch : pAgentBranch , collAmt : collAmt , payAmt : payAmt , payCurr : payCurr , collCurr : collCurr
, pModetxt : pModetxt , senderId : senderId , schemeCode : schemeCode , couponId : couponId , isManualSc : isManualSc
, sc : sc , payoutPartner : payoutPartner , IsExrateFromPartner : IsExrateFromPartner , PCountryCode : PCountryCode , calcBy : obj
, payerName : payerName , introducerTxt : introducerTxt
, payerName : payerName , tpExRate : tpExRate
} ;
var options =
@ -811,13 +825,13 @@ function SendTransactionMethod() {
//********IF NEW CUSTOMER CHECK REQUIRED FIELD******
var enrollCustomer = "N" ;
var collModeFrmCustomer = $ ( "input[name='chkCollMode']:checked") . val ( ) ;
if ( collModeFrmCustomer === undefined || collModeFrmCustomer === '' ) {
alert ( 'Please choose collect mode first!' ) ;
return false ;
} if ( collModeFrmCustomer === "Existing Balance" ) {
collModeFrmCustomer = "Bank Deposit" ;
}
//var collModeFrmCustomer = $( "input[name='chkCollMode']:checked").val();
//if (collModeFrmCustomer === undefined || collModeFrmCustomer === '') {
// alert('Please choose collect mode first!');
// return false;
//} if (collModeFrmCustomer === "Existing Balance") {
// collModeFrmCustomer = "Bank Deposit";
//}
//New params added
var sCustStreet = $ ( "#" + mId + "sCustStreet" ) . val ( ) ;
@ -856,7 +870,7 @@ function SendTransactionMethod() {
return false ;
}
}
var cashCollMode = collModeFrmCustomer ;
//var cashCollMode = collModeFrmCustomer;
var customerDepositedBank = $ ( "#" + mId + "depositedBankDDL" ) . val ( ) ;
var introducerTxt = $ ( "#" + mId + "introducerTxt_aValue" ) . val ( ) ;
@ -904,8 +918,8 @@ function SendTransactionMethod() {
var isRealTime = $ ( "#" + mId + "hddIsRealTimeTxn" ) . val ( ) ;
var tpExRate = $ ( "#" + mId + "hddTPExRate" ) . val ( ) ;
var IsExrateFromPartner = $ ( "#" + mId + "hddFetchExrateFromPartner" ) . val ( ) ;
var branchId = $ ( "#" + mId + "sendingAgentOnBehalfDDL" ) . val ( ) . split ( '|' ) [ 0 ] ;
var branchName = $ ( "#" + mId + "sendingAgentOnBehalfDDL :selected" ) . text ( ) ;
// var branchId = $("#" + mId + "sendingAgentOnBehalfDDL").val().split('|')[0];
// var branchName = $("#" + mId + "sendingAgentOnBehalfDDL :selected").text();
var txnRequestFromAgent = $ ( "#" + mId + "hddTxnRequestFromAgent" ) . val ( ) ;
var txnRequestRowId = $ ( "#" + mId + "hddTxnRequestRowId" ) . val ( ) ;
var goodsType = $ ( "#" + mId + "goodsType" ) . val ( ) ;
@ -990,21 +1004,21 @@ function SendTransactionMethod() {
"&manualSC=" + manualSC +
"&isManualSC=" + isManualSC +
//new fields
"&sCustStreet=" + sCustStreet +
"&sCustLocation=" + sCustLocation +
//"&sCustStreet=" + sCustStreet +
//"&sCustLocation=" + sCustLocation +
"&sCustomerType=" + sCustomerType +
"&sCustBusinessType=" + sCustBusinessType +
"&sCustIdIssuedCountry=" + sCustIdIssuedCountry +
"&sCustIdIssuedDate=" + sCustIdIssuedDate +
"&receiverId=" + receiverId +
"&payoutPartnerId=" + payoutPartnerId +
"&cashCollMode=" + cashCollMode +
//"&cashCollMode=" + cashCollMode +
"&customerDepositedBank=" + customerDepositedBank +
"&introducerTxt=" + introducerTxt +
"&pSubLocationText=" + pSubLocationText +
"&payerId=" + payerId +
"&payerBranchId=" + payerBranchId +
"&branchId=" + branchId +
//"&branchId=" + branchId +
"&isCDDI=" + FilterString ( isCDDI ) +
"&isRealTime=" + isRealTime +
"&agentRefId=" + hddAgentRefId +
@ -1014,7 +1028,7 @@ function SendTransactionMethod() {
"&relationOther=" + relationOther +
"&purposeOther=" + purposeOther +
"&promotionAmount=" + promotionAmount +
"&branchName=" + branchName +
//"&branchName=" + branchName +
"&txnRequestFromAgent=" + txnRequestFromAgent +
"&txnRequestRowId=" + txnRequestRowId +
"&goodsType=" + goodsType +