feat(investment): FD screens - purchase, maturity/premature/renewal, interest entry and reminders
This commit is contained in:
@@ -126,6 +126,8 @@ export class InvestmentMastersComponent implements OnInit {
|
||||
readonly slrTypeOptions = SLR_TYPE_OPTIONS;
|
||||
/** Investment GLs (under the 100700 INVESTMENTS head) a party or script can be mapped to — not loans, banks or test GLs. */
|
||||
investmentGlOptions: InvestmentGlAccount[] = [];
|
||||
/** Income GLs under 400400 INCOME FROM INVESTMENTS, for an FD bank's interest. */
|
||||
interestGlOptions: InvestmentGlAccount[] = [];
|
||||
newSubType: Partial<SubTypeMaster> = {};
|
||||
newBroker: Partial<BrokerMaster> = {};
|
||||
newControlParam: Partial<ControlParameter> = {};
|
||||
@@ -143,6 +145,10 @@ export class InvestmentMastersComponent implements OnInit {
|
||||
)),
|
||||
error: (err) => this.toast(`Could not load GL accounts: ${apiErrorMessage(err)}`)
|
||||
});
|
||||
this.investmentService.getIncomeGlAccounts().subscribe({
|
||||
next: (gls) => (this.interestGlOptions = gls.filter((g) => g.glCode.startsWith('4004'))),
|
||||
error: (err) => this.toast(`Could not load income GLs: ${apiErrorMessage(err)}`)
|
||||
});
|
||||
this.reloadMasters();
|
||||
}
|
||||
|
||||
@@ -182,6 +188,10 @@ export class InvestmentMastersComponent implements OnInit {
|
||||
this.toast('Enter Bond Type, Party Name and GL A/c No.');
|
||||
return;
|
||||
}
|
||||
if (f.bondType === 'FD' && !f.interestGlAccountId) {
|
||||
this.toast('An FD bank needs its Interest GL as well.');
|
||||
return;
|
||||
}
|
||||
const body = {
|
||||
bondType: f.bondType,
|
||||
partyName: f.partyName,
|
||||
@@ -194,6 +204,7 @@ export class InvestmentMastersComponent implements OnInit {
|
||||
fax: f.fax ?? '',
|
||||
bankType: f.bankType ?? '',
|
||||
glAccountId: Number(f.glAccountId),
|
||||
interestGlAccountId: f.bondType === 'FD' && f.interestGlAccountId ? Number(f.interestGlAccountId) : null,
|
||||
rbiCode: f.rbiCode ?? '',
|
||||
limit: f.limit ?? null,
|
||||
leiNo: f.leiNo ?? '',
|
||||
|
||||
Reference in New Issue
Block a user