LFA BANK Advice
This commit is contained in:
parent
c57a15e87d
commit
fa8c19b209
|
|
@ -2439,7 +2439,8 @@ namespace HRM.BO
|
|||
ITReport177Yearly = 1005,
|
||||
TAXReconciliation = 1006,
|
||||
BasePay = 1008,
|
||||
ITReport177Quaterly = 1010
|
||||
ITReport177Quaterly = 1010,
|
||||
LFABankAdvice = 1201
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,6 +181,10 @@ namespace HRM.BO
|
|||
LFAApproverBatch GetApproverBatch(int wfMovementTranID, int? employeeID);
|
||||
LFAApprovalResult ApproveFromApprover(LFAApproverActionRequest request, int? employeeID, int userID);
|
||||
LFAApprovalResult RevertFromApprover(LFAApproverActionRequest request, int? employeeID);
|
||||
|
||||
// LFA Bank Advice (report viewer, EnumReportType.LFABankAdvice)
|
||||
List<LFAPaymentBatch> GetBankAdviceBatches(int payrollTypeID);
|
||||
System.Data.DataSet GetBankAdvice(int lfaPaymentID, string sEmpIDs, int bankID, int payrollTypeID);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -281,6 +281,38 @@ namespace HRM.DA
|
|||
payrollTypeID, fromDate, toDate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LFA Bank Advice: the employees of one batch with an amount to pay, with the bank account kept on the
|
||||
/// detail row when the batch was processed. empIDs = joined ints made by the service (empty = whole batch);
|
||||
/// bankID 0 = every bank.
|
||||
/// </summary>
|
||||
internal static DataSet GetBankAdvice(TransactionContext tc, int lfaPaymentID, string empIDs, int bankID, int payrollTypeID)
|
||||
{
|
||||
string sql = SQLParser.MakeSQL(
|
||||
@"SELECT e.EMPLOYEENO, e.NAME, e.EMAILADDRESS, ds.NAME AS DesignationName, d.DESCRIPTION AS DepartmentName,
|
||||
ISNULL(cc.DESCRIPTION, '') AS CostCenter, dt.AccountNo, ISNULL(bk.NAME, '') AS BankName,
|
||||
ISNULL(br.NAME, '') AS BranchName, ISNULL(br.ROUTINGNO, '') AS RoutingNo, dt.Amount,
|
||||
p.BatchNumber, p.PaymentDate, p.LFAYear
|
||||
FROM LFAPayment p
|
||||
INNER JOIN LFAPaymentDetail dt ON dt.LFAPaymentID = p.LFAPaymentID
|
||||
INNER JOIN EMPLOYEE e ON e.EMPLOYEEID = dt.EmployeeID
|
||||
LEFT JOIN DESIGNATION ds ON ds.DESIGNATIONID = dt.DesignationID
|
||||
LEFT JOIN DEPARTMENT d ON d.DEPARTMENTID = dt.DepartmentID
|
||||
LEFT JOIN CRG cc ON cc.CRGID = dt.CostCenterID
|
||||
LEFT JOIN BRANCHES br ON br.BRANCHID = dt.BranchID
|
||||
LEFT JOIN BANKS bk ON bk.BANKID = br.BANKID
|
||||
WHERE p.LFAPaymentID=%n AND p.PayrollTypeID=%n AND dt.Amount > 0",
|
||||
lfaPaymentID, payrollTypeID);
|
||||
|
||||
if (!string.IsNullOrEmpty(empIDs))
|
||||
sql += SQLParser.MakeSQL(" AND dt.EmployeeID IN (%q)", empIDs);
|
||||
if (bankID > 0)
|
||||
sql += SQLParser.MakeSQL(" AND br.BANKID=%n", bankID);
|
||||
sql += " ORDER BY bk.NAME, e.EMPLOYEENO";
|
||||
|
||||
return tc.ExecuteDataSet(sql);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1160,6 +1160,65 @@ namespace HRM.DA
|
|||
return result;
|
||||
}
|
||||
|
||||
#region LFA Bank Advice
|
||||
|
||||
/// <summary>LFA Bank Advice: only the approved batches of the payroll type can go to the bank.</summary>
|
||||
public List<LFAPaymentBatch> GetBankAdviceBatches(int payrollTypeID)
|
||||
{
|
||||
return GetBatches(payrollTypeID).Where(x => x.WFStatus == enumwfStatus.Approve).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The bank advice rows of one approved batch of the payroll type: the selected employees (sEmpIDs,
|
||||
/// comma separated; empty = the whole batch), of one bank (bankID; 0 = every bank). Not approved,
|
||||
/// or not of this payroll type, is refused.
|
||||
/// </summary>
|
||||
public System.Data.DataSet GetBankAdvice(int lfaPaymentID, string sEmpIDs, int bankID, int payrollTypeID)
|
||||
{
|
||||
// the IDs go into the SQL as %q, so only digits pass
|
||||
string empIDs = string.Join(",", (sEmpIDs ?? string.Empty)
|
||||
.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(x => int.TryParse(x.Trim(), out int id) ? id : 0)
|
||||
.Where(id => id > 0)
|
||||
.Distinct());
|
||||
|
||||
System.Data.DataSet ds = null;
|
||||
TransactionContext tc = null;
|
||||
try
|
||||
{
|
||||
tc = TransactionContext.Begin();
|
||||
LFAPayment oPayment = null;
|
||||
DataReader dr = new DataReader(LFAPaymentDA.Get(tc, lfaPaymentID));
|
||||
if (dr.Read())
|
||||
{
|
||||
oPayment = this.CreateObject<LFAPayment>(dr);
|
||||
}
|
||||
dr.Close();
|
||||
|
||||
if (oPayment == null || oPayment.PayrollTypeID != payrollTypeID)
|
||||
throw new Exception("LFA payment batch not found.");
|
||||
if (oPayment.WFStatus != enumwfStatus.Approve)
|
||||
throw new Exception("LFA payment batch " + oPayment.BatchNumber + " is not approved yet.");
|
||||
|
||||
ds = LFAPaymentDA.GetBankAdvice(tc, lfaPaymentID, empIDs, bankID, payrollTypeID);
|
||||
tc.End();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
#region Handle Exception
|
||||
|
||||
if (tc != null)
|
||||
tc.HandleError();
|
||||
ExceptionLog.Write(e);
|
||||
throw new ServiceException(e.Message, e);
|
||||
|
||||
#endregion
|
||||
}
|
||||
return ds;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>lfaapproval/workflow = Yes.</summary>
|
||||
private static bool IsWorkflowRequired()
|
||||
{
|
||||
|
|
|
|||
85
HRM.Report/Class/rptLFABankAdvice.cs
Normal file
85
HRM.Report/Class/rptLFABankAdvice.cs
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using HRM.BO;
|
||||
using HRM.DA;
|
||||
using Microsoft.Reporting.NETCore;
|
||||
|
||||
namespace HRM.Report
|
||||
{
|
||||
/// <summary>
|
||||
/// LFA Bank Advice (EnumReportType.LFABankAdvice, /payroll-lfa/lfa-bank-advice): the employees of one
|
||||
/// approved LFA payment batch with their bank account and LFA amount, rendered with LFABankAdvice.rdlc.
|
||||
/// </summary>
|
||||
public class rptLFABankAdvice
|
||||
{
|
||||
private const string RdlcName = "HRM.Report.RDLC.LFABankAdvice.rdlc";
|
||||
private const string DataSetName = "dsLFABankAdvice";
|
||||
|
||||
public byte[] ShowLFABankAdvice(int lfaPaymentID, string sEmpIDs, int bankID, int payrollTypeId, string reportType)
|
||||
{
|
||||
if (lfaPaymentID <= 0)
|
||||
throw new Exception("Select an LFA payment batch.");
|
||||
|
||||
DataSet oSource = new LFAPaymentService().GetBankAdvice(lfaPaymentID, sEmpIDs, bankID, payrollTypeId);
|
||||
if (oSource == null || oSource.Tables.Count == 0 || oSource.Tables[0].Rows.Count == 0)
|
||||
throw new Exception("No employee of the selected batch has an LFA amount to pay for this selection.");
|
||||
|
||||
DataTable bankAdvice = new DataTable(DataSetName);
|
||||
bankAdvice.Columns.Add("SLNo", typeof(int));
|
||||
bankAdvice.Columns.Add("EmpNo", typeof(string));
|
||||
bankAdvice.Columns.Add("EmpName", typeof(string));
|
||||
bankAdvice.Columns.Add("Designation", typeof(string));
|
||||
bankAdvice.Columns.Add("Department", typeof(string));
|
||||
bankAdvice.Columns.Add("CostCenter", typeof(string));
|
||||
bankAdvice.Columns.Add("AccountNo", typeof(string));
|
||||
bankAdvice.Columns.Add("Bank", typeof(string));
|
||||
bankAdvice.Columns.Add("Branch", typeof(string));
|
||||
bankAdvice.Columns.Add("RoutingNo", typeof(string));
|
||||
bankAdvice.Columns.Add("Email", typeof(string));
|
||||
bankAdvice.Columns.Add("Amount", typeof(double));
|
||||
|
||||
string batchNumber = string.Empty;
|
||||
DateTime paymentDate = DateTime.Today;
|
||||
DateTime lfaYear = DateTime.Today;
|
||||
int count = 1;
|
||||
foreach (DataRow oDRow in oSource.Tables[0].Rows)
|
||||
{
|
||||
DataRow oDR = bankAdvice.NewRow();
|
||||
oDR["SLNo"] = count;
|
||||
oDR["EmpNo"] = Convert.ToString(oDRow["EMPLOYEENO"]);
|
||||
oDR["EmpName"] = Convert.ToString(oDRow["NAME"]);
|
||||
oDR["Designation"] = Convert.ToString(oDRow["DesignationName"]);
|
||||
oDR["Department"] = Convert.ToString(oDRow["DepartmentName"]);
|
||||
oDR["CostCenter"] = Convert.ToString(oDRow["CostCenter"]);
|
||||
oDR["AccountNo"] = Convert.ToString(oDRow["AccountNo"]);
|
||||
oDR["Bank"] = Convert.ToString(oDRow["BankName"]);
|
||||
oDR["Branch"] = Convert.ToString(oDRow["BranchName"]);
|
||||
oDR["RoutingNo"] = Convert.ToString(oDRow["RoutingNo"]);
|
||||
oDR["Email"] = Convert.ToString(oDRow["EMAILADDRESS"]);
|
||||
oDR["Amount"] = Math.Round(Convert.ToDouble(oDRow["Amount"]));
|
||||
bankAdvice.Rows.Add(oDR);
|
||||
|
||||
if (count == 1)
|
||||
{
|
||||
batchNumber = Convert.ToString(oDRow["BatchNumber"]);
|
||||
paymentDate = Convert.ToDateTime(oDRow["PaymentDate"]);
|
||||
lfaYear = Convert.ToDateTime(oDRow["LFAYear"]);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
DataSet dSet = new DataSet();
|
||||
dSet.Tables.Add(bankAdvice);
|
||||
|
||||
List<ReportParameter> parameters = new List<ReportParameter>
|
||||
{
|
||||
new ReportParameter("BatchNumber", batchNumber),
|
||||
new ReportParameter("PaymentDate", paymentDate.ToString("dd MMM yyyy")),
|
||||
new ReportParameter("LFAYear", lfaYear.Year.ToString())
|
||||
};
|
||||
|
||||
return new ReportProcessor().CommonReportView(null, RdlcName, dSet, null, parameters, true, payrollTypeId, reportType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -61,6 +61,7 @@
|
|||
<None Remove="RDLC\BanglaPSlipBonus.rdlc" />
|
||||
<None Remove="RDLC\BanglaPSlipSub.rdlc" />
|
||||
<None Remove="RDLC\BankAdvice.rdlc" />
|
||||
<None Remove="RDLC\LFABankAdvice.rdlc" />
|
||||
<None Remove="RDLC\BankAdviceNmgt.rdlc" />
|
||||
<None Remove="RDLC\BankAdviceSalary.rdlc" />
|
||||
<None Remove="RDLC\BankAdviceSalaryHnm.rdlc" />
|
||||
|
|
@ -376,6 +377,7 @@
|
|||
<EmbeddedResource Include="RDLC\BanglaPSlipSub.rdlc" />
|
||||
<EmbeddedResource Include="RDLC\BankAdviceWithRoutingNo.rdlc" />
|
||||
<EmbeddedResource Include="RDLC\BankAdvice.rdlc" />
|
||||
<EmbeddedResource Include="RDLC\LFABankAdvice.rdlc" />
|
||||
<EmbeddedResource Include="RDLC\BankAdviceNmgt.rdlc" />
|
||||
<EmbeddedResource Include="RDLC\BankAdviceSalary.rdlc" />
|
||||
<EmbeddedResource Include="RDLC\BankAdviceSalaryHnm.rdlc" />
|
||||
|
|
|
|||
19
HRM.Report/RDLC/LFABankAdvice.rdlc
Normal file
19
HRM.Report/RDLC/LFABankAdvice.rdlc
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1799,6 +1799,7 @@ export enum EnumReportType {
|
|||
DailyAbsentLiFung = 609,
|
||||
DailyOddLiFung = 610,
|
||||
DailyAttnLiFung = 611,
|
||||
LFABankAdvice = 1201,
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<app-loading-panel></app-loading-panel>
|
||||
<div class="col-12">
|
||||
<kendo-card style="width: 100%;">
|
||||
<kendo-card-header style="font-size:22px; font-weight:400;" align="middle">LFA Bank Advice</kendo-card-header>
|
||||
<kendo-card-body>
|
||||
</kendo-card-body>
|
||||
</kendo-card>
|
||||
</div>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { ApiService } from '../../app.api.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-lfa-bank-advice',
|
||||
templateUrl: './lfa-bank-advice.component.html',
|
||||
styleUrls: ['./lfa-bank-advice.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
})
|
||||
export class LfaBankAdviceComponent implements OnInit {
|
||||
|
||||
constructor(public apiService: ApiService) {
|
||||
this.apiService.selectedMenuName = 'LFA Bank Advice';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
||||
|
|
@ -4,13 +4,15 @@ import { AuthGuard } from '../_guards/auth.guard';
|
|||
import { LfaPaymentComponent } from './lfa-payment/lfa-payment.component';
|
||||
import { LfaPaymentUndoComponent } from './lfa-payment-undo/lfa-payment-undo.component';
|
||||
import { LfaPaymentApprovalComponent } from './lfa-payment-approval/lfa-payment-approval.component';
|
||||
import { LfaBankAdviceComponent } from './lfa-bank-advice/lfa-bank-advice.component';
|
||||
import { ReportViewerComponent } from '../reports/report-viewer/report-viewer.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: 'lfa-payment', component: LfaPaymentComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'lfa-payment-undo', component: LfaPaymentUndoComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'lfa-payment-approval', component: LfaPaymentApprovalComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'lfa-bank-advice', component: LfaBankAdviceComponent, canActivate: [AuthGuard] }
|
||||
// LFA Bank Advice runs on the common report viewer, as Salary Bank Advice (report-viewer/36) does;
|
||||
// the viewer recognises it by the last URL segment ('lfa-bank-advice').
|
||||
{ path: 'lfa-bank-advice', component: ReportViewerComponent, canActivate: [AuthGuard] }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
|||
|
|
@ -15,14 +15,12 @@ import { TabViewCompatModule } from '../custom-components/tab-view-compat/tab-vi
|
|||
import { LfaPaymentComponent } from './lfa-payment/lfa-payment.component';
|
||||
import { LfaPaymentUndoComponent } from './lfa-payment-undo/lfa-payment-undo.component';
|
||||
import { LfaPaymentApprovalComponent } from './lfa-payment-approval/lfa-payment-approval.component';
|
||||
import { LfaBankAdviceComponent } from './lfa-bank-advice/lfa-bank-advice.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
LfaPaymentComponent,
|
||||
LfaPaymentUndoComponent,
|
||||
LfaPaymentApprovalComponent,
|
||||
LfaBankAdviceComponent
|
||||
LfaPaymentApprovalComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
|
|
|
|||
|
|
@ -1252,6 +1252,17 @@ export class ReportViewerComponent implements OnInit {
|
|||
this.hiddenFromMonth = true;
|
||||
this.hiddenToMonth = true;
|
||||
}
|
||||
if (this.reportType === 'lfa-bank-advice') {
|
||||
// LFA Bank Advice (/payroll-lfa/lfa-bank-advice): Item = an approved LFA payment batch,
|
||||
// Search lists that batch's employees, Preview/Export renders LFABankAdvice.rdlc.
|
||||
this.hiddenItemDDL = true;
|
||||
this.hiddenExport = true;
|
||||
this.itemName = 'LFA Batch';
|
||||
this.reportDropdownDefaultName = 'Select LFA Batch...';
|
||||
this.PDFTitle = 'LFA Bank Advice';
|
||||
this.apiService.selectedMenuName = 'LFA Bank Advice';
|
||||
this.loadLFABankAdviceBatches();
|
||||
}
|
||||
if (!this.multiselect) {
|
||||
this.selectableSettings = {
|
||||
checkboxOnly: true,
|
||||
|
|
@ -1277,6 +1288,54 @@ export class ReportViewerComponent implements OnInit {
|
|||
}
|
||||
);
|
||||
}
|
||||
/** LFA Bank Advice: the approved LFA payment batches of the payroll type. */
|
||||
loadLFABankAdviceBatches() {
|
||||
this.loadingPanel.ShowLoadingPanel = true;
|
||||
this.apiService.httpGet<any[]>('/lfa/getBankAdviceBatches').subscribe(
|
||||
(resp) => {
|
||||
(resp || []).forEach(x => {
|
||||
const paymentDate = x.paymentDate ? formatDate(new Date(x.paymentDate), 'dd MMM yyyy') : '';
|
||||
this.items.push(new Item(x.lfaPaymentID, x.batchNumber + ' (' + paymentDate + ', ' + x.headCount + ' emp)'));
|
||||
});
|
||||
if (this.items.length === 0) {
|
||||
this.notificationService.showWarning('No approved LFA payment batch found.');
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
this.notificationService.showError(err.error);
|
||||
},
|
||||
() => {
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
});
|
||||
}
|
||||
/** LFA Bank Advice: Search lists the employees of the selected batch. */
|
||||
searchLFABatchEmployees() {
|
||||
if (this.selectedItemid == undefined || this.selectedItemid == 0) {
|
||||
this.notificationService.showWarning('Please select an LFA Batch.');
|
||||
return;
|
||||
}
|
||||
this.taggedSelection = [];
|
||||
this.searchEmployees = [];
|
||||
this.skip = 0;
|
||||
this.loadData();
|
||||
this.loadingPanel.ShowLoadingPanel = true;
|
||||
this.apiService.httpGet<any[]>('/lfa/getBatchEmployees/' + this.selectedItemid).subscribe(
|
||||
(resp) => {
|
||||
this.searchEmployees = (resp || [])
|
||||
.filter(x => x.amount > 0)
|
||||
.map(x => <SearchEmployee><any>{ employeeID: x.employeeID, employeeNo: x.employeeNo, name: x.name });
|
||||
},
|
||||
(err) => {
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
this.notificationService.showError(err.error);
|
||||
},
|
||||
() => {
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
this.loadData();
|
||||
this.selectAllState = 'unchecked';
|
||||
});
|
||||
}
|
||||
loadEncashmentReportType() {
|
||||
this.reportItems.push(new Item(1, 'EmployeeWise Encashment'));
|
||||
this.reportItems.push(new Item(2, 'Bank Advice'));
|
||||
|
|
@ -1963,6 +2022,50 @@ export class ReportViewerComponent implements OnInit {
|
|||
// );
|
||||
|
||||
// }
|
||||
else if (this.reportType === 'lfa-bank-advice') {
|
||||
// the route is not numeric, so the report id is sent explicitly; itemid = LFAPaymentID
|
||||
if (this.selectedItemid == undefined || this.selectedItemid == 0) {
|
||||
this.notificationService.showWarning('Please select an LFA Batch.');
|
||||
return;
|
||||
}
|
||||
const data = {
|
||||
reportid: EnumReportType.LFABankAdvice,
|
||||
itemid: this.selectedItemid,
|
||||
bankId: (this.selectedBank !== undefined && this.selectedBank.id !== undefined) ? this.selectedBank.id : 0,
|
||||
selectedReport: '',
|
||||
empIds: this.empIds,
|
||||
reportType: reportType,
|
||||
fromDate: undefined,
|
||||
toDate: undefined,
|
||||
locationIds: ''
|
||||
};
|
||||
|
||||
this.loadingPanel.ShowLoadingPanel = true;
|
||||
if (reportType === 'PDF')
|
||||
this.showPopUp = true;
|
||||
this.reportService.getCommonReportData(data).subscribe(
|
||||
(resp: any) => {
|
||||
if (resp == null || resp == undefined || resp == "") {
|
||||
this.closeForm();
|
||||
this.notificationService.showWarning("No data found");
|
||||
} else 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 === 'EXCELOPENXML') {
|
||||
this.downloadFile(resp);
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
this.closeForm();
|
||||
this.notificationService.showError(err.error);
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
},
|
||||
() => {
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
else {
|
||||
// ;
|
||||
let bankId = 0;
|
||||
|
|
@ -2286,6 +2389,10 @@ export class ReportViewerComponent implements OnInit {
|
|||
|
||||
search() {
|
||||
// ;
|
||||
if (this.reportType === 'lfa-bank-advice') {
|
||||
this.searchLFABatchEmployees();
|
||||
return;
|
||||
}
|
||||
const srcManager: SearchManager = new SearchManager(EnumSearchFrom.Employee);
|
||||
srcManager.SearchFrom = this.SearchFrom;
|
||||
srcManager.IsNegletWithheld = this.IsNegletWithheld;
|
||||
|
|
@ -2547,6 +2654,14 @@ export class ReportViewerComponent implements OnInit {
|
|||
public onItemChange(data: any) {
|
||||
data;
|
||||
this.selectedItemid;
|
||||
if (this.reportType === 'lfa-bank-advice') {
|
||||
// another LFA batch: the listed employees belong to the old one
|
||||
this.taggedSelection = [];
|
||||
this.searchEmployees = [];
|
||||
this.skip = 0;
|
||||
this.selectAllState = 'unchecked';
|
||||
this.loadData();
|
||||
}
|
||||
//;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,6 +117,25 @@ namespace HRM.UI.Controllers.Payroll
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>LFA Bank Advice: the approved batches of the payroll type.</summary>
|
||||
[HttpGet("getBankAdviceBatches")]
|
||||
public ActionResult GetBankAdviceBatches()
|
||||
{
|
||||
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
|
||||
if (currentUser.UserType == EnumUserType.Employee)
|
||||
{
|
||||
return NotAllowed();
|
||||
}
|
||||
try
|
||||
{
|
||||
return Ok(this._lfaPaymentService.GetBankAdviceBatches(currentUser.PayrollTypeID.GetValueOrDefault()));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return StatusCode(StatusCodes.Status500InternalServerError, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("getBatchEmployees/{lfaPaymentID}")]
|
||||
public ActionResult GetBatchEmployees(int lfaPaymentID)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -750,6 +750,10 @@ namespace HRM.UI.Controllers.Report
|
|||
rptLeave = new rptLeave();
|
||||
bytes = rptLeave.ShowLeaveEncashmentReports(sEmpIDs, itemid, selectedReport, payrollTypeId, reportType);
|
||||
break;
|
||||
case EnumReportType.LFABankAdvice:
|
||||
// itemid = LFAPaymentID of the selected (approved) LFA batch
|
||||
bytes = new rptLFABankAdvice().ShowLFABankAdvice(itemid, sEmpIDs, bankId, payrollTypeId, reportType);
|
||||
break;
|
||||
case EnumReportType.CCWiseLeaveEncashmentReturn:
|
||||
rptLeave = new rptLeave();
|
||||
bytes = rptLeave.ShowCCWiseLeaveEncashmentReturn(itemid, payrollTypeId, reportType);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user