correction

This commit is contained in:
mashfiq 2025-10-08 17:02:14 +06:00
parent 99d14b5fe0
commit 947692280e
4 changed files with 53 additions and 39 deletions

View File

@ -39,8 +39,8 @@ namespace HRM.Service
oLeaveEncashment.CreatedDate = oReader.GetDateTime("CreatedDate").Value; oLeaveEncashment.CreatedDate = oReader.GetDateTime("CreatedDate").Value;
oLeaveEncashment.ModifiedBy = oReader.GetString("ModifiedBy") == null ? 0 : oReader.GetInt32("ModifiedBy").Value; oLeaveEncashment.ModifiedBy = oReader.GetString("ModifiedBy") == null ? 0 : oReader.GetInt32("ModifiedBy").Value;
oLeaveEncashment.ModifiedDate = oReader.GetDateTime("ModifiedDate"); oLeaveEncashment.ModifiedDate = oReader.GetDateTime("ModifiedDate");
oLeaveEncashment.BasicSalary = oReader.GetDouble("BasicSalary").Value; oLeaveEncashment.BasicSalary = oReader.GetDouble("BasicSalary", true, 0);
oLeaveEncashment.ESSSubmittedDays = oReader.GetDouble("ESSSubmittedDays").Value; oLeaveEncashment.ESSSubmittedDays = oReader.GetDouble("ESSSubmittedDays", true, 0);
oLeaveEncashment.presentDays = oReader.GetDouble("PresentDays").Value; oLeaveEncashment.presentDays = oReader.GetDouble("PresentDays").Value;
oLeaveEncashment.absentDays = oReader.GetDouble("AbsentDays").Value; oLeaveEncashment.absentDays = oReader.GetDouble("AbsentDays").Value;
oLeaveEncashment.enjoyedLeave = oReader.GetDouble("EnjoyedLeave").Value; oLeaveEncashment.enjoyedLeave = oReader.GetDouble("EnjoyedLeave").Value;

View File

@ -3368,32 +3368,38 @@ namespace HRM.Report
public byte[] ShowLeaveReport(string sEmpIDs, int lyyid, int payrollTypeID, DateTime nextPayProcessDate, string reportType) public byte[] ShowLeaveReport(string sEmpIDs, int lyyid, int payrollTypeID, DateTime nextPayProcessDate, string reportType)
{ {
try
ReportProcessor form = new ReportProcessor();
DataTable dTEmpLeave = new HRM.Report.PayrollDataSet.dsEmpLeaveLedger.LeaveBalanceDataTable();
LeaveYear lyy = new LeaveYearService().Get(lyyid);
dTEmpLeave = new EmpLeaveStatusService().CurrentYearStatusOptimized(sEmpIDs, lyy, EnumLeaveStatus.Approved, nextPayProcessDate);
if (dTEmpLeave.Rows.Count > 0)
{ {
DataSet ds = new DataSet(); ReportProcessor form = new ReportProcessor();
dTEmpLeave.TableName = "dsEmpLeaveLedger_LeaveBalance"; DataTable dTEmpLeave = new HRM.Report.PayrollDataSet.dsEmpLeaveLedger.LeaveBalanceDataTable();
ds.Tables.Add(dTEmpLeave);
List<ReportParameter> oParameters = new List<ReportParameter>(); LeaveYear lyy = new LeaveYearService().Get(lyyid);
ReportParameter rParam = new ReportParameter("FromDate", lyy.StartDate.ToString("dd MMM yyyy"));
oParameters.Add(rParam);
rParam = new ReportParameter("ToDate", lyy.EndDate.ToString("dd MMM yyyy"));
oParameters.Add(rParam);
string RDLC = "LeaveReportEcho.rdlc"; dTEmpLeave = new EmpLeaveStatusService().CurrentYearStatusOptimized(sEmpIDs, lyy, EnumLeaveStatus.Approved, nextPayProcessDate);
return form.CommonReportViewForReports(null, ds, null, RDLC, oParameters, true, payrollTypeID, reportType);
if (dTEmpLeave.Rows.Count > 0)
{
DataSet ds = new DataSet();
dTEmpLeave.TableName = "dsEmpLeaveLedger_LeaveBalance";
ds.Tables.Add(dTEmpLeave);
List<ReportParameter> oParameters = new List<ReportParameter>();
ReportParameter rParam = new ReportParameter("FromDate", lyy.StartDate.ToString("dd MMM yyyy"));
oParameters.Add(rParam);
rParam = new ReportParameter("ToDate", lyy.EndDate.ToString("dd MMM yyyy"));
oParameters.Add(rParam);
string RDLC = "LeaveReportEcho.rdlc";
return form.CommonReportViewForReports(null, ds, null, RDLC, oParameters, true, payrollTypeID, reportType);
}
else
{
throw new Exception("Leave balance not found");
}
} }
else catch (Exception ex)
{ {
throw new Exception("Leave balance not found"); throw new Exception(ex.Message, ex);
} }
} }
@ -3648,28 +3654,35 @@ namespace HRM.Report
public byte[] ShowLeaveEncashmentReport(string sEmpIDs, DateTime fromMonth, int lyyid, int payrollTypeID, DateTime nextPayProcessDate, string reportType) public byte[] ShowLeaveEncashmentReport(string sEmpIDs, DateTime fromMonth, int lyyid, int payrollTypeID, DateTime nextPayProcessDate, string reportType)
{ {
try
{
ReportProcessor form = new ReportProcessor(); ReportProcessor form = new ReportProcessor();
LeaveYear oLeaveYear = new LeaveYearService().Get(lyyid); LeaveYear oLeaveYear = new LeaveYearService().Get(lyyid);
string leaveYear = fromMonth.ToString("MMMM yyyy") + " - " + fromMonth.AddYears(1).ToString("MMMM yyyy");//cboLeaveYear.Text; string leaveYear = fromMonth.ToString("MMMM yyyy") + " - " + fromMonth.AddYears(1).ToString("MMMM yyyy");//cboLeaveYear.Text;
//DataTable dTEmpLeave = new HRM.Report.PayrollDataSet.dsEmpLeaveLedger.LeaveBalanceDataTable(); //DataTable dTEmpLeave = new HRM.Report.PayrollDataSet.dsEmpLeaveLedger.LeaveBalanceDataTable();
DataTable dt = new EmpLeaveStatusService().CurrentYearStatusForEncashment(sEmpIDs, oLeaveYear, EnumLeaveStatus.Approved, fromMonth); DataTable dt = new EmpLeaveStatusService().CurrentYearStatusForEncashment(sEmpIDs, oLeaveYear, EnumLeaveStatus.Approved, fromMonth);
DataSet dSet = new DataSet(); DataSet dSet = new DataSet();
dt.TableName = "PayrollDataSet_dtEncashmentReportNew"; dt.TableName = "PayrollDataSet_dtEncashmentReportNew";
dSet.Tables.Add(dt); ; dSet.Tables.Add(dt); ;
List<ReportParameter> oParameters = new List<ReportParameter>(); List<ReportParameter> oParameters = new List<ReportParameter>();
ReportParameter rParam = new ReportParameter("LeaveYear", leaveYear); ReportParameter rParam = new ReportParameter("LeaveYear", leaveYear);
oParameters.Add(rParam); oParameters.Add(rParam);
rParam = new ReportParameter("EncashMonth", fromMonth.ToString("MMMM yyyy")); rParam = new ReportParameter("EncashMonth", fromMonth.ToString("MMMM yyyy"));
oParameters.Add(rParam); oParameters.Add(rParam);
string RDLC = "EncashmentReportEcho.rdlc"; string RDLC = "EncashmentReportEcho.rdlc";
return form.CommonReportViewForReports(null, dSet, null, RDLC, oParameters, true, payrollTypeID, reportType); return form.CommonReportViewForReports(null, dSet, null, RDLC, oParameters, true, payrollTypeID, reportType);
}
catch (Exception ex)
{
throw new Exception(ex.Message, ex);
}
} }
#endregion #endregion
} }

View File

@ -14,7 +14,7 @@ export class ApiService {
public isSSO = false; public isSSO = false;
public versionDeployement = false; public versionDeployement = false;
// public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01"; // public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01";
public versionNumber = `V-20250902-`+"01"; public versionNumber = `V-20251008-`+"01";
public static BASE_URL = ''; public static BASE_URL = '';
public base_url = ''; public base_url = '';
// public currentLink = ''; // public currentLink = '';

View File

@ -110,6 +110,7 @@ export class LeaveEncashmentReportComponent implements OnInit {
reportid: 728, reportid: 728,
itemid: this.leaveYearId, itemid: this.leaveYearId,
empIds: this.empIds, empIds: this.empIds,
fromDate: this.fromDate,
reportType: reportType, reportType: reportType,
}; };