From 6a04a92113cf2fb7ec994f39122183180700e641 Mon Sep 17 00:00:00 2001 From: anshul Date: Mon, 12 Oct 2026 15:27:15 +0530 Subject: [PATCH] feat(investment): Daily Script Master, market rate on purchase, broken-period interest as expense - 09 Daily Script Master now saves to and loads from the backend (sample rows removed), with Drop to correct a wrong rate. - Purchase Entry takes the rate (NAV for a mutual fund) from the newest Daily Script Master rate on or before the deal date, shows which rate was used, warns when the rate entered is outside the day's low-high, and clears the rate when the script has none. - Broken-period interest paid to the seller is debited to expense GL 500606 instead of Interest Receivable (RBI UCB Investment Directions, para 152, confirmed by Jitendra Sir); Interest Entry labels it so. Co-Authored-By: Claude Opus 5.5 --- .../bond-investment.component.html | 24 ++++++- .../bond-investment.component.ts | 49 +++++++++++++- src/app/investment/investment-data.ts | 15 ++++- .../investment-masters.component.html | 12 +++- .../investment-masters.component.ts | 67 ++++++++++++++----- src/app/investment/investment.service.ts | 49 ++++++++++++++ 6 files changed, 191 insertions(+), 25 deletions(-) diff --git a/src/app/investment/bond-investment/bond-investment.component.html b/src/app/investment/bond-investment/bond-investment.component.html index 8782990da..958cca5e9 100644 --- a/src/app/investment/bond-investment/bond-investment.component.html +++ b/src/app/investment/bond-investment/bond-investment.component.html @@ -275,6 +275,28 @@ >Other Charges (₹) + @if (purchaseMarketRate) { +

+ Market rate (Daily Script Master) as on {{ purchaseMarketRate.rateDate }}: Close + {{ purchaseMarketRate.closeRate | number: '1.2-4' }} + @if (purchaseMarketRate.lowRate && purchaseMarketRate.highRate) { + (Low {{ purchaseMarketRate.lowRate | number: '1.2-4' }} – High + {{ purchaseMarketRate.highRate | number: '1.2-4' }}) + } + @if (purchaseMarketRate.rateDate !== purchaseForm.dealDate) { + — no rate entered for the deal date, the latest earlier rate is used. + } +

+ @if (purchaseRateOutOfRange) { +

+ Warning: the rate entered is outside the day's market range. +

+ } + } @else if (purchaseMarketRate === null) { +

+ No rate in the Daily Script Master for this script — enter the day's rate there first. +

+ } @@ -732,7 +754,7 @@ >Maturity Date