This commit is contained in:
Mohaimen Hasan 2026-11-29 10:06:33 +06:00
parent 4be77e5433
commit 908a6d28ff
2 changed files with 12 additions and 6 deletions

View File

@ -62,6 +62,13 @@ export class LFAService {
return this.apiService.httpPost<LFAPaymentUndoResult>('/lfa/undoPayment', request);
}
// ── LFA Bank Advice (report viewer, /payroll-lfa/lfa-bank-advice) ──
/** The approved batches of the payroll type. */
getBankAdviceBatches(): Observable<LFAPaymentBatch[]> {
return this.apiService.httpGet<LFAPaymentBatch[]>('/lfa/getBankAdviceBatches');
}
// ── LFA Payment Approval (as Salary Approve) ──
getApprovalInfo(): Observable<LFAApprovalInfo> {

View File

@ -39,6 +39,7 @@ 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 { LFAService } from '../../_services/payroll/lfa.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';
@ -73,6 +74,7 @@ export class ReportViewerComponent implements OnInit {
public loanService: LoanService,
public taxService: TaxService,
public salaryService: SalaryService,
public lfaService: LFAService,
public leaveYearService: LeaveService,
public router: Router, public loadingPanel: loadingPanelService,
public notificationService: HRMNotificationService,
@ -1291,15 +1293,12 @@ 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(
this.lfaService.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)'));
this.items.push(new Item(x.lfaPaymentID, x.batchNumber + ' (' + x.headCount + ' emp)'));
});
if (this.items.length === 0) {
this.notificationService.showWarning('No approved LFA payment batch found.');
}
},
(err) => {
this.loadingPanel.ShowLoadingPanel = false;
@ -1320,7 +1319,7 @@ export class ReportViewerComponent implements OnInit {
this.skip = 0;
this.loadData();
this.loadingPanel.ShowLoadingPanel = true;
this.apiService.httpGet<any[]>('/lfa/getBatchEmployees/' + this.selectedItemid).subscribe(
this.lfaService.getBatchEmployees(this.selectedItemid).subscribe(
(resp) => {
this.searchEmployees = (resp || [])
.filter(x => x.amount > 0)