/** * Copyright since 2025 Mifos Initiative * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** * Sample Investment (Treasury) data — dummy static data modelled on a legacy CBS "Investment" * menu (FD / Govt Security / Non-SLR / Bond / Mutual Fund / Share), covering Purchase, Interest, * Sell/Redeem, Write-off and Amortize entries, master data, and reports. * * Maturity amount and accrued interest are always DERIVED from principal/rate/dates via the * helper functions below — never hand-duplicated — so the Dashboard, per-instrument Holdings * lists, and Reports can never drift out of sync with each other. */ export type InstrumentType = 'FD' | 'GOVT_SECURITY' | 'NON_SLR' | 'BOND' | 'MUTUAL_FUND' | 'SHARE'; export type HoldingStatus = 'ACTIVE' | 'MATURED' | 'SOLD' | 'WRITTEN_OFF'; export type InterestFreq = 'MONTHLY' | 'QUARTERLY' | 'HALF_YEARLY' | 'YEARLY' | 'CUMULATIVE'; export type TxnType = | 'PURCHASE' | 'INTEREST' | 'INTEREST_RECEIVED' | 'DIVIDEND' | 'SELL' | 'REDEEM' | 'WRITE_OFF' | 'AMORTIZE' | 'PART_PAYMENT'; export const INSTRUMENT_LABELS: Record = { FD: 'Fixed Deposit', GOVT_SECURITY: 'Govt Security', NON_SLR: 'Non-SLR', BOND: 'Bond', MUTUAL_FUND: 'Mutual Fund', SHARE: 'Share' }; /** RBI investment-provisioning classification. A holding with no `provisionStatus` (or * explicitly 'STANDARD') is performing normally. Once classified Sub-Standard/Doubtful/Loss — * a Non-Performing Investment (NPI), the loan-book equivalent of an NPA — interest can no * longer be recognised on accrual basis (see canAccrueInterest()) and a provision must be held * against the investment (see provisionRequiredInv()). */ export type InvestmentProvisionStatus = 'STANDARD' | 'SUB_STANDARD' | 'DOUBTFUL' | 'LOSS'; export const PROVISION_STATUS_LABELS: Record = { STANDARD: 'Standard', SUB_STANDARD: 'Sub-Standard (NPI)', DOUBTFUL: 'Doubtful (NPI)', LOSS: 'Loss (NPI)' }; /** * Portfolio-policy target — % of the total investment corpus each instrument type should hold. * Compared against actual holdings on the Dashboard so a treasury desk can see at a glance where * the book has drifted from policy. Four of these six trace back to real RBI rules for Urban * Co-operative Banks (RBI Master Direction/Circular — Investment Portfolio of Primary (Urban) * Co-operative Banks): * • SLR: UCBs must hold 18% of NDTL in approved securities — predominantly Central/State Govt * securities (and SLR-eligible State Development Loan bonds). A well-run treasury holds a * safety buffer above the bare floor, so Govt Security dominates the book far beyond the 18% * minimum — it isn't itself an upper target, just the reason this bucket is the largest. * • Non-SLR ceiling: a UCB's Non-SLR investments must not exceed 10% of its total deposits as * on 31 March of the previous year — a hard regulatory cap, not a board choice. * • Mutual Funds: RBI permits UCBs to invest only in debt-oriented schemes of SEBI-registered * mutual funds, in strictly limited amounts — equity/balanced schemes are not permitted. * • Shares: RBI does not permit UCBs to invest in equity shares of companies as a general * investment class; any "Share" holding is essentially the (small, largely static) shares a * UCB holds in affiliated co-operative institutions, not a discretionary trading book. * Fixed Deposit (treasury placements with other banks) and Bond (a mix of SLR-eligible SDL and * Non-SLR PSU/FI bonds) have no RBI-mandated percentage of their own — their split here is a * board-approved policy choice within the room RBI's SLR/Non-SLR framework leaves. */ export const TARGET_ALLOCATION_PCT: Record = { GOVT_SECURITY: 55, BOND: 18, FD: 15, NON_SLR: 7, MUTUAL_FUND: 3, SHARE: 2 }; /** True for the instrument types whose target traces to an actual RBI rule (SLR floor / Non-SLR * ceiling) rather than a board-only policy choice — see TARGET_ALLOCATION_PCT's doc comment. */ export const ALLOCATION_TARGET_IS_RBI_LINKED: Record = { GOVT_SECURITY: true, BOND: false, FD: false, NON_SLR: true, MUTUAL_FUND: true, SHARE: true }; export interface InvestmentHolding { certNo: string; instrumentType: InstrumentType; scriptCode: string; scriptName: string; party: string; subType: string; faceValue: number; purchaseRate: number; units: number; purchaseDate: string; maturityDate: string; interestRate: number; interestFreq: InterestFreq; glCode: string; glName: string; crToAc: string; brokerCode: string; status: HoldingStatus; /** Absent/'STANDARD' for a healthy holding. Drives canAccrueInterest() and provisioning. */ provisionStatus?: InvestmentProvisionStatus; /** Cumulative interest posted (booked as an accrual receivable/income entry) to date. */ interestPosted?: number; /** Cumulative interest actually received in cash to date. */ interestReceived?: number; /** DD-MM-YYYY through which interest has already been calculated & posted. accruedInterestBetween() * never re-counts days up to this date, so re-running a Calculation & Post for an overlapping * or repeated period always yields 0 instead of double-posting the same interest. */ interestPostedTillDate?: string; } export interface InvestmentTxn { certNo: string; instrumentType: InstrumentType; txnType: TxnType; voucherNo: string; txnDate: string; amount: number; particulars: string; /** GL account this entry was posted/received against — the Interest Income GL for a Post, * the Cash/Bank GL for a Receive. Absent on older/seeded entries that predate GL selection. */ glCode?: string; glName?: string; } // -------------------- Date / interest helpers -------------------- export function parseDDMMYYYY(s: string): Date { const [ dd, mm, yyyy ] = s.split('-').map(Number); return new Date(yyyy, mm - 1, dd); } export function yearsBetween(d1: string, d2: string): number { const a = parseDDMMYYYY(d1).getTime(); const b = parseDDMMYYYY(d2).getTime(); return (b - a) / (365.25 * 24 * 3600 * 1000); } /** Maturity amount — compounded annually for cumulative instruments, principal-only otherwise * (non-cumulative interest is paid out periodically instead of being added to the corpus). */ export function maturityAmount(h: InvestmentHolding): number { const yrs = yearsBetween(h.purchaseDate, h.maturityDate); if (h.interestFreq === 'CUMULATIVE') { return Math.round(h.faceValue * Math.pow(1 + h.interestRate / 100, yrs)); } return h.faceValue; } /** Interest accrued from purchase up to `asOnStr`, capped at the maturity date. */ export function accruedInterest(h: InvestmentHolding, asOnStr: string): number { const cap = Math.min(yearsBetween(h.purchaseDate, asOnStr), yearsBetween(h.purchaseDate, h.maturityDate)); const yrs = Math.max(0, cap); return Math.round(h.faceValue * (h.interestRate / 100) * yrs); } export function daysToMaturity(h: InvestmentHolding, asOnStr: string): number { const asOn = parseDDMMYYYY(asOnStr).getTime(); const mat = parseDDMMYYYY(h.maturityDate).getTime(); return Math.round((mat - asOn) / (24 * 3600 * 1000)); } // -------------------- Provisioning & interest-lifecycle helpers -------------------- export function isNpi(h: InvestmentHolding): boolean { return (h.provisionStatus ?? 'STANDARD') !== 'STANDARD'; } export function provisionRatePctInv(status: InvestmentProvisionStatus): number { switch (status) { case 'STANDARD': return 0; case 'SUB_STANDARD': return 25; case 'DOUBTFUL': return 50; case 'LOSS': return 100; } } /** Provision required against the investment itself (principal), same idea as NPA provisioning * on a loan book — computed on face value since that is this module's carrying-value figure. */ export function provisionRequiredInv(h: InvestmentHolding): number { return Math.round(h.faceValue * (provisionRatePctInv(h.provisionStatus ?? 'STANDARD') / 100)); } /** Interest can only be recognised on an accrual basis (posted as a receivable/income entry) * while the investment is Standard. Once it is classified Non-Performing (Sub-Standard/ * Doubtful/Loss), RBI income-recognition norms require interest to move to cash basis — i.e. * it is recognised only when actually received, never posted as an accrual receivable. */ export function canAccrueInterest(h: InvestmentHolding): boolean { return !isNpi(h); } /** Outstanding "Interest Receivable" GL balance — interest already posted (booked as income) * but not yet actually received in cash. Always 0 for an NPI holding, since nothing is ever * posted as a receivable on one. */ export function interestReceivableBalance(h: InvestmentHolding): number { if (!canAccrueInterest(h)) { return 0; } return Math.max(0, (h.interestPosted ?? 0) - (h.interestReceived ?? 0)); } /** For an NPI holding, interest keeps accruing notionally but is held in memo/suspense — never * posted as an asset or recognised as income — until it is actually collected in cash. */ export function suspenseInterest(h: InvestmentHolding, asOnStr: string): number { if (canAccrueInterest(h)) { return 0; } return Math.max(0, accruedInterest(h, asOnStr) - (h.interestReceived ?? 0)); } /** Interest accrued strictly within [fromStr, toStr], clipped to the holding's own * purchase→maturity window — the basis for a period-based Interest Calculation & Post run * (as opposed to accruedInterest(), which is always measured from purchase date). Returns 0 * for a Non-Performing holding, same accrual-basis rule as accruedInterest(). */ export function accruedInterestBetween(h: InvestmentHolding, fromStr: string, toStr: string): number { if (!canAccrueInterest(h)) { return 0; } const purchase = parseDDMMYYYY(h.purchaseDate).getTime(); const maturity = parseDDMMYYYY(h.maturityDate).getTime(); const postedTill = h.interestPostedTillDate ? parseDDMMYYYY(h.interestPostedTillDate).getTime() : purchase; const from = Math.max(parseDDMMYYYY(fromStr).getTime(), purchase, postedTill); const to = Math.min(parseDDMMYYYY(toStr).getTime(), maturity); const days = Math.max(0, (to - from) / (24 * 3600 * 1000)); return Math.round(h.faceValue * (h.interestRate / 100) * (days / 365.25)); } export function formatDDMMYYYY(d: Date): string { return `${String(d.getDate()).padStart(2, '0')}-${String(d.getMonth() + 1).padStart(2, '0')}-${d.getFullYear()}`; } /** Adds a period (years/months/days) to a DD-MM-YYYY date string — used to compute Maturity Date * from an entry form's Deposit/Deal Date + Period Year/Month/Days fields. */ export function addPeriod(dateStr: string, years: number, months: number, days = 0): string { const d = parseDDMMYYYY(dateStr); d.setFullYear(d.getFullYear() + (years || 0)); d.setMonth(d.getMonth() + (months || 0)); d.setDate(d.getDate() + (days || 0)); return formatDDMMYYYY(d); } export function todayDDMMYYYY(): string { return formatDDMMYYYY(new Date()); } // -------------------- Holdings (dummy portfolio) -------------------- export const FD_HOLDINGS: InvestmentHolding[] = [ { certNo: '15620', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'Jila Sahakari Kendriya Bank', subType: 'NON SLR', faceValue: 2401711, purchaseRate: 100, units: 1, purchaseDate: '23-06-2026', maturityDate: '23-12-2028', interestRate: 6.75, interestFreq: 'CUMULATIVE', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: '15621', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'ABC Cooperative Bank Ltd', subType: 'NON SLR', faceValue: 1500000, purchaseRate: 100, units: 1, purchaseDate: '10-01-2026', maturityDate: '10-01-2029', interestRate: 7.0, interestFreq: 'CUMULATIVE', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: '15622', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'State Cooperative Bank Ltd', subType: 'NON SLR', faceValue: 5000000, purchaseRate: 100, units: 1, purchaseDate: '05-03-2024', maturityDate: '05-03-2026', interestRate: 6.5, interestFreq: 'YEARLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'MATURED' }, { certNo: '15623', instrumentType: 'FD', scriptCode: 'FD-MIP', scriptName: 'Monthly Interest Payout FD', party: 'District Central Cooperative Bank', subType: 'NON SLR', faceValue: 1000000, purchaseRate: 100, units: 1, purchaseDate: '15-05-2026', maturityDate: '15-05-2027', interestRate: 7.25, interestFreq: 'MONTHLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE', interestPosted: 42000, interestReceived: 36000 }, { certNo: '15624', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'Urban Cooperative Bank Ltd', subType: 'NON SLR', faceValue: 2500000, purchaseRate: 100, units: 1, purchaseDate: '20-02-2024', maturityDate: '20-02-2026', interestRate: 6.9, interestFreq: 'QUARTERLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'MATURED' }, { certNo: '15625', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'Nagrik Sahakari Bank Ltd', subType: 'NON SLR', faceValue: 800000, purchaseRate: 100, units: 1, purchaseDate: '01-04-2026', maturityDate: '01-04-2028', interestRate: 7.1, interestFreq: 'HALF_YEARLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: '15626', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'Maharashtra State Cooperative Bank', subType: 'NON SLR', faceValue: 3500000, purchaseRate: 100, units: 1, purchaseDate: '12-07-2025', maturityDate: '12-07-2027', interestRate: 6.6, interestFreq: 'YEARLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE', provisionStatus: 'DOUBTFUL', interestPosted: 115500, interestReceived: 50000 }, { certNo: '15627', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'Rajasthan State Cooperative Bank', subType: 'NON SLR', faceValue: 1250000, purchaseRate: 100, units: 1, purchaseDate: '18-06-2026', maturityDate: '18-06-2029', interestRate: 7.0, interestFreq: 'QUARTERLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: '15628', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'Zilla Sahakari Bank Ltd', subType: 'NON SLR', faceValue: 1800000, purchaseRate: 100, units: 1, purchaseDate: '20-08-2025', maturityDate: '20-08-2026', interestRate: 6.8, interestFreq: 'CUMULATIVE', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: '15629', instrumentType: 'FD', scriptCode: 'FD-MIP', scriptName: 'Monthly Interest Payout FD', party: 'Vidarbha Cooperative Bank', subType: 'NON SLR', faceValue: 2200000, purchaseRate: 100, units: 1, purchaseDate: '25-09-2025', maturityDate: '25-09-2026', interestRate: 7.15, interestFreq: 'MONTHLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE', interestPosted: 143220, interestReceived: 130800 }, { certNo: '15630', instrumentType: 'FD', scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', party: 'Konkan Cooperative Bank Ltd', subType: 'NON SLR', faceValue: 900000, purchaseRate: 100, units: 1, purchaseDate: '28-10-2024', maturityDate: '28-10-2026', interestRate: 6.75, interestFreq: 'YEARLY', glCode: '320020', glName: 'FIXED DEPO. CO-OPER. BANK MAIN', crToAc: '310070', brokerCode: '', status: 'ACTIVE' } ]; export const GOVT_SECURITY_HOLDINGS: InvestmentHolding[] = [ { certNo: 'GSEC-2001', instrumentType: 'GOVT_SECURITY', scriptCode: 'IN0020230012', scriptName: '7.26% GOI 2033', party: 'RBI - SGL', subType: 'SLR', faceValue: 5000000, purchaseRate: 99.5, units: 50000, purchaseDate: '15-01-2026', maturityDate: '15-01-2033', interestRate: 7.26, interestFreq: 'HALF_YEARLY', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-002', status: 'ACTIVE', interestPosted: 181500, interestReceived: 150000 }, { certNo: 'GSEC-2002', instrumentType: 'GOVT_SECURITY', scriptCode: 'IN0020220089', scriptName: '7.10% GOI 2029', party: 'RBI - SGL', subType: 'SLR', faceValue: 3000000, purchaseRate: 100.25, units: 30000, purchaseDate: '10-03-2025', maturityDate: '10-03-2029', interestRate: 7.1, interestFreq: 'HALF_YEARLY', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-001', status: 'ACTIVE' }, { certNo: 'GSEC-2003', instrumentType: 'GOVT_SECURITY', scriptCode: 'IN0020210056', scriptName: '6.79% GOI 2027', party: 'RBI - SGL', subType: 'SLR', faceValue: 2000000, purchaseRate: 101.1, units: 20000, purchaseDate: '05-06-2024', maturityDate: '05-06-2027', interestRate: 6.79, interestFreq: 'HALF_YEARLY', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-002', status: 'ACTIVE', interestPosted: 67900, interestReceived: 67900 }, { certNo: 'GSEC-2004', instrumentType: 'GOVT_SECURITY', scriptCode: 'IN0020240034', scriptName: '7.18% GOI 2037', party: 'RBI - SGL', subType: 'SLR', faceValue: 4000000, purchaseRate: 98.75, units: 40000, purchaseDate: '22-04-2026', maturityDate: '22-04-2037', interestRate: 7.18, interestFreq: 'HALF_YEARLY', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-001', status: 'ACTIVE' }, { certNo: 'GSEC-2005', instrumentType: 'GOVT_SECURITY', scriptCode: 'TBILL-364D', scriptName: '364 Days Treasury Bill', party: 'RBI - SGL', subType: 'SLR', faceValue: 1500000, purchaseRate: 96.4, units: 15000, purchaseDate: '02-07-2026', maturityDate: '02-07-2027', interestRate: 6.4, interestFreq: 'CUMULATIVE', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-003', status: 'ACTIVE' }, { certNo: 'GSEC-2006', instrumentType: 'GOVT_SECURITY', scriptCode: 'MH-SDL-2031', scriptName: '8.05% Maharashtra SDL 2031', party: 'RBI - SGL', subType: 'SLR', faceValue: 2500000, purchaseRate: 100.5, units: 25000, purchaseDate: '15-02-2025', maturityDate: '15-02-2031', interestRate: 8.05, interestFreq: 'HALF_YEARLY', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-002', status: 'ACTIVE' }, { certNo: 'GSEC-2007', instrumentType: 'GOVT_SECURITY', scriptCode: 'TBILL-91D', scriptName: '91 Days Treasury Bill', party: 'RBI - SGL', subType: 'SLR', faceValue: 2000000, purchaseRate: 98.2, units: 20000, purchaseDate: '15-05-2026', maturityDate: '13-08-2026', interestRate: 6.2, interestFreq: 'CUMULATIVE', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-003', status: 'ACTIVE' }, { certNo: 'GSEC-2008', instrumentType: 'GOVT_SECURITY', scriptCode: 'GJ-SDL-2026', scriptName: '7.85% Gujarat SDL 2026', party: 'RBI - SGL', subType: 'SLR', faceValue: 1800000, purchaseRate: 100.2, units: 18000, purchaseDate: '18-09-2025', maturityDate: '18-09-2026', interestRate: 7.85, interestFreq: 'HALF_YEARLY', glCode: '310020', glName: 'INVESTMENT IN GOVT. SECURITIES', crToAc: '310070', brokerCode: 'BRK-001', status: 'ACTIVE' } ]; export const NON_SLR_HOLDINGS: InvestmentHolding[] = [ { certNo: 'NSLR-3001', instrumentType: 'NON_SLR', scriptCode: 'REC-7.5-2031', scriptName: 'REC Ltd Bond 7.50% 2031', party: 'REC Limited', subType: 'NON SLR', faceValue: 2000000, purchaseRate: 100, units: 20000, purchaseDate: '11-08-2025', maturityDate: '11-08-2031', interestRate: 7.5, interestFreq: 'YEARLY', glCode: '310030', glName: 'INVESTMENT IN NON SLR SECURITIES', crToAc: '310070', brokerCode: 'BRK-004', status: 'ACTIVE' }, { certNo: 'NSLR-3002', instrumentType: 'NON_SLR', scriptCode: 'NABARD-7.35-2030', scriptName: 'NABARD Bond 7.35% 2030', party: 'NABARD', subType: 'NON SLR', faceValue: 1500000, purchaseRate: 100, units: 15000, purchaseDate: '20-09-2025', maturityDate: '20-09-2030', interestRate: 7.35, interestFreq: 'YEARLY', glCode: '310030', glName: 'INVESTMENT IN NON SLR SECURITIES', crToAc: '310070', brokerCode: 'BRK-004', status: 'ACTIVE' }, { certNo: 'NSLR-3003', instrumentType: 'NON_SLR', scriptCode: 'SIDBI-7.4-2029', scriptName: 'SIDBI Bond 7.40% 2029', party: 'SIDBI', subType: 'NON SLR', faceValue: 1000000, purchaseRate: 100, units: 10000, purchaseDate: '02-11-2025', maturityDate: '02-11-2029', interestRate: 7.4, interestFreq: 'YEARLY', glCode: '310030', glName: 'INVESTMENT IN NON SLR SECURITIES', crToAc: '310070', brokerCode: 'BRK-003', status: 'ACTIVE' }, { certNo: 'NSLR-3004', instrumentType: 'NON_SLR', scriptCode: 'HUDCO-7.6-2032', scriptName: 'HUDCO Bond 7.60% 2032', party: 'HUDCO', subType: 'NON SLR', faceValue: 1800000, purchaseRate: 100, units: 18000, purchaseDate: '14-12-2025', maturityDate: '14-12-2032', interestRate: 7.6, interestFreq: 'YEARLY', glCode: '310030', glName: 'INVESTMENT IN NON SLR SECURITIES', crToAc: '310070', brokerCode: 'BRK-004', status: 'ACTIVE' }, { certNo: 'NSLR-3005', instrumentType: 'NON_SLR', scriptCode: 'PFC-7.45-2028', scriptName: 'PFC Bond 7.45% 2028', party: 'Power Finance Corporation', subType: 'NON SLR', faceValue: 1200000, purchaseRate: 100, units: 12000, purchaseDate: '08-01-2026', maturityDate: '08-01-2028', interestRate: 7.45, interestFreq: 'YEARLY', glCode: '310030', glName: 'INVESTMENT IN NON SLR SECURITIES', crToAc: '310070', brokerCode: 'BRK-003', status: 'ACTIVE', interestPosted: 89400, interestReceived: 60000 }, { certNo: 'NSLR-3006', instrumentType: 'NON_SLR', scriptCode: 'IRFC-7.55-2026', scriptName: 'IRFC Bond 7.55% 2026', party: 'Indian Railway Finance Corp', subType: 'NON SLR', faceValue: 1600000, purchaseRate: 100, units: 16000, purchaseDate: '25-08-2025', maturityDate: '25-08-2026', interestRate: 7.55, interestFreq: 'YEARLY', glCode: '310030', glName: 'INVESTMENT IN NON SLR SECURITIES', crToAc: '310070', brokerCode: 'BRK-004', status: 'ACTIVE' }, { certNo: 'NSLR-3007', instrumentType: 'NON_SLR', scriptCode: 'NHB-7.3-2026', scriptName: 'NHB Bond 7.30% 2026', party: 'National Housing Bank', subType: 'NON SLR', faceValue: 1000000, purchaseRate: 100, units: 10000, purchaseDate: '10-10-2025', maturityDate: '10-10-2026', interestRate: 7.3, interestFreq: 'YEARLY', glCode: '310030', glName: 'INVESTMENT IN NON SLR SECURITIES', crToAc: '310070', brokerCode: 'BRK-003', status: 'ACTIVE' } ]; export const BOND_HOLDINGS: InvestmentHolding[] = [ { certNo: 'BOND-4001', instrumentType: 'BOND', scriptCode: 'LTF-8.1-2028', scriptName: 'L&T Finance NCD 8.10% 2028', party: 'L&T Finance Ltd', subType: 'CORPORATE BOND', faceValue: 1000000, purchaseRate: 100, units: 10000, purchaseDate: '05-02-2026', maturityDate: '05-02-2028', interestRate: 8.1, interestFreq: 'YEARLY', glCode: '310040', glName: 'INVESTMENT IN CORPORATE BONDS', crToAc: '310070', brokerCode: 'BRK-005', status: 'ACTIVE' }, { certNo: 'BOND-4002', instrumentType: 'BOND', scriptCode: 'BAF-7.95-2027', scriptName: 'Bajaj Finance NCD 7.95% 2027', party: 'Bajaj Finance Ltd', subType: 'CORPORATE BOND', faceValue: 1500000, purchaseRate: 100, units: 15000, purchaseDate: '18-03-2026', maturityDate: '18-03-2027', interestRate: 7.95, interestFreq: 'YEARLY', glCode: '310040', glName: 'INVESTMENT IN CORPORATE BONDS', crToAc: '310070', brokerCode: 'BRK-005', status: 'ACTIVE' }, { certNo: 'BOND-4003', instrumentType: 'BOND', scriptCode: 'TCL-8.05-2029', scriptName: 'Tata Capital NCD 8.05% 2029', party: 'Tata Capital Ltd', subType: 'CORPORATE BOND', faceValue: 1200000, purchaseRate: 100, units: 12000, purchaseDate: '25-04-2026', maturityDate: '25-04-2029', interestRate: 8.05, interestFreq: 'YEARLY', glCode: '310040', glName: 'INVESTMENT IN CORPORATE BONDS', crToAc: '310070', brokerCode: 'BRK-006', status: 'ACTIVE' }, { certNo: 'BOND-4004', instrumentType: 'BOND', scriptCode: 'MUT-8.25-2026', scriptName: 'Muthoot Finance NCD 8.25% 2026', party: 'Muthoot Finance Ltd', subType: 'CORPORATE BOND', faceValue: 800000, purchaseRate: 100, units: 8000, purchaseDate: '10-08-2024', maturityDate: '10-08-2026', interestRate: 8.25, interestFreq: 'YEARLY', glCode: '310040', glName: 'INVESTMENT IN CORPORATE BONDS', crToAc: '310070', brokerCode: 'BRK-006', status: 'ACTIVE', provisionStatus: 'SUB_STANDARD', interestPosted: 66000, interestReceived: 40000 }, { certNo: 'BOND-4005', instrumentType: 'BOND', scriptCode: 'STF-8.15-2030', scriptName: 'Shriram Transport NCD 8.15% 2030', party: 'Shriram Transport Finance', subType: 'CORPORATE BOND', faceValue: 2000000, purchaseRate: 100, units: 20000, purchaseDate: '30-05-2026', maturityDate: '30-05-2030', interestRate: 8.15, interestFreq: 'YEARLY', glCode: '310040', glName: 'INVESTMENT IN CORPORATE BONDS', crToAc: '310070', brokerCode: 'BRK-005', status: 'ACTIVE' }, { certNo: 'BOND-4006', instrumentType: 'BOND', scriptCode: 'CHOLA-8.35-2026', scriptName: 'Cholamandalam Finance NCD 8.35% 2026', party: 'Cholamandalam Investment & Finance', subType: 'CORPORATE BOND', faceValue: 1400000, purchaseRate: 100, units: 14000, purchaseDate: '15-09-2024', maturityDate: '15-09-2026', interestRate: 8.35, interestFreq: 'YEARLY', glCode: '310040', glName: 'INVESTMENT IN CORPORATE BONDS', crToAc: '310070', brokerCode: 'BRK-006', status: 'ACTIVE' }, { certNo: 'BOND-4007', instrumentType: 'BOND', scriptCode: 'PEL-8.4-2026', scriptName: 'Piramal Enterprises NCD 8.40% 2026', party: 'Piramal Enterprises Ltd', subType: 'CORPORATE BOND', faceValue: 900000, purchaseRate: 100, units: 9000, purchaseDate: '28-10-2025', maturityDate: '28-10-2026', interestRate: 8.4, interestFreq: 'YEARLY', glCode: '310040', glName: 'INVESTMENT IN CORPORATE BONDS', crToAc: '310070', brokerCode: 'BRK-005', status: 'ACTIVE' } ]; export const MUTUAL_FUND_HOLDINGS: InvestmentHolding[] = [ { certNo: 'MF-5001', instrumentType: 'MUTUAL_FUND', scriptCode: 'SBI-OVN', scriptName: 'SBI Overnight Fund', party: 'SBI Mutual Fund', subType: 'DEBT - OVERNIGHT', faceValue: 1000000, purchaseRate: 1200.5, units: 833.33, purchaseDate: '12-01-2026', maturityDate: '12-01-2027', interestRate: 6.8, interestFreq: 'CUMULATIVE', glCode: '310050', glName: 'INVESTMENT IN MUTUAL FUNDS', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'MF-5002', instrumentType: 'MUTUAL_FUND', scriptCode: 'HDFC-LIQ', scriptName: 'HDFC Liquid Fund', party: 'HDFC Mutual Fund', subType: 'DEBT - LIQUID', faceValue: 1500000, purchaseRate: 3800.2, units: 394.72, purchaseDate: '05-02-2026', maturityDate: '05-02-2027', interestRate: 6.9, interestFreq: 'CUMULATIVE', glCode: '310050', glName: 'INVESTMENT IN MUTUAL FUNDS', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'MF-5003', instrumentType: 'MUTUAL_FUND', scriptCode: 'ICICI-MMF', scriptName: 'ICICI Pru Money Market Fund', party: 'ICICI Prudential Mutual Fund', subType: 'DEBT - MONEY MARKET', faceValue: 800000, purchaseRate: 350.75, units: 2280.87, purchaseDate: '18-03-2026', maturityDate: '18-03-2027', interestRate: 7.0, interestFreq: 'CUMULATIVE', glCode: '310050', glName: 'INVESTMENT IN MUTUAL FUNDS', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'MF-5004', instrumentType: 'MUTUAL_FUND', scriptCode: 'AXIS-BPSU', scriptName: 'Axis Banking & PSU Debt Fund', party: 'Axis Mutual Fund', subType: 'DEBT - BANKING & PSU', faceValue: 1200000, purchaseRate: 22.4, units: 53571.43, purchaseDate: '22-04-2026', maturityDate: '22-04-2027', interestRate: 7.2, interestFreq: 'CUMULATIVE', glCode: '310050', glName: 'INVESTMENT IN MUTUAL FUNDS', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'MF-5005', instrumentType: 'MUTUAL_FUND', scriptCode: 'KOTAK-OVN', scriptName: 'Kotak Overnight Fund', party: 'Kotak Mutual Fund', subType: 'DEBT - OVERNIGHT', faceValue: 600000, purchaseRate: 1150.3, units: 521.6, purchaseDate: '02-06-2026', maturityDate: '02-06-2027', interestRate: 6.7, interestFreq: 'CUMULATIVE', glCode: '310050', glName: 'INVESTMENT IN MUTUAL FUNDS', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'MF-5006', instrumentType: 'MUTUAL_FUND', scriptCode: 'SBI-BPSU', scriptName: 'SBI Banking & PSU Fund', party: 'SBI Mutual Fund', subType: 'DEBT - BANKING & PSU', faceValue: 700000, purchaseRate: 18.6, units: 37634.4, purchaseDate: '10-09-2025', maturityDate: '10-09-2026', interestRate: 7.1, interestFreq: 'CUMULATIVE', glCode: '310050', glName: 'INVESTMENT IN MUTUAL FUNDS', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'MF-5007', instrumentType: 'MUTUAL_FUND', scriptCode: 'ICICI-CB', scriptName: 'ICICI Pru Corporate Bond Fund', party: 'ICICI Prudential Mutual Fund', subType: 'DEBT - CORPORATE BOND', faceValue: 1100000, purchaseRate: 24.8, units: 44354.84, purchaseDate: '14-07-2026', maturityDate: '14-07-2027', interestRate: 7.05, interestFreq: 'CUMULATIVE', glCode: '310050', glName: 'INVESTMENT IN MUTUAL FUNDS', crToAc: '310070', brokerCode: '', status: 'ACTIVE' } ]; export const SHARE_HOLDINGS: InvestmentHolding[] = [ { certNo: 'SH-6001', instrumentType: 'SHARE', scriptCode: 'SBIN', scriptName: 'State Bank of India', party: 'NSE/BSE', subType: 'EQUITY', faceValue: 375000, purchaseRate: 750, units: 500, purchaseDate: '10-01-2026', maturityDate: '10-01-2036', interestRate: 2.5, interestFreq: 'YEARLY', glCode: '310060', glName: 'INVESTMENT IN SHARES', crToAc: '310070', brokerCode: 'BRK-007', status: 'ACTIVE' }, { certNo: 'SH-6002', instrumentType: 'SHARE', scriptCode: 'HDFCBANK', scriptName: 'HDFC Bank Ltd', party: 'NSE/BSE', subType: 'EQUITY', faceValue: 495000, purchaseRate: 1650, units: 300, purchaseDate: '15-02-2026', maturityDate: '15-02-2036', interestRate: 1.8, interestFreq: 'YEARLY', glCode: '310060', glName: 'INVESTMENT IN SHARES', crToAc: '310070', brokerCode: 'BRK-007', status: 'ACTIVE' }, { certNo: 'SH-6003', instrumentType: 'SHARE', scriptCode: 'NCDC', scriptName: 'National Coop Development Corp', party: 'NCDC', subType: 'CO-OP SHARE', faceValue: 100000, purchaseRate: 100, units: 1000, purchaseDate: '01-04-2025', maturityDate: '01-04-2035', interestRate: 5.0, interestFreq: 'YEARLY', glCode: '310060', glName: 'INVESTMENT IN SHARES', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'SH-6004', instrumentType: 'SHARE', scriptCode: 'DCCB', scriptName: 'District Cooperative Bank Shares', party: 'District Cooperative Bank', subType: 'CO-OP SHARE', faceValue: 100000, purchaseRate: 50, units: 2000, purchaseDate: '12-05-2025', maturityDate: '12-05-2035', interestRate: 5.5, interestFreq: 'YEARLY', glCode: '310060', glName: 'INVESTMENT IN SHARES', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'SH-6005', instrumentType: 'SHARE', scriptCode: 'SCF', scriptName: 'State Coop Federation Shares', party: 'State Coop Federation', subType: 'CO-OP SHARE', faceValue: 90000, purchaseRate: 60, units: 1500, purchaseDate: '20-06-2025', maturityDate: '20-06-2035', interestRate: 5.0, interestFreq: 'YEARLY', glCode: '310060', glName: 'INVESTMENT IN SHARES', crToAc: '310070', brokerCode: '', status: 'ACTIVE' }, { certNo: 'SH-6006', instrumentType: 'SHARE', scriptCode: 'ICICIBANK', scriptName: 'ICICI Bank Ltd', party: 'NSE/BSE', subType: 'EQUITY', faceValue: 420000, purchaseRate: 1050, units: 400, purchaseDate: '05-03-2026', maturityDate: '05-03-2036', interestRate: 2.0, interestFreq: 'YEARLY', glCode: '310060', glName: 'INVESTMENT IN SHARES', crToAc: '310070', brokerCode: 'BRK-007', status: 'ACTIVE' }, { certNo: 'SH-6007', instrumentType: 'SHARE', scriptCode: 'PDCC', scriptName: 'Pune District Central Coop Bank Shares', party: 'Pune District Central Cooperative Bank', subType: 'CO-OP SHARE', faceValue: 60000, purchaseRate: 50, units: 1200, purchaseDate: '18-07-2025', maturityDate: '18-07-2035', interestRate: 5.0, interestFreq: 'YEARLY', glCode: '310060', glName: 'INVESTMENT IN SHARES', crToAc: '310070', brokerCode: '', status: 'ACTIVE' } ]; export const ALL_HOLDINGS: InvestmentHolding[] = [ ...FD_HOLDINGS, ...GOVT_SECURITY_HOLDINGS, ...NON_SLR_HOLDINGS, ...BOND_HOLDINGS, ...MUTUAL_FUND_HOLDINGS, ...SHARE_HOLDINGS ]; // -------------------- Transaction log -------------------- /** A Purchase txn for every holding (so every Holdings-list row has a matching ledger entry), * plus a handful of hand-authored Interest/Sell/Write-off entries for realism. */ function purchaseTxns(): InvestmentTxn[] { return ALL_HOLDINGS.map((h, i) => ({ certNo: h.certNo, instrumentType: h.instrumentType, txnType: 'PURCHASE' as TxnType, voucherNo: `INV/PUR/${1000 + i}`, txnDate: h.purchaseDate, amount: h.faceValue, particulars: `Purchase of ${h.scriptName} - ${h.party}` })); } export const EXTRA_TXNS: InvestmentTxn[] = [ { certNo: '15622', instrumentType: 'FD', txnType: 'REDEEM', voucherNo: 'INV/RED/2001', txnDate: '05-03-2026', amount: 5000000 + Math.round(5000000 * 0.065 * 2), particulars: 'Maturity redemption - State Cooperative Bank Ltd FD' }, { certNo: '15624', instrumentType: 'FD', txnType: 'REDEEM', voucherNo: 'INV/RED/2002', txnDate: '20-02-2026', amount: 2500000, particulars: 'Maturity redemption (non-cumulative) - Urban Cooperative Bank Ltd FD' }, { certNo: 'GSEC-2003', instrumentType: 'GOVT_SECURITY', txnType: 'INTEREST', voucherNo: 'INV/INT/3001', txnDate: '05-06-2026', amount: Math.round(2000000 * 0.0679 * 0.5), particulars: 'Half-yearly coupon - 6.79% GOI 2027' }, { certNo: 'GSEC-2001', instrumentType: 'GOVT_SECURITY', txnType: 'INTEREST', voucherNo: 'INV/INT/3002', txnDate: '15-07-2026', amount: Math.round(5000000 * 0.0726 * 0.5), particulars: 'Half-yearly coupon - 7.26% GOI 2033' }, { certNo: 'NSLR-3005', instrumentType: 'NON_SLR', txnType: 'INTEREST', voucherNo: 'INV/INT/3003', txnDate: '08-01-2027', amount: Math.round(1200000 * 0.0745), particulars: 'Annual coupon - PFC Bond 7.45% 2028' }, { certNo: 'BOND-4004', instrumentType: 'BOND', txnType: 'INTEREST', voucherNo: 'INV/INT/3004', txnDate: '10-08-2025', amount: Math.round(800000 * 0.0825), particulars: 'Annual coupon - Muthoot Finance NCD 8.25% 2026' }, { certNo: 'MF-5001', instrumentType: 'MUTUAL_FUND', txnType: 'SELL', voucherNo: 'INV/SEL/4001', txnDate: '20-06-2026', amount: 250000, particulars: 'Partial redemption - SBI Overnight Fund (200 units)' }, { certNo: 'SH-6002', instrumentType: 'SHARE', txnType: 'DIVIDEND', voucherNo: 'INV/DIV/5001', txnDate: '25-06-2026', amount: Math.round(300 * 19), particulars: 'Dividend received - HDFC Bank Ltd (Rs 19/share)' }, { certNo: 'SH-6001', instrumentType: 'SHARE', txnType: 'DIVIDEND', voucherNo: 'INV/DIV/5002', txnDate: '18-06-2026', amount: Math.round(500 * 13.7), particulars: 'Dividend received - State Bank of India (Rs 13.70/share)' }, { certNo: 'BOND-4004', instrumentType: 'BOND', txnType: 'WRITE_OFF', voucherNo: 'INV/WOF/6001', txnDate: '15-07-2026', amount: 0, particulars: 'Reserved - no write-offs booked this year (sample entry)' } ]; export const ALL_TXNS: InvestmentTxn[] = [ ...purchaseTxns(), ...EXTRA_TXNS ]; // -------------------- Masters -------------------- export interface InvestmentGlOption { glCode: string; glName: string; } /** Interest Income (Cr) GL per instrument type — the GL an Interest Calculation & Post run * credits. Selectable on the FD/Govt./Bond Interest Calculation screens instead of being * hard-wired, so a period's posting can be routed to a different income head when needed. */ export const INTEREST_INCOME_GL_MASTER: InvestmentGlOption[] = [ { glCode: '410010', glName: 'INTEREST ON GOVT. SECURITIES' }, { glCode: '410020', glName: 'INTEREST ON NON SLR SECURITIES' }, { glCode: '410030', glName: 'INTEREST ON CORPORATE BONDS' }, { glCode: '410040', glName: 'INTEREST ON FIXED DEPOSITS' }, { glCode: '410050', glName: 'INCOME FROM MUTUAL FUNDS' }, { glCode: '410060', glName: 'DIVIDEND ON SHARES' } ]; /** Default Interest Income GL suggested per instrument type — pre-fills the selector above, * which the user can still override before posting. */ export const INTEREST_INCOME_GL_BY_TYPE: Record = { GOVT_SECURITY: '410010', NON_SLR: '410020', BOND: '410030', FD: '410040', MUTUAL_FUND: '410050', SHARE: '410060' }; /** Cash/Bank (Dr) GL credited when an Interest Receive entry is booked — the account the cash * actually lands in. Selectable on the Interest Receive screen. */ export const CASH_BANK_GL_MASTER: InvestmentGlOption[] = [ { glCode: '100010', glName: 'CASH IN HAND' }, { glCode: '110010', glName: 'RBI CURRENT ACCOUNT' }, { glCode: '110020', glName: 'SBI CURRENT ACCOUNT' }, { glCode: '110030', glName: 'HDFC BANK CURRENT ACCOUNT' } ]; export interface ScriptMaster { scriptCode: string; scriptName: string; instrumentType: InstrumentType; isin: string; faceValuePerUnit: number; } export const SCRIPT_MASTER: ScriptMaster[] = [ { scriptCode: 'FD-CUM', scriptName: 'Cumulative Fixed Deposit', instrumentType: 'FD', isin: '', faceValuePerUnit: 1 }, { scriptCode: 'FD-MIP', scriptName: 'Monthly Interest Payout FD', instrumentType: 'FD', isin: '', faceValuePerUnit: 1 }, { scriptCode: 'IN0020230012', scriptName: '7.26% GOI 2033', instrumentType: 'GOVT_SECURITY', isin: 'IN0020230012', faceValuePerUnit: 100 }, { scriptCode: 'IN0020220089', scriptName: '7.10% GOI 2029', instrumentType: 'GOVT_SECURITY', isin: 'IN0020220089', faceValuePerUnit: 100 }, { scriptCode: 'TBILL-364D', scriptName: '364 Days Treasury Bill', instrumentType: 'GOVT_SECURITY', isin: '', faceValuePerUnit: 100 }, { scriptCode: 'REC-7.5-2031', scriptName: 'REC Ltd Bond 7.50% 2031', instrumentType: 'NON_SLR', isin: 'INE020B08JN0', faceValuePerUnit: 100 }, { scriptCode: 'NABARD-7.35-2030', scriptName: 'NABARD Bond 7.35% 2030', instrumentType: 'NON_SLR', isin: 'INE261F09EU1', faceValuePerUnit: 100 }, { scriptCode: 'LTF-8.1-2028', scriptName: 'L&T Finance NCD 8.10% 2028', instrumentType: 'BOND', isin: 'INE027E07BR5', faceValuePerUnit: 100 }, { scriptCode: 'BAF-7.95-2027', scriptName: 'Bajaj Finance NCD 7.95% 2027', instrumentType: 'BOND', isin: 'INE296A07SP0', faceValuePerUnit: 100 }, { scriptCode: 'SBI-OVN', scriptName: 'SBI Overnight Fund', instrumentType: 'MUTUAL_FUND', isin: 'INF200KA1Q40', faceValuePerUnit: 1000 }, { scriptCode: 'HDFC-LIQ', scriptName: 'HDFC Liquid Fund', instrumentType: 'MUTUAL_FUND', isin: 'INF179KA1WR9', faceValuePerUnit: 1000 }, { scriptCode: 'SBIN', scriptName: 'State Bank of India', instrumentType: 'SHARE', isin: 'INE062A01020', faceValuePerUnit: 1 }, { scriptCode: 'HDFCBANK', scriptName: 'HDFC Bank Ltd', instrumentType: 'SHARE', isin: 'INE040A01034', faceValuePerUnit: 1 } ]; export interface BrokerMaster { brokerCode: string; brokerName: string; contactNo: string; empanelledOn: string; status: 'ACTIVE' | 'INACTIVE'; } export const BROKER_MASTER: BrokerMaster[] = [ { brokerCode: 'BRK-001', brokerName: 'ICICI Securities Primary Dealership', contactNo: '022-40001234', empanelledOn: '01-04-2020', status: 'ACTIVE' }, { brokerCode: 'BRK-002', brokerName: 'SBI-DFHI Ltd', contactNo: '022-40005678', empanelledOn: '01-04-2020', status: 'ACTIVE' }, { brokerCode: 'BRK-003', brokerName: 'STCI Primary Dealer Ltd', contactNo: '022-40009012', empanelledOn: '15-06-2021', status: 'ACTIVE' }, { brokerCode: 'BRK-004', brokerName: 'A.K. Capital Services Ltd', contactNo: '022-67543210', empanelledOn: '10-09-2021', status: 'ACTIVE' }, { brokerCode: 'BRK-005', brokerName: 'Trust Investment Advisors', contactNo: '022-40103200', empanelledOn: '05-01-2022', status: 'ACTIVE' }, { brokerCode: 'BRK-006', brokerName: 'JM Financial Services Ltd', contactNo: '022-66303030', empanelledOn: '12-11-2022', status: 'ACTIVE' }, { brokerCode: 'BRK-007', brokerName: 'Zerodha Broking Ltd', contactNo: '080-47184718', empanelledOn: '01-01-2023', status: 'ACTIVE' } ]; export interface PartyMaster { partyCode: string; partyName: string; partyType: 'BANK' | 'CORPORATE' | 'GOVT' | 'AMC' | 'EXCHANGE' | 'COOP_SOCIETY'; panNo: string; } export const PARTY_MASTER: PartyMaster[] = [ { partyCode: 'PTY-001', partyName: 'Jila Sahakari Kendriya Bank', partyType: 'BANK', panNo: 'AABCJ1234K' }, { partyCode: 'PTY-002', partyName: 'State Cooperative Bank Ltd', partyType: 'BANK', panNo: 'AABCS5678L' }, { partyCode: 'PTY-003', partyName: 'RBI - SGL', partyType: 'GOVT', panNo: 'AAACR4849R' }, { partyCode: 'PTY-004', partyName: 'REC Limited', partyType: 'CORPORATE', panNo: 'AAACR0641G' }, { partyCode: 'PTY-005', partyName: 'NABARD', partyType: 'CORPORATE', panNo: 'AAACN0272B' }, { partyCode: 'PTY-006', partyName: 'L&T Finance Ltd', partyType: 'CORPORATE', panNo: 'AAACL0140P' }, { partyCode: 'PTY-007', partyName: 'SBI Mutual Fund', partyType: 'AMC', panNo: 'AAATS4325L' }, { partyCode: 'PTY-008', partyName: 'HDFC Mutual Fund', partyType: 'AMC', panNo: 'AAATH1234M' }, { partyCode: 'PTY-009', partyName: 'NSE/BSE', partyType: 'EXCHANGE', panNo: 'AAACN0028G' }, { partyCode: 'PTY-010', partyName: 'District Cooperative Bank', partyType: 'COOP_SOCIETY', panNo: 'AABCD9988K' } ]; export interface SubTypeMaster { subTypeCode: string; subTypeName: string; instrumentType: InstrumentType; } export const SUBTYPE_MASTER: SubTypeMaster[] = [ { subTypeCode: '1', subTypeName: 'SLR', instrumentType: 'GOVT_SECURITY' }, { subTypeCode: '2', subTypeName: 'NON SLR', instrumentType: 'NON_SLR' }, { subTypeCode: '3', subTypeName: 'CORPORATE BOND', instrumentType: 'BOND' }, { subTypeCode: '4', subTypeName: 'EQUITY', instrumentType: 'SHARE' }, { subTypeCode: '5', subTypeName: 'CO-OP SHARE', instrumentType: 'SHARE' }, { subTypeCode: '6', subTypeName: 'DEBT - OVERNIGHT', instrumentType: 'MUTUAL_FUND' }, { subTypeCode: '7', subTypeName: 'DEBT - LIQUID', instrumentType: 'MUTUAL_FUND' } ]; export interface ControlParameter { paramName: string; paramValue: string; description: string; } export const CONTROL_PARAMETERS: ControlParameter[] = [ { paramName: 'SLR_MIN_PERCENT', paramValue: '18.00', description: 'Minimum SLR holding as % of NDTL (RBI requirement)' }, { paramName: 'NON_SLR_MAX_PERCENT', paramValue: '10.00', description: 'Maximum Non-SLR exposure as % of total investments' }, { paramName: 'FD_AUTO_RENEW_DAYS', paramValue: '7', description: 'Days before maturity to flag FD for auto-renewal review' }, { paramName: 'BROKERAGE_CEILING_BPS', paramValue: '25', description: 'Maximum brokerage allowed (basis points) per deal' }, { paramName: 'SINGLE_PARTY_EXPOSURE_LIMIT', paramValue: '5000000', description: 'Maximum investment exposure to a single counterparty (Rs)' }, { paramName: 'AMORTIZATION_METHOD', paramValue: 'STRAIGHT_LINE', description: 'Default amortization method for premium/discount on bonds' } ]; export interface MutualFundProductMaster { productCode: string; productName: string; amcName: string; category: string; riskLevel: 'LOW' | 'MODERATE' | 'HIGH'; } export const MUTUAL_FUND_PRODUCTS: MutualFundProductMaster[] = [ { productCode: 'MFP-01', productName: 'SBI Overnight Fund', amcName: 'SBI Mutual Fund', category: 'Debt - Overnight', riskLevel: 'LOW' }, { productCode: 'MFP-02', productName: 'HDFC Liquid Fund', amcName: 'HDFC Mutual Fund', category: 'Debt - Liquid', riskLevel: 'LOW' }, { productCode: 'MFP-03', productName: 'ICICI Pru Money Market Fund', amcName: 'ICICI Prudential Mutual Fund', category: 'Debt - Money Market', riskLevel: 'LOW' }, { productCode: 'MFP-04', productName: 'Axis Banking & PSU Debt Fund', amcName: 'Axis Mutual Fund', category: 'Debt - Banking & PSU', riskLevel: 'MODERATE' }, { productCode: 'MFP-05', productName: 'Kotak Overnight Fund', amcName: 'Kotak Mutual Fund', category: 'Debt - Overnight', riskLevel: 'LOW' } ]; export interface SglBankMaster { sglCode: string; bankName: string; branch: string; } export const SGL_BANK_MASTER: SglBankMaster[] = [ { sglCode: 'SGL-RBI-01', bankName: 'Reserve Bank of India', branch: 'Mumbai (PDO)' }, { sglCode: 'SGL-SBI-01', bankName: 'State Bank of India', branch: 'Fort, Mumbai' }, { sglCode: 'SGL-HDFC-01', bankName: 'HDFC Bank Ltd', branch: 'Treasury Branch, Mumbai' }, { sglCode: 'SGL-CCIL-01', bankName: 'Clearing Corporation of India Ltd', branch: 'Mumbai' } ]; export interface ScriptMarketDetail { scriptCode: string; marketPrice: number; asOnDate: string; ytm: number; } export const SCRIPT_MARKET_DETAIL: ScriptMarketDetail[] = [ { scriptCode: 'IN0020230012', marketPrice: 99.85, asOnDate: '31-07-2026', ytm: 7.31 }, { scriptCode: 'IN0020220089', marketPrice: 100.6, asOnDate: '31-07-2026', ytm: 7.02 }, { scriptCode: 'IN0020210056', marketPrice: 101.4, asOnDate: '31-07-2026', ytm: 6.71 }, { scriptCode: 'IN0020240034', marketPrice: 99.1, asOnDate: '31-07-2026', ytm: 7.24 }, { scriptCode: 'REC-7.5-2031', marketPrice: 100.35, asOnDate: '31-07-2026', ytm: 7.44 }, { scriptCode: 'LTF-8.1-2028', marketPrice: 100.1, asOnDate: '31-07-2026', ytm: 8.08 } ]; export interface LienReason { reasonCode: string; reasonDescription: string; } export const LIEN_REASON_MASTER: LienReason[] = [ { reasonCode: 'LR-01', reasonDescription: 'Lien marked for loan collateral' }, { reasonCode: 'LR-02', reasonDescription: 'Lien marked for court order / litigation' }, { reasonCode: 'LR-03', reasonDescription: 'Lien marked for SGL/CSGL margin requirement' }, { reasonCode: 'LR-04', reasonDescription: 'Lien marked for guarantee issued' } ]; /** Daily Script Master (legacy menu "09") — the day's quoted rate per script, entered/imported * every working day. Distinct from Script Market Detail ("13") which also carries YTM/valuation. */ export interface DailyScriptRate { rateDate: string; scriptCode: string; scriptName: string; openRate: number; closeRate: number; highRate: number; lowRate: number; } export const DAILY_SCRIPT_RATES: DailyScriptRate[] = [ { rateDate: '31-07-2026', scriptCode: 'IN0020230012', scriptName: '7.26% GOI 2033', openRate: 99.7, closeRate: 99.85, highRate: 99.95, lowRate: 99.6 }, { rateDate: '31-07-2026', scriptCode: 'IN0020220089', scriptName: '7.10% GOI 2029', openRate: 100.5, closeRate: 100.6, highRate: 100.7, lowRate: 100.45 }, { rateDate: '31-07-2026', scriptCode: 'IN0020210056', scriptName: '6.79% GOI 2027', openRate: 101.3, closeRate: 101.4, highRate: 101.5, lowRate: 101.25 }, { rateDate: '31-07-2026', scriptCode: 'SBIN', scriptName: 'State Bank of India', openRate: 790, closeRate: 802.5, highRate: 808, lowRate: 787 }, { rateDate: '31-07-2026', scriptCode: 'HDFCBANK', scriptName: 'HDFC Bank Ltd', openRate: 1685, closeRate: 1702.4, highRate: 1710, lowRate: 1680 }, { rateDate: '30-07-2026', scriptCode: 'IN0020230012', scriptName: '7.26% GOI 2033', openRate: 99.55, closeRate: 99.7, highRate: 99.8, lowRate: 99.5 }, { rateDate: '30-07-2026', scriptCode: 'SBIN', scriptName: 'State Bank of India', openRate: 782, closeRate: 790, highRate: 794, lowRate: 780 } ]; // -------------------- Dropdown option lists (legacy entry-form selects) -------------------- /** RBI investment classification categories — drive HTM/AFS/HFT valuation treatment. */ export const CATEGORY_OPTIONS = [ 'HTM (Held To Maturity)', 'AFS (Available For Sale)', 'HFT (Held For Trading)' ]; export const DEAL_TYPE_OPTIONS = [ 'OUTRIGHT', 'REPO', 'REVERSE REPO', 'CBLO / TREPS', 'SWITCH' ]; export const MARKET_OPTIONS = [ 'NDS-OM', 'NDS-CALL', 'OTC', 'BSE', 'NSE', 'PRIMARY AUCTION' ]; export const PAYMENT_MODE_OPTIONS = [ 'RTGS', 'NEFT', 'CHEQUE', 'DD / PAY ORDER', 'INTERNAL TRANSFER' ]; export const DELIVERY_MODE_OPTIONS = [ 'SGL', 'CSGL', 'DEMAT', 'PHYSICAL', 'CONSTITUENT SGL' ]; export const BOND_RATING_OPTIONS = [ 'AAA', 'AA+', 'AA', 'AA-', 'A+', 'A', 'A-', 'BBB+', 'BBB', 'SOVEREIGN' ]; export const INT_TYPE_OPTIONS: Array<{ value: InterestFreq; label: string }> = [ { value: 'MONTHLY', label: 'MONTHLY' }, { value: 'QUARTERLY', label: 'QUARTERLY' }, { value: 'HALF_YEARLY', label: 'HALF YEARLY' }, { value: 'YEARLY', label: 'YEARLY' }, { value: 'CUMULATIVE', label: 'CUMULATIVE' } ]; export const AUTHORITY_OPTIONS = [ 'Board of Directors', 'Investment Committee', 'Chief Executive Officer', 'General Manager - Treasury', 'Asset Liability Committee (ALCO)' ]; export const FD_TYPE_OPTIONS = [ 'CUMMULATIVE', 'NON-CUMMULATIVE', 'RECURRING', 'CALL DEPOSIT' ]; /** Approximate YTM for a bond bought at `purchaseRate` per 100 face — coupon adjusted for * the premium/discount amortised over the remaining life. Used to fill the read-only YTM * field on the Bond entry form. */ export function approxYtm(couponRate: number, purchaseRate: number, yearsToMaturity: number): number { if (!purchaseRate || !yearsToMaturity) { return couponRate; } const annualAmortisation = (100 - purchaseRate) / yearsToMaturity; return +(((couponRate + annualAmortisation) / purchaseRate) * 100).toFixed(2); }