diff --git a/HRM.BO/HRBasic/Enums.cs b/HRM.BO/HRBasic/Enums.cs
index fad6fef..bab9adc 100644
--- a/HRM.BO/HRBasic/Enums.cs
+++ b/HRM.BO/HRBasic/Enums.cs
@@ -2173,6 +2173,7 @@ namespace HRM.BO
OverAllSummary = 39,
SalaryControl = 40,
PaySlip = 41,
+ DateRangeWiseSalarySheet = 4101,
Envelop = 42,
SalaryReconcil = 43,
SalaryReconcilItemWise = 143,
diff --git a/HRM.BO/Salary/SalaryMonthly.cs b/HRM.BO/Salary/SalaryMonthly.cs
index f5ac4e4..0c8f5dd 100644
--- a/HRM.BO/Salary/SalaryMonthly.cs
+++ b/HRM.BO/Salary/SalaryMonthly.cs
@@ -2072,6 +2072,7 @@ namespace HRM.BO
DataSet GetEmpPaySlipGrossForOthers(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipDeductForOthers(DateTime dSalaryMonthDate, string sEmpID);
+ DataSet GetEmpPaySlipDateRangeMonthWise(DateTime fromSalaryMonth, DateTime toSalaryMonth, string sEmpID);
DataSet GetEmpPaySlipDeductForCitiOthers(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipDeductForLR(DateTime dSalaryMonthDate, string sEmpID);
diff --git a/HRM.DA/DA/Salary/SalaryMonthlyDA.cs b/HRM.DA/DA/Salary/SalaryMonthlyDA.cs
index 91e2f20..d14c172 100644
--- a/HRM.DA/DA/Salary/SalaryMonthlyDA.cs
+++ b/HRM.DA/DA/Salary/SalaryMonthlyDA.cs
@@ -713,6 +713,40 @@ namespace HRM.DA
return oSMonthlys;
}
+ #region Date Range Wise Salary Sheet
+
+ // Date Range Wise Salary Sheet: one row per salary item per employee per salary month in the range
+ // (gross 1, unauthorized leave 2, deduction 3, arrear 8 and the net payable 5/-132), with the
+ // employee's grade / basic of THAT month. PaySlip.ShowReportDateRange turns it into the salary sheet matrix.
+ // LEFT JOIN so that a salary month without any of those items still gets its row.
+ internal static DataSet GetEmpPaySlipDateRangeMonthWise(TransactionContext tc, DateTime fromSalaryMonth, DateTime toSalaryMonth, string sEmpID)
+ {
+ DataSet oSMonthlys = new DataSet();
+ try
+ {
+ string sql = SQLParser.MakeSQL(@"SELECT E.EMPLOYEENO, E.NAME Name, G.DESCRIPTION GName, D.DESCRIPTION Department, E.JOININGDATE,
+ S.SalaryMonth, S.THISMONTHBASIC ActualBasic,
+ SD.ITEMGROUP, SD.ItemCode, SD.ItemID, SD.DESCRIPTION Description, SD.Position, SD.CHANGEDAMOUNT
+ FROM SALARYMONTHLY S
+ inner join EMPLOYEE E on S.EMPLOYEEID = E.EMPLOYEEID
+ inner join GRADES G on S.GRADEID = G.GRADEID
+ inner join DEPARTMENT D on S.DEPARTMENTID = D.DEPARTMENTID
+ left outer join SALARYMONTHLYDETAIL SD on S.SALARYMONTHLYID = SD.SALARYMONTHLYID
+ AND (SD.ITEMGROUP IN (1,2,3,8) OR (SD.ITEMGROUP = 5 AND SD.ItemCode = -132))
+ WHERE S.SalaryMonth BETWEEN %d AND %d AND S.EmployeeID IN(%q)
+ ORDER BY E.EMPLOYEENO, S.SalaryMonth, SD.Position", fromSalaryMonth, toSalaryMonth, sEmpID);
+
+ oSMonthlys = tc.ExecuteDataSet(sql);
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ return oSMonthlys;
+ }
+
+ #endregion
+
internal static DataSet GetGrossDeduction(TransactionContext tc, int empID, DateTime salaryMonth)
{
DataSet rootDataset = new DataSet();
diff --git a/HRM.DA/Service/Salary/SalaryMonthlyService.cs b/HRM.DA/Service/Salary/SalaryMonthlyService.cs
index 429c3fa..489ae5a 100644
--- a/HRM.DA/Service/Salary/SalaryMonthlyService.cs
+++ b/HRM.DA/Service/Salary/SalaryMonthlyService.cs
@@ -655,6 +655,31 @@ namespace HRM.DA
return oSalaryMonthlys;
}
+ public DataSet GetEmpPaySlipDateRangeMonthWise(DateTime fromSalaryMonth, DateTime toSalaryMonth, string sEmpID)
+ {
+ DataSet oSalaryMonthlys = new DataSet();
+ TransactionContext tc = null;
+ try
+ {
+ tc = TransactionContext.Begin();
+ oSalaryMonthlys = SalaryMonthlyDA.GetEmpPaySlipDateRangeMonthWise(tc, fromSalaryMonth, toSalaryMonth, sEmpID);
+ tc.End();
+ }
+ catch (Exception e)
+ {
+ #region Handle Exception
+
+ if (tc != null)
+ tc.HandleError();
+ ExceptionLog.Write(e);
+ throw new ServiceException(e.Message, e);
+
+ #endregion
+ }
+
+ return oSalaryMonthlys;
+ }
+
public DataSet GetEmpPaySlipDeductForCitiOthers(DateTime dateTime, string sEmpID)
{
DataSet oSalaryMonthlys = new DataSet();
diff --git a/HRM.Report/Class/PaySlip.cs b/HRM.Report/Class/PaySlip.cs
index 59084f1..0013101 100644
--- a/HRM.Report/Class/PaySlip.cs
+++ b/HRM.Report/Class/PaySlip.cs
@@ -716,6 +716,186 @@ namespace HRM.Report
return reportProcessor.ShowDlgForNewPaySlip(null, basicInfo,oFDST, payrollTypeID);
}
+ #region Date Range Wise Salary Sheet
+
+ ///
+ /// Date Range Wise Salary Sheet (report 4101): a salary-sheet style matrix of every salary month of each
+ /// employee between fromMonth and toMonth - one row per employee per salary month, one column per
+ /// salary head (the columns come from the data, they are not fixed), then Total Gross, the
+ /// deduction heads, Total Deduction and Net Pay, with a grand total at the bottom.
+ /// Rendered from the embedded RDLC DateRangeWiseSalarySheet.rdlc, the way the salary sheet (report 54) is.
+ ///
+ public byte[] ShowReportDateRange(int payrollTypeID, DateTime fromMonth, DateTime toMonth, string sEmpID, string reportType)
+ {
+ DateTime fromSalaryMonth = GlobalFunctions.LastDateOfMonth(fromMonth);
+ DateTime toSalaryMonth = GlobalFunctions.LastDateOfMonth(toMonth);
+ if (fromSalaryMonth > toSalaryMonth)
+ {
+ throw new Exception("From month can not be greater than To month.");
+ }
+
+ DataTable oItems = new SalaryMonthlyService().GetEmpPaySlipDateRangeMonthWise(fromSalaryMonth, toSalaryMonth, sEmpID).Tables[0];
+ if (oItems.Rows.Count <= 0)
+ {
+ return null;
+ }
+
+ DataTable dtSalarySheet = this.GetDateRangeSalarySheetTable(oItems);
+ dtSalarySheet.TableName = "DateRangeSalarySheet";
+ DataSet resultDataSet = new DataSet();
+ resultDataSet.Tables.Add(dtSalarySheet);
+
+ string salarySheetPeriod = fromSalaryMonth.Year == toSalaryMonth.Year && fromSalaryMonth.Month == toSalaryMonth.Month
+ ? "Salary Sheet for the month of " + toSalaryMonth.ToString("MMMM yyyy")
+ : "Salary Sheet for the period of " + fromSalaryMonth.ToString("MMMM yyyy") + " to " + toSalaryMonth.ToString("MMMM yyyy");
+ List extraParams = new List();
+ extraParams.Add(new ReportParameter("SalarySheetPeriod", salarySheetPeriod));
+
+ ReportProcessor reportProcessor = new ReportProcessor();
+ return reportProcessor.CommonReportView(null, "HRM.Report.RDLC.DateRangeWiseSalarySheet.rdlc", resultDataSet, null, extraParams, true, payrollTypeID, reportType);
+ }
+
+ ///
+ /// Turns the item rows of GetEmpPaySlipDateRangeMonthWise into the matrix rows: for every employee
+ /// and salary month, one row per column (0 where that month has no such head). Columns are keyed by
+ /// ItemGroup|ItemCode|ItemID, not by description, because an arrear and an unauthorized-leave row
+ /// carry the same description as the gross head ("Basic").
+ /// Total Gross = gross + arrear - unauthorized leave; Total Deduction = deductions; Net Pay is the
+ /// processed Net Payable (5 / -132) - the same figures the salary sheet shows.
+ ///
+ private DataTable GetDateRangeSalarySheetTable(DataTable oItems)
+ {
+ int grossGroup = (int)EnumSalaryGroup.Gross;
+ int unauthGroup = (int)EnumSalaryGroup.UnauthLeave;
+ int deductGroup = (int)EnumSalaryGroup.Deductions;
+ int arrearGroup = (int)EnumSalaryGroup.Arrear;
+ const string unauthKey = "UNAUTHLEAVE", totalGrossKey = "TOTALGROSS", totalDeductionKey = "TOTALDEDUCTION", netPayKey = "NETPAY";
+
+ DataTable dt = new DataTable();
+ dt.Columns.Add("EmpNo", typeof(string));
+ dt.Columns.Add("EmpName", typeof(string));
+ dt.Columns.Add("Grade", typeof(string));
+ dt.Columns.Add("Department", typeof(string));
+ dt.Columns.Add("SalaryMonth", typeof(DateTime));
+ dt.Columns.Add("JoiningDate", typeof(DateTime));
+ dt.Columns.Add("ActualBasic", typeof(double));
+ dt.Columns.Add("ColumnKey", typeof(string));
+ dt.Columns.Add("ColumnName", typeof(string));
+ dt.Columns.Add("ColumnSequence", typeof(int));
+ dt.Columns.Add("Amount", typeof(double));
+
+ List itemRows = oItems.AsEnumerable().Where(r => r["ITEMGROUP"] != DBNull.Value).ToList();
+
+ // every head that has a non-zero amount somewhere in the range; the description of the latest month
+ var heads = itemRows
+ .GroupBy(r => new { Group = Convert.ToInt32(r["ITEMGROUP"]), Code = Convert.ToInt32(r["ItemCode"]), ID = Convert.ToInt32(r["ItemID"]) })
+ .Select(g => new
+ {
+ g.Key.Group,
+ g.Key.Code,
+ g.Key.ID,
+ Key = g.Key.Group + "|" + g.Key.Code + "|" + g.Key.ID,
+ Description = Convert.ToString(g.OrderBy(r => Convert.ToDateTime(r["SalaryMonth"])).Last()["Description"]),
+ Position = g.Min(r => r["Position"] == DBNull.Value ? int.MaxValue : Convert.ToInt32(r["Position"])),
+ HasAmount = g.Any(r => Convert.ToDouble(r["CHANGEDAMOUNT"]) != 0)
+ })
+ .Where(h => h.HasAmount)
+ .ToList();
+
+ #region Column order
+ List> columns = new List>();
+ // earnings: Basic first, then the salary position; each head's arrear right after it
+ foreach (var head in heads.Where(h => h.Group == grossGroup)
+ .OrderBy(h => h.Code == (int)EnumSalaryItemCode.Basic_Salary ? 0 : 1)
+ .ThenBy(h => h.Position).ThenBy(h => h.Description))
+ {
+ columns.Add(new KeyValuePair(head.Key, head.Description));
+ var arrear = heads.FirstOrDefault(h => h.Group == arrearGroup && h.Code == head.Code && h.ID == head.ID);
+ if (arrear != null)
+ columns.Add(new KeyValuePair(arrear.Key, GetArrearColumnName(arrear.Description)));
+ }
+ // an arrear whose head is not paid in the range
+ foreach (var arrear in heads.Where(h => h.Group == arrearGroup && !columns.Any(c => c.Key == h.Key))
+ .OrderBy(h => h.Position).ThenBy(h => h.Description))
+ {
+ columns.Add(new KeyValuePair(arrear.Key, GetArrearColumnName(arrear.Description)));
+ }
+ if (heads.Any(h => h.Group == unauthGroup))
+ columns.Add(new KeyValuePair(unauthKey, "Unauthorized Leave"));
+ columns.Add(new KeyValuePair(totalGrossKey, "Total Gross"));
+ // deductions: Income Tax, PF, then the salary position
+ foreach (var head in heads.Where(h => h.Group == deductGroup)
+ .OrderBy(h => h.Code == (int)EnumSalaryItemCode.Inc_Tax_Deduction ? 0 : h.Code == (int)EnumSalaryItemCode.PF_Contribution ? 1 : 2)
+ .ThenBy(h => h.Position).ThenBy(h => h.Description))
+ {
+ columns.Add(new KeyValuePair(head.Key, head.Description));
+ }
+ columns.Add(new KeyValuePair(totalDeductionKey, "Total Deduction"));
+ columns.Add(new KeyValuePair(netPayKey, "Net Pay"));
+ #endregion
+
+ foreach (var salaryMonth in oItems.AsEnumerable()
+ .GroupBy(r => new { EmpNo = Convert.ToString(r["EMPLOYEENO"]), Month = Convert.ToDateTime(r["SalaryMonth"]) }))
+ {
+ DataRow info = salaryMonth.First();
+ Dictionary amounts = new Dictionary();
+ double totalGross = 0, totalDeduction = 0, unauthLeave = 0;
+ double? netPay = null;
+
+ foreach (DataRow r in salaryMonth.Where(r => r["ITEMGROUP"] != DBNull.Value))
+ {
+ int group = Convert.ToInt32(r["ITEMGROUP"]);
+ int code = Convert.ToInt32(r["ItemCode"]);
+ string key = group + "|" + code + "|" + Convert.ToInt32(r["ItemID"]);
+ double amount = Convert.ToDouble(r["CHANGEDAMOUNT"]);
+
+ if (group == grossGroup || group == arrearGroup)
+ totalGross += amount;
+ else if (group == unauthGroup)
+ {
+ totalGross -= amount;
+ unauthLeave -= amount;
+ }
+ else if (group == deductGroup)
+ totalDeduction += amount;
+ else if (group == (int)EnumSalaryGroup.OtherItem && code == (int)EnumSalaryItemCode.Net_Payable)
+ netPay = (netPay ?? 0) + amount;
+
+ if (group != unauthGroup)
+ amounts[key] = (amounts.ContainsKey(key) ? amounts[key] : 0) + amount;
+ }
+ amounts[unauthKey] = unauthLeave;
+ amounts[totalGrossKey] = totalGross;
+ amounts[totalDeductionKey] = totalDeduction;
+ amounts[netPayKey] = netPay ?? (totalGross - totalDeduction);
+
+ for (int i = 0; i < columns.Count; i++)
+ {
+ DataRow oRow = dt.NewRow();
+ oRow["EmpNo"] = salaryMonth.Key.EmpNo;
+ oRow["EmpName"] = info["Name"];
+ oRow["Grade"] = info["GName"];
+ oRow["Department"] = info["Department"];
+ oRow["SalaryMonth"] = salaryMonth.Key.Month;
+ oRow["JoiningDate"] = info["JOININGDATE"];
+ oRow["ActualBasic"] = info["ActualBasic"] == DBNull.Value ? 0 : Convert.ToDouble(info["ActualBasic"]);
+ oRow["ColumnKey"] = columns[i].Key;
+ oRow["ColumnName"] = columns[i].Value;
+ oRow["ColumnSequence"] = i + 1;
+ oRow["Amount"] = amounts.ContainsKey(columns[i].Key) ? amounts[columns[i].Key] : 0;
+ dt.Rows.Add(oRow);
+ }
+ }
+ return dt;
+ }
+
+ private string GetArrearColumnName(string description)
+ {
+ return description.IndexOf("arrear", StringComparison.OrdinalIgnoreCase) >= 0 ? description : description + " Arrear";
+ }
+
+ #endregion
+
public void PayslipMail(int payrollTypeID, DateTime SalaryMonth, string sEmpID, bool isForESS, EmailSettings emailSettings)
{
DataSet oFDST = new DataSet();
diff --git a/HRM.Report/HRM.Report.csproj b/HRM.Report/HRM.Report.csproj
index 0b3d320..c10e03a 100644
--- a/HRM.Report/HRM.Report.csproj
+++ b/HRM.Report/HRM.Report.csproj
@@ -314,6 +314,7 @@
+
@@ -644,6 +645,7 @@
+
diff --git a/HRM.Report/RDLC/DateRangeWiseSalarySheet.rdlc b/HRM.Report/RDLC/DateRangeWiseSalarySheet.rdlc
new file mode 100644
index 0000000..169f08a
--- /dev/null
+++ b/HRM.Report/RDLC/DateRangeWiseSalarySheet.rdlc
@@ -0,0 +1,1217 @@
+
+
+ 0
+
+
+
+ System.Data.DataSet
+ /* Local Connection */
+
+ 7b0f4c1e-2d6a-4f3b-9c41-4101a1b2c3d4
+
+
+
+
+
+ PayrollDataSet
+ /* Local Query */
+
+
+
+ EmpNo
+ System.String
+
+
+ EmpName
+ System.String
+
+
+ Grade
+ System.String
+
+
+ Department
+ System.String
+
+
+ SalaryMonth
+ System.DateTime
+
+
+ JoiningDate
+ System.DateTime
+
+
+ ActualBasic
+ System.Double
+
+
+ ColumnKey
+ System.String
+
+
+ ColumnName
+ System.String
+
+
+ ColumnSequence
+ System.Int32
+
+
+ Amount
+ System.Double
+
+
+
+ PayrollDataSet
+ DateRangeSalarySheet
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!SalarySheetPeriod.Value
+
+
+
+
+
+
+ 0in
+ 0.25in
+ 13.6in
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SL
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Emp No
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Name
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Job Grade
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Department
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Joining Date
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Salary Month
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Actual Basic
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+ 0.45in
+
+
+
+
+ 0.2in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!Amount.Value)
+
+
+
+
+
+
+
+
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+ Output
+
+
+
+
+ 0.2in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!Amount.Value)
+
+
+
+
+
+
+
+
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+ Output
+
+
+
+
+
+
+
+
+
+
+ =Fields!ColumnKey.Value
+
+
+
+
+ =Min(Fields!ColumnSequence.Value)
+
+
+
+ 0.55in
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!ColumnName.Value)
+
+
+
+
+
+
+
+
+ Silver
+ Middle
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+ Output
+
+
+
+
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+ 0.28in
+
+
+ true
+ true
+
+
+
+
+ =RunningValue(Fields!EmpNo.Value, CountDistinct, "matrix1")
+
+
+
+
+
+
+
+
+ Top
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+ 0.5in
+
+
+ true
+ true
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+
+
+
+
+
+ Top
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+ 0.85in
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!EmpName.Value)
+
+
+
+
+
+
+
+
+ Top
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+ 0.5in
+
+
+ true
+ true
+
+
+
+
+ =Last(Fields!Grade.Value)
+
+
+
+
+
+
+
+
+ Top
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+ 0.7in
+
+
+ true
+ true
+
+
+
+
+ =Last(Fields!Department.Value)
+
+
+
+
+
+
+
+
+ Top
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!EmpNo.Value
+
+
+
+ 0.6in
+
+
+ true
+ true
+
+
+
+
+ =IIf(IsNothing(First(Fields!JoiningDate.Value)), "", Format(First(Fields!JoiningDate.Value), "dd MMM yyyy"))
+
+
+
+
+
+
+
+
+ Top
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!SalaryMonth.Value
+
+
+
+
+ =Fields!SalaryMonth.Value
+
+
+
+ 0.6in
+
+
+ true
+ true
+
+
+
+
+ =Format(Fields!SalaryMonth.Value, "dd MMM yyyy")
+
+
+
+
+
+
+
+
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!SalaryMonth.Value
+
+
+
+ 0.55in
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!ActualBasic.Value)
+
+
+
+
+
+
+
+
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+ 4.58in
+
+
+ true
+ true
+
+
+
+
+ Total
+
+
+
+
+
+
+
+
+ 1pt
+ 1pt
+ 2pt
+ 2pt
+
+
+
+
+ Before
+
+
+
+ true
+ true
+ DateRangeSalarySheet
+ 0.3in
+ 0.95in
+ 5.03in
+ 1
+
+
+
+
+
+ 1.3in
+
+
+ 13.6in
+
+
+ 0.72396in
+ true
+ true
+
+
+ 0.68125in
+ 0in
+ 13.6in
+
+ 1.75pt
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!CompanyInfo.Value
+
+
+
+
+
+
+ 1.52083in
+ 0.25in
+ 12.08in
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ External
+ ="file:///" & Parameters!Logo.Value
+ image/jpg
+ FitProportional
+ 0.0375in
+ 0.5625in
+ 1.4in
+ 2
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Phone.Value
+
+
+
+
+
+
+ 0.375in
+ 1.52083in
+ 0.2in
+ 12.08in
+ 3
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Address.Value
+
+
+
+
+
+
+ 0.2in
+ 1.52083in
+ 0.2in
+ 12.08in
+ 4
+
+
+
+
+
+
+
+
+ 0.3in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ ="Print Date & Time: " & Format(Now(), "MM/dd/yyyy h:mm:ss tt")
+
+
+
+
+
+
+ 0.04in
+ 0.22in
+ 3in
+
+
+
+ true
+ true
+
+
+
+
+ ="Page " & Globals!PageNumber & " of " & Globals!TotalPages
+
+
+
+
+
+
+ 0.04in
+ 11.6in
+ 0.22in
+ 2in
+ 1
+
+
+
+
+
+
+
+ 8.5in
+ 14in
+ 8.5in
+ 14in
+ 0.2in
+ 0.2in
+ 0.3in
+ 0.3in
+
+
+
+
+
+
+ String
+ true
+ true
+ SearchCriteria
+
+
+ String
+ true
+ true
+ CompanyInfo
+
+
+ String
+ true
+ true
+ Logo
+
+
+ String
+ true
+ true
+ Address
+
+
+ String
+ true
+ true
+ Phone
+
+
+ String
+ true
+ true
+ SalarySheetPeriod
+
+
+
+
+ 4
+ 2
+
+
+ 0
+ 0
+ SearchCriteria
+
+
+ 1
+ 0
+ CompanyInfo
+
+
+ 2
+ 0
+ Logo
+
+
+ 3
+ 0
+ Address
+
+
+ 0
+ 1
+ Phone
+
+
+ 1
+ 1
+ SalarySheetPeriod
+
+
+
+
+ Inch
+ c4f1e2a7-6b3d-4e8a-9f10-4101b2c3d4e5
+
\ No newline at end of file
diff --git a/HRM.UI/ClientApp/package-lock.json b/HRM.UI/ClientApp/package-lock.json
index d7e14a9..584869b 100644
--- a/HRM.UI/ClientApp/package-lock.json
+++ b/HRM.UI/ClientApp/package-lock.json
@@ -3625,9 +3625,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -3645,9 +3642,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -3665,9 +3659,6 @@
"ppc64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -3685,9 +3676,6 @@
"riscv64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -3705,9 +3693,6 @@
"s390x"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -3725,9 +3710,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -3745,9 +3727,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4004,9 +3983,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4023,9 +3999,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4042,9 +4015,6 @@
"cpu": [
"ppc64"
],
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4061,9 +4031,6 @@
"cpu": [
"riscv64"
],
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4080,9 +4047,6 @@
"cpu": [
"riscv64"
],
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4099,9 +4063,6 @@
"cpu": [
"s390x"
],
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4118,9 +4079,6 @@
"cpu": [
"x64"
],
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4137,9 +4095,6 @@
"cpu": [
"x64"
],
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4399,9 +4354,6 @@
"arm"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4423,9 +4375,6 @@
"arm"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4447,9 +4396,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4471,9 +4417,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4495,9 +4438,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4519,9 +4459,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -5878,9 +5815,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -5898,9 +5832,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -5918,9 +5849,6 @@
"ppc64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -5938,9 +5866,6 @@
"s390x"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -5958,9 +5883,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -5978,9 +5900,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -11221,9 +11140,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -11245,9 +11161,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -11269,9 +11182,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -11293,9 +11203,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -13481,7 +13388,6 @@
"arm"
],
"dev": true,
- "libc": "glibc",
"license": "MIT",
"optional": true,
"os": [
@@ -13499,7 +13405,6 @@
"arm64"
],
"dev": true,
- "libc": "glibc",
"license": "MIT",
"optional": true,
"os": [
@@ -13517,7 +13422,6 @@
"arm"
],
"dev": true,
- "libc": "musl",
"license": "MIT",
"optional": true,
"os": [
@@ -13535,7 +13439,6 @@
"arm64"
],
"dev": true,
- "libc": "musl",
"license": "MIT",
"optional": true,
"os": [
@@ -13553,7 +13456,6 @@
"riscv64"
],
"dev": true,
- "libc": "musl",
"license": "MIT",
"optional": true,
"os": [
@@ -13571,7 +13473,6 @@
"x64"
],
"dev": true,
- "libc": "musl",
"license": "MIT",
"optional": true,
"os": [
@@ -13589,7 +13490,6 @@
"riscv64"
],
"dev": true,
- "libc": "glibc",
"license": "MIT",
"optional": true,
"os": [
@@ -13607,7 +13507,6 @@
"x64"
],
"dev": true,
- "libc": "glibc",
"license": "MIT",
"optional": true,
"os": [
diff --git a/HRM.UI/ClientApp/src/app/_models/enums.ts b/HRM.UI/ClientApp/src/app/_models/enums.ts
index 770aad1..b0d135c 100644
--- a/HRM.UI/ClientApp/src/app/_models/enums.ts
+++ b/HRM.UI/ClientApp/src/app/_models/enums.ts
@@ -1597,6 +1597,7 @@ export enum EnumReportType {
OverAllSummary = 39,
SalaryControl = 40,
PaySlip = 41,
+ DateRangeWiseSalarySheet = 4101,
Envelop = 42,
SalaryReconcil = 43,
SalaryReconcilItemWise = 143,
diff --git a/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts b/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts
index d78aa1c..7e8376b 100644
--- a/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts
+++ b/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts
@@ -415,6 +415,22 @@ export class ReportViewerComponent implements OnInit {
this.topview = "decade";
this.hiddenSendMail = true;
this.apiService.selectedMenuName = 'Payslip';
+ } else if (this.reportType === '4101') {
+ // Date Range Wise Salary Sheet: a salary-sheet style matrix, one row per employee per salary month
+ // from the From month to the To month (ReportController -> PaySlip.ShowReportDateRange).
+ this.SearchFrom = EnumSearchFrom.Salary;
+ this.IsNegletWithheld = true;
+ this.hiddenFromDate = true;
+ this.hiddenToDate = true;
+ this.fromDate = GlobalfunctionExtension.getFirstDateofMonth(new Date(this.payrolltype.nextPayProcessDate));
+ this.toDate = GlobalfunctionExtension.getLastDateOfMonth(new Date(this.payrolltype.nextPayProcessDate));
+ this.PDFTitle = 'Date Range Wise Salary Sheet';
+ this.fromDateFormat = 'MMM yyyy';
+ this.toDateFormat = 'MMM yyyy';
+ this.bottomView = "year";
+ this.topview = "decade";
+ this.apiService.selectedMenuName = 'Date Range Wise Salary Sheet';
+ this.hiddenExport = true;
} else if (this.reportType === '263' || this.reportType === '709') {
// debugger;
this.SearchFrom = EnumSearchFrom.Salary;
@@ -1449,6 +1465,17 @@ export class ReportViewerComponent implements OnInit {
}
}
+ if (this.reportType === '4101') {
+ if (this.fromDate == undefined || this.toDate == undefined) {
+ this.notificationService.showWarning('Select From and To month');
+ return;
+ }
+ if (GlobalfunctionExtension.getFirstDateofMonth(this.fromDate) > GlobalfunctionExtension.getFirstDateofMonth(this.toDate)) {
+ this.notificationService.showWarning('From month can not be greater than To month');
+ return;
+ }
+ }
+
if (this.reportType === '2') {
this.employeeService.getEmpBasicInfo(this.empIds).subscribe(
(resp) => {
@@ -2434,6 +2461,12 @@ export class ReportViewerComponent implements OnInit {
this.notificationService.showError(err.error);
},
() => {
+ if (this.reportType === '4101' && this.searchEmployees != undefined) {
+ // Date Range Wise Salary Sheet searches salary over several months, so an employee whose
+ // department/designation changed in the range comes back more than once.
+ this.searchEmployees = this.searchEmployees.filter((emp, index, all) =>
+ all.findIndex(x => x.employeeID === emp.employeeID) === index);
+ }
this.loadingPanel.ShowLoadingPanel = false;
this.loadData();
this.selectAllState = "unchecked";
diff --git a/HRM.UI/ClientApp/src/app/reports/reports-routing.module.ts b/HRM.UI/ClientApp/src/app/reports/reports-routing.module.ts
index 5b884a3..9c288fb 100644
--- a/HRM.UI/ClientApp/src/app/reports/reports-routing.module.ts
+++ b/HRM.UI/ClientApp/src/app/reports/reports-routing.module.ts
@@ -40,6 +40,7 @@ export const routes: Routes = [
{ path: 'report-viewer/50', component: ReportViewerComponent, canActivate: [AuthGuard] },
{ path: 'report-viewer/39', component: ReportViewerComponent, canActivate: [AuthGuard] },
{ path: 'report-viewer/41', component: ReportViewerComponent, canActivate: [AuthGuard] },
+ { path: 'report-viewer/4101', component: ReportViewerComponent, canActivate: [AuthGuard] },
{ path: 'report-viewer/43', component: ReportViewerComponent, canActivate: [AuthGuard] },
{ path: 'report-viewer/430', component: ReportViewerComponent, canActivate: [AuthGuard] },
{ path: 'report-viewer/48', component: ReportViewerComponent, canActivate: [AuthGuard] },
diff --git a/HRM.UI/ClientApp/src/assets/resource/Menu.xml b/HRM.UI/ClientApp/src/assets/resource/Menu.xml
index 2e91bc9..5bb9130 100644
--- a/HRM.UI/ClientApp/src/assets/resource/Menu.xml
+++ b/HRM.UI/ClientApp/src/assets/resource/Menu.xml
@@ -189,6 +189,7 @@
+
diff --git a/HRM.UI/Controllers/Report/ReportController.cs b/HRM.UI/Controllers/Report/ReportController.cs
index 206483a..0945e14 100644
--- a/HRM.UI/Controllers/Report/ReportController.cs
+++ b/HRM.UI/Controllers/Report/ReportController.cs
@@ -244,6 +244,9 @@ namespace HRM.UI.Controllers.Report
bytes = new PaySlip().ShowReportNew((int)currentUser.PayrollTypeID, fromDate, sEmpIDs, isForESS);
}
break;
+ case EnumReportType.DateRangeWiseSalarySheet:
+ bytes = new PaySlip().ShowReportDateRange((int)currentUser.PayrollTypeID, fromDate, toDate, sEmpIDs, reportType);
+ break;
case EnumReportType.Envelop:
break;
case EnumReportType.SalaryReconcil: