Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
244b70f926 |
@@ -353,7 +353,12 @@
|
||||
<div class="gl-fgroup">
|
||||
<label class="gl-flabel"><fa-icon icon="calendar-check"></fa-icon> Submitted From</label>
|
||||
<mat-form-field appearance="outline" class="gl-ffield">
|
||||
<input matInput [matDatepicker]="dpSubFrom" [min]="minDate" [formControl]="submittedOnDateFrom" />
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="dpSubFrom"
|
||||
[min]="minDate"
|
||||
[formControl]="submittedOnDateFrom"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dpSubFrom"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dpSubFrom></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -36,15 +36,7 @@ export class CacheInterceptor implements HttpInterceptor {
|
||||
'/rbireserveconfig',
|
||||
'/tdsconfig',
|
||||
'/tds/deposit-interest',
|
||||
'/savingsinterestpostingreports',
|
||||
// Cash in vaults and drawers changes with every transaction; a cached teller list or position
|
||||
// kept showing a branch's old tellers and figures at day close.
|
||||
'/tellers',
|
||||
'/cashreports',
|
||||
'/cashreconciliation',
|
||||
'/cashsettlement',
|
||||
'/cashtransfer',
|
||||
'/branchday'
|
||||
'/savingsinterestpostingreports'
|
||||
];
|
||||
|
||||
private isCacheable(url: string): boolean {
|
||||
|
||||
@@ -22,134 +22,9 @@
|
||||
<input type="date" [(ngModel)]="postingDate" (change)="load()" />
|
||||
</label>
|
||||
<button class="ipr-btn" (click)="load()" [disabled]="loading"><fa-icon icon="undo"></fa-icon> Reload</button>
|
||||
<button class="ipr-btn ipr-btn--primary" (click)="openPreview()" [disabled]="previewLoading">
|
||||
<fa-icon icon="eye"></fa-icon> Preview interest (today)
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (isHeadOffice) {
|
||||
<div class="ipr-tabs">
|
||||
<button class="ipr-tab" [class.is-active]="tab === 'own'" (click)="switchTab('own')">
|
||||
<fa-icon icon="building"></fa-icon> My branch{{ myBranch ? ' — ' + myBranch : '' }}
|
||||
</button>
|
||||
<button class="ipr-tab" [class.is-active]="tab === 'others'" (click)="switchTab('others')">
|
||||
<fa-icon icon="sitemap"></fa-icon> Other branches
|
||||
</button>
|
||||
</div>
|
||||
@if (tab === 'others') {
|
||||
<div class="ipr-alert ipr-alert--info">
|
||||
<fa-icon icon="info-circle"></fa-icon>
|
||||
<div>
|
||||
Each branch generates and approves its own reports. The head office can act here only for a branch that has
|
||||
not opened the day, and only once every other open branch has closed. Anything it approves is marked (HO).
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@if (showPreview) {
|
||||
<div class="ipr-card">
|
||||
<div class="ipr-detail-head">
|
||||
<div>
|
||||
<h3>Interest preview — earned up to {{ previewAsOf }}</h3>
|
||||
<div class="muted">
|
||||
What each account would be paid if interest were posted today. View only — nothing is saved, approved or
|
||||
posted.
|
||||
</div>
|
||||
</div>
|
||||
<div class="ipr-total">
|
||||
<span>Total so far</span>
|
||||
<strong>₹{{ previewTotal | number: '1.2-2' }}</strong>
|
||||
<span class="muted">{{ previewRows.length }} account(s)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ipr-preview-actions">
|
||||
<button class="ipr-btn ipr-btn--slim" (click)="openPreview()" [disabled]="previewLoading">
|
||||
<fa-icon icon="undo"></fa-icon> Refresh
|
||||
</button>
|
||||
<button
|
||||
class="ipr-btn ipr-btn--slim"
|
||||
(click)="exportPreview()"
|
||||
[disabled]="previewLoading || previewRows.length === 0"
|
||||
>
|
||||
<fa-icon icon="file-excel"></fa-icon> Export Excel
|
||||
</button>
|
||||
<button class="ipr-btn ipr-btn--slim" (click)="closePreview()"><fa-icon icon="times"></fa-icon> Close</button>
|
||||
</div>
|
||||
@if (previewLoading) {
|
||||
<div class="ipr-empty">Calculating interest up to today…</div>
|
||||
} @else {
|
||||
<table class="ipr-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Branch</th>
|
||||
<th>Product</th>
|
||||
<th>Posting date</th>
|
||||
<th class="num">Accounts</th>
|
||||
<th class="num">Interest so far</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (g of previewGroups; track g.officeName + g.productName) {
|
||||
<tr>
|
||||
<td>{{ g.officeName }}</td>
|
||||
<td>
|
||||
<strong>{{ g.productName }}</strong>
|
||||
</td>
|
||||
<td>{{ g.postingDate }}</td>
|
||||
<td class="num">{{ g.accounts }}</td>
|
||||
<td class="num">₹{{ g.interest | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
} @empty {
|
||||
<tr>
|
||||
<td colspan="5" class="ipr-empty">No savings account has interest accrued in its current cycle.</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@if (previewRows.length > 0) {
|
||||
<table class="ipr-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Branch</th>
|
||||
<th>Product</th>
|
||||
<th>Account no</th>
|
||||
<th>Account holder</th>
|
||||
<th class="num">Balance</th>
|
||||
<th class="num">Rate %</th>
|
||||
<th>Cycle</th>
|
||||
<th class="num">Interest so far</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (r of previewRows; track r.savingsAccountId) {
|
||||
<tr>
|
||||
<td>{{ r.officeName }}</td>
|
||||
<td>{{ r.productName }}</td>
|
||||
<td>{{ r.accountNo }}</td>
|
||||
<td>{{ r.clientName }}</td>
|
||||
<td class="num">₹{{ r.balance | number: '1.2-2' }}</td>
|
||||
<td class="num">{{ r.rate | number: '1.2-2' }}</td>
|
||||
<td class="muted">{{ r.cycleStart }} → {{ r.postingDate }}</td>
|
||||
<td class="num">₹{{ r.interest | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7"><strong>Total</strong></td>
|
||||
<td class="num">
|
||||
<strong>₹{{ previewTotal | number: '1.2-2' }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (errorMessage) {
|
||||
<div class="ipr-alert ipr-alert--error">
|
||||
<fa-icon icon="exclamation-triangle"></fa-icon>
|
||||
@@ -177,13 +52,9 @@
|
||||
@for (d of due; track d.productId + '-' + d.officeId) {
|
||||
<div class="ipr-due-row">
|
||||
<strong>{{ d.productName }}</strong> <span>· {{ d.officeName }} · {{ d.postingDate }}</span>
|
||||
@if (d.canAct) {
|
||||
<button class="ipr-btn ipr-btn--primary ipr-btn--slim" (click)="generate(d)" [disabled]="busy">
|
||||
<fa-icon icon="sync"></fa-icon> {{ tab === 'others' ? 'Generate on behalf' : 'Generate report' }}
|
||||
</button>
|
||||
} @else if (d.blockedReason) {
|
||||
<span class="ipr-blocked">{{ d.blockedReason }}</span>
|
||||
}
|
||||
<button class="ipr-btn ipr-btn--primary ipr-btn--slim" (click)="generate(d)" [disabled]="busy">
|
||||
<fa-icon icon="sync"></fa-icon> Generate report
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -243,12 +114,9 @@
|
||||
}
|
||||
@if (canApprove(r)) {
|
||||
<button class="ipr-btn ipr-btn--primary ipr-btn--slim" (click)="approve(r)" [disabled]="busy">
|
||||
<fa-icon icon="check"></fa-icon> {{ tab === 'others' ? 'Approve on behalf' : 'Approve' }}
|
||||
<fa-icon icon="check"></fa-icon> Approve
|
||||
</button>
|
||||
}
|
||||
@if (!r.canAct && r.blockedReason && (r.status === 'GENERATED' || r.status === 'APPROVED')) {
|
||||
<span class="ipr-blocked">{{ r.blockedReason }}</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
} @empty {
|
||||
|
||||
@@ -274,54 +274,3 @@
|
||||
font-weight: 600;
|
||||
color: var(--i-amber);
|
||||
}
|
||||
|
||||
// Preview: refresh / export / close, above the totals.
|
||||
.ipr-preview-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
justify-content: flex-end;
|
||||
padding: 0 16px 10px;
|
||||
}
|
||||
|
||||
.ipr-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-bottom: 12px;
|
||||
border-bottom: 1px solid var(--i-g200);
|
||||
}
|
||||
|
||||
.ipr-tab {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 14px;
|
||||
margin-bottom: -1px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--i-g500);
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px 6px 0 0;
|
||||
|
||||
&.is-active {
|
||||
color: var(--i-navy);
|
||||
background: #fff;
|
||||
border-color: var(--i-g200);
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.ipr-alert--info {
|
||||
background: var(--i-blue-l);
|
||||
color: var(--i-blue);
|
||||
}
|
||||
|
||||
.ipr-blocked {
|
||||
display: inline-block;
|
||||
max-width: 320px;
|
||||
font-size: 11px;
|
||||
line-height: 1.35;
|
||||
color: var(--i-g500);
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@@ -11,14 +11,11 @@ import { FormsModule } from '@angular/forms';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { exportWorkbook } from '../cashier/cashier-export';
|
||||
import {
|
||||
InterestPostingDue,
|
||||
InterestPostingReport,
|
||||
InterestPostingReportDetail,
|
||||
InterestPostingReportService,
|
||||
InterestPreviewRow,
|
||||
ReportScope
|
||||
InterestPostingReportService
|
||||
} from './interest-posting-report.service';
|
||||
|
||||
/**
|
||||
@@ -54,48 +51,15 @@ export class InterestPostingReportComponent implements OnInit {
|
||||
/** Products with interest due and no report yet — the noon job ran before they had anything due, or failed. */
|
||||
due: InterestPostingDue[] = [];
|
||||
|
||||
/** 'own' — the user's own branch; 'others' — every other branch, a head-office-only tab. */
|
||||
tab: ReportScope = 'own';
|
||||
isHeadOffice = false;
|
||||
myBranch = '';
|
||||
|
||||
ngOnInit(): void {
|
||||
this.postingDate = this.businessDateIso();
|
||||
this.reportService.context().subscribe({
|
||||
next: (ctx) => {
|
||||
this.isHeadOffice = !!ctx?.headOffice;
|
||||
this.myBranch = ctx?.officeName ?? '';
|
||||
},
|
||||
error: () => (this.isHeadOffice = false)
|
||||
});
|
||||
this.load();
|
||||
}
|
||||
|
||||
switchTab(tab: ReportScope): void {
|
||||
if (this.tab === tab) {
|
||||
return;
|
||||
}
|
||||
this.tab = tab;
|
||||
this.selected = null;
|
||||
this.notice = '';
|
||||
this.load();
|
||||
}
|
||||
|
||||
/** Acting for another branch is the head office's exception, so it is spelt out before it happens. */
|
||||
private confirmOnBehalf(officeName: string, action: string): boolean {
|
||||
if (this.tab !== 'others') {
|
||||
return true;
|
||||
}
|
||||
return confirm(
|
||||
`${officeName} has not opened today. You are about to ${action} its interest posting report on its behalf, ` +
|
||||
'from the head office. Continue?'
|
||||
);
|
||||
}
|
||||
|
||||
load(): void {
|
||||
this.loading = true;
|
||||
this.errorMessage = '';
|
||||
this.reportService.list(this.postingDate || undefined, undefined, undefined, this.tab).subscribe({
|
||||
this.reportService.list(this.postingDate || undefined).subscribe({
|
||||
next: (reports) => {
|
||||
this.reports = reports ?? [];
|
||||
this.loading = false;
|
||||
@@ -111,16 +75,13 @@ export class InterestPostingReportComponent implements OnInit {
|
||||
this.errorMessage = this.messageOf(err, 'Could not load the interest posting reports.');
|
||||
}
|
||||
});
|
||||
this.reportService.dueWithoutReport(this.postingDate || undefined, this.tab).subscribe({
|
||||
this.reportService.dueWithoutReport(this.postingDate || undefined).subscribe({
|
||||
next: (due) => (this.due = due ?? []),
|
||||
error: () => (this.due = [])
|
||||
});
|
||||
}
|
||||
|
||||
generate(item: InterestPostingDue): void {
|
||||
if (!this.confirmOnBehalf(item.officeName, 'generate')) {
|
||||
return;
|
||||
}
|
||||
this.busy = true;
|
||||
this.notice = '';
|
||||
this.errorMessage = '';
|
||||
@@ -150,8 +111,7 @@ export class InterestPostingReportComponent implements OnInit {
|
||||
if (
|
||||
!confirm(
|
||||
`Regenerate the interest posting report for ${report.productName} — ${report.officeName}? It will need approving again.`
|
||||
) ||
|
||||
!this.confirmOnBehalf(report.officeName, 'regenerate')
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -178,8 +138,7 @@ export class InterestPostingReportComponent implements OnInit {
|
||||
!confirm(
|
||||
`Approve interest of ₹${report.totalInterest} across ${report.accountCount} account(s) for ${report.productName}? ` +
|
||||
'It will be posted when the branch closes the day.'
|
||||
) ||
|
||||
!this.confirmOnBehalf(report.officeName, 'approve')
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -218,165 +177,8 @@ export class InterestPostingReportComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
/** Pending reports that block this user's own day close; another branch's pending reports block only that branch. */
|
||||
get pendingCount(): number {
|
||||
return this.tab === 'own' ? this.reports.filter((r) => r.status === 'GENERATED').length : 0;
|
||||
}
|
||||
|
||||
// ── Preview: what each account has earned so far, as if posted today. View only. ──
|
||||
|
||||
showPreview = false;
|
||||
previewLoading = false;
|
||||
previewRows: InterestPreviewRow[] = [];
|
||||
previewAsOf = '';
|
||||
|
||||
openPreview(): void {
|
||||
this.showPreview = true;
|
||||
this.previewLoading = true;
|
||||
this.errorMessage = '';
|
||||
this.reportService.preview().subscribe({
|
||||
next: (rows) => {
|
||||
this.previewRows = rows ?? [];
|
||||
this.previewAsOf = this.previewRows[0]?.asOf ?? this.businessDateIso();
|
||||
this.previewLoading = false;
|
||||
},
|
||||
error: (err) => {
|
||||
this.previewLoading = false;
|
||||
this.previewRows = [];
|
||||
this.errorMessage = this.messageOf(err, 'Could not load the interest preview.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
closePreview(): void {
|
||||
this.showPreview = false;
|
||||
}
|
||||
|
||||
get previewTotal(): number {
|
||||
return this.previewRows.reduce((sum, r) => sum + Number(r.interest || 0), 0);
|
||||
}
|
||||
|
||||
/** Totals by branch and product, for the summary above the account list and the export. */
|
||||
get previewGroups(): {
|
||||
officeName: string;
|
||||
productName: string;
|
||||
postingDate: string;
|
||||
accounts: number;
|
||||
interest: number;
|
||||
}[] {
|
||||
const map = new Map<
|
||||
string,
|
||||
{ officeName: string; productName: string; postingDate: string; accounts: number; interest: number }
|
||||
>();
|
||||
this.previewRows.forEach((r) => {
|
||||
const key = `${r.officeName}|${r.productName}`;
|
||||
const g = map.get(key) ?? {
|
||||
officeName: r.officeName,
|
||||
productName: r.productName,
|
||||
postingDate: r.postingDate,
|
||||
accounts: 0,
|
||||
interest: 0
|
||||
};
|
||||
g.accounts += 1;
|
||||
g.interest += Number(r.interest || 0);
|
||||
map.set(key, g);
|
||||
});
|
||||
return [...map.values()];
|
||||
}
|
||||
|
||||
exportPreview(): void {
|
||||
const stamp = `Interest earned to ${this.previewAsOf} — preview, not posted`;
|
||||
exportWorkbook(
|
||||
[
|
||||
{
|
||||
sheetName: 'By account',
|
||||
title: 'Savings Interest Preview',
|
||||
subtitle: stamp,
|
||||
headers: [
|
||||
'Branch',
|
||||
'Product',
|
||||
'Account No',
|
||||
'Customer',
|
||||
'Balance',
|
||||
'Rate %',
|
||||
'Cycle Start',
|
||||
'Posting Date',
|
||||
'Interest So Far'
|
||||
],
|
||||
widths: [
|
||||
18,
|
||||
22,
|
||||
20,
|
||||
26,
|
||||
16,
|
||||
8,
|
||||
12,
|
||||
12,
|
||||
16
|
||||
],
|
||||
rows: [
|
||||
...this.previewRows.map((r) => [
|
||||
r.officeName,
|
||||
r.productName,
|
||||
r.accountNo,
|
||||
r.clientName,
|
||||
Number(r.balance || 0),
|
||||
Number(r.rate || 0),
|
||||
r.cycleStart,
|
||||
r.postingDate,
|
||||
Number(r.interest || 0)
|
||||
]),
|
||||
[
|
||||
'TOTAL',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
this.previewTotal
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
sheetName: 'By branch & product',
|
||||
title: 'Savings Interest Preview — Totals',
|
||||
subtitle: stamp,
|
||||
headers: [
|
||||
'Branch',
|
||||
'Product',
|
||||
'Posting Date',
|
||||
'Accounts',
|
||||
'Interest So Far'
|
||||
],
|
||||
widths: [
|
||||
18,
|
||||
22,
|
||||
12,
|
||||
10,
|
||||
16
|
||||
],
|
||||
rows: [
|
||||
...this.previewGroups.map((g) => [
|
||||
g.officeName,
|
||||
g.productName,
|
||||
g.postingDate,
|
||||
g.accounts,
|
||||
g.interest
|
||||
]),
|
||||
[
|
||||
'TOTAL',
|
||||
'',
|
||||
'',
|
||||
this.previewRows.length,
|
||||
this.previewTotal
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
`savings-interest-preview-${this.previewAsOf}`
|
||||
);
|
||||
return this.reports.filter((r) => r.status === 'GENERATED').length;
|
||||
}
|
||||
|
||||
private businessDateIso(): string {
|
||||
|
||||
@@ -12,9 +12,6 @@ import { Observable } from 'rxjs';
|
||||
|
||||
export type InterestPostingReportStatus = 'GENERATED' | 'APPROVED' | 'POSTED' | 'SUPERSEDED';
|
||||
|
||||
/** Which branches a list covers: the user's own, or (head office only) every other branch. */
|
||||
export type ReportScope = 'own' | 'others';
|
||||
|
||||
export interface InterestPostingReport {
|
||||
id: number;
|
||||
productId: number;
|
||||
@@ -35,8 +32,6 @@ export interface InterestPostingReport {
|
||||
failureReason: string | null;
|
||||
/** Whether the signed-in user may regenerate or approve it: their own branch, or the head office for a branch that did not open. */
|
||||
canAct: boolean;
|
||||
/** Why not, where canAct is false. */
|
||||
blockedReason: string | null;
|
||||
}
|
||||
|
||||
export interface InterestPostingReportLine {
|
||||
@@ -65,8 +60,6 @@ export interface InterestPostingDue {
|
||||
officeId: number;
|
||||
officeName: string;
|
||||
postingDate: string;
|
||||
canAct: boolean;
|
||||
blockedReason: string | null;
|
||||
}
|
||||
|
||||
export interface InterestPostingSummaryRow {
|
||||
@@ -85,22 +78,6 @@ export interface InterestPostingSummaryRow {
|
||||
postedAt: string | null;
|
||||
}
|
||||
|
||||
export interface InterestPreviewRow {
|
||||
officeId: number;
|
||||
officeName: string;
|
||||
productId: number;
|
||||
productName: string;
|
||||
savingsAccountId: number;
|
||||
accountNo: string;
|
||||
clientName: string;
|
||||
balance: number;
|
||||
rate: number;
|
||||
cycleStart: string;
|
||||
postingDate: string;
|
||||
asOf: string;
|
||||
interest: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The savings interest posting reports, one per branch and product: generated at noon on a posting
|
||||
* date, approved by the branch, posted when the branch closes the day.
|
||||
@@ -110,15 +87,8 @@ export class InterestPostingReportService {
|
||||
private http = inject(HttpClient);
|
||||
private readonly base = '/savingsinterestpostingreports';
|
||||
|
||||
/** scope 'own' is the user's own branch; 'others' (head office only) every other branch. */
|
||||
list(
|
||||
postingDate?: string,
|
||||
status?: string,
|
||||
officeId?: number,
|
||||
scope?: ReportScope
|
||||
): Observable<InterestPostingReport[]> {
|
||||
list(postingDate?: string, status?: string, officeId?: number): Observable<InterestPostingReport[]> {
|
||||
let params = new HttpParams();
|
||||
if (scope) params = params.set('scope', scope);
|
||||
if (postingDate) params = params.set('postingDate', postingDate);
|
||||
if (status) params = params.set('status', status);
|
||||
if (officeId) params = params.set('officeId', String(officeId));
|
||||
@@ -126,18 +96,12 @@ export class InterestPostingReportService {
|
||||
}
|
||||
|
||||
/** Branch and product pairs with interest due by the date and no report yet, that this user may generate. */
|
||||
dueWithoutReport(postingDate?: string, scope?: ReportScope): Observable<InterestPostingDue[]> {
|
||||
dueWithoutReport(postingDate?: string): Observable<InterestPostingDue[]> {
|
||||
let params = new HttpParams();
|
||||
if (scope) params = params.set('scope', scope);
|
||||
if (postingDate) params = params.set('postingDate', postingDate);
|
||||
return this.http.get<InterestPostingDue[]>(`${this.base}/due-without-report`, { params });
|
||||
}
|
||||
|
||||
/** The signed-in user's branch, and whether it is the head office. */
|
||||
context(): Observable<{ officeId: number; officeName: string; headOffice: boolean }> {
|
||||
return this.http.get<{ officeId: number; officeName: string; headOffice: boolean }>(`${this.base}/context`);
|
||||
}
|
||||
|
||||
detail(reportId: number): Observable<InterestPostingReportDetail> {
|
||||
return this.http.get<InterestPostingReportDetail>(`${this.base}/${reportId}`);
|
||||
}
|
||||
@@ -162,13 +126,6 @@ export class InterestPostingReportService {
|
||||
);
|
||||
}
|
||||
|
||||
/** Interest each account has earned so far this cycle, as if posted today. View only. */
|
||||
preview(officeId?: number): Observable<InterestPreviewRow[]> {
|
||||
let params = new HttpParams();
|
||||
if (officeId) params = params.set('officeId', String(officeId));
|
||||
return this.http.get<InterestPreviewRow[]>(`${this.base}/preview`, { params });
|
||||
}
|
||||
|
||||
/** The head office's branch-wise view over a date range. */
|
||||
summary(fromDate?: string, toDate?: string, productId?: number): Observable<InterestPostingSummaryRow[]> {
|
||||
let params = new HttpParams();
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@
|
||||
</button>
|
||||
}
|
||||
@if (savingProductFormValid && selectedTabIndex === totalTabs - 1) {
|
||||
<button mat-raised-button color="primary" [disabled]="submitting" (click)="submit()">
|
||||
<button mat-raised-button color="primary" (click)="submit()">
|
||||
<i class="fas fa-check" style="margin-right: 8px"></i>
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
|
||||
+1
-13
@@ -70,10 +70,6 @@ export class CreateSavingProductComponent {
|
||||
savingProductsTemplate: any;
|
||||
accountingRuleData: string[] = [];
|
||||
selectedTabIndex = 0;
|
||||
/** Guards against repeat clicks on Submit: the product name is unique in the database, so a
|
||||
* second request for the same form fails with a duplicate key error even though the first one
|
||||
* created the product. */
|
||||
submitting = false;
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -166,11 +162,8 @@ export class CreateSavingProductComponent {
|
||||
}
|
||||
|
||||
submit() {
|
||||
if (this.submitting) {
|
||||
return;
|
||||
}
|
||||
this.submitting = true;
|
||||
const savingProduct = this.prepareSavingProductPayload();
|
||||
console.log('Saving product submit payload:', savingProduct);
|
||||
this.productsService.createSavingProduct(savingProduct).subscribe({
|
||||
next: (response: any) => {
|
||||
if (response?.rollbackTransaction) {
|
||||
@@ -188,11 +181,6 @@ export class CreateSavingProductComponent {
|
||||
{ relativeTo: this.route }
|
||||
);
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
// the error itself is reported by the global error handler; just let the user correct the
|
||||
// form and try again
|
||||
this.submitting = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+15
-1
@@ -11,6 +11,7 @@ import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { AlertService } from 'app/core/alert/alert.service';
|
||||
|
||||
/** Custom Services */
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
@@ -37,6 +38,7 @@ export class ApproveSavingsAccountComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
private alertService = inject(AlertService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
@@ -98,7 +100,19 @@ export class ApproveSavingsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'approve', data).subscribe(() => {
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'approve', data).subscribe((response: any) => {
|
||||
// Parked in the Checker Inbox rather than executed (HTTP 200 with rollbackTransaction: true).
|
||||
// The account is therefore still pending, so chaining activation onto it would be applied to an
|
||||
// unapproved account -- stop here and say what is actually waiting.
|
||||
if (response?.rollbackTransaction) {
|
||||
this.alertService.alert({
|
||||
type: 'Success',
|
||||
message:
|
||||
'This approval has been sent for checker approval. The account stays pending until a checker approves it.'
|
||||
});
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
return;
|
||||
}
|
||||
const activationData = {
|
||||
activatedOnDate: approveSavingsAccountFormData.approvedOnDate,
|
||||
dateFormat,
|
||||
|
||||
+11
-1
@@ -20,6 +20,7 @@ import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
/** Custom Services */
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { AlertService } from 'app/core/alert/alert.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { MatCheckbox } from '@angular/material/checkbox';
|
||||
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
||||
@@ -47,6 +48,7 @@ export class CloseSavingsAccountComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
private alertService = inject(AlertService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
@@ -158,7 +160,15 @@ export class CloseSavingsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'close', data).subscribe(() => {
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'close', data).subscribe((response: any) => {
|
||||
// Parked in the Checker Inbox rather than executed (HTTP 200 with rollbackTransaction: true),
|
||||
// so the account is still open -- say so instead of letting that read as "nothing happened".
|
||||
if (response?.rollbackTransaction) {
|
||||
this.alertService.alert({
|
||||
type: 'Success',
|
||||
message: 'Closure has been sent for checker approval. The account is unchanged until a checker approves it.'
|
||||
});
|
||||
}
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
+12
-1
@@ -14,6 +14,7 @@ import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
/** Custom Services */
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { AlertService } from 'app/core/alert/alert.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
@@ -37,6 +38,7 @@ export class RejectSavingsAccountComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
private alertService = inject(AlertService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
@@ -97,7 +99,16 @@ export class RejectSavingsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'reject', data).subscribe(() => {
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'reject', data).subscribe((response: any) => {
|
||||
// Parked in the Checker Inbox rather than executed (HTTP 200 with rollbackTransaction: true),
|
||||
// so the application is still open -- say so instead of letting that read as "nothing happened".
|
||||
if (response?.rollbackTransaction) {
|
||||
this.alertService.alert({
|
||||
type: 'Success',
|
||||
message:
|
||||
'Rejection has been sent for checker approval. The application is unchanged until a checker approves it.'
|
||||
});
|
||||
}
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
+16
-3
@@ -13,6 +13,7 @@ import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { AlertService } from 'app/core/alert/alert.service';
|
||||
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
@@ -33,6 +34,7 @@ export class UndoApprovalSavingsAccountComponent implements OnInit {
|
||||
private savingsService = inject(SavingsService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private alertService = inject(AlertService);
|
||||
|
||||
/** Undo Approval Savings Account form. */
|
||||
undoApprovalSavingsAccountForm: UntypedFormGroup;
|
||||
@@ -73,8 +75,19 @@ export class UndoApprovalSavingsAccountComponent implements OnInit {
|
||||
const data = {
|
||||
...this.undoApprovalSavingsAccountForm.value
|
||||
};
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'undoapproval', data).subscribe(() => {
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
});
|
||||
this.savingsService
|
||||
.executeSavingsAccountCommand(this.accountId, 'undoapproval', data)
|
||||
.subscribe((response: any) => {
|
||||
// Parked in the Checker Inbox rather than executed (HTTP 200 with rollbackTransaction: true),
|
||||
// so the account reloads unchanged -- say so instead of letting that read as "it worked".
|
||||
if (response?.rollbackTransaction) {
|
||||
this.alertService.alert({
|
||||
type: 'Success',
|
||||
message:
|
||||
'Undo approval has been sent for checker approval. The account is unchanged until a checker approves it.'
|
||||
});
|
||||
}
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+16
-3
@@ -14,6 +14,7 @@ import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
/** Custom Services */
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { AlertService } from 'app/core/alert/alert.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
@@ -37,6 +38,7 @@ export class WithdrawByClientSavingsAccountComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
private alertService = inject(AlertService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
@@ -97,8 +99,19 @@ export class WithdrawByClientSavingsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, 'withdrawnByApplicant', data).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
this.savingsService
|
||||
.executeSavingsAccountCommand(this.accountId, 'withdrawnByApplicant', data)
|
||||
.subscribe((response: any) => {
|
||||
// Parked in the Checker Inbox rather than executed (HTTP 200 with rollbackTransaction: true),
|
||||
// so the application is still open -- say so instead of letting that read as "nothing happened".
|
||||
if (response?.rollbackTransaction) {
|
||||
this.alertService.alert({
|
||||
type: 'Success',
|
||||
message:
|
||||
'Withdrawal has been sent for checker approval. The application is unchanged until a checker approves it.'
|
||||
});
|
||||
}
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,7 +446,16 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
if (response.confirm) {
|
||||
this.savingsService
|
||||
.executeSavingsAccountCommand(this.savingsAccountData.id, 'postInterest', {})
|
||||
.subscribe(() => {
|
||||
.subscribe((commandResponse: any) => {
|
||||
// Parked in the Checker Inbox rather than executed (HTTP 200 with
|
||||
// rollbackTransaction: true), so the reload below shows no new interest posting.
|
||||
if (commandResponse?.rollbackTransaction) {
|
||||
this.alertService.alert({
|
||||
type: 'Success',
|
||||
message:
|
||||
'Interest posting has been sent for checker approval. No interest is posted until a checker approves it.'
|
||||
});
|
||||
}
|
||||
this.reload();
|
||||
});
|
||||
}
|
||||
|
||||
+99
@@ -130,4 +130,103 @@
|
||||
<p class="empty-text">There are no accounts awaiting approval at this time.</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Share accounts awaiting approval render here too, rather than on their own tab. Own table,
|
||||
own per-row approve/reject/view actions - unchanged from their previous standalone screen. -->
|
||||
<h3 class="pa-section-heading">Pending Share Accounts</h3>
|
||||
@if (showShareData) {
|
||||
<div class="psa-action-bar">
|
||||
<mat-form-field appearance="outline" class="psa-search-field">
|
||||
<mat-icon matPrefix>search</mat-icon>
|
||||
<input
|
||||
#shareFilterInput
|
||||
matInput
|
||||
placeholder="Search by account number, member or product"
|
||||
(keyup)="applyShareFilter(shareFilterInput.value)"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div class="table-container">
|
||||
<table mat-table [dataSource]="shareDataSource" class="modern-table">
|
||||
<ng-container matColumnDef="accountNo">
|
||||
<th mat-header-cell *matHeaderCellDef>Account No.</th>
|
||||
<td mat-cell *matCellDef="let account" class="psa-mono">{{ account.accountNo }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="clientName">
|
||||
<th mat-header-cell *matHeaderCellDef>Member</th>
|
||||
<td mat-cell *matCellDef="let account">
|
||||
{{ account.clientName }}
|
||||
@if (account.officeName) {
|
||||
<div class="psa-sub">{{ account.officeName }}</div>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="productName">
|
||||
<th mat-header-cell *matHeaderCellDef>Product</th>
|
||||
<td mat-cell *matCellDef="let account">{{ account.productName }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedShares">
|
||||
<th mat-header-cell *matHeaderCellDef class="ta-right">Shares</th>
|
||||
<td mat-cell *matCellDef="let account" class="ta-right psa-num">{{ account.requestedShares }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedAmount">
|
||||
<th mat-header-cell *matHeaderCellDef class="ta-right">Amount</th>
|
||||
<td mat-cell *matCellDef="let account" class="ta-right psa-num">
|
||||
{{ account.requestedAmount | number: '1.2-2' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="resolution">
|
||||
<th mat-header-cell *matHeaderCellDef>Resolution</th>
|
||||
<td mat-cell *matCellDef="let account">
|
||||
{{ account.resolutionNumber || '—' }}
|
||||
@if (account.resolutionDate) {
|
||||
<div class="psa-sub">{{ formatShareDate(account.resolutionDate) }}</div>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="submittedDate">
|
||||
<th mat-header-cell *matHeaderCellDef>Submitted</th>
|
||||
<td mat-cell *matCellDef="let account">
|
||||
{{ formatShareDate(account.submittedDate) }}
|
||||
@if (account.submittedByUsername) {
|
||||
<div class="psa-sub">by {{ account.submittedByUsername }}</div>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let account">
|
||||
<button mat-stroked-button class="psa-btn psa-btn-view" (click)="viewShareAccount(account)">
|
||||
<fa-icon icon="eye" class="m-r-10"></fa-icon>View
|
||||
</button>
|
||||
<button mat-stroked-button class="psa-btn psa-btn-approve" (click)="approveShareAccount(account)">
|
||||
<fa-icon icon="check" class="m-r-10"></fa-icon>Approve
|
||||
</button>
|
||||
<button mat-stroked-button class="psa-btn psa-btn-reject" (click)="rejectShareAccount(account)">
|
||||
<fa-icon icon="ban" class="m-r-10"></fa-icon>Reject
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="shareDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: shareDisplayedColumns" class="table-row"></tr>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!showShareData) {
|
||||
<div class="empty-state">
|
||||
<fa-icon icon="hourglass-half" class="empty-icon"></fa-icon>
|
||||
<p class="empty-title">No pending share accounts</p>
|
||||
<p class="empty-text">There are no share accounts awaiting approval at this time.</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
+10
@@ -14,6 +14,16 @@ $text-muted: #64748b;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
/* Marks where the Share Account section begins below the normal-account table on this same screen. */
|
||||
.pa-section-heading {
|
||||
margin: 28px 0 12px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #0d1b2a;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid $border;
|
||||
}
|
||||
|
||||
.cv-action-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
+120
-3
@@ -29,17 +29,24 @@ import { MatCheckbox } from '@angular/material/checkbox';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
import { TasksService } from '../../tasks.service';
|
||||
import { SharesService } from 'app/shares/shares.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { DecimalPipe } from '@angular/common';
|
||||
import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component';
|
||||
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
||||
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
||||
import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base';
|
||||
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-pending-account',
|
||||
templateUrl: './pending-account.component.html',
|
||||
styleUrls: ['./pending-account.component.scss'],
|
||||
styleUrls: [
|
||||
'./pending-account.component.scss',
|
||||
'../pending-share-accounts/pending-share-accounts.component.scss'
|
||||
],
|
||||
imports: [
|
||||
...STANDALONE_SHARED_IMPORTS,
|
||||
FaIconComponent,
|
||||
@@ -54,7 +61,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
MatHeaderRow,
|
||||
MatRowDef,
|
||||
MatRow,
|
||||
MatIcon
|
||||
MatIcon,
|
||||
DecimalPipe
|
||||
]
|
||||
})
|
||||
export class PendingAccountComponent {
|
||||
@@ -64,6 +72,7 @@ export class PendingAccountComponent {
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
private tasksService = inject(TasksService);
|
||||
private sharesService = inject(SharesService);
|
||||
|
||||
dataSource: MatTableDataSource<any>;
|
||||
selection: SelectionModel<any>;
|
||||
@@ -81,8 +90,26 @@ export class PendingAccountComponent {
|
||||
'status'
|
||||
];
|
||||
|
||||
/** Share accounts awaiting approval - rendered as their own section on this same screen rather
|
||||
* than a separate tab. Kept out of `dataSource`/`selection` (bulk-select + date-picker approve)
|
||||
* since a share subscription is approved/rejected one at a time against today's business date,
|
||||
* exactly as it always was on its own page - only where it's shown has changed. */
|
||||
shareDataSource: MatTableDataSource<any>;
|
||||
showShareData = false;
|
||||
|
||||
shareDisplayedColumns: string[] = [
|
||||
'accountNo',
|
||||
'clientName',
|
||||
'productName',
|
||||
'requestedShares',
|
||||
'requestedAmount',
|
||||
'resolution',
|
||||
'submittedDate',
|
||||
'actions'
|
||||
];
|
||||
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { pendingAccountsData: any }) => {
|
||||
this.route.data.subscribe((data: { pendingAccountsData: any; pendingShareAccountsData: any }) => {
|
||||
// status 100 = submitted and pending approval only; exclude terminated accounts
|
||||
const items = (data.pendingAccountsData?.pageItems || []).filter(
|
||||
(a: any) => a.status?.id === 100 && !a.terminateTrue
|
||||
@@ -90,6 +117,10 @@ export class PendingAccountComponent {
|
||||
this.showData = items.length > 0;
|
||||
this.dataSource = new MatTableDataSource(items);
|
||||
this.selection = new SelectionModel(true, []);
|
||||
|
||||
const shareItems = data.pendingShareAccountsData || [];
|
||||
this.showShareData = shareItems.length > 0;
|
||||
this.shareDataSource = new MatTableDataSource(shareItems);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -283,6 +314,92 @@ export class PendingAccountComponent {
|
||||
return date;
|
||||
}
|
||||
|
||||
applyShareFilter(filterValue: string = '') {
|
||||
this.shareDataSource.filter = filterValue.trim().toLowerCase();
|
||||
}
|
||||
|
||||
/** A date from the share account API rendered readably, whether it arrives as a string or as
|
||||
* Fineract's {@code [yyyy, m, d]} array. Kept separate from `formatDate()` above, which the
|
||||
* normal-account table already relies on with its own date-array handling. */
|
||||
formatShareDate(date: any): string {
|
||||
if (!date) {
|
||||
return '';
|
||||
}
|
||||
const d = Array.isArray(date) ? new Date(date[0], date[1] - 1, date[2]) : new Date(date);
|
||||
return isNaN(d.getTime()) ? String(date) : d.toLocaleDateString('en-IN');
|
||||
}
|
||||
|
||||
/** Opens the share account itself, for a checker who wants more than the row shows. */
|
||||
viewShareAccount(account: any): void {
|
||||
this.router.navigate([
|
||||
'/clients',
|
||||
account.clientId,
|
||||
'shares-accounts',
|
||||
account.shareAccountId
|
||||
]);
|
||||
}
|
||||
|
||||
approveShareAccount(account: any): void {
|
||||
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
data: {
|
||||
heading: 'Approve Share Account',
|
||||
dialogContext:
|
||||
`Approve share account "${account.accountNo}" for ${account.clientName} — ` +
|
||||
`${account.requestedShares} shares at ${account.requestedAmount}?`,
|
||||
type: 'basic'
|
||||
}
|
||||
});
|
||||
dialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response?.confirm) {
|
||||
// The approval date is the business date rather than the checker's choice, same as this
|
||||
// queue's original standalone screen: clearing a submission is a decision, not a backdated
|
||||
// transaction, so a date field per row would be extra clicks for no benefit.
|
||||
const data = {
|
||||
approvedDate: this.dateUtils.formatDate(this.settingsService.businessDate, this.settingsService.dateFormat),
|
||||
dateFormat: this.settingsService.dateFormat,
|
||||
locale: this.settingsService.language.code
|
||||
};
|
||||
this.sharesService
|
||||
.executeSharesAccountCommand(account.shareAccountId, 'approve', data)
|
||||
.subscribe(() => this.reload());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
rejectShareAccount(account: any): void {
|
||||
const formfields: FormfieldBase[] = [
|
||||
new InputBase({
|
||||
controlName: 'rejectReason',
|
||||
label: 'Reason for rejection',
|
||||
value: '',
|
||||
type: 'text',
|
||||
required: false
|
||||
})
|
||||
];
|
||||
const dialogRef = this.dialog.open(FormDialogComponent, {
|
||||
data: {
|
||||
title: `Reject Share Account ${account.accountNo}`,
|
||||
formfields
|
||||
}
|
||||
});
|
||||
dialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response?.data) {
|
||||
const data: any = {
|
||||
rejectedDate: this.dateUtils.formatDate(this.settingsService.businessDate, this.settingsService.dateFormat),
|
||||
dateFormat: this.settingsService.dateFormat,
|
||||
locale: this.settingsService.language.code
|
||||
};
|
||||
const reason = response.data.value?.rejectReason?.trim();
|
||||
if (reason) {
|
||||
data.note = reason;
|
||||
}
|
||||
this.sharesService
|
||||
.executeSharesAccountCommand(account.shareAccountId, 'reject', data)
|
||||
.subscribe(() => this.reload());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
reload() {
|
||||
const url = this.router.url;
|
||||
this.router
|
||||
|
||||
@@ -72,15 +72,6 @@
|
||||
<fa-icon icon="hourglass-half" class="ac-tab__ic"></fa-icon>
|
||||
<span>Pending Account</span>
|
||||
</a>
|
||||
<a
|
||||
class="ac-tab"
|
||||
routerLink="./pending-share-accounts"
|
||||
routerLinkActive="ac-tab--active"
|
||||
*mifosxHasPermission="'ALL_FUNCTIONS_READ'"
|
||||
>
|
||||
<fa-icon icon="hourglass-half" class="ac-tab__ic"></fa-icon>
|
||||
<span>Pending Share Accounts</span>
|
||||
</a>
|
||||
<a
|
||||
class="ac-tab"
|
||||
routerLink="./product-approval"
|
||||
|
||||
@@ -108,7 +108,10 @@ const routes: Routes = [
|
||||
component: PendingAccountComponent,
|
||||
data: { title: 'Pending Account' },
|
||||
resolve: {
|
||||
pendingAccountsData: GetPendingAccounts
|
||||
pendingAccountsData: GetPendingAccounts,
|
||||
// Share accounts awaiting approval now render inside this same screen instead of their
|
||||
// own tab - reuses the same resolver the standalone route below still uses.
|
||||
pendingShareAccountsData: GetPendingShareAccounts
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -13,21 +13,15 @@
|
||||
<div>
|
||||
<h2 class="tdsr__title">Deposit Interest & TDS</h2>
|
||||
<div class="tdsr__sub">
|
||||
Interest each customer earned this year, and whether TDS has to be deducted on it ·
|
||||
<strong>Showing: {{ scopeLabel }}</strong>
|
||||
Quarter-wise and yearly interest on time deposits, with tax deductible under {{ statute.section }} ·
|
||||
{{ scopeLabel }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tdsr__head-r">
|
||||
<button type="button" class="tdsr__btn" (click)="showHelp = !showHelp">
|
||||
<fa-icon icon="question-circle"></fa-icon>
|
||||
{{ showHelp ? 'Hide help' : 'How to read this page' }}
|
||||
</button>
|
||||
<button type="button" class="tdsr__btn" (click)="exportWorkbook()" [disabled]="exporting">
|
||||
<fa-icon icon="download"></fa-icon>
|
||||
{{ exporting ? 'Preparing…' : 'Export' }}
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="tdsr__btn" (click)="exportWorkbook()" [disabled]="exporting">
|
||||
<fa-icon icon="download"></fa-icon>
|
||||
{{ exporting ? 'Preparing…' : 'Export' }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (loadError) {
|
||||
@@ -37,87 +31,57 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Help -->
|
||||
@if (showHelp) {
|
||||
<div class="tdsr__help">
|
||||
<div class="tdsr__help-title"><fa-icon icon="info-circle"></fa-icon> How to read this page</div>
|
||||
<ol class="tdsr__help-list">
|
||||
<li>
|
||||
Every customer with an account is listed. Each account is either
|
||||
<span class="tdsr__pill tdsr__pill--ok">Tracked</span> — its interest counts toward the TDS limit — or
|
||||
<span class="tdsr__pill">Not tracked</span>. Open a row (<fa-icon icon="chevron-down"></fa-icon>) to see which
|
||||
account is which, and why.
|
||||
</li>
|
||||
<li>
|
||||
Only <strong>fixed and recurring deposits</strong> are tracked. Savings interest is shown for information but
|
||||
never attracts TDS.
|
||||
</li>
|
||||
@if (rules) {
|
||||
<li>
|
||||
A customer's tracked interest for the whole year, across every branch, is checked against the limit:
|
||||
<strong>₹{{ rules.general | number: '1.0-0' }}</strong
|
||||
>, or <strong>₹{{ rules.senior | number: '1.0-0' }}</strong> for a senior citizen (60+).
|
||||
</li>
|
||||
<li>
|
||||
Once over the limit, TDS is <strong>{{ rules.rate | number: '1.0-2' }}%</strong> of the
|
||||
<em>whole</em> year's interest — <strong>{{ rules.rateNoPan | number: '1.0-2' }}%</strong> if no PAN is on
|
||||
record.
|
||||
</li>
|
||||
}
|
||||
<li>A customer who has submitted Form 15G/15H is not deducted, even over the limit.</li>
|
||||
<li>
|
||||
The TDS figures here are <strong>worked out by this report</strong> from the interest actually posted. They
|
||||
are not debited from the customer's account automatically.
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="tdsr__kpis">
|
||||
<div class="tdsr__kpi">
|
||||
<div class="tdsr__kpi-n">{{ summary.deductees | number }}</div>
|
||||
<div class="tdsr__kpi-l">Customers · {{ summary.trackedCustomers | number }} with an FD/RD being tracked</div>
|
||||
<div class="tdsr__kpi-l">Deductees</div>
|
||||
</div>
|
||||
<div class="tdsr__kpi">
|
||||
<div class="tdsr__kpi-n">₹{{ summary.applicableInterest | number: '1.0-0' }}</div>
|
||||
<div class="tdsr__kpi-l">FD / RD interest — counts toward the limit</div>
|
||||
<div class="tdsr__kpi-l">Interest on FD / RD</div>
|
||||
</div>
|
||||
<div class="tdsr__kpi tdsr__kpi--muted">
|
||||
<div class="tdsr__kpi-n">₹{{ summary.exemptInterest | number: '1.0-0' }}</div>
|
||||
<div class="tdsr__kpi-l">Savings interest — shown only, no TDS</div>
|
||||
</div>
|
||||
<div class="tdsr__kpi tdsr__kpi--warn">
|
||||
<div class="tdsr__kpi-n">{{ summary.crossed | number }}</div>
|
||||
<div class="tdsr__kpi-l">Customers over the limit</div>
|
||||
<div class="tdsr__kpi-l">Savings interest — outside the charge</div>
|
||||
</div>
|
||||
<div class="tdsr__kpi tdsr__kpi--warn">
|
||||
<div class="tdsr__kpi-n">₹{{ summary.totalTds | number: '1.0-0' }}</div>
|
||||
<div class="tdsr__kpi-l">TDS to be deducted</div>
|
||||
<div class="tdsr__kpi-l">TDS payable</div>
|
||||
</div>
|
||||
<div class="tdsr__kpi tdsr__kpi--warn">
|
||||
<div class="tdsr__kpi-n">{{ summary.crossed | number }}</div>
|
||||
<div class="tdsr__kpi-l">Crossed the threshold</div>
|
||||
</div>
|
||||
<button type="button" class="tdsr__kpi tdsr__kpi--action" (click)="showNearThreshold()">
|
||||
<div class="tdsr__kpi-n">{{ summary.nearThreshold | number }}</div>
|
||||
<div class="tdsr__kpi-l">Within ₹{{ nearBand | number: '1.0-0' }} of it — chase a declaration</div>
|
||||
</button>
|
||||
<div class="tdsr__kpi tdsr__kpi--ok">
|
||||
<div class="tdsr__kpi-n">₹{{ summary.tdsSaved | number: '1.0-0' }}</div>
|
||||
<div class="tdsr__kpi-l">Saved by {{ summary.declarations | number }} declarations</div>
|
||||
</div>
|
||||
@if (summary.noPan > 0) {
|
||||
<div class="tdsr__kpi tdsr__kpi--warn">
|
||||
<div class="tdsr__kpi-n">{{ summary.noPan | number }}</div>
|
||||
<div class="tdsr__kpi-l">No PAN — deducted at 20%</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<!-- Things worth acting on, only when there are any -->
|
||||
@if (summary.nearThreshold || summary.declarations || summary.noPan) {
|
||||
<div class="tdsr__chips">
|
||||
@if (summary.nearThreshold) {
|
||||
<button type="button" class="tdsr__chip tdsr__chip--near" (click)="showNearThreshold()">
|
||||
{{ summary.nearThreshold | number }} near the limit (within ₹{{ nearBand | number: '1.0-0' }}) — ask for
|
||||
15G/15H
|
||||
</button>
|
||||
}
|
||||
@if (summary.declarations) {
|
||||
<span class="tdsr__chip tdsr__chip--ok">
|
||||
{{ summary.declarations | number }} with 15G/15H — ₹{{ summary.tdsSaved | number: '1.0-0' }} not deducted
|
||||
</span>
|
||||
}
|
||||
@if (summary.noPan) {
|
||||
<span class="tdsr__chip tdsr__chip--warn">
|
||||
{{ summary.noPan | number }} FD/RD customers without PAN — higher rate applies
|
||||
</span>
|
||||
<!-- Quarter strip -->
|
||||
<div class="tdsr__card">
|
||||
<div class="tdsr__card-head"><fa-icon icon="calendar"></fa-icon> Quarter by quarter</div>
|
||||
<div class="tdsr__qstrip">
|
||||
@for (q of summary.byQuarter; track q.quarter) {
|
||||
<div class="tdsr__qcell">
|
||||
<div class="tdsr__qcell-l">{{ quarterLabel[q.quarter] }}</div>
|
||||
<div class="tdsr__qcell-n">₹{{ q.interest | number: '1.0-0' }}</div>
|
||||
<div class="tdsr__qcell-s">TDS ₹{{ q.tds | number: '1.0-0' }}</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
<div class="tdsr__filters">
|
||||
@@ -135,8 +99,8 @@
|
||||
<span>Branch</span>
|
||||
<select [(ngModel)]="filter.branchCode" (ngModelChange)="onFilterChanged()">
|
||||
<option value="">All branches</option>
|
||||
@for (b of branches; track b) {
|
||||
<option [value]="b">{{ b }}</option>
|
||||
@for (b of branches; track b.code) {
|
||||
<option [value]="b.code">{{ b.name }}</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
@@ -153,32 +117,32 @@
|
||||
</label>
|
||||
|
||||
<label class="tdsr__filter">
|
||||
<span>Age group</span>
|
||||
<span>Threshold band</span>
|
||||
<select [(ngModel)]="filter.band" (ngModelChange)="onFilterChanged()">
|
||||
<option value="">Everyone</option>
|
||||
<option value="GENERAL">Below 60</option>
|
||||
<option value="">Both bands</option>
|
||||
<option value="GENERAL">General (below 60)</option>
|
||||
<option value="SENIOR">Senior citizen (60+)</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label class="tdsr__filter tdsr__filter--wide">
|
||||
<span>Search customer</span>
|
||||
<span>Customer / CIF / PAN</span>
|
||||
<input
|
||||
type="text"
|
||||
[(ngModel)]="filter.search"
|
||||
(ngModelChange)="onFilterChanged()"
|
||||
placeholder="Name, customer ID or PAN"
|
||||
placeholder="name, CIF or PAN"
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label class="tdsr__check">
|
||||
<input type="checkbox" [(ngModel)]="filter.crossedOnly" (ngModelChange)="onFilterChanged()" />
|
||||
<span>Over the limit only</span>
|
||||
<span>Threshold crossed only</span>
|
||||
</label>
|
||||
|
||||
<label class="tdsr__check">
|
||||
<input type="checkbox" [(ngModel)]="filter.nearThresholdOnly" (ngModelChange)="onFilterChanged()" />
|
||||
<span>Near the limit only</span>
|
||||
<span>Near threshold only</span>
|
||||
</label>
|
||||
|
||||
@if (hasFilters) {
|
||||
@@ -186,7 +150,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<!-- Tabs -->
|
||||
<!-- Tabs Selector -->
|
||||
<div class="tdsr__tabs">
|
||||
<button
|
||||
type="button"
|
||||
@@ -194,7 +158,7 @@
|
||||
[class.tdsr__tab--active]="selectedTab === 'paying'"
|
||||
(click)="selectTab('paying')"
|
||||
>
|
||||
TDS to deduct ({{ payingRows.length }})
|
||||
Paying TDS ({{ payingRows.length }})
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -202,7 +166,7 @@
|
||||
[class.tdsr__tab--active]="selectedTab === 'not-paying'"
|
||||
(click)="selectTab('not-paying')"
|
||||
>
|
||||
No TDS ({{ notPayingRows.length }})
|
||||
Not Paying TDS ({{ notPayingRows.length }})
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -212,76 +176,87 @@
|
||||
<table class="tdsr__table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Customer</th>
|
||||
<th>Customer · PAN</th>
|
||||
<th>Branch</th>
|
||||
<th>Accounts</th>
|
||||
<th class="num">FD / RD interest this year</th>
|
||||
<th class="num">Limit</th>
|
||||
<th>Status</th>
|
||||
<th>Form · Band</th>
|
||||
<th class="num">Q1</th>
|
||||
<th class="num">Q2</th>
|
||||
<th class="num">Q3</th>
|
||||
<th class="num">Q4</th>
|
||||
<th class="num">Year total</th>
|
||||
<th class="num">Threshold</th>
|
||||
<th>Crossed</th>
|
||||
<th class="num">TDS</th>
|
||||
<th class="num">Saved</th>
|
||||
<th class="col-actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (row of pagedRows; track trackRow($index, row)) {
|
||||
<tr class="tdsr__row--click" [class.tdsr__row--near]="row.nearThreshold" (click)="toggleExpanded(row)">
|
||||
<tr [class.tdsr__row--warn]="!row.panOnRecord" [class.tdsr__row--near]="row.nearThreshold">
|
||||
<td>
|
||||
<div class="tdsr__name">{{ row.deductee.name }}</div>
|
||||
<div class="mono small muted">
|
||||
ID {{ row.deductee.customerId }} ·
|
||||
{{ row.deductee.customerId }} ·
|
||||
@if (row.panOnRecord) {
|
||||
PAN {{ row.deductee.pan }}
|
||||
{{ row.deductee.pan }}
|
||||
} @else {
|
||||
<span class="tdsr__pill tdsr__pill--warn">no PAN</span>
|
||||
}
|
||||
@if (row.band === 'SENIOR') {
|
||||
<span class="tdsr__pill">Senior 60+</span>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
<td class="small">{{ row.branchCode || '—' }}</td>
|
||||
<td class="small">
|
||||
@if (row.trackedAccounts) {
|
||||
<span class="tdsr__pill tdsr__pill--ok">{{ row.trackedAccounts }} tracked</span>
|
||||
}
|
||||
@if (untrackedOf(row).length) {
|
||||
<span class="tdsr__pill">{{ untrackedOf(row).length }} not tracked</span>
|
||||
<td class="small">{{ branchName(row.branchCode) }}</td>
|
||||
<td>
|
||||
<span class="tdsr__pill" [class.tdsr__pill--ok]="row.hasDeclaration">
|
||||
{{ row.form === '121' ? '121' : row.form }}
|
||||
</span>
|
||||
<div class="small muted">{{ row.band === 'SENIOR' ? 'Senior' : 'General' }}</div>
|
||||
@if (row.hasDeclaration) {
|
||||
<div class="mono small muted">{{ row.declarationUin }}</div>
|
||||
}
|
||||
</td>
|
||||
@for (q of quarters; track q) {
|
||||
<td class="num small">
|
||||
@if (row.quarters[q]) {
|
||||
₹{{ row.quarters[q] | number: '1.0-0' }}
|
||||
} @else {
|
||||
<span class="muted">—</span>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
<td class="num">
|
||||
<strong>₹{{ row.tdsApplicableInterest | number: '1.0-0' }}</strong>
|
||||
@if (row.exemptInterest) {
|
||||
<div class="small muted">+ ₹{{ row.exemptInterest | number: '1.0-0' }} savings (no TDS)</div>
|
||||
<div class="small muted">+₹{{ row.exemptInterest | number: '1.0-0' }} SB (exempt)</div>
|
||||
}
|
||||
</td>
|
||||
<td class="num small muted">₹{{ row.threshold | number: '1.0-0' }}</td>
|
||||
<td class="small">
|
||||
<span
|
||||
class="tdsr__pill"
|
||||
[class.tdsr__pill--warn]="statusOf(row).tone === 'warn'"
|
||||
[class.tdsr__pill--near]="statusOf(row).tone === 'near'"
|
||||
[class.tdsr__pill--ok]="statusOf(row).tone === 'ok'"
|
||||
>
|
||||
{{ statusOf(row).label }}
|
||||
</span>
|
||||
@if (row.crossedInQuarter) {
|
||||
<span class="tdsr__pill tdsr__pill--warn">Q{{ row.crossedInQuarter }}</span>
|
||||
} @else if (row.nearThreshold) {
|
||||
<span class="tdsr__pill tdsr__pill--near"> ₹{{ row.headroom | number: '1.0-0' }} left </span>
|
||||
} @else {
|
||||
<span class="muted">—</span>
|
||||
}
|
||||
</td>
|
||||
<td class="num">
|
||||
@if (row.schedule.totalTds) {
|
||||
<strong>₹{{ row.schedule.totalTds | number: '1.0-0' }}</strong>
|
||||
<div class="small muted">@ {{ row.rateApplied * 100 | number: '1.0-0' }}%</div>
|
||||
} @else if (row.tdsSaved) {
|
||||
<span class="small tdsr__ok">₹{{ row.tdsSaved | number: '1.0-0' }} saved</span>
|
||||
} @else {
|
||||
<span class="muted">—</span>
|
||||
}
|
||||
</td>
|
||||
<td class="num">
|
||||
@if (row.tdsSaved) {
|
||||
<strong class="tdsr__ok">₹{{ row.tdsSaved | number: '1.0-0' }}</strong>
|
||||
} @else {
|
||||
<span class="muted">—</span>
|
||||
}
|
||||
</td>
|
||||
<td class="col-actions">
|
||||
<button
|
||||
type="button"
|
||||
class="tdsr__icon-btn"
|
||||
[attr.aria-label]="isExpanded(row) ? 'Hide details' : 'Show details'"
|
||||
(click)="$event.stopPropagation(); toggleExpanded(row)"
|
||||
>
|
||||
<button type="button" class="tdsr__icon-btn" (click)="toggleExpanded(row)">
|
||||
<fa-icon [icon]="isExpanded(row) ? 'chevron-up' : 'chevron-down'"></fa-icon>
|
||||
</button>
|
||||
</td>
|
||||
@@ -289,138 +264,89 @@
|
||||
|
||||
@if (isExpanded(row)) {
|
||||
<tr class="tdsr__row--detail">
|
||||
<td colspan="8">
|
||||
<!-- 1. Which accounts are tracked -->
|
||||
<div class="tdsr__detail-h">Accounts of {{ row.deductee.name }}</div>
|
||||
<td colspan="13">
|
||||
@for (note of row.schedule.notes; track note) {
|
||||
<div class="tdsr__note">
|
||||
<fa-icon icon="info-circle"></fa-icon>
|
||||
<div>{{ note }}</div>
|
||||
</div>
|
||||
}
|
||||
@if (row.jointHeldInterest) {
|
||||
<div class="tdsr__note">
|
||||
<fa-icon icon="info-circle"></fa-icon>
|
||||
<div>
|
||||
₹{{ row.jointHeldInterest | number: '1.0-0' }} of interest sits on deposits where this customer
|
||||
is a joint holder but not the first-named one. Tax there is deducted against the first-named
|
||||
holder, so it is excluded from the figures above.
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<table class="tdsr__table tdsr__table--inner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Account no.</th>
|
||||
<th>Type</th>
|
||||
<th>Tracked for TDS?</th>
|
||||
<th class="num">Interest this year</th>
|
||||
<th class="num">Postings</th>
|
||||
<th>Last posted</th>
|
||||
<th>Quarter</th>
|
||||
<th class="num">Interest</th>
|
||||
<th class="num">Cumulative</th>
|
||||
<th class="num">Liability to date</th>
|
||||
<th class="num">TDS this quarter</th>
|
||||
<th>Return due</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (a of row.accounts; track a.accountNo) {
|
||||
<tr>
|
||||
<td class="mono small">{{ a.accountNo }}</td>
|
||||
<td class="small">{{ accountTypeLabel[a.type] }}</td>
|
||||
@for (line of row.schedule.lines; track line.quarter) {
|
||||
<tr [class.tdsr__row--warn]="line.thresholdCrossedHere">
|
||||
<td class="small">
|
||||
@if (a.tracked) {
|
||||
<span class="tdsr__pill tdsr__pill--ok"><fa-icon icon="check"></fa-icon> Yes</span>
|
||||
} @else {
|
||||
<span class="tdsr__pill">No</span>
|
||||
{{ line.label }}
|
||||
@if (line.thresholdCrossedHere) {
|
||||
<span class="tdsr__pill tdsr__pill--warn">crossed here</span>
|
||||
}
|
||||
@if (line.declarationActive) {
|
||||
<span class="tdsr__pill tdsr__pill--ok">Form 121 active</span>
|
||||
}
|
||||
<span class="muted"> {{ a.reason }}</span>
|
||||
</td>
|
||||
<td class="num">₹{{ a.interest | number: '1.2-2' }}</td>
|
||||
<td class="num small">{{ a.postings }}</td>
|
||||
<td class="small muted">
|
||||
{{ a.lastPostedOn ? (a.lastPostedOn | date: 'd MMM y') : 'No interest posted yet' }}
|
||||
<td class="num">₹{{ line.interest | number: '1.0-0' }}</td>
|
||||
<td class="num">₹{{ line.cumInterest | number: '1.0-0' }}</td>
|
||||
<td class="num">₹{{ line.cumLiability | number: '1.0-0' }}</td>
|
||||
<td class="num">
|
||||
@if (line.tds !== 0) {
|
||||
<strong>₹{{ line.tds | number: '1.0-0' }}</strong>
|
||||
} @else {
|
||||
<span class="muted">—</span>
|
||||
}
|
||||
</td>
|
||||
<td class="small muted">{{ line.dueDate }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 2. How the TDS was worked out -->
|
||||
@if (row.trackedAccounts) {
|
||||
<div class="tdsr__detail-h">How the TDS is worked out, quarter by quarter</div>
|
||||
@for (note of row.schedule.notes; track note) {
|
||||
<div class="tdsr__note">
|
||||
<fa-icon icon="info-circle"></fa-icon>
|
||||
<div>{{ note }}</div>
|
||||
</div>
|
||||
}
|
||||
@if (row.schedule.lines.length) {
|
||||
<table class="tdsr__table tdsr__table--inner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Quarter</th>
|
||||
<th class="num">Interest in quarter</th>
|
||||
<th class="num">Total so far</th>
|
||||
<th class="num">TDS this quarter</th>
|
||||
<th>Return due</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (line of row.schedule.lines; track line.quarter) {
|
||||
<tr [class.tdsr__row--warn]="line.thresholdCrossedHere">
|
||||
<td class="small">
|
||||
{{ line.label }}
|
||||
@if (line.thresholdCrossedHere) {
|
||||
<span class="tdsr__pill tdsr__pill--warn">limit crossed here</span>
|
||||
}
|
||||
@if (line.declarationActive) {
|
||||
<span class="tdsr__pill tdsr__pill--ok">15G/15H active</span>
|
||||
}
|
||||
</td>
|
||||
<td class="num">₹{{ line.interest | number: '1.0-0' }}</td>
|
||||
<td class="num">
|
||||
₹{{ line.cumInterest | number: '1.0-0' }}
|
||||
<span class="small muted">of ₹{{ row.threshold | number: '1.0-0' }}</span>
|
||||
</td>
|
||||
<td class="num">
|
||||
@if (line.tds !== 0) {
|
||||
<strong>₹{{ line.tds | number: '1.0-0' }}</strong>
|
||||
} @else {
|
||||
<span class="muted">—</span>
|
||||
}
|
||||
</td>
|
||||
<td class="small muted">{{ line.dueDate }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
} @else {
|
||||
<div class="small muted">No interest has been posted on the tracked deposits this year yet.</div>
|
||||
<div class="tdsr__meta">
|
||||
<span
|
||||
>Settlement: <strong>{{ row.mode === 'QUARTERLY' ? 'Quarterly' : 'Year end' }}</strong> (set by
|
||||
the deposit product)</span
|
||||
>
|
||||
@if (row.declarationAcceptedOn) {
|
||||
<span
|
||||
>Declaration accepted: <strong>{{ row.declarationAcceptedOn | date: 'd MMM y' }}</strong></span
|
||||
>
|
||||
}
|
||||
@if (row.paidWithoutDeduction) {
|
||||
<div class="tdsr__meta">
|
||||
<span>
|
||||
Paid without deduction because of 15G/15H:
|
||||
<strong>₹{{ row.paidWithoutDeduction | number: '1.0-0' }}</strong> — still reported in
|
||||
{{ statute.statement }}
|
||||
</span>
|
||||
</div>
|
||||
<span>
|
||||
Paid without deduction:
|
||||
<strong>₹{{ row.paidWithoutDeduction | number: '1.0-0' }}</strong> — reportable in
|
||||
{{ statute.statement }}
|
||||
</span>
|
||||
}
|
||||
} @else {
|
||||
<div class="tdsr__note">
|
||||
<fa-icon icon="info-circle"></fa-icon>
|
||||
<div>
|
||||
This customer has no fixed or recurring deposit, so nothing here counts toward TDS. Savings
|
||||
interest is shown for information only.
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (row.jointHeldInterest) {
|
||||
<div class="tdsr__note">
|
||||
<fa-icon icon="info-circle"></fa-icon>
|
||||
<div>
|
||||
₹{{ row.jointHeldInterest | number: '1.0-0' }} of interest is on joint deposits where this
|
||||
customer is not the first-named holder, so it is counted under that holder instead.
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
@if (visibleRows.length === 0) {
|
||||
<tr>
|
||||
<td colspan="8" class="tdsr__empty">
|
||||
<fa-icon icon="info-circle"></fa-icon>
|
||||
@if (loading) {
|
||||
Loading…
|
||||
} @else if (selectedTab === 'paying') {
|
||||
No customer needs TDS deducted for these filters. Check the "No TDS" tab.
|
||||
} @else {
|
||||
No customers match these filters.
|
||||
}
|
||||
<td colspan="13" class="tdsr__empty">
|
||||
<fa-icon icon="info-circle"></fa-icon> No customers in this section match the filters.
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@@ -433,7 +359,8 @@
|
||||
<div class="tdsr__pager-l">
|
||||
<span>
|
||||
Showing <strong>{{ rangeStart | number }}–{{ rangeEnd | number }}</strong> of
|
||||
<strong>{{ visibleRows.length | number }}</strong> customers
|
||||
<strong>{{ visibleRows.length | number }}</strong>
|
||||
{{ selectedTab === 'paying' ? 'deductees paying TDS' : 'deductees not paying TDS' }}
|
||||
</span>
|
||||
<label class="tdsr__pager-sizel">
|
||||
Rows
|
||||
|
||||
@@ -13,12 +13,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import * as ExcelJS from 'exceljs';
|
||||
|
||||
import { BranchScopeService } from '../core/branch-scope.service';
|
||||
import { GL_BRANCHES, glBranchName } from '../gl-reports/gl-reports-data';
|
||||
import { FY_TAX_CONFIG, Quarter, QUARTER_LABEL } from '../letter-mgmt/certificates/form-15gh/tds-15gh.compute';
|
||||
import { TdsDeductee, setTdsDeductees, tdsFys } from './tds-reports-data';
|
||||
import { setTdsDeductees, tdsFys } from './tds-reports-data';
|
||||
import { TdsReportsService } from './tds-reports.service';
|
||||
import {
|
||||
NEAR_THRESHOLD_BAND,
|
||||
TdsAccountLine,
|
||||
TdsInterestRow,
|
||||
TdsInterestSummary,
|
||||
TdsReportFilter,
|
||||
@@ -40,12 +40,7 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
private scope = inject(BranchScopeService);
|
||||
private tdsService = inject(TdsReportsService);
|
||||
|
||||
/**
|
||||
* Office names the loaded customers belong to, for Head Office's branch selector. Read off the
|
||||
* data rather than a fixed list, which named branches this bank does not have and left out the
|
||||
* ones it does.
|
||||
*/
|
||||
branches: string[] = [];
|
||||
readonly branches = GL_BRANCHES.filter((b) => b.code !== 'HO');
|
||||
/** Filled by the route resolver from Organization › TDS Configuration. */
|
||||
readonly financialYears = tdsFys();
|
||||
readonly quarterLabel = QUARTER_LABEL;
|
||||
@@ -97,26 +92,16 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
|
||||
loading = false;
|
||||
loadError = '';
|
||||
/** The "how to read this page" panel. */
|
||||
showHelp = true;
|
||||
|
||||
readonly accountTypeLabel: Record<TdsAccountLine['type'], string> = {
|
||||
FD: 'Fixed deposit',
|
||||
RD: 'Recurring deposit',
|
||||
SB: 'Savings',
|
||||
OTHER: 'Other'
|
||||
};
|
||||
|
||||
ngOnInit(): void {
|
||||
if (!this.financialYears.length) {
|
||||
this.loadError = 'No financial year is configured for TDS. Set one up under Organization › TDS Configuration.';
|
||||
return;
|
||||
}
|
||||
// A branch login sees only its own book and cannot widen the scope. The platform labels each
|
||||
// customer with their office's name, so the login's office name is the filter — the GL branch
|
||||
// code list does not know every office and turned a branch login into an empty report.
|
||||
if (!this.scope.isHeadOffice) {
|
||||
this.filter.branchCode = this.scope.officeName;
|
||||
// A branch login sees only its own book and cannot widen the scope.
|
||||
const own = this.scope.ownBranchCode;
|
||||
if (own) {
|
||||
this.filter.branchCode = own;
|
||||
}
|
||||
this.loadDeductees();
|
||||
}
|
||||
@@ -136,7 +121,6 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
next: (deductees) => {
|
||||
this.loading = false;
|
||||
setTdsDeductees(deductees);
|
||||
this.branches = this.branchesOf(deductees);
|
||||
this.invalidateCaches();
|
||||
},
|
||||
error: (err: any) => {
|
||||
@@ -154,11 +138,6 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
* only the summary left the KPIs counting the new data while the tables kept the empty list
|
||||
* cached on the first render, before the load returned.
|
||||
*/
|
||||
private branchesOf(deductees: TdsDeductee[]): string[] {
|
||||
const names = new Set(deductees.map((d) => d.branchCode).filter((n) => !!n));
|
||||
return [...names].sort((a, b) => a.localeCompare(b));
|
||||
}
|
||||
|
||||
private invalidateCaches(): void {
|
||||
this.rowsCacheKey = '';
|
||||
this.summaryCacheKey = '';
|
||||
@@ -189,54 +168,12 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
/** The limits and rates for the selected year, for the help panel. */
|
||||
get rules(): { general: number; senior: number; rate: number; rateNoPan: number } | null {
|
||||
const cfg = FY_TAX_CONFIG[this.filter.fy];
|
||||
if (!cfg) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
general: cfg.thresholdGeneral,
|
||||
senior: cfg.thresholdSenior,
|
||||
rate: cfg.rate * 100,
|
||||
rateNoPan: cfg.rateNoPan * 100
|
||||
};
|
||||
}
|
||||
|
||||
get canSelectBranch(): boolean {
|
||||
return this.scope.canSelectBranch;
|
||||
}
|
||||
|
||||
get scopeLabel(): string {
|
||||
return this.filter.branchCode ? `${this.filter.branchCode} branch` : 'All branches';
|
||||
}
|
||||
|
||||
/**
|
||||
* One plain-language status per customer, so a reader does not have to work it out from the
|
||||
* threshold, crossed and saved columns together.
|
||||
*/
|
||||
statusOf(row: TdsInterestRow): { label: string; tone: 'muted' | 'warn' | 'near' | 'ok' } {
|
||||
if (!row.trackedAccounts) {
|
||||
return { label: 'Not tracked — no FD/RD', tone: 'muted' };
|
||||
}
|
||||
if (row.schedule.totalTds > 0) {
|
||||
return { label: 'Over the limit — TDS due', tone: 'warn' };
|
||||
}
|
||||
if (row.hasDeclaration && row.crossed) {
|
||||
return { label: 'Over the limit — 15G/15H, no TDS', tone: 'ok' };
|
||||
}
|
||||
if (row.nearThreshold) {
|
||||
return { label: `Near the limit — ₹${Math.round(row.headroom).toLocaleString('en-IN')} left`, tone: 'near' };
|
||||
}
|
||||
return { label: 'Below the limit', tone: 'ok' };
|
||||
}
|
||||
|
||||
trackedOf(row: TdsInterestRow): TdsAccountLine[] {
|
||||
return row.accounts.filter((a) => a.tracked);
|
||||
}
|
||||
|
||||
untrackedOf(row: TdsInterestRow): TdsAccountLine[] {
|
||||
return row.accounts.filter((a) => !a.tracked);
|
||||
return this.filter.branchCode ? glBranchName(this.filter.branchCode) : 'All branches';
|
||||
}
|
||||
|
||||
/** Recomputes the book only when the filter actually changed. Side-effect free. */
|
||||
@@ -378,6 +315,10 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
return this.expandedId === row.deductee.customerId;
|
||||
}
|
||||
|
||||
branchName(code: string): string {
|
||||
return glBranchName(code);
|
||||
}
|
||||
|
||||
trackRow(_: number, row: TdsInterestRow): string {
|
||||
return row.deductee.customerId;
|
||||
}
|
||||
@@ -396,9 +337,6 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
'CIF',
|
||||
'PAN',
|
||||
'Branch',
|
||||
'Accounts tracked for TDS',
|
||||
'Accounts not tracked',
|
||||
'Status',
|
||||
'Form',
|
||||
'Band',
|
||||
'Age',
|
||||
@@ -423,14 +361,7 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
r.deductee.name,
|
||||
r.deductee.customerId,
|
||||
r.deductee.pan || 'NOT ON RECORD',
|
||||
r.branchCode,
|
||||
this.trackedOf(r)
|
||||
.map((a) => `${a.accountNo} (${a.type})`)
|
||||
.join(', '),
|
||||
this.untrackedOf(r)
|
||||
.map((a) => `${a.accountNo} (${a.type})`)
|
||||
.join(', '),
|
||||
this.statusOf(r).label,
|
||||
this.branchName(r.branchCode),
|
||||
r.form === '121' ? 'Form 121' : `Form ${r.form}`,
|
||||
r.band === 'SENIOR' ? 'Senior citizen' : 'General',
|
||||
r.age,
|
||||
@@ -458,9 +389,6 @@ export class TdsInterestReportComponent implements OnInit {
|
||||
`${s.deductees} deductees`,
|
||||
'',
|
||||
'',
|
||||
`${s.trackedCustomers} tracked`,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
|
||||
@@ -56,25 +56,6 @@ export interface TdsReportFilter {
|
||||
nearThresholdOnly: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* One of the customer's accounts as the report sees it: whether its interest is being counted
|
||||
* toward the deduction, and if not, why not. A customer can hold savings, fixed and recurring
|
||||
* accounts together, and the branch has to see which of them the deduction is actually watching.
|
||||
*/
|
||||
export interface TdsAccountLine {
|
||||
accountNo: string;
|
||||
type: 'FD' | 'RD' | 'SB' | 'OTHER';
|
||||
/** True when the account's interest counts toward this customer's threshold. */
|
||||
tracked: boolean;
|
||||
/** Plain-language reason, shown beside the account. */
|
||||
reason: string;
|
||||
/** Interest credited in the year. */
|
||||
interest: number;
|
||||
/** How many interest postings made up that figure. */
|
||||
postings: number;
|
||||
lastPostedOn: string | null;
|
||||
}
|
||||
|
||||
/** How close to the trigger counts as "worth chasing a declaration for". */
|
||||
export const NEAR_THRESHOLD_BAND = 6_000;
|
||||
|
||||
@@ -120,10 +101,6 @@ export interface TdsInterestRow {
|
||||
paidWithoutDeduction: number;
|
||||
panOnRecord: boolean;
|
||||
rateApplied: number;
|
||||
/** Every account the customer holds, tracked or not. */
|
||||
accounts: TdsAccountLine[];
|
||||
/** How many of them count toward the deduction. */
|
||||
trackedAccounts: number;
|
||||
}
|
||||
|
||||
function emptyQuarters(): Record<Quarter, number> {
|
||||
@@ -177,35 +154,14 @@ export function tdsInterestRowsForFy(fy: string): TdsInterestRow[] {
|
||||
|
||||
let exemptInterest = 0;
|
||||
let jointHeldInterest = 0;
|
||||
const accountLines: TdsAccountLine[] = [];
|
||||
for (const account of deductee.accounts) {
|
||||
const yearCredits = account.credits.filter((c) => fyOf(c.date) === fy);
|
||||
const inYear = yearCredits.reduce((s, c) => s + c.amount, 0);
|
||||
const type = accountTypeOf(account.depositTypeCode);
|
||||
let tracked = false;
|
||||
let reason: string;
|
||||
const inYear = account.credits.filter((c) => fyOf(c.date) === fy).reduce((s, c) => s + c.amount, 0);
|
||||
if (!isTdsApplicable(account)) {
|
||||
exemptInterest += inYear;
|
||||
reason = type === 'SB' ? 'Savings account — no TDS on savings interest' : 'Not a time deposit — no TDS';
|
||||
} else if (tdsDeducteeOf(account) !== deductee.clientId) {
|
||||
jointHeldInterest += inYear;
|
||||
reason = 'Joint deposit — counted under the first-named holder';
|
||||
} else {
|
||||
tracked = true;
|
||||
reason = 'Counted toward the TDS limit';
|
||||
}
|
||||
accountLines.push({
|
||||
accountNo: account.accountNo || '',
|
||||
type,
|
||||
tracked,
|
||||
reason,
|
||||
interest: inYear,
|
||||
postings: yearCredits.length,
|
||||
lastPostedOn: yearCredits.reduce<string | null>((last, c) => (!last || c.date > last ? c.date : last), null)
|
||||
});
|
||||
}
|
||||
// Tracked accounts first, so the deposits that drive the figure lead the list.
|
||||
accountLines.sort((a, b) => Number(b.tracked) - Number(a.tracked));
|
||||
|
||||
const crossedLine = schedule.lines.find((l) => l.thresholdCrossedHere);
|
||||
const headroom = Math.max(0, schedule.threshold - schedule.totalInterest);
|
||||
@@ -234,9 +190,7 @@ export function tdsInterestRowsForFy(fy: string): TdsInterestRow[] {
|
||||
tdsSaved: declaration ? Math.max(0, withoutDeclaration.totalTds - schedule.totalTds) : 0,
|
||||
paidWithoutDeduction: schedule.shieldedInterest,
|
||||
panOnRecord: isWellFormedPan(deductee.pan),
|
||||
rateApplied: schedule.rateApplied,
|
||||
accounts: accountLines,
|
||||
trackedAccounts: accountLines.filter((a) => a.tracked).length
|
||||
rateApplied: schedule.rateApplied
|
||||
});
|
||||
}
|
||||
|
||||
@@ -256,29 +210,10 @@ function overallModeFor(deductee: TdsDeductee): TdsMode {
|
||||
return applicable.some((a) => tdsModeFor(a) === 'QUARTERLY') ? 'QUARTERLY' : 'ANNUAL';
|
||||
}
|
||||
|
||||
function accountTypeOf(code: string | undefined): TdsAccountLine['type'] {
|
||||
const c = (code || '').toLowerCase();
|
||||
if (c.includes('fixeddeposit')) {
|
||||
return 'FD';
|
||||
}
|
||||
if (c.includes('recurringdeposit')) {
|
||||
return 'RD';
|
||||
}
|
||||
if (c.includes('savings')) {
|
||||
return 'SB';
|
||||
}
|
||||
return 'OTHER';
|
||||
}
|
||||
|
||||
/** Branches are compared by office name, case and spacing aside — the platform and the session both carry the name. */
|
||||
function sameBranch(a: string, b: string): boolean {
|
||||
return (a || '').trim().toLowerCase() === (b || '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
export function tdsInterestRows(filter: TdsReportFilter): TdsInterestRow[] {
|
||||
const needle = filter.search.trim().toLowerCase();
|
||||
return tdsInterestRowsForFy(filter.fy).filter((row) => {
|
||||
if (filter.branchCode && !sameBranch(row.branchCode, filter.branchCode)) {
|
||||
if (filter.branchCode && row.branchCode !== filter.branchCode) {
|
||||
return false;
|
||||
}
|
||||
if (filter.band && row.band !== filter.band) {
|
||||
@@ -319,8 +254,6 @@ export interface TdsInterestSummary {
|
||||
tdsSaved: number;
|
||||
paidWithoutDeduction: number;
|
||||
noPan: number;
|
||||
/** Customers holding at least one account whose interest counts toward the deduction. */
|
||||
trackedCustomers: number;
|
||||
byQuarter: { quarter: Quarter; interest: number; tds: number }[];
|
||||
}
|
||||
|
||||
@@ -347,10 +280,7 @@ export function tdsInterestSummary(filter: TdsReportFilter): TdsInterestSummary
|
||||
declarations: rows.filter((r) => r.hasDeclaration).length,
|
||||
tdsSaved: rows.reduce((s, r) => s + r.tdsSaved, 0),
|
||||
paidWithoutDeduction: rows.reduce((s, r) => s + r.paidWithoutDeduction, 0),
|
||||
// Only customers with a deposit the deduction watches: a savings-only customer without a PAN
|
||||
// is never deducted at the higher rate, so counting them overstated the problem.
|
||||
noPan: rows.filter((r) => !r.panOnRecord && r.trackedAccounts > 0).length,
|
||||
trackedCustomers: rows.filter((r) => r.trackedAccounts > 0).length,
|
||||
noPan: rows.filter((r) => !r.panOnRecord).length,
|
||||
byQuarter
|
||||
};
|
||||
}
|
||||
|
||||
@@ -647,82 +647,3 @@
|
||||
color: var(--tdsr-ink);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ── Help panel (interest report) ── */
|
||||
.tdsr__help {
|
||||
margin-bottom: 16px;
|
||||
padding: 14px 18px;
|
||||
border: 1px solid color-mix(in srgb, var(--tdsr-blue) 25%, transparent);
|
||||
border-radius: 10px;
|
||||
background: color-mix(in srgb, var(--tdsr-blue) 5%, transparent);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.tdsr__help-title {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
margin-bottom: 6px;
|
||||
font-weight: 700;
|
||||
color: var(--tdsr-blue);
|
||||
}
|
||||
|
||||
.tdsr__help-list {
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
|
||||
li + li {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Action chips under the summary ── */
|
||||
.tdsr__chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin: -6px 0 16px;
|
||||
}
|
||||
|
||||
.tdsr__chip {
|
||||
padding: 5px 12px;
|
||||
border: 1px solid var(--tdsr-line);
|
||||
border-radius: 999px;
|
||||
background: var(--tdsr-bg);
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
|
||||
&--near {
|
||||
border-color: color-mix(in srgb, var(--tdsr-blue) 30%, transparent);
|
||||
color: var(--tdsr-blue);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&--ok {
|
||||
border-color: color-mix(in srgb, var(--tdsr-green) 35%, transparent);
|
||||
color: var(--tdsr-green);
|
||||
}
|
||||
|
||||
&--warn {
|
||||
border-color: color-mix(in srgb, var(--tdsr-amber) 35%, transparent);
|
||||
color: var(--tdsr-amber);
|
||||
}
|
||||
}
|
||||
|
||||
.tdsr__row--click {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover > td {
|
||||
background: var(--tdsr-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.tdsr__detail-h {
|
||||
margin: 4px 0 8px;
|
||||
font-weight: 700;
|
||||
|
||||
.tdsr__table--inner + & {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* tslint:disable */
|
||||
export default {
|
||||
'mifos_x': {
|
||||
'version': '261005',
|
||||
'version': '261001',
|
||||
'hash': '1ffac4b1'
|
||||
},
|
||||
'allow_switching_backend_instance': true
|
||||
|
||||
Reference in New Issue
Block a user