Browse Source

pdf & receiver info

master
shakun 9 months ago
parent
commit
3b9449c200
  1. BIN
      CustomerOnlineV2/.vs/CustomerOnlineV2/DesignTimeBuild/.dtbcache.v2
  2. BIN
      CustomerOnlineV2/.vs/CustomerOnlineV2/v17/.futdcache.v2
  3. BIN
      CustomerOnlineV2/.vs/CustomerOnlineV2/v17/.suo
  4. BIN
      CustomerOnlineV2/.vs/ProjectEvaluation/customeronlinev2.metadata.v7.bin
  5. BIN
      CustomerOnlineV2/.vs/ProjectEvaluation/customeronlinev2.projects.v7.bin
  6. 1
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/TransactionBusiness/ITransactionBusiness.cs
  7. 21
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/TransactionBusiness/TransactionBusiness.cs
  8. 5
      CustomerOnlineV2/CustomerOnlineV2.Common/Helper/ApplicationConfig.cs
  9. 21
      CustomerOnlineV2/CustomerOnlineV2.Common/Helper/Utilities.cs
  10. 1
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/ITransactionRepository.cs
  11. 32
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs
  12. BIN
      CustomerOnlineV2/CustomerOnlineV2.Repository/obj/Debug/net7.0/CustomerOnlineV2.Repository.csproj.AssemblyReference.cache
  13. 186
      CustomerOnlineV2/CustomerOnlineV2/Controllers/ReportController.cs
  14. 8
      CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs
  15. 1
      CustomerOnlineV2/CustomerOnlineV2/CustomerOnlineV2.csproj
  16. 2
      CustomerOnlineV2/CustomerOnlineV2/Properties/PublishProfiles/FolderProfile.pubxml.user
  17. 145
      CustomerOnlineV2/CustomerOnlineV2/Views/Report/GeneratePdf.cshtml
  18. 62
      CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml
  19. 8
      CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml
  20. 1
      CustomerOnlineV2/CustomerOnlineV2/appsettings.json
  21. 4
      CustomerOnlineV2/CustomerOnlineV2/wwwroot/js/Custom.js

BIN
CustomerOnlineV2/.vs/CustomerOnlineV2/DesignTimeBuild/.dtbcache.v2

BIN
CustomerOnlineV2/.vs/CustomerOnlineV2/v17/.futdcache.v2

BIN
CustomerOnlineV2/.vs/CustomerOnlineV2/v17/.suo

BIN
CustomerOnlineV2/.vs/ProjectEvaluation/customeronlinev2.metadata.v7.bin

BIN
CustomerOnlineV2/.vs/ProjectEvaluation/customeronlinev2.projects.v7.bin

1
CustomerOnlineV2/CustomerOnlineV2.Business/Business/TransactionBusiness/ITransactionBusiness.cs

@ -20,5 +20,6 @@ namespace CustomerOnlineV2.Business.Business.TransactionBusiness
Task<CustomerNotificationModel> GetRewardPoints(LoginResponse loginDetails);
Task<SendMoneySuccessModel> UpdateTranDataFailed(TrustPaymentRequest request, LoginResponse loginDetails);
Task<ReceiverListModel> GetReceiverListDetail(LoginResponse loginDetails , string receiverId);
Task<CommonDropDownList> GetReceiverListDDL(CommonDropDownModel model, LoginResponse loginDetails);
}
}

21
CustomerOnlineV2/CustomerOnlineV2.Business/Business/TransactionBusiness/TransactionBusiness.cs

@ -39,11 +39,16 @@ namespace CustomerOnlineV2.Business.Business.TransactionBusiness
_response = await _tpApi.GetExRate(_request);
_response.ProcessId = calcRequest.ProcessId;
_response.tpExRate = _partnerDetails.TpExRate;
if (decimal.TryParse(_response.collAmt, out decimal collAmtDecimal))
{
decimal roundedCollAmt = Math.Round(collAmtDecimal, 2);
_response.collAmt = roundedCollAmt.ToString();
}
//if (decimal.TryParse(_response.collAmt, out decimal collAmtDecimal))
//{
// decimal roundedCollAmt = Math.Round(collAmtDecimal, 2);
// _response.collAmt = roundedCollAmt.ToString();
//}
_response.collAmt = Utilities.ShowDecimal2(_response.collAmt);
_response.sAmt = Utilities.ShowDecimal2(_response.sAmt);
_response.pAmt = Utilities.ShowDecimal2(_response.pAmt);
_response.discountedFee = Utilities.ShowDecimal2(_response.discountedFee);
}
return _response;
}
@ -127,7 +132,7 @@ namespace CustomerOnlineV2.Business.Business.TransactionBusiness
{
return new ExrateCalculateRequestModel()
{
RequestedBy = "mobile",
RequestedBy = "online",
SCountry = Utilities.ReadFromAppSettings("OnlineAgent:SendingCountry"),
SSuperAgent = Utilities.ReadFromAppSettings("OnlineAgent:SuperAgentId"),
SBranch = Utilities.ReadFromAppSettings("OnlineAgent:BranchId"),
@ -366,5 +371,9 @@ namespace CustomerOnlineV2.Business.Business.TransactionBusiness
{
return await _transactionRepo.GetReceiverListDetail(loginDetails , receiverId);
}
public async Task<CommonDropDownList> GetReceiverListDDL(CommonDropDownModel model, LoginResponse loginDetails)
{
return await _transactionRepo.GetReceiverListDDL(model, loginDetails);
}
}
}

5
CustomerOnlineV2/CustomerOnlineV2.Common/Helper/ApplicationConfig.cs

@ -78,5 +78,10 @@ namespace CustomerOnlineV2.Common.Helper
{
return ReadWebConfig("merchantemail");
}
public static string GetpdfLibPath()
{
return ReadWebConfig("pdfLibPath");
}
}
}

21
CustomerOnlineV2/CustomerOnlineV2.Common/Helper/Utilities.cs

@ -1,5 +1,6 @@
using CustomerOnlineV2.Common.Configs;
using Microsoft.AspNetCore.Http;
using System;
using System.Text.RegularExpressions;
namespace CustomerOnlineV2.Common.Helper
@ -68,6 +69,26 @@ namespace CustomerOnlineV2.Common.Helper
else
return strVal;
}
public static String ShowDecimal2(String strVal)
{
if (strVal != "")
return TruncateDecimalPlaces(decimal.Parse(strVal), 2).Value.ToString("0.00");
else
return strVal;
}
public static decimal? TruncateDecimalPlaces(this decimal? value, int places)
{
if (value == null)
{
return null;
}
return Math.Floor((decimal)value * (decimal)Math.Pow(10, places)) / (decimal)Math.Pow(10, places);
} //
public static string GenerateOTP()
{
string[] strChar = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };

1
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/ITransactionRepository.cs

@ -17,5 +17,6 @@ namespace CustomerOnlineV2.Repository.Repository.TransactionRepository
Task<CustomerNotificationModel> GetRewardPoints(LoginResponse loginDetails);
Task<SendMoneySuccessModel> UpdateTranDataFailed(TrustPaymentRequest request, LoginResponse loginDetails);
Task<ReceiverListModel> GetReceiverListDetail(LoginResponse loginDetails, string receiverId);
Task<CommonDropDownList> GetReceiverListDDL(CommonDropDownModel model, LoginResponse loginDetails);
}
}

32
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs

@ -598,6 +598,38 @@ namespace CustomerOnlineV2.Repository.Repository.TransactionRepository
}
return await Task.FromResult(_response);
}
public async Task<CommonDropDownList> GetReceiverListDDL(CommonDropDownModel model, LoginResponse loginDetails)
{
try
{
var sql = "EXEC PROC_DROPDOWN_LIST";
sql += " @Flag = " + _connHelper.FilterString("receiverListPMode");
sql += ",@customerid = " + _connHelper.FilterString(loginDetails.UserId);
sql += " ,@selectedValue1 = " + _connHelper.FilterString(model.country);
sql += " ,@paymentMode = " + _connHelper.FilterString(model.Value);
_logger.LogDebug("TRANSACTIONREPOSITORY | GETRECEIVERLISTDDL | SQL | " + sql);
var dt = _connHelper.ExecuteDataTable(sql);
if (dt == null || dt.Rows.Count <= 0)
{
return new CommonDropDownList();
}
List<DropDownResponse> _resp = new List<DropDownResponse>();
foreach (DataRow item in dt.Rows)
{
_resp.Add(new DropDownResponse
{
Id = Utilities.GetRowCellValue(item["Id"]),
Text = Utilities.GetRowCellValue(item["Text"])
});
}
return new CommonDropDownList { DropDownResponse = _resp };
}
catch (Exception ex)
{
_logger.LogError("TRANSACTIONREPOSITORY | GETRECEIVERLISTDDL | " + ex.Message);
return new CommonDropDownList { DropDownResponse = new List<DropDownResponse>() };
}
}
}
}

BIN
CustomerOnlineV2/CustomerOnlineV2.Repository/obj/Debug/net7.0/CustomerOnlineV2.Repository.csproj.AssemblyReference.cache

186
CustomerOnlineV2/CustomerOnlineV2/Controllers/ReportController.cs

@ -0,0 +1,186 @@
using CustomerOnlineV2.Business.Business.TransactionBusiness;
using CustomerOnlineV2.Common.Helper;
using CustomerOnlineV2.Common.Models.HomeModel;
using Microsoft.AspNetCore.Mvc;
//using DinkToPdf.PdfTools.Load;
using System.Diagnostics;
using System.Text;
namespace CustomerOnlineV2.Controllers
{
public class ReportController : Controller
{
private readonly ITransactionBusiness _transactionBusiness;
public ReportController(ITransactionBusiness transactionBusiness)
{
_transactionBusiness = transactionBusiness;
}
//private readonly IConverter _converter = new SynchronizedConverter(new PdfTools());
//private byte[] GeneratePdfBytes(string htmlContent)
//{
// var globalSettings = new GlobalSettings
// {
// PaperSize = PaperKind.A4,
// Orientation = Orientation.Portrait,
// Margins = new MarginSettings { Top = 10, Bottom = 10, Left = 10, Right = 10 },
// };
// var objectSettings = new ObjectSettings
// {
// PagesCount = true,
// HtmlContent = htmlContent,
// };
// var pdf = new HtmlToPdfDocument()
// {
// GlobalSettings = globalSettings,
// Objects = { objectSettings }
// };
// if (_converter != null)
// {
// return _converter.Convert(pdf);
// }
// else
// {
// // Handle the case where _converter is null
// throw new InvalidOperationException("_converter is not properly initialized.");
// }
//}
// [HttpGet("generate-pdf")]
//[HttpPost]
public IActionResult GeneratePdf(CustomerTransaction customerTransaction)
{
//if (TempData["ResponseCode"] == null || string.IsNullOrEmpty(TempData["ResponseCode"].ToString()))
//{
// TempData["ResponseCode"] = "0";
//}
//else
//{
// TempData["ResponseCode"] = "1";
//}
var loginDetails = HttpContext.GetLoginDetails();
var r = _transactionBusiness.GetTransactionReportList(loginDetails, customerTransaction);
if (r?.Result?.CustomerTransaction == null)
{
return NotFound("Transaction Not Found");
}
StringBuilder htmlContent = new StringBuilder();
var imageUrl = "data:image/png;base64," + Convert.ToBase64String(System.IO.File.ReadAllBytes("wwwroot/images/logo.png"));
var svgContent = System.IO.File.ReadAllText("wwwroot/images/imelondon.svg");
var imageUrl1 = $"data:image/svg+xml;base64,{Convert.ToBase64String(Encoding.UTF8.GetBytes(svgContent))}";
htmlContent.AppendLine("<html><head><style> .header {overflow: auto;}" +
".img1 {float: left; width: 350px; height: 60px; }" +
".img {float: right; width: 150px; height: 60px;-webkit-filter: grayscale(100%); filter: grayscale(100%);}" +
" .parag {text-align: justify;} " +
"</style></head> <body> " +
" <div class='header'>" +
$"<img class='img' src='{imageUrl}' />" +
$"<img class='img1' src='{imageUrl1}' />" +
"<div class=\"parag\"><p>" +
"<br /><br /><br /><br /><b> IME is the trading name of Subhida UK Ltd company.</b>" +
"<br /> Registration No.: 6432399" +
"<br />FCA Registration No.: 576127" +
"<br />HMRC Registration No.: 12663526" +
"<br /> Registered Address : Pentax House South Hill Avenue, South Harrow," +
"<br />London, HA2 0DU" +
"<br />Email:info@imelondon.co.uk</p> </div></div>" +
"<h1>Transaction List</h1>");
htmlContent.AppendLine("<table style='border-collapse: collapse;'><thead><tr>" +
"<th style='border: 1px solid black; padding: 5px;'>S.N</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Receiver Name</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Send Date</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Tran Id</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Control No</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Delivery Method</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Status</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Transfer Amt</th>" +
"<th style='border: 1px solid black; padding: 5px;'>Receive Amt</th>" +
"</tr></thead><tbody>");
int sn = 1;
decimal totalPayoutAmt = 0;
foreach (var transa in r.Result.CustomerTransaction)
{
if (decimal.TryParse(transa.PayoutAmt, out decimal payoutAmtDecimal))
{
totalPayoutAmt += payoutAmtDecimal;
}
htmlContent.AppendLine(
$"<tr style='border: 1px solid black;'>" +
$"<td style='border: 1px solid black; padding: 5px;'>{sn}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.Id}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.SendDate}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.TranId}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.ControlNo}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.PayoutMode}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.PayStatus}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.CollAmt}</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{transa.PayoutAmt}</td>" +
$"</tr>");
sn++;
}
htmlContent.AppendLine(
$"<tr style='border: 1px solid black;'>" +
$"<td></td>" +
$"<td></td>" +
$"<td></td>" +
$"<td></td>" +
$"<td></td>" +
$"<td></td>" +
$"<td></td>" +
$"<td style='border: 1px solid black; padding: 5px;'>Total:</td>" +
$"<td style='border: 1px solid black; padding: 5px;'>{totalPayoutAmt}</td>" +
$"</tr>");
htmlContent.AppendLine("</tbody></table></body></html>");
var pdfBytes = GeneratePdf(htmlContent.ToString());
// Return the PDF as a file result
return File(pdfBytes, "application/pdf", "TransactionReport.pdf");
}
private byte[] GeneratePdf(string htmlContent)
{
var fileName = Path.GetTempFileName();
// Save the HTML content to a temporary file
System.IO.File.WriteAllText(fileName + ".html", htmlContent);
// Run the WkHtmlToPdf process
var process = new Process()
{
StartInfo = new ProcessStartInfo
{
FileName = ApplicationConfig.GetpdfLibPath(),
Arguments = $"{fileName}.html {fileName}.pdf",
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true,
}
};
process.Start();
process.WaitForExit();
// Read the generated PDF into a byte array
var pdfBytes = System.IO.File.ReadAllBytes($"{fileName}.pdf");
// Cleanup temporary files
//System.IO.File.Delete($"{fileName}.html");
//System.IO.File.Delete($"{fileName}.pdf");
return pdfBytes;
}
}
}

8
CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs

@ -313,5 +313,13 @@ namespace CustomerOnlineV2.Controllers
var loginDetails = HttpContext.GetLoginDetails();
return await _transactionBusiness.GetReceiverListDetail(loginDetails, id);
}
[HttpPost]
[ValidateAntiForgeryToken]
[Authorization("GetReceiverListDDL")]
public async Task<CommonDropDownList> GetReceiverListDDL(CommonDropDownModel model)
{
var loginDetails = HttpContext.GetLoginDetails();
return await _transactionBusiness.GetReceiverListDDL(model, loginDetails);
}
}
}

1
CustomerOnlineV2/CustomerOnlineV2/CustomerOnlineV2.csproj

@ -15,6 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="DinkToPdf" Version="1.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.11" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.9" />
<PackageReference Include="Serilog" Version="3.0.1" />

2
CustomerOnlineV2/CustomerOnlineV2/Properties/PublishProfiles/FolderProfile.pubxml.user

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\Imelondon\New folder</_PublishTargetUrl>
<History>True|2023-12-01T08:44:54.6987204Z;True|2023-12-01T13:48:23.4841029+05:45;True|2023-12-01T00:12:04.2288558+05:45;True|2023-11-30T23:51:56.2008888+05:45;True|2023-11-30T23:49:36.9385794+05:45;True|2023-11-30T23:46:46.8847879+05:45;True|2023-11-30T23:46:03.6979693+05:45;True|2023-11-30T23:44:27.3157126+05:45;True|2023-11-30T23:33:55.0600332+05:45;False|2023-11-30T23:32:36.1977723+05:45;True|2023-11-30T23:26:29.2113993+05:45;True|2023-11-30T23:04:07.5067771+05:45;True|2023-11-29T01:51:42.3247259+05:45;True|2023-11-28T23:34:50.6877537+05:45;True|2023-11-28T23:31:23.9257392+05:45;True|2023-11-28T17:22:07.3908940+05:45;True|2023-11-28T16:44:59.6364591+05:45;True|2023-11-28T16:39:13.8831139+05:45;True|2023-11-28T16:35:01.7962202+05:45;True|2023-11-28T15:54:09.3703564+05:45;True|2023-11-28T13:17:36.9582579+05:45;True|2023-11-28T11:06:56.1393117+05:45;True|2023-11-27T21:26:39.4737693+05:45;True|2023-11-27T20:27:44.8267131+05:45;True|2023-11-27T15:15:02.7845576+05:45;True|2023-11-27T15:14:24.7414474+05:45;True|2023-11-27T15:12:20.8631275+05:45;True|2023-11-27T14:53:12.8806451+05:45;True|2023-11-27T14:44:42.3370519+05:45;True|2023-11-27T14:03:02.0808830+05:45;True|2023-11-26T22:29:14.7842119+05:45;True|2023-11-26T22:26:41.5591080+05:45;True|2023-11-26T22:24:00.1770904+05:45;True|2023-11-26T22:20:37.2082479+05:45;True|2023-11-26T12:54:30.6489713+05:45;True|2023-11-25T09:37:52.6378019+05:45;True|2023-11-24T23:46:21.5762377+05:45;True|2023-11-24T23:40:44.7042923+05:45;True|2023-11-24T22:26:01.6024702+05:45;True|2023-11-24T22:11:31.5563357+05:45;True|2023-11-23T20:11:39.9968178+05:45;True|2023-11-23T19:11:12.3226825+05:45;True|2023-11-23T14:34:53.3821861+05:45;True|2023-11-22T21:49:39.4855996+05:45;True|2023-11-22T00:55:02.7339322+05:45;True|2023-11-22T00:35:33.7932258+05:45;True|2023-11-22T00:06:39.0977881+05:45;True|2023-11-21T16:56:40.9165139+05:45;True|2023-11-21T16:55:43.5238508+05:45;True|2023-11-21T13:06:42.6334262+05:45;True|2023-11-21T13:05:56.8163644+05:45;True|2023-11-21T01:30:01.6294845+05:45;True|2023-11-21T01:25:46.8788948+05:45;True|2023-11-21T01:18:10.9400288+05:45;True|2023-11-20T17:46:52.6414077+05:45;False|2023-11-20T17:46:20.7035330+05:45;True|2023-11-20T16:17:17.6490092+05:45;True|2023-11-19T23:00:54.1411776+05:45;True|2023-11-19T15:41:16.8030592+05:45;True|2023-11-19T15:27:21.5495440+05:45;True|2023-11-19T12:52:51.4532176+05:45;True|2023-11-17T19:30:12.1934196+05:45;True|2023-11-16T23:07:05.3180955+05:45;True|2023-11-16T23:02:00.4838743+05:45;True|2023-11-16T22:59:08.9347336+05:45;True|2023-11-16T22:55:10.4213631+05:45;True|2023-11-16T22:43:21.8981804+05:45;True|2023-11-14T17:28:08.3885160+05:45;True|2023-11-14T17:22:29.1626336+05:45;True|2023-11-14T17:04:07.2972823+05:45;True|2023-11-11T20:35:29.2080326+05:45;True|2023-11-11T20:32:15.2845349+05:45;True|2023-11-10T16:47:06.4019617+05:45;False|2023-11-10T13:51:28.3018175+05:45;True|2023-11-10T02:19:03.5340681+05:45;True|2023-11-10T01:20:14.2700570+05:45;True|2023-11-09T21:01:27.9875543+05:45;True|2023-11-09T20:59:19.5230056+05:45;True|2023-11-09T18:16:23.7470131+05:45;False|2023-11-09T18:16:03.5500533+05:45;True|2023-11-09T18:09:25.9299204+05:45;True|2023-11-09T15:14:04.7264848+05:45;True|2023-11-09T15:11:19.0085135+05:45;True|2023-11-09T15:07:24.6950375+05:45;True|2023-11-09T00:57:27.0432228+05:45;True|2023-11-09T00:52:22.0688681+05:45;True|2023-11-08T23:45:10.1218798+05:45;True|2023-11-08T23:42:07.1091081+05:45;True|2023-11-08T23:36:21.1551855+05:45;True|2023-11-08T23:32:16.8459083+05:45;True|2023-11-08T23:29:21.9724548+05:45;True|2023-11-08T23:14:15.4606206+05:45;True|2023-11-08T20:17:27.8481449+05:45;True|2023-11-08T19:52:59.1891066+05:45;True|2023-11-08T16:44:42.6170002+05:45;True|2023-11-08T16:33:32.3937081+05:45;True|2023-11-08T16:18:57.4262589+05:45;True|2023-11-08T00:01:31.4692446+05:45;True|2023-11-06T17:55:12.6620312+05:45;True|2023-11-05T15:21:57.3331893+05:45;</History>
<History>True|2023-12-08T08:01:34.5508826Z;True|2023-12-08T13:22:59.7907396+05:45;True|2023-12-08T13:16:18.2446566+05:45;True|2023-12-08T01:36:46.4929190+05:45;True|2023-12-01T14:29:54.6987204+05:45;True|2023-12-01T13:48:23.4841029+05:45;True|2023-12-01T00:12:04.2288558+05:45;True|2023-11-30T23:51:56.2008888+05:45;True|2023-11-30T23:49:36.9385794+05:45;True|2023-11-30T23:46:46.8847879+05:45;True|2023-11-30T23:46:03.6979693+05:45;True|2023-11-30T23:44:27.3157126+05:45;True|2023-11-30T23:33:55.0600332+05:45;False|2023-11-30T23:32:36.1977723+05:45;True|2023-11-30T23:26:29.2113993+05:45;True|2023-11-30T23:04:07.5067771+05:45;True|2023-11-29T01:51:42.3247259+05:45;True|2023-11-28T23:34:50.6877537+05:45;True|2023-11-28T23:31:23.9257392+05:45;True|2023-11-28T17:22:07.3908940+05:45;True|2023-11-28T16:44:59.6364591+05:45;True|2023-11-28T16:39:13.8831139+05:45;True|2023-11-28T16:35:01.7962202+05:45;True|2023-11-28T15:54:09.3703564+05:45;True|2023-11-28T13:17:36.9582579+05:45;True|2023-11-28T11:06:56.1393117+05:45;True|2023-11-27T21:26:39.4737693+05:45;True|2023-11-27T20:27:44.8267131+05:45;True|2023-11-27T15:15:02.7845576+05:45;True|2023-11-27T15:14:24.7414474+05:45;True|2023-11-27T15:12:20.8631275+05:45;True|2023-11-27T14:53:12.8806451+05:45;True|2023-11-27T14:44:42.3370519+05:45;True|2023-11-27T14:03:02.0808830+05:45;True|2023-11-26T22:29:14.7842119+05:45;True|2023-11-26T22:26:41.5591080+05:45;True|2023-11-26T22:24:00.1770904+05:45;True|2023-11-26T22:20:37.2082479+05:45;True|2023-11-26T12:54:30.6489713+05:45;True|2023-11-25T09:37:52.6378019+05:45;True|2023-11-24T23:46:21.5762377+05:45;True|2023-11-24T23:40:44.7042923+05:45;True|2023-11-24T22:26:01.6024702+05:45;True|2023-11-24T22:11:31.5563357+05:45;True|2023-11-23T20:11:39.9968178+05:45;True|2023-11-23T19:11:12.3226825+05:45;True|2023-11-23T14:34:53.3821861+05:45;True|2023-11-22T21:49:39.4855996+05:45;True|2023-11-22T00:55:02.7339322+05:45;True|2023-11-22T00:35:33.7932258+05:45;True|2023-11-22T00:06:39.0977881+05:45;True|2023-11-21T16:56:40.9165139+05:45;True|2023-11-21T16:55:43.5238508+05:45;True|2023-11-21T13:06:42.6334262+05:45;True|2023-11-21T13:05:56.8163644+05:45;True|2023-11-21T01:30:01.6294845+05:45;True|2023-11-21T01:25:46.8788948+05:45;True|2023-11-21T01:18:10.9400288+05:45;True|2023-11-20T17:46:52.6414077+05:45;False|2023-11-20T17:46:20.7035330+05:45;True|2023-11-20T16:17:17.6490092+05:45;True|2023-11-19T23:00:54.1411776+05:45;True|2023-11-19T15:41:16.8030592+05:45;True|2023-11-19T15:27:21.5495440+05:45;True|2023-11-19T12:52:51.4532176+05:45;True|2023-11-17T19:30:12.1934196+05:45;True|2023-11-16T23:07:05.3180955+05:45;True|2023-11-16T23:02:00.4838743+05:45;True|2023-11-16T22:59:08.9347336+05:45;True|2023-11-16T22:55:10.4213631+05:45;True|2023-11-16T22:43:21.8981804+05:45;True|2023-11-14T17:28:08.3885160+05:45;True|2023-11-14T17:22:29.1626336+05:45;True|2023-11-14T17:04:07.2972823+05:45;True|2023-11-11T20:35:29.2080326+05:45;True|2023-11-11T20:32:15.2845349+05:45;True|2023-11-10T16:47:06.4019617+05:45;False|2023-11-10T13:51:28.3018175+05:45;True|2023-11-10T02:19:03.5340681+05:45;True|2023-11-10T01:20:14.2700570+05:45;True|2023-11-09T21:01:27.9875543+05:45;True|2023-11-09T20:59:19.5230056+05:45;True|2023-11-09T18:16:23.7470131+05:45;False|2023-11-09T18:16:03.5500533+05:45;True|2023-11-09T18:09:25.9299204+05:45;True|2023-11-09T15:14:04.7264848+05:45;True|2023-11-09T15:11:19.0085135+05:45;True|2023-11-09T15:07:24.6950375+05:45;True|2023-11-09T00:57:27.0432228+05:45;True|2023-11-09T00:52:22.0688681+05:45;True|2023-11-08T23:45:10.1218798+05:45;True|2023-11-08T23:42:07.1091081+05:45;True|2023-11-08T23:36:21.1551855+05:45;True|2023-11-08T23:32:16.8459083+05:45;True|2023-11-08T23:29:21.9724548+05:45;True|2023-11-08T23:14:15.4606206+05:45;True|2023-11-08T20:17:27.8481449+05:45;True|2023-11-08T19:52:59.1891066+05:45;True|2023-11-08T16:44:42.6170002+05:45;True|2023-11-08T16:33:32.3937081+05:45;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

145
CustomerOnlineV2/CustomerOnlineV2/Views/Report/GeneratePdf.cshtml

@ -0,0 +1,145 @@

@{
ViewData["Title"] = "Transaction Report";
}
<a href="/Report/GeneratePdf" target="_blank">Download Transaction Report</a>
@* <!DOCTYPE html>
<html>
<head>
<style>
.header {
overflow: auto;
}
.img {
float: left;
width: 250px;
height: 150px;
}
.parag {
text-align: justify;
}
/* .tab, .trr {
border: 1px solid black;
} */
</style>
</head>
<body>
<br />
<div class="header"><img class="img" src="/images/logo.png" />
<div class="parag">
<p>
<b> IME is the trading name of Subhida UK Ltd company.</b><br />
Registration No.: 6432399<br />
FCA Registration No.: 576127<br />
HMRC Registration No.: 12663526<br />
Registered Address : Pentax House South Hill Avenue, South Harrow,<br />
London, HA2 0DU<br />
Email:info@imelondon.co.uk
</p>
</div>
</div>
@* <div class="px-4">
<div class="col-lg-12">
<h5 class="mb-4"> Remitter Transactions Report </h5>
</div>
<h5 class="mb-4">
Remitter Details
</h5>
<table class="table">
<tr>
<td>Member Id :</td>
<td>
<strong><span id="rName"></span></strong>
</td>
</tr>
<tr>
<td>Name :</td>
<td>
<strong><span id="mNumber"></span></strong>
</td>
</tr>
<tr>
<td>Address :</td>
<td>
<strong><span id="country"></span></strong>
</td>
</tr>
<tr>
<td>Telephone :</td>
<td>
<strong><span id="pmode"></span></strong>
</td>
</tr>
<tr>
<td> Date Of Birth :</td>
<td>
<strong><span id="bname"></span></strong>
</td>
</tr>
<tr>
<td> Nationality :</td>
<td>
<strong><span id="acountNumber"></span></strong>
</td>
</tr>
<tr>
<td> ID Details :</td>
<td>
<strong><span id="Branch"></span></strong>
</td>
</tr>
<tr>
<td>Date Of Issue :</td>
<td>
<strong><span id="relationship"></span></strong>
</td>
</tr>
</table>
</div> *@
@* <h5 class="mb-4">
Transactions
</h5>
{{table}}
<script>
$(document).ready(function () {
downloadPdf();
});
function downloadPdf() {
$.ajax({
type: "POST",
url: "/Report/GeneratePdf",
data: JSON.stringify(yourData), // Pass any necessary data to the server
contentType: "application/json; charset=utf-8",
success: function (data) {
// Create a Blob from the PDF data and create a download link
var blob = new Blob([data], { type: "application/pdf" });
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = "TransactionReport.pdf";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
},
error: function (error) {
console.error("Error generating PDF: ", error);
}
});
}
</script>
</body>
</html>
*@

62
CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml

@ -260,7 +260,7 @@
</td>
</tr>
<tr class="branch">
<td id="bnch"> Branch :</td>
<td> Branch :</td>
<td>
<strong><span id="Branch"></span></strong>
</td>
@ -310,11 +310,20 @@
$('#ReceivingCountry').change(function () {
if ($(this).val() != '') {
PopulateDDL('DeliveryMethod', 'pMode', $(this).val(), true, '');
PopulateDDL('Receiver', 'receiverList', $(this).val(), true, '');
// PopulateDDL('Receiver', 'receiverList', $(this).val(), true, '');
}
else {
$('#DeliveryMethod').empty();
//$('#Receiver').empty();
}
});
$('#DeliveryMethod').change(function () {
if ($(this).val() != '') {
PopulateReceiverListDDL();
}
else {
$('#Receiver').empty();
}
});
@ -547,7 +556,7 @@
$('#collAmount').text(NumberWithCommas(response.collAmt) + ' ' + response.collCurr);
$('#exRate').text(response.exRateDisplay);
$('#sCharge').text(NumberWithCommas(response.scCharge));
$('#sAmt').text(NumberWithCommas(response.sAmt) + ' ' + response.collCurr);
$('#sAmt').text(response.sAmt + ' ' + response.collCurr);
$('#pCurrency').text(response.pCurr);
$('#floatingInputPcurr').text("Receiving Amount " + response.pCurr);
$('#rewardPoint').text(response.discountedFee);
@ -719,7 +728,7 @@
$('#btnSend').prop('disabled', false);
}
function receiverList(id) {
debugger;
$.ajax({
type: 'GET',
contentType: 'application/json; charset=utf-8',
@ -733,18 +742,29 @@
//$('#Branch').text(data.bankLocation);
$('#relationship').text(data.relationship);
$('#country').text(data.country);
$('#acountNumber').text(data.receiverAccountNumber);
$('#Branch').text(data.bankLocation);
//$('#acountNumber').text(data.receiverAccountNumber);
// if (data.paymentMode === '1') {
// $('.account-number').hide();
// $('.branch').hide();
// } else {
debugger;
if (data.paymentMode === 'Cash Payment') {
// $('.account-number').text(data.receiverAccountNumber).show();
// $('.branch').text(data.bankLocation).show();
// }
if (data.paymentMode === "Cash Payment") {
$('.account-number').hide();
$('.branch').hide();
}
else {
$('.account-number').show();
$('.branch').show();
$('#acountNumber').text(data.receiverAccountNumber).show();
$('#branch').text(data.bankLocation).show();
}
},
error: function (error) {
@ -752,5 +772,31 @@
}
});
}
function PopulateReceiverListDDL() {
let pmode = $('#DeliveryMethod option:selected').val();
let pCountryid = $('#ReceivingCountry option:selected').val();
let Data = {
Flag: 'receiverListPMode',
Country: pCountryid,
Value: pmode,
};
$.ajax(
{
type: 'POST',
url: '/Transaction/GetReceiverListDDL',
data: Data,
headers: {
"RequestVerificationToken":
$('input[name="__RequestVerificationToken"]').val()
},
async: false,
success: function (response) {
PopulateDDLMain(response, 'Receiver', true, '');
},
error: function () {
return null;
}
});
}
</script>
}

8
CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml

@ -43,7 +43,9 @@
<button type="button" onclick="GetTransactionList()">Search</button>
<button type="button" onclick="downloadPdf()"><i class="fas fa-print"></i> Print</button>
@* <p class="text-success text-7 lh-1"> <a class="text-3 d-inline-block btn-link mt-4" href="/TransactionReport/PrintPDF"><i class="fas fa-print"></i> Print</a></p> *@
@* <p class="text-success text-7 lh-1" style=" display: inline;"> <a class="text-3 d-inline-block btn-link mt-4" href="/Report/GeneratePdf"><i class="fas fa-print"></i> Print</a></p> *@
</form>
</div>
@ -290,7 +292,9 @@
// }
// }
function downloadPdf() {
window.location.href = '/Report/GeneratePdf';
}
</script>
}

1
CustomerOnlineV2/CustomerOnlineV2/appsettings.json

@ -73,6 +73,7 @@
"SessionTimeOutInMinutes": "10",
"EncryptDecryptKey": "mH9Mjsi3VBOvk40YsCd1S8rm2vYFV7P6",
"docUploadPath": "D:\\",
"pdfLibPath": "C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltoimage.exe",
"profilePicUploadURL": "D:\\CustomerDocument\\App\\MobileApi\\Images\\Profile\\",
"customerPortalUrl": "https://web.imelondon.co.uk:2095/",
"mobileJsonRxUrl": "https://mobile.imelondon.co.uk:2086/",

4
CustomerOnlineV2/CustomerOnlineV2/wwwroot/js/Custom.js

@ -1,5 +1,6 @@
function NumberWithCommas(amount) {
amount = parseFloat(amount).toFixed(2);
// amount = parseFloat(amount).toFixed(2);
// amount = toTrunc(amount, 2);
var delimiter = ",";
var a = amount.toString().split('.', 2);
var d = a[1];
@ -23,6 +24,7 @@
return amount;
}
function ShowSessionAlert() {
let errorCode = sessionStorage.getItem("ResponseCode");
let errorMessage = sessionStorage.getItem("ResponseMessage");

Loading…
Cancel
Save