arjun 4 years ago
parent
commit
ecfaf66971
  1. 2
      Database/Sp/proc_sendRequest.sql
  2. 77
      JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js
  3. 28
      JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx
  4. 18
      JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx.designer.cs

2
Database/Sp/proc_sendRequest.sql

@ -70,7 +70,7 @@ BEGIN
RETURN
END
SELECT FULLNAME, RECEIVERID, errorCode = 0
SELECT FULLNAME = firstName + ISNULL(' '+middleName, '') + ISNULL(' '+lastName1, '') , RECEIVERID, errorCode = 0
FROM RECEIVERINFORMATION (NOLOCK)
WHERE CUSTOMERID = @CUSTOMERID
END

77
JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js

@ -2,7 +2,16 @@
$(document).ready(function () {
$("#branchRequired").hide();
$(document).on("change", "#" + mId + "receiverMobileNumber", function () {
var isValid = CheckForMobileNumber(this, "Mobile No.");
if (isValid === false) {
$(this).val('');
$(this).focus();
}
});
$("#searchCustomer").click(function () {
ClearAllData();
$('#step2SendRemittance').hide();
$('#step2SendRemittanceAgreement').hide();
$('#signatureDiv').hide();
@ -34,7 +43,7 @@ $(document).ready(function () {
$('#step2SendRemittanceSaveButton').show();
CustomerSignature();
ParseDDlDynamic(response, 'ddlBenedeciary', 'FULLNAME', 'RECEIVERID', 'Select Beneficiary')
ParseDDlDynamic(response, 'ddlBenedeciary', 'FULLNAME', 'RECEIVERID', 'Select Beneficiary');
}
else {
alert(response[0].Msg);
@ -59,6 +68,7 @@ $(document).ready(function () {
}
});
$("#" + mId + "ddlBenedeciary").on("change", function () {
ClearAllData();
var benefeciaryId = $("#" + mId + "ddlBenedeciary").val();
if (benefeciaryId === null || benefeciaryId === '' || benefeciaryId === undefined) {
return false;
@ -78,6 +88,7 @@ $(document).ready(function () {
$("#" + mId + "receiverMobileNumber").val(response[0].mobile);
$("#" + mId + "purpose").val(response[0].address);
$("#" + mId + "relationship").val(response[0].address);
$("#" + mId + "accountNo").val(response[0].receiverAccountNo);
if (response[0].relationship === '11339') {
$("#" + mId + "otherRelationshipTextBox").val(response[0].relationOther);
@ -119,6 +130,7 @@ $(document).ready(function () {
}
}
}
ShowHideAccountNo();
}
else {
alert(response[0].Msg);
@ -129,7 +141,7 @@ $(document).ready(function () {
});
$("#" + mId + "purpose").on("change", function () {
let purposeValue = $("#" + mId + "purpose option:selected").val();
if (purposeValue == '11347') {
if (purposeValue === '11347') {
$("#purposeOtherDiv").show();
} else {
$("#purposeOtherDiv").hide();
@ -137,10 +149,10 @@ $(document).ready(function () {
});
$("#" + mId + "relationship").on("change", function () {
let relationValue = $("#" + mId + "relationship option:selected").val();
if (relationValue == '11339') {
$("#" + mId + "otherRelationDiv").show();
if (relationValue === '11339') {
$("#otherRelationDiv").show();
} else {
$("#" + mId + "otherRelationDiv").hide();
$("#otherRelationDiv").hide();
}
});
@ -218,15 +230,19 @@ $(document).ready(function () {
});
$("#" + mId + "pMode").on('change', function () {
ShowHideAccountNo();
});
});
function ShowHideAccountNo() {
var pmode = $("#" + mId + "pMode").val();
if (pmode == "2") {
if (pmode === "2") {
$("#accountDiv").show();
} else {
$("#accountDiv").hide();
}
});
});
}
function ResetAmountFields() {
//Reset Fields
@ -619,14 +635,8 @@ function CommaFormatted(amount, amountMain) {
else
return amount;
}
function ClearCalculatedAmount() {
$("#" + mId + "txtCollAmt").val('');
$("#" + mId + "lblSendAmt").val(0);
$("#" + mId + "lblServiceChargeAmt").val(0);
$("#" + mId + "lblExRate").val(0);
$("#" + mId + "txtPayAmt").val('');
$("#" + mId + "customerRateFields").hide();
}
function checkdata(amt, obj) {
if (amt > 0)
CalculateTxn(amt, obj);
@ -719,7 +729,7 @@ function CalculateTxn(amt, obj, isManualSc) {
if (pCountry === "203" && payCurr === "USD") {
if ((pMode === "1" && pAgent !== 2091) || (pMode !== "12" && pAgent !== 2091)) {
alert('USD receiving is only allow for Door to Door');
ClearAmountFields();
ClearCalculatedAmount();
return false;
}
}
@ -760,7 +770,7 @@ function ParseCalculateData(response, amtType) {
var data = response;
if (data[0].ErrCode === '1') {
alert(data[0].Msg);
ClearAmountFields();
ClearCalculatedAmount();
return;
}
@ -886,4 +896,33 @@ function SetDDLValueSelected(ddl, selectText) {
});
}
function ClearAllData() {
$("#" + mId + "receiverFullName").val('');
$("#" + mId + "receiveraddress").val('');
$("#" + mId + "receiverMobileNumber").val('');
$("#" + mId + "purpose").val('');
$("#" + mId + "relationship").val('');
$("#" + mId + "purposeOther").val('');
$("#" + mId + "otherRelationshipTextBox").val('');
$('#otherRelationDiv').hide();
$('#purposeOtherDiv').hide();
$("#" + mId + "purpose").val('');
$("#" + mId + "relationship").val('');
$("#" + mId + "pCountry").val('');
$("#" + mId + "pAgent").empty();
$("#" + mId + "branch").empty();
SetDDLTextSelected(mId + "pCountry", '');
ClearCalculatedAmount();
}
function CheckForMobileNumber(nField, fieldName) {
var numberPattern = /^[+]?[0-9]{6,16}$/;
test = numberPattern.test(nField.value);
if (!test) {
alert(fieldName + " Is Not Valid !");
nField.value = "";
return false
}
return true;
}

28
JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx

@ -58,9 +58,11 @@
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Mobile No:<span class="errormsg">*</span></label>
<asp:TextBox ID="receiverMobileNumber" runat="server" placeholder="Mobile No" MaxLength="14" CssClass="form-control required" />
<asp:TextBox ID="receiverMobileNumber" runat="server" placeholder="Mobile No" MaxLength="16" CssClass="form-control required" />
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Country:<span class="errormsg">*</span></label>
@ -83,6 +85,8 @@
<input type="hidden" id="hdnBankType" />
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4" id="branchSelect">
<div class="form-group">
<label>Branch:<span class="errormsg" id="branchRequired">*</span></label>
@ -114,6 +118,8 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Transfer Amount:<span class="errormsg">*</span></label>
@ -128,10 +134,12 @@
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Service Charge:<span class="errormsg">*</span></label>
<asp:HiddenField ID="allowEditSC" runat="server" />
<asp:TextBox ID="lblServiceChargeAmt" runat="server" Text="0" class="form-control" Width="20%" Style="display: inherit !important;" onblur="return ReCalculate();"></asp:TextBox>
<div class="input-group m-b">
<asp:TextBox ID="lblServiceChargeAmt" runat="server" Text="0" class="form-control" Style="display: inherit !important;" onblur="return ReCalculate();"></asp:TextBox>
<span class="input-group-addon">
<asp:Label ID="lblServiceChargeCurr" runat="server" Text="JPY" class="amountLabel"></asp:Label>&nbsp;
<label id="lblCampaign" style="background-color: yellow; font-weight: 600;"></label>
</span>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4">
@ -140,13 +148,14 @@
<asp:DropDownList ID="purpose" runat="server" CssClass="required form-control"></asp:DropDownList>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4" id="purposeOtherDiv" style="display: none;">
<div class="form-group">
<label>Purpose Other:<span class="errormsg">*</span></label>
<asp:TextBox ID="purposeOther" runat="server" CssClass="required form-control"></asp:TextBox>
<asp:TextBox ID="purposeOther" runat="server" CssClass="required form-control" placeholder="Other Purpose Description"></asp:TextBox>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Relation<span class="errormsg">*</span></label>
@ -159,6 +168,8 @@
<asp:TextBox runat="server" ID="otherRelationshipTextBox" CssClass="form-control" placeholder="Other Relation Description"></asp:TextBox>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4" style="display: none">
<div class="form-group">
<label>ReferralName<span class="errormsg">*</span></label>
@ -166,7 +177,7 @@
</div>
</div>
</div>
</div>
<asp:HiddenField ID="hddPayoutPartner" runat="server" />
<asp:HiddenField ID="hddPmode" runat="server" />
<asp:HiddenField ID="hddPagent" runat="server" />
@ -174,7 +185,8 @@
<asp:HiddenField ID="hddErrMsg" runat="server" />
<asp:HiddenField ID="hddTamt" runat="server" />
<asp:HiddenField ID="hddServiceCharge" runat="server" />
<asp:HiddenField ID="allowEditSC" runat="server" />
<label id="lblCampaign" style="background-color: yellow; font-weight: 600;"></label>
</div>
</div>
<div class="panel panel-default clearfix m-b-20" id="step2SendRemittanceAgreement" style="display: none;">

18
JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx.designer.cs

@ -192,15 +192,6 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSendCurr;
/// <summary>
/// allowEditSC control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField allowEditSC;
/// <summary>
/// lblServiceChargeAmt control.
/// </summary>
@ -327,6 +318,15 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddServiceCharge;
/// <summary>
/// allowEditSC control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField allowEditSC;
/// <summary>
/// TransactionAgreementDiv control.
/// </summary>

Loading…
Cancel
Save