feat(investment): interest in transaction log, accrued interest since last coupon, investment-only GL list

This commit is contained in:
2026-10-14 17:40:08 +05:30
parent 0404197c1b
commit c9feeae3cb
5 changed files with 88 additions and 4 deletions
@@ -53,6 +53,10 @@ type MasterTab =
* Investment master-data screens (legacy "04-13" Entry submenu masters) — 9 simple dummy
* lists, each with an inline Add-row form so the demo stays interactive without a backend.
*/
/** Detail GLs under the 100700 INVESTMENTS head; 100707 holds premium only, never a party's or script's GL. */
const INVESTMENT_GL_HEAD_PREFIX = '1007';
const PREMIUM_ON_INVESTMENTS_GL_CODE = '100707';
@Component({
selector: 'mifosx-investment-masters',
templateUrl: './investment-masters.component.html',
@@ -120,7 +124,7 @@ export class InvestmentMastersComponent implements OnInit {
saving = false;
readonly bankTypeOptions = BANK_TYPE_OPTIONS;
readonly slrTypeOptions = SLR_TYPE_OPTIONS;
/** Enabled ASSET detail GLs from the chart of accounts. */
/** Investment GLs (under the 100700 INVESTMENTS head) a party or script can be mapped to — not loans, banks or test GLs. */
investmentGlOptions: InvestmentGlAccount[] = [];
newSubType: Partial<SubTypeMaster> = {};
newBroker: Partial<BrokerMaster> = {};
@@ -133,7 +137,10 @@ export class InvestmentMastersComponent implements OnInit {
ngOnInit(): void {
this.loadDailyRates();
this.investmentService.getAssetGlAccounts().subscribe({
next: (gls) => (this.investmentGlOptions = gls),
next: (gls) =>
(this.investmentGlOptions = gls.filter(
(g) => g.glCode.startsWith(INVESTMENT_GL_HEAD_PREFIX) && g.glCode !== PREMIUM_ON_INVESTMENTS_GL_CODE
)),
error: (err) => this.toast(`Could not load GL accounts: ${apiErrorMessage(err)}`)
});
this.reloadMasters();