profile reports
This commit is contained in:
parent
89f9dddd85
commit
4f7337c5b7
|
@ -3991,4 +3991,13 @@ namespace HRM.BO
|
||||||
ReadyInOneYear = 2,
|
ReadyInOneYear = 2,
|
||||||
ReadyInTwoYears = 3
|
ReadyInTwoYears = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum EnumProfileReportType : short
|
||||||
|
{
|
||||||
|
Print_CV = 1,
|
||||||
|
Employee_Service_Book = 2,
|
||||||
|
Appointment_Letter_Worker = 3,
|
||||||
|
Appointment_Letter_Staff = 4,
|
||||||
|
Appointment_Letter_Officer = 5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ using Org.BouncyCastle.Ocsp;
|
||||||
using HRM.Service;
|
using HRM.Service;
|
||||||
using HRM.BO.Configuration;
|
using HRM.BO.Configuration;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
|
||||||
namespace HRM.Report
|
namespace HRM.Report
|
||||||
{
|
{
|
||||||
|
@ -2918,12 +2919,14 @@ namespace HRM.Report
|
||||||
}
|
}
|
||||||
|
|
||||||
//Echotex Profile Reports
|
//Echotex Profile Reports
|
||||||
public byte[] GetEmployeeCV(HREmployee employee/*Employee employee*/, int payrollTypeId, string reportType)
|
public byte[] GetEmployeeCV(int empid, int payrollTypeId, string reportType)
|
||||||
{
|
{
|
||||||
ReportProcessor reportProcessor = new ReportProcessor();
|
ReportProcessor reportProcessor = new ReportProcessor();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
HREmployee employee = new HREmployeeService().Get(empid);
|
||||||
|
|
||||||
DataRow oRow = null;
|
DataRow oRow = null;
|
||||||
//_rImageManager = new RemoteImageManager();
|
//_rImageManager = new RemoteImageManager();
|
||||||
String RDLC = "HRM.Report.RDLC.EmployeeCV.rdlc";
|
String RDLC = "HRM.Report.RDLC.EmployeeCV.rdlc";
|
||||||
|
@ -3285,10 +3288,11 @@ namespace HRM.Report
|
||||||
// return leaveReocd;
|
// return leaveReocd;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public byte[] GetAsstOfficeAndAbove(HREmployee employee, int payrollTypeID, string reportType)
|
public byte[] GetAsstOfficeAndAbove(int empid, int payrollTypeID, string reportType)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Employee employee = new EmployeeService().Get(empid);
|
||||||
|
|
||||||
String RDLC = "HRM.Report.RDLC.ApLetterForAssistantOfficerToAbove.rdlc";
|
String RDLC = "HRM.Report.RDLC.ApLetterForAssistantOfficerToAbove.rdlc";
|
||||||
DataSet dSet = new DataSet();
|
DataSet dSet = new DataSet();
|
||||||
|
@ -3296,10 +3300,6 @@ namespace HRM.Report
|
||||||
dTable.TableName = "dsCompany_EmployeeAppointmentInfo";
|
dTable.TableName = "dsCompany_EmployeeAppointmentInfo";
|
||||||
dSet.Tables.Add(dTable);
|
dSet.Tables.Add(dTable);
|
||||||
|
|
||||||
List<ReportParameter> _parameters = new List<ReportParameter>();
|
|
||||||
|
|
||||||
ReportParameter parameter = new ReportParameter("CompanyName", System.Configuration.ConfigurationSettings.AppSettings["CompanyName"]);
|
|
||||||
_parameters.Add(parameter);
|
|
||||||
|
|
||||||
double total = 0;
|
double total = 0;
|
||||||
if (dSet.Tables[0].Rows.Count > 0)
|
if (dSet.Tables[0].Rows.Count > 0)
|
||||||
|
@ -3311,19 +3311,24 @@ namespace HRM.Report
|
||||||
// Convert.ToDouble(dSet.Tables[0].Rows[0]["Food"]);
|
// Convert.ToDouble(dSet.Tables[0].Rows[0]["Food"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemInformation systemInformation = new SystemInformationService().Get();
|
||||||
|
List<ReportParameter> _parameters = new List<ReportParameter>();
|
||||||
|
|
||||||
|
ReportParameter parameter = new ReportParameter("CompanyName", systemInformation.name);
|
||||||
|
_parameters.Add(parameter);
|
||||||
parameter = new ReportParameter("AmountInWord", Global.NumericFunctions.AmountInWords((decimal)total, "", " only"));
|
parameter = new ReportParameter("AmountInWord", Global.NumericFunctions.AmountInWords((decimal)total, "", " only"));
|
||||||
_parameters.Add(parameter);
|
_parameters.Add(parameter);
|
||||||
|
|
||||||
|
|
||||||
ReportProcessor reportProcessor = new ReportProcessor();
|
ReportProcessor reportProcessor = new ReportProcessor();
|
||||||
return reportProcessor.CommonReportView(null, RDLC, dSet, null, null, true, payrollTypeID, reportType);
|
return reportProcessor.CommonReportView(null, RDLC, dSet, null, _parameters, false, payrollTypeID, reportType);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw new Exception(ex.Message);
|
throw new Exception(ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private DataTable CollectDataForEnglishAppointment(HREmployee employee, int payrollTypeID)
|
private DataTable CollectDataForEnglishAppointment(Employee employee, int payrollTypeID)
|
||||||
{
|
{
|
||||||
DataRow oRow = null;
|
DataRow oRow = null;
|
||||||
PayrollDataSet.dsCompany.EmployeeAppointmentInfoDataTable dEmpInfo = new HRM.Report.PayrollDataSet.dsCompany.EmployeeAppointmentInfoDataTable();
|
PayrollDataSet.dsCompany.EmployeeAppointmentInfoDataTable dEmpInfo = new HRM.Report.PayrollDataSet.dsCompany.EmployeeAppointmentInfoDataTable();
|
||||||
|
@ -3370,32 +3375,33 @@ namespace HRM.Report
|
||||||
oRow["Designation"] = drBasic["Designation"];
|
oRow["Designation"] = drBasic["Designation"];
|
||||||
|
|
||||||
oRow["Basic"] = employee.BasicSalary;
|
oRow["Basic"] = employee.BasicSalary;
|
||||||
List<ADParameter> adParams = null;
|
List<ADParameter> adParams = new ADParameterService().Get(employee.GradeID, EnumEntitleType.Grade, EnumAllowOrDeduct.Allowance, payrollTypeID);
|
||||||
List<ADParameterEmployee> adParamEmps = null;
|
List<ADParameterEmployee> adParamEmps = null;
|
||||||
adParams = new ADParameterService().Get(employee.GradeID, EnumEntitleType.Grade, EnumAllowOrDeduct.Allowance, payrollTypeID);
|
|
||||||
|
|
||||||
|
//EmployeeGradeSalary oEmpGradeSalary = new EmployeeGradeSalaryService().Get();
|
||||||
|
EmployeeGradeSalary oEmpGradeSalary = new EmployeeGradeSalaryService().GetBasicOnDateBAT(employee.ID, DateTime.Now);
|
||||||
if (adParams != null)
|
if (adParams != null)
|
||||||
{
|
{
|
||||||
foreach (ADParameter adParam in adParams)
|
foreach (ADParameter adParam in adParams)
|
||||||
{
|
{
|
||||||
//double amount = new ADParameterService().GetGradeDefinedAmount(employee, employee.BasicSalary, employee.GrossSalary);
|
double amount = new ADParameterService().GetGradeDefinedAmount(employee, employee.BasicSalary, employee.GrossSalary, oEmpGradeSalary, adParam);
|
||||||
//switch (adParam.AllowanceDeduction.Code.Trim())
|
switch (adParam.AllowanceDeduction.Code.Trim())
|
||||||
//{
|
{
|
||||||
// case "008":
|
case "008":
|
||||||
// oRow["HouseRent"] = amount;
|
oRow["HouseRent"] = amount;
|
||||||
// break;
|
break;
|
||||||
// case "010":
|
case "010":
|
||||||
// oRow["Conveyence"] = amount;
|
oRow["Conveyence"] = amount;
|
||||||
// break;
|
break;
|
||||||
// case "011":
|
case "011":
|
||||||
// oRow["Medical"] = amount;
|
oRow["Medical"] = amount;
|
||||||
// break;
|
break;
|
||||||
// case "006":
|
case "006":
|
||||||
// oRow["Food"] = amount;
|
oRow["Food"] = amount;
|
||||||
// break;
|
break;
|
||||||
// default:
|
default:
|
||||||
// break;
|
break;
|
||||||
//}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
<None Remove="RDLC\AllDigitalServiceBook.rdlc" />
|
<None Remove="RDLC\AllDigitalServiceBook.rdlc" />
|
||||||
<None Remove="RDLC\AllEmpTaxInfo.rdlc" />
|
<None Remove="RDLC\AllEmpTaxInfo.rdlc" />
|
||||||
<None Remove="RDLC\AllMedicalClaim.rdlc" />
|
<None Remove="RDLC\AllMedicalClaim.rdlc" />
|
||||||
|
<None Remove="RDLC\ApLetterForAssistantOfficerToAbove.rdlc" />
|
||||||
<None Remove="RDLC\ApointmentLetterForStuff.rdlc" />
|
<None Remove="RDLC\ApointmentLetterForStuff.rdlc" />
|
||||||
<None Remove="RDLC\ApointmentLetterForWorker.rdlc" />
|
<None Remove="RDLC\ApointmentLetterForWorker.rdlc" />
|
||||||
<None Remove="RDLC\ArrearBankAdvice.rdlc" />
|
<None Remove="RDLC\ArrearBankAdvice.rdlc" />
|
||||||
|
@ -321,6 +322,7 @@
|
||||||
<EmbeddedResource Include="RDLC\AllDigitalServiceBook.rdlc" />
|
<EmbeddedResource Include="RDLC\AllDigitalServiceBook.rdlc" />
|
||||||
<EmbeddedResource Include="RDLC\AllEmpTaxInfo.rdlc" />
|
<EmbeddedResource Include="RDLC\AllEmpTaxInfo.rdlc" />
|
||||||
<EmbeddedResource Include="RDLC\AllMedicalClaim.rdlc" />
|
<EmbeddedResource Include="RDLC\AllMedicalClaim.rdlc" />
|
||||||
|
<EmbeddedResource Include="RDLC\ApLetterForAssistantOfficerToAbove.rdlc" />
|
||||||
<EmbeddedResource Include="RDLC\ApointmentLetterForStuff.rdlc" />
|
<EmbeddedResource Include="RDLC\ApointmentLetterForStuff.rdlc" />
|
||||||
<EmbeddedResource Include="RDLC\ApointmentLetterForWorker.rdlc" />
|
<EmbeddedResource Include="RDLC\ApointmentLetterForWorker.rdlc" />
|
||||||
<EmbeddedResource Include="RDLC\ArrearBankAdvice.rdlc" />
|
<EmbeddedResource Include="RDLC\ArrearBankAdvice.rdlc" />
|
||||||
|
|
|
@ -1,5 +1,155 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||||
|
<AutoRefresh>0</AutoRefresh>
|
||||||
|
<DataSources>
|
||||||
|
<DataSource Name="dsCompany">
|
||||||
|
<ConnectionProperties>
|
||||||
|
<DataProvider>System.Data.DataSet</DataProvider>
|
||||||
|
<ConnectString>/* Local Connection */</ConnectString>
|
||||||
|
</ConnectionProperties>
|
||||||
|
<rd:DataSourceID>c0c9003a-fe5d-4a30-bb82-8e07d99de6bd</rd:DataSourceID>
|
||||||
|
</DataSource>
|
||||||
|
</DataSources>
|
||||||
|
<DataSets>
|
||||||
|
<DataSet Name="dsCompany_EmployeeAppointmentInfo">
|
||||||
|
<Query>
|
||||||
|
<DataSourceName>dsCompany</DataSourceName>
|
||||||
|
<CommandText>/* Local Query */</CommandText>
|
||||||
|
</Query>
|
||||||
|
<Fields>
|
||||||
|
<Field Name="EmpName">
|
||||||
|
<DataField>EmpName</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="EmpCode">
|
||||||
|
<DataField>EmpCode</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="FatherName">
|
||||||
|
<DataField>FatherName</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="MotherName">
|
||||||
|
<DataField>MotherName</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="HusbandName">
|
||||||
|
<DataField>HusbandName</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="JoiningDate">
|
||||||
|
<DataField>JoiningDate</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="BirthDate">
|
||||||
|
<DataField>BirthDate</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="BloodGroup">
|
||||||
|
<DataField>BloodGroup</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="VillagePA">
|
||||||
|
<DataField>VillagePA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="PostOfficePA">
|
||||||
|
<DataField>PostOfficePA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="ThanaPA">
|
||||||
|
<DataField>ThanaPA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="DistrictPA">
|
||||||
|
<DataField>DistrictPA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="VillageTA">
|
||||||
|
<DataField>VillageTA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="PostOfficeTA">
|
||||||
|
<DataField>PostOfficeTA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="ThanaTA">
|
||||||
|
<DataField>ThanaTA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="DistrictTA">
|
||||||
|
<DataField>DistrictTA</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Department">
|
||||||
|
<DataField>Department</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Section">
|
||||||
|
<DataField>Section</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Designation">
|
||||||
|
<DataField>Designation</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Basic">
|
||||||
|
<DataField>Basic</DataField>
|
||||||
|
<rd:TypeName>System.Double</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="HouseRent">
|
||||||
|
<DataField>HouseRent</DataField>
|
||||||
|
<rd:TypeName>System.Double</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Conveyence">
|
||||||
|
<DataField>Conveyence</DataField>
|
||||||
|
<rd:TypeName>System.Double</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Medical">
|
||||||
|
<DataField>Medical</DataField>
|
||||||
|
<rd:TypeName>System.Double</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Food">
|
||||||
|
<DataField>Food</DataField>
|
||||||
|
<rd:TypeName>System.Double</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="ProbationEndDate">
|
||||||
|
<DataField>ProbationEndDate</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Floor">
|
||||||
|
<DataField>Floor</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Nationality">
|
||||||
|
<DataField>Nationality</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Gender">
|
||||||
|
<DataField>Gender</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Religion">
|
||||||
|
<DataField>Religion</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="MartialStatus">
|
||||||
|
<DataField>MartialStatus</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
</Fields>
|
||||||
|
<rd:DataSetInfo>
|
||||||
|
<rd:DataSetName>dsCompany</rd:DataSetName>
|
||||||
|
<rd:SchemaPath>D:\LOCAL\EchoTextNew\Echo_Desktop.root\Echo_Desktop\Payroll.Report\PayrollDataSet\dsCompany.xsd</rd:SchemaPath>
|
||||||
|
<rd:TableName>EmployeeAppointmentInfo</rd:TableName>
|
||||||
|
<rd:TableAdapterFillMethod />
|
||||||
|
<rd:TableAdapterGetDataMethod />
|
||||||
|
<rd:TableAdapterName />
|
||||||
|
</rd:DataSetInfo>
|
||||||
|
</DataSet>
|
||||||
|
</DataSets>
|
||||||
|
<ReportSections>
|
||||||
|
<ReportSection>
|
||||||
<Body>
|
<Body>
|
||||||
<ReportItems>
|
<ReportItems>
|
||||||
<Textbox Name="textbox1">
|
<Textbox Name="textbox1">
|
||||||
|
@ -2824,164 +2974,40 @@
|
||||||
<BottomMargin>0.5in</BottomMargin>
|
<BottomMargin>0.5in</BottomMargin>
|
||||||
<Style />
|
<Style />
|
||||||
</Page>
|
</Page>
|
||||||
<AutoRefresh>0</AutoRefresh>
|
</ReportSection>
|
||||||
<DataSources>
|
</ReportSections>
|
||||||
<DataSource Name="dsCompany">
|
|
||||||
<ConnectionProperties>
|
|
||||||
<DataProvider>System.Data.DataSet</DataProvider>
|
|
||||||
<ConnectString>/* Local Connection */</ConnectString>
|
|
||||||
</ConnectionProperties>
|
|
||||||
<rd:DataSourceID>c0c9003a-fe5d-4a30-bb82-8e07d99de6bd</rd:DataSourceID>
|
|
||||||
</DataSource>
|
|
||||||
</DataSources>
|
|
||||||
<DataSets>
|
|
||||||
<DataSet Name="dsCompany_EmployeeAppointmentInfo">
|
|
||||||
<Query>
|
|
||||||
<DataSourceName>dsCompany</DataSourceName>
|
|
||||||
<CommandText>/* Local Query */</CommandText>
|
|
||||||
</Query>
|
|
||||||
<Fields>
|
|
||||||
<Field Name="EmpName">
|
|
||||||
<DataField>EmpName</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="EmpCode">
|
|
||||||
<DataField>EmpCode</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="FatherName">
|
|
||||||
<DataField>FatherName</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="MotherName">
|
|
||||||
<DataField>MotherName</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="HusbandName">
|
|
||||||
<DataField>HusbandName</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="JoiningDate">
|
|
||||||
<DataField>JoiningDate</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="BirthDate">
|
|
||||||
<DataField>BirthDate</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="BloodGroup">
|
|
||||||
<DataField>BloodGroup</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="VillagePA">
|
|
||||||
<DataField>VillagePA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="PostOfficePA">
|
|
||||||
<DataField>PostOfficePA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="ThanaPA">
|
|
||||||
<DataField>ThanaPA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="DistrictPA">
|
|
||||||
<DataField>DistrictPA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="VillageTA">
|
|
||||||
<DataField>VillageTA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="PostOfficeTA">
|
|
||||||
<DataField>PostOfficeTA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="ThanaTA">
|
|
||||||
<DataField>ThanaTA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="DistrictTA">
|
|
||||||
<DataField>DistrictTA</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Department">
|
|
||||||
<DataField>Department</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Section">
|
|
||||||
<DataField>Section</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Designation">
|
|
||||||
<DataField>Designation</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Basic">
|
|
||||||
<DataField>Basic</DataField>
|
|
||||||
<rd:TypeName>System.Double</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="HouseRent">
|
|
||||||
<DataField>HouseRent</DataField>
|
|
||||||
<rd:TypeName>System.Double</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Conveyence">
|
|
||||||
<DataField>Conveyence</DataField>
|
|
||||||
<rd:TypeName>System.Double</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Medical">
|
|
||||||
<DataField>Medical</DataField>
|
|
||||||
<rd:TypeName>System.Double</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Food">
|
|
||||||
<DataField>Food</DataField>
|
|
||||||
<rd:TypeName>System.Double</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="ProbationEndDate">
|
|
||||||
<DataField>ProbationEndDate</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Floor">
|
|
||||||
<DataField>Floor</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Nationality">
|
|
||||||
<DataField>Nationality</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Gender">
|
|
||||||
<DataField>Gender</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Religion">
|
|
||||||
<DataField>Religion</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="MartialStatus">
|
|
||||||
<DataField>MartialStatus</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
</Fields>
|
|
||||||
<rd:DataSetInfo>
|
|
||||||
<rd:DataSetName>dsCompany</rd:DataSetName>
|
|
||||||
<rd:SchemaPath>D:\LOCAL\EchoTextNew\Echo_Desktop.root\Echo_Desktop\Payroll.Report\PayrollDataSet\dsCompany.xsd</rd:SchemaPath>
|
|
||||||
<rd:TableName>EmployeeAppointmentInfo</rd:TableName>
|
|
||||||
<rd:TableAdapterFillMethod />
|
|
||||||
<rd:TableAdapterGetDataMethod />
|
|
||||||
<rd:TableAdapterName />
|
|
||||||
</rd:DataSetInfo>
|
|
||||||
</DataSet>
|
|
||||||
</DataSets>
|
|
||||||
<ReportParameters>
|
<ReportParameters>
|
||||||
<ReportParameter Name="CompanyName">
|
<ReportParameter Name="CompanyName">
|
||||||
<DataType>String</DataType>
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
<ReportParameter Name="AmountInWord">
|
<ReportParameter Name="AmountInWord">
|
||||||
<DataType>String</DataType>
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
|
<ReportParametersLayout>
|
||||||
|
<GridLayoutDefinition>
|
||||||
|
<NumberOfColumns>2</NumberOfColumns>
|
||||||
|
<NumberOfRows>1</NumberOfRows>
|
||||||
|
<CellDefinitions>
|
||||||
|
<CellDefinition>
|
||||||
|
<ColumnIndex>0</ColumnIndex>
|
||||||
|
<RowIndex>0</RowIndex>
|
||||||
|
<ParameterName>CompanyName</ParameterName>
|
||||||
|
</CellDefinition>
|
||||||
|
<CellDefinition>
|
||||||
|
<ColumnIndex>1</ColumnIndex>
|
||||||
|
<RowIndex>0</RowIndex>
|
||||||
|
<ParameterName>AmountInWord</ParameterName>
|
||||||
|
</CellDefinition>
|
||||||
|
</CellDefinitions>
|
||||||
|
</GridLayoutDefinition>
|
||||||
|
</ReportParametersLayout>
|
||||||
<Language>en-US</Language>
|
<Language>en-US</Language>
|
||||||
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
|
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
|
||||||
<rd:ReportUnitType>Inch</rd:ReportUnitType>
|
<rd:ReportUnitType>Inch</rd:ReportUnitType>
|
||||||
|
|
|
@ -3911,21 +3911,25 @@
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
<ReportParameter Name="CompanyInfo">
|
<ReportParameter Name="CompanyInfo">
|
||||||
<DataType>String</DataType>
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>Report_Parameter_1</Prompt>
|
<Prompt>Report_Parameter_1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
<ReportParameter Name="Logo">
|
<ReportParameter Name="Logo">
|
||||||
<DataType>String</DataType>
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>Report_Parameter_2</Prompt>
|
<Prompt>Report_Parameter_2</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
<ReportParameter Name="Address">
|
<ReportParameter Name="Address">
|
||||||
<DataType>String</DataType>
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>Report_Parameter_3</Prompt>
|
<Prompt>Report_Parameter_3</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
<ReportParameter Name="Phone">
|
<ReportParameter Name="Phone">
|
||||||
<DataType>String</DataType>
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>Report_Parameter_4</Prompt>
|
<Prompt>Report_Parameter_4</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
|
|
@ -838,7 +838,7 @@ namespace HRM.Report
|
||||||
reportParameters.Add(rParam);
|
reportParameters.Add(rParam);
|
||||||
|
|
||||||
// rParam = new ReportParameter("CompanyInfo", oPT.Description.ToString());
|
// rParam = new ReportParameter("CompanyInfo", oPT.Description.ToString());
|
||||||
rParam = new ReportParameter("CompanyInfo", payrollType != null ? payrollType.CompanyName : string.Empty);
|
rParam = new ReportParameter("CompanyInfo", payrollType != null ? (payrollType.CompanyName != null && payrollType.CompanyName.Trim() != "" ? payrollType.CompanyName : systemInformation?.name) : string.Empty);
|
||||||
reportParameters.Add(rParam);
|
reportParameters.Add(rParam);
|
||||||
|
|
||||||
rParam = new ReportParameter("SearchCriteria", "");
|
rParam = new ReportParameter("SearchCriteria", "");
|
||||||
|
|
|
@ -130,4 +130,7 @@ export class ReportServices {
|
||||||
getAttendanceReport(param: any, reportType: string) {
|
getAttendanceReport(param: any, reportType: string) {
|
||||||
return this.apiService.httpPost<any>('/Report/getAttendanceReport/' + reportType, param);
|
return this.apiService.httpPost<any>('/Report/getAttendanceReport/' + reportType, param);
|
||||||
}
|
}
|
||||||
|
getProfileReportData(param: any): Observable<HttpEvent<any>> {
|
||||||
|
return this.apiService.httpPost<any>('/Report/getProfileReportData/', param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
<app-loading-panel> </app-loading-panel>
|
||||||
|
<div class="card" style="padding:10px;">
|
||||||
|
<div class="p-grid" style="justify-content: center">
|
||||||
|
<div class="p-col-12">
|
||||||
|
<fieldset style="border-radius: 5px;">
|
||||||
|
<div class="p-grid" style="margin-top: auto; margin-bottom: auto;">
|
||||||
|
<div class="p-col-4">
|
||||||
|
<app-employee-picker
|
||||||
|
[setSelectedEmp]="selectedEmployee"
|
||||||
|
(ItemSelected)="GetSelectedEmployee($event)"></app-employee-picker>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-1">
|
||||||
|
<label>Authorized Person</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-3">
|
||||||
|
<kendo-dropdownlist [(ngModel)]="authorizedPerson" [data]="authorizedPersons" [textField]="'name'"
|
||||||
|
[valueField]="'id'" [defaultItem]="{ name: 'Select Authorized Person..', id: null }"
|
||||||
|
style="width:100%;">
|
||||||
|
</kendo-dropdownlist>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-1">
|
||||||
|
<label>Report</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-3">
|
||||||
|
<kendo-dropdownlist [(ngModel)]="selectedreportType" [data]="reportTypes" [textField]="'text'"
|
||||||
|
[valueField]="'value'" [defaultItem]="{ text: 'Select Report Type..', value: null }"
|
||||||
|
style="width:100%;">
|
||||||
|
</kendo-dropdownlist>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="p-col-3" align="middle">
|
||||||
|
<label>Salary Allocation Date</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-3">
|
||||||
|
<kendo-datepicker [(ngModel)]="salaryAllocationDate" [format]="salaryAllocationDateFormat"
|
||||||
|
[bottomView]="bottomView" [topView]="topview" style="width:100%"></kendo-datepicker>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-3" align="middle" *ngIf="showLocation">
|
||||||
|
<label>Location</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-3" *ngIf="showLocation">
|
||||||
|
<kendo-dropdownlist [(ngModel)]="selectedLocation" [data]="locations"
|
||||||
|
[defaultItem]="{ name: 'Select Location..', id: 0 }" [textField]="'name'" [valueField]="'id'"
|
||||||
|
(valueChange)="locationChange($event)"
|
||||||
|
style="width:100%;">
|
||||||
|
</kendo-dropdownlist>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<div class="p-col-12" align="right">
|
||||||
|
<button kendoButton icon="file-pdf" [primary]="true" (click)="preview('PDF')">Preview</button>
|
||||||
|
<button kendoButton icon="file-excel" [primary]="true" style="margin-left:5px;"
|
||||||
|
(click)="preview('EXCEL')">Export</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card" *ngIf="showPopUp" class="blur-background">
|
||||||
|
<kendo-window [height]="600" title="{{PDFTitle}}" *ngIf="showPopUp" (close)="closeForm()"
|
||||||
|
[style]="{'min-width': '70%','max-width': '100%', 'max-height': '100%'}">
|
||||||
|
<app-loading-panel> </app-loading-panel>
|
||||||
|
<div class='embed-responsive'>
|
||||||
|
<iframe class="pdf-viewer" id="pdf-viewer-report" type='application/pdf' [zoom]="zoomLevel"></iframe>
|
||||||
|
</div>
|
||||||
|
</kendo-window>
|
||||||
|
</div>
|
|
@ -0,0 +1,194 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
import { DynamicPicker, EnumDynamicpickerType } from '../../picker/dynamic-picker/Dynamic-Picker';
|
||||||
|
import {
|
||||||
|
EnumBloodGroup,
|
||||||
|
EnumExtension,
|
||||||
|
EnumGender,
|
||||||
|
EnumMaritalStatus,
|
||||||
|
EnumSearchFrom,
|
||||||
|
EnumSearchObjDataType,
|
||||||
|
EnumSearchParameter,
|
||||||
|
EnumSQLOperator,
|
||||||
|
EnumStatus
|
||||||
|
} from '../../_models/enums';
|
||||||
|
import { SearchEmployee, SearchManager } from '../../_models/Employee/searchEmployee';
|
||||||
|
import { EmployeeServices } from '../../_services/employee/employee.service';
|
||||||
|
import { EmployeeBasicInfo } from '../../_models/report/employee-basic-info';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { EmployeeDetailInfo } from '../../_models/report/employeeDetailInfo';
|
||||||
|
import { loadingPanelService } from '../../hrm-loding panel/loding.panel.service';
|
||||||
|
import { ColumnDefinition, Columns, ReportViewerListColumn } from '../report-viewer/repor-viewer-object';
|
||||||
|
import { AttendanceServices } from '../../_services/attendance/attendance.service';
|
||||||
|
import { DailyAttnByStatusReport } from '../../_models/Attendance/dailyAttnByStatusReport';
|
||||||
|
import { HRMNotificationService } from '../../app.notification.service';
|
||||||
|
import { DataStateChangeEvent, GridDataResult, PageChangeEvent, SelectableSettings, SelectableMode } from '@progress/kendo-angular-grid';
|
||||||
|
import { ExcelExportData } from '@progress/kendo-angular-excel-export';
|
||||||
|
import { DataResult, GroupDescriptor, process, State } from '@progress/kendo-data-query';
|
||||||
|
import { ReportServices } from '../../_services/reports/report.service';
|
||||||
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
import { BasicService } from '../../_services/Basic/basic.service';
|
||||||
|
import { LoanService } from 'src/app/_services/payroll/loan.service';
|
||||||
|
import { ApiService } from '../../app.api.service';
|
||||||
|
import { TaxParameter } from '../../_models/Payroll/Tax/taxParameter';
|
||||||
|
import { TaxService } from '../../_services/payroll/tax.service';
|
||||||
|
import { LeaveService } from '../../_services/leave/leave.service';
|
||||||
|
import { PayrollType } from '../../_models/Authentication/payrollType';
|
||||||
|
import { User } from '../../_models/Authentication/user';
|
||||||
|
import { AuthService } from '../../_services/auth/auth.service';
|
||||||
|
import { saveAs } from 'file-saver';
|
||||||
|
import { SalaryService } from '../../_services/payroll/salary.service';
|
||||||
|
import { LoanIssue } from 'src/app/_models/Payroll/Loan/loanIssue';
|
||||||
|
import { Bank } from 'src/app/_models/Basic/bank';
|
||||||
|
import { formatDate } from '@progress/kendo-angular-intl';
|
||||||
|
import { encodeBase64 } from '@progress/kendo-file-saver';
|
||||||
|
import { AuthorizedPerson } from 'src/app/adhoc-feature/authorized-persons/authorizedPerson';
|
||||||
|
import { Employee } from 'src/app/_models/Employee/employee';
|
||||||
|
import { HrEmployee } from 'src/app/_models/HREmployee/hrEmployee';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-employee-profile-reports',
|
||||||
|
templateUrl: './employee-profile-reports.component.html',
|
||||||
|
styleUrls: ['./employee-profile-reports.component.scss']
|
||||||
|
})
|
||||||
|
export class EmployeeProfileReportsComponent implements OnInit {
|
||||||
|
|
||||||
|
public showPopUp: boolean = false;
|
||||||
|
public src: any;
|
||||||
|
public PDFTitle = '';
|
||||||
|
|
||||||
|
public selectedreportType: EnumProfileReportType;
|
||||||
|
public reportTypes = Object.keys(EnumProfileReportType)
|
||||||
|
.filter(key => !isNaN(Number(EnumProfileReportType[key])))
|
||||||
|
.map(key => ({
|
||||||
|
text: key.replace(/_/g, ' '),
|
||||||
|
value: EnumProfileReportType[key]
|
||||||
|
}));
|
||||||
|
public authorizedPersons: AuthorizedPerson[] = [];
|
||||||
|
public authorizedPerson: AuthorizedPerson;
|
||||||
|
|
||||||
|
public selectedEmployee: SearchEmployee;
|
||||||
|
public employee: HrEmployee;
|
||||||
|
|
||||||
|
constructor(public employeeService: EmployeeServices,
|
||||||
|
public attendanceService: AttendanceServices,
|
||||||
|
public reportService: ReportServices,
|
||||||
|
private sanitizer: DomSanitizer,
|
||||||
|
public basicService: BasicService,
|
||||||
|
public loanService: LoanService,
|
||||||
|
public taxService: TaxService,
|
||||||
|
public salaryService: SalaryService,
|
||||||
|
public leaveYearService: LeaveService,
|
||||||
|
public router: Router, public loadingPanel: loadingPanelService,
|
||||||
|
public notificationService: HRMNotificationService,
|
||||||
|
public apiService: ApiService, public authService: AuthService) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.loadAuthorizedPerson();
|
||||||
|
}
|
||||||
|
|
||||||
|
closeForm(): void {
|
||||||
|
this.showPopUp = false;
|
||||||
|
this.loadingPanel.ShowLoadingPanel = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
preview(reportType: string) {
|
||||||
|
debugger;
|
||||||
|
const data = {
|
||||||
|
reportID: this.selectedreportType['value'],
|
||||||
|
personID: this.authorizedPerson.id,
|
||||||
|
employeeID: this.selectedEmployee.employeeID,
|
||||||
|
reportType: reportType
|
||||||
|
};
|
||||||
|
|
||||||
|
this.loadingPanel.ShowLoadingPanel = true;
|
||||||
|
if (reportType === 'PDF')
|
||||||
|
this.showPopUp = true;
|
||||||
|
this.reportService.getProfileReportData(data).subscribe(
|
||||||
|
(resp: any) => {
|
||||||
|
if (reportType === 'PDF') {
|
||||||
|
|
||||||
|
this.src = URL.createObjectURL(this.b64toBlob(resp, 'application/pdf', 1024));
|
||||||
|
var element = <HTMLIFrameElement>(document.getElementById("pdf-viewer-report"));
|
||||||
|
element.src = this.src;
|
||||||
|
} else if (reportType === 'EXCEL') {
|
||||||
|
this.downloadFile(resp);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
this.closeForm();
|
||||||
|
console.log(err);
|
||||||
|
this.notificationService.showError(err.error);
|
||||||
|
this.loadingPanel.ShowLoadingPanel = false;
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
|
||||||
|
this.loadingPanel.ShowLoadingPanel = false;
|
||||||
|
// this.loadGrid();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
downloadFile(blobContent) {
|
||||||
|
let blob = new Blob([this.b64toBlob(blobContent, 'application/data:application/vnd.ms-excel', 1024)], {});
|
||||||
|
saveAs(blob, this.PDFTitle + '.xls');
|
||||||
|
}
|
||||||
|
b64toBlob(b64Data, contentType, sliceSize) {
|
||||||
|
const byteCharacters = atob(b64Data);
|
||||||
|
const byteArrays = [];
|
||||||
|
|
||||||
|
for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
|
||||||
|
const slice = byteCharacters.slice(offset, offset + sliceSize);
|
||||||
|
|
||||||
|
const byteNumbers = new Array(slice.length);
|
||||||
|
for (let i = 0; i < slice.length; i++) {
|
||||||
|
byteNumbers[i] = slice.charCodeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
const byteArray = new Uint8Array(byteNumbers);
|
||||||
|
byteArrays.push(byteArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
const blob = new Blob(byteArrays, { type: contentType });
|
||||||
|
return blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
public loadAuthorizedPerson() {
|
||||||
|
this.employeeService.getAuthorizedPerson().subscribe(
|
||||||
|
(resp) => {
|
||||||
|
this.authorizedPersons = resp as AuthorizedPerson[];
|
||||||
|
},
|
||||||
|
(err: any) => {
|
||||||
|
this.notificationService.showError(err.error);
|
||||||
|
this.loadingPanel.ShowLoadingPanel = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public GetSelectedEmployee(childData: any) {
|
||||||
|
if (childData === undefined) {
|
||||||
|
this.employee = new HrEmployee();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.selectedEmployee = childData;
|
||||||
|
// this.employeeService.getHREmployeeID(this.selectedEmployee.employeeID).subscribe(
|
||||||
|
// (resp: any) => {
|
||||||
|
// this.employee = resp;
|
||||||
|
// },
|
||||||
|
// (err: any) => {
|
||||||
|
// this.notificationService.showError(err.error);
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum EnumProfileReportType {
|
||||||
|
Print_CV = 1,
|
||||||
|
// Employee_Service_Book = 2,
|
||||||
|
Appointment_Letter_Worker = 3,
|
||||||
|
Appointment_Letter_Staff = 4,
|
||||||
|
Appointment_Letter_Officer = 5
|
||||||
|
}
|
|
@ -30,6 +30,7 @@ import { PfLedgerComponent } from './pf-ledger/pf-ledger.component';
|
||||||
import { CcWiseBonusSummaryComponent } from './cc-wise-bonus-summary/cc-wise-bonus-summary.component';
|
import { CcWiseBonusSummaryComponent } from './cc-wise-bonus-summary/cc-wise-bonus-summary.component';
|
||||||
import { CcwiseSalarySummaryComponent } from './ccwise-salary-summary/ccwise-salary-summary.component';
|
import { CcwiseSalarySummaryComponent } from './ccwise-salary-summary/ccwise-salary-summary.component';
|
||||||
import { CcwiseNewPfMemberWithAmountComponent } from './ccwise-new-pf-member-with-amount/ccwise-new-pf-member-with-amount.component';
|
import { CcwiseNewPfMemberWithAmountComponent } from './ccwise-new-pf-member-with-amount/ccwise-new-pf-member-with-amount.component';
|
||||||
|
import { EmployeeProfileReportsComponent } from './employee-profile-reports/employee-profile-reports.component';
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
|
@ -160,6 +161,7 @@ const routes: Routes = [
|
||||||
{ path: 'report-viewer/721', component: ReportViewerComponent, canActivate: [AuthGuard] },
|
{ path: 'report-viewer/721', component: ReportViewerComponent, canActivate: [AuthGuard] },
|
||||||
{ path: 'report-viewer/722', component: ReportViewerComponent, canActivate: [AuthGuard] },
|
{ path: 'report-viewer/722', component: ReportViewerComponent, canActivate: [AuthGuard] },
|
||||||
{ path: 'report-viewer/723', component: ReportViewerComponent, canActivate: [AuthGuard] },
|
{ path: 'report-viewer/723', component: ReportViewerComponent, canActivate: [AuthGuard] },
|
||||||
|
{ path: 'report-viewer/profile-reports', component: EmployeeProfileReportsComponent, canActivate: [AuthGuard] },
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ import { PfLedgerComponent } from './pf-ledger/pf-ledger.component';
|
||||||
import { CcWiseBonusSummaryComponent } from './cc-wise-bonus-summary/cc-wise-bonus-summary.component';
|
import { CcWiseBonusSummaryComponent } from './cc-wise-bonus-summary/cc-wise-bonus-summary.component';
|
||||||
import { CcwiseSalarySummaryComponent } from './ccwise-salary-summary/ccwise-salary-summary.component';
|
import { CcwiseSalarySummaryComponent } from './ccwise-salary-summary/ccwise-salary-summary.component';
|
||||||
import { CcwiseNewPfMemberWithAmountComponent } from './ccwise-new-pf-member-with-amount/ccwise-new-pf-member-with-amount.component';
|
import { CcwiseNewPfMemberWithAmountComponent } from './ccwise-new-pf-member-with-amount/ccwise-new-pf-member-with-amount.component';
|
||||||
|
import { EmployeeProfileReportsComponent } from './employee-profile-reports/employee-profile-reports.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -74,7 +75,8 @@ import { CcwiseNewPfMemberWithAmountComponent } from './ccwise-new-pf-member-wit
|
||||||
PfLedgerComponent,
|
PfLedgerComponent,
|
||||||
CcWiseBonusSummaryComponent,
|
CcWiseBonusSummaryComponent,
|
||||||
CcwiseSalarySummaryComponent,
|
CcwiseSalarySummaryComponent,
|
||||||
CcwiseNewPfMemberWithAmountComponent
|
CcwiseNewPfMemberWithAmountComponent,
|
||||||
|
EmployeeProfileReportsComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
|
|
@ -1695,6 +1695,54 @@ namespace HRM.UI.Controllers.Report
|
||||||
return StatusCode(StatusCodes.Status500InternalServerError, e.Message);
|
return StatusCode(StatusCodes.Status500InternalServerError, e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Ok(bytes);
|
||||||
|
}
|
||||||
|
[HttpPost("getProfileReportData")]
|
||||||
|
public ActionResult getProfileReportData(dynamic data)
|
||||||
|
{
|
||||||
|
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
|
||||||
|
var items = Newtonsoft.Json.JsonConvert.DeserializeObject(Convert.ToString(data));
|
||||||
|
EnumProfileReportType reportid = (EnumProfileReportType)items["reportID"].ToObject<int>();
|
||||||
|
int personID = 0;
|
||||||
|
int employeeID = 0;
|
||||||
|
|
||||||
|
if (items["personID"] != null)
|
||||||
|
personID = (int)items["personID"].ToObject<int>();
|
||||||
|
if (items["employeeID"] != null)
|
||||||
|
employeeID = (int)items["employeeID"].ToObject<int>();
|
||||||
|
|
||||||
|
string reportType = (string)items["reportType"].ToObject<string>();
|
||||||
|
|
||||||
|
int payrollTypeId = currentUser.PayrollTypeID.GetValueOrDefault();
|
||||||
|
byte[] bytes = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (reportid)
|
||||||
|
{
|
||||||
|
case EnumProfileReportType.Print_CV:
|
||||||
|
bytes = new rptEmployee().GetEmployeeCV(employeeID, payrollTypeId, reportType);
|
||||||
|
break;
|
||||||
|
case EnumProfileReportType.Employee_Service_Book:
|
||||||
|
break;
|
||||||
|
case EnumProfileReportType.Appointment_Letter_Officer:
|
||||||
|
bytes = new rptEmployee().GetAsstOfficeAndAbove(employeeID, payrollTypeId, reportType);
|
||||||
|
break;
|
||||||
|
case EnumProfileReportType.Appointment_Letter_Worker:
|
||||||
|
break;
|
||||||
|
case EnumProfileReportType.Appointment_Letter_Staff:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
return Ok(bytes);
|
return Ok(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user