diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html
index a3e8fe8c4..878300434 100644
--- a/src/app/home/home.component.html
+++ b/src/app/home/home.component.html
@@ -47,43 +47,63 @@
-
- @if (pendingInvestmentInterest.length) {
-
+
+ @if (pendingInvestmentInterest.length || pendingFd.length) {
+
| Cert No | +Deal No / Cert No | Script | Party | Units | @@ -150,7 +150,8 @@ @for (h of holdingsForType; track h.certNo) {||||
|---|---|---|---|---|---|---|---|---|
|
- {{ h.certNo }}
+ {{ h.dealNo }}
+ Cert {{ h.certNo }} |
{{ h.scriptName }} | {{ h.party }} | @@ -169,8 +170,13 @@@if (h.status === 'PENDING_SETTLEMENT') { - |
@if (r.type === 'COUPON') {
- Dr Bank ₹{{ r.grossInterest | number: '1.0-0' }}
+ Dr Bank ₹{{ r.grossInterest | number: '1.2-2' }}
@if (r.alreadyBooked > 0) {
- Cr {{ interestReceivableGl.glCode }} Int. Receivable ₹{{ r.alreadyBooked | number: '1.0-0' }}
+ Cr {{ interestReceivableGl.glCode }} Int. Receivable ₹{{ r.alreadyBooked | number: '1.2-2' }}
}
- Cr {{ sc.interestGlCode }} Int. Income ₹{{ r.amount | number: '1.0-0' }}
+ Cr {{ sc.interestGlCode }} Int. Income ₹{{ r.amount | number: '1.2-2' }}
} @else {
- Dr {{ interestReceivableGl.glCode }} Int. Receivable ₹{{ r.amount | number: '1.0-0' }}
- Cr {{ sc.interestGlCode }} Int. Income ₹{{ r.amount | number: '1.0-0' }}
+ Dr {{ interestReceivableGl.glCode }} Int. Receivable ₹{{ r.amount | number: '1.2-2' }}
+ Cr {{ sc.interestGlCode }} Int. Income ₹{{ r.amount | number: '1.2-2' }}
}
|
@@ -1129,8 +1135,22 @@ | ₹{{ s.netAmount | number: '1.2-2' }} | ₹{{ s.profitLoss | number: '1.2-2' }} |
- |
+ Choose the bank for the {{ closureTopUp > 0 ? 'extra amount' : 'amount taken out' }} to complete the + voucher. +
+ }Voucher dated {{ q.closeDate }}. The lines follow the amounts entered above.
diff --git a/src/app/investment/fd-investment/fd-investment.component.ts b/src/app/investment/fd-investment/fd-investment.component.ts index 1643c7485..e80a64160 100644 --- a/src/app/investment/fd-investment/fd-investment.component.ts +++ b/src/app/investment/fd-investment/fd-investment.component.ts @@ -139,7 +139,7 @@ export class FdInvestmentComponent implements OnInit { ngOnInit(): void { this.investmentService.getParties().subscribe({ - next: (ps) => (this.fdParties = ps.filter((p) => p.bondType === 'FD' && p.active)), + next: (ps) => (this.fdParties = ps.filter((p) => p.bondType === 'FD' && p.active && !!p.interestGlAccountId)), error: (err) => this.toast(`Could not load FD banks: ${apiErrorMessage(err)}`) }); this.investmentService.getAssetGlAccounts().subscribe({ @@ -162,9 +162,19 @@ export class FdInvestmentComponent implements OnInit { this.activeTab = tab; if (tab === 'purchase') { this.refreshQuote(); + } else if (tab === 'closure' && this.closure.fdId) { + // Interest may have been posted on the other tab meanwhile: work the closure out again. + this.refreshClosureQuote(); + } else if (tab === 'interest' && this.interestFdId) { + this.loadSchedule(); } } + /** A complete DD-MM-YYYY date: half-typed dates are not sent to the server. */ + private static fullDate(d: string | null | undefined): boolean { + return !!d && /^\d{2}-\d{2}-\d{4}$/.test(d); + } + private loadFds(): void { this.investmentService.getFds().subscribe({ next: (list) => (this.fds = list), @@ -196,7 +206,7 @@ export class FdInvestmentComponent implements OnInit { /** Period (years / months / days) sets the maturity date; the maturity date can also be typed directly. */ onPeriodChange(): void { const f = this.form; - if (f.dealDate && (f.periodYears || f.periodMonths || f.periodDays)) { + if (FdInvestmentComponent.fullDate(f.dealDate) && (f.periodYears || f.periodMonths || f.periodDays)) { f.maturityDate = addPeriod(f.dealDate, f.periodYears ?? 0, f.periodMonths ?? 0, f.periodDays ?? 0); } this.refreshQuote(); @@ -206,6 +216,9 @@ export class FdInvestmentComponent implements OnInit { refreshQuote(): void { const f = this.form; this.quoteError = ''; + if (f.dealDate && !FdInvestmentComponent.fullDate(f.dealDate)) { + return; + } const params: Record