MoneyTransReport
Posted by Angham Al-Banawien, Last modified by Laith Ghawi on 03 July 2019 11:13 AM

Syntax

 Public Function MoneyTransReport (ClientID As Long, TransType As Integer, FromDate As String, ToDate As String, Optional ByVal isPaging As Boolean = False) As String

Description

The MoneyTransReport operation is used to get the money transaction report that shows all money transaction represented by either Deposit,
Withdrawal , Adjustment , Credit in , Credit out done by any dealer in the system.

Request Parameters

Name Description  Required
 ClientID
  • Client identifier to get money transaction report for
  • Type : Long
  • Default : None
  • Constraints : Must be valid client Id and accessible by logged in dealer

 

Yes

 TransType
  • You can set the report for daily , weekly , Monthly , Yearly
  • Type : Integer
  • Default : None
  • Can be one of the Following
        1 : All Transactions
        2 : Daily
        3 : Weekly
        4 : Monthly
        5 : Yearly



Yes 
 FromDate
  • Specify the duration
  • Type : String
  • Default : None
  • Constraints : must be valid date format (“DD/MM/YYYY HH:NN:SS”)
  • “” : means from beginning

 

 Yes

 ToDate
  • Specify the duration
  • Type : String
  • Default : None
  • Constraints : must be valid date format (“DD/MM/YYYY HH:NN:SS”)
  • “” : means till now 

 

 Yes

 isPaging
  • Boolean value which indicate that you are calling MoneyTransReport to get remaining records
  • This is useful if you are calling a large amount of data to split the returned  data as 3000 rows for each response
  • Type : Boolean
  • Default : False
  • Constraints : on first call must be false and next calls true

Conditional if the first ClientID in MoneyTransReport List = -1200 

 


Response Elements

Name Description 
 Result

The operation returns list of type MoneyTransReport, otherwise an explicit error code is returned if ClientID  is less than 0 .

The Following are the MoneyTransReport data member

  • ClientID : Client Identifier 
  • AccountID : Account Identifier 
  • TicketID : money transaction ticket number
  • DateTime: Transaction Time
  • Type : Transaction Type 
                1 : Deposit 
               -1:
     withdrawal 
                2
     : Adjustment 
               3 : Credit in 
              -3: Credit out
  • Amount : Money transaction Amount 
  • Description : Transaction Description


Sample

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MoneyTransReport</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<script>
$(document).ready(function () {
var urlStr = "http://173.249.35.43/webtrader/webservice.svc";
jQuery.support.cors = true;
$("#progress").ajaxStart(function () { $(this).css("display", "block"); });
$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });
$("#resultAction").ajaxError(function (result) { $(this).html('An error occured'); });



function onSuccessResultt(dataResult) {
var result = eval(dataResult);
var rst = ""
if (result[0].ClientID > 0) {
for (var i = 0; i < result.length; i++) {
rst += "TicketID : " + result[i].TicketID + "<br/>"
rst += "AccountID : " + result[i].AccountID + "<br/>"
rst += "DateTime : " + result[i].DateTime + "<br/>"
rst += "Type : " + result[i].Type + "<br/>"
rst += "Amount : " + result[i].Amount + "<br/>"
rst += "clientID : " + result[i].ClientID + "<br/>"
rst += "--------------------------------------------------" + "<br/>"
$("#resultAction").html(rst)
}
}
else {
$("#resultAction").html("Error Code : " + result[0].ClientID + "<br/>" );
}
}

function onSuccessResult(response) {
response = eval('(' + response + ')')
if (response.UserId == -1 || response.UserId == -207) {
$("#resultData").html("Invalid username or password");
}
else if (response.UserId == -231) {
$("#resultData").html("You must have at least one account");
}
else if (response == null || response == "" || response.UserId < 0) {
$("#resultData").html("Error while login.Please try later");
}
else {
$("#resultData").html("SuccessResult ... UserId is :" + response.UserId);
}
}
function onErrorResult(result) {
alert('Service call faild : ' + result.status + ' ' + result.statusText);
}
$("#btnLogin").click(function () {
$.getJSON(urlStr + "/BackofficeLogin?username=" + $("#txtusername").val() + "&password=" + $("#txtpassword").val() + "&callback=?" , onSuccessResult);
});
$("#btnAction").click(function () {
$.getJSON(urlStr + "/MoneyTransReport?ClientID="+ $("#txtClientID").val() + "&TransType=" + $("#txtTransType").val() + "&FormDate=" + $("#txtFromDate").val() + "&ToDate=" + $("#txtToDate").val()+ "&isPaging=" + $("#txtIsPaging").val() + "&callback=?", onSuccessResultt);
});
});
</script>
<body>
<table border="1px">
<tbody>
<tr>
<td>
Username: <input type="text" id="txtusername" value=""/>
Password: <input type="text" id="txtpassword" value=""/>
<button id="btnLogin"> Login </button>
</td>
</tr>
<tr >
<td>
ClientID : <input type="text" id="txtClientID" value ="" /> 
FromDate : <input type="text" id="txtFromDate" value=""/>
ToDate : <input type="text" id="txtToDate" value="" />
</td>
</tr>
<tr>
<td>
TransType : <input type="text" id="txtTransType" value=""/>
IsPaging : <input type="text" id="txtIsPaging" value="FALSE"/> 

<button id="btnAction"> MoneyTransReport </button>
</td>
</tr>
</tbody>
</table>
<div id="resultData"> </div>
<div id="resultAction"> </div>
</body>
</html>

 


See Also


VertexFX Backoffice WCF Service Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions