diff --git a/JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js b/JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js index 90da526..f7efacf 100644 --- a/JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js +++ b/JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js @@ -184,6 +184,7 @@ $(document).ready(function () { if ($("#" + mId + "pCountry option:selected ").val() !== "") { PcountryOnChange('c', ""); + SetPayCurrency($("#" + mId + "pCountry").val()); } var pmode = $("#" + mId + "pMode").val(); var partnerId = $("#" + mId + "hddPayoutPartner").val(); @@ -523,6 +524,8 @@ function GetPayoutPartner(payMode) { agentId = datas[0].agentId; } $("#" + mId + "hddPayoutPartner").val(agentId); + $("#" + mId + "hddFetchExrateFromPartner").val(datas[0].exRateCalByPartner); + $("#" + mId + "hddPCountryCode").val(datas[0].COUNTRYCODE); }, error: function (result) { alert("Due to unexpected errors we were unable to load data"); @@ -964,4 +967,43 @@ function CheckForMobileNumber(nField, fieldName) { return false } return true; +} +function SetPayCurrency(pCountry) { + var dataToSend = { MethodName: 'PCurrPcountry', pCountry: pCountry }; + var options = { + url: '', + data: dataToSend, + dataType: 'JSON', + type: 'POST', + async: false, + success: + function (response) { + var data = response; + var ddl = GetElement(mId + "pCurrDdl"); + $(ddl).empty(); + + var option; + + for (var i = 0; i < data.length; i++) { + option = document.createElement("option"); + + option.text = data[i].currencyCode; + option.value = data[i].currencyCode; + + try { + ddl.options.add(option); + if (data[i].isDefault === "Y") { + $("#" + mId + "pCurrDdl").val(data[i].currencyCode); + } + } + catch (e) { + alert(e); + } + } + }, + error: function (result) { + alert("Due to unexpected errors we were unable to load data"); + } + }; + $.ajax(options); } \ No newline at end of file diff --git a/JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx b/JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx index 03b1b84..06ed3bc 100644 --- a/JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx +++ b/JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx @@ -32,11 +32,13 @@