feat(investment): FD TDS fields, GOI interest to the paisa, compact home reminders, deal no in holdings and settle guard
This commit is contained in:
@@ -175,6 +175,22 @@ export class InvestmentMastersComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
/** FD GLs are the bank-wise children of 100704 (codes 1007040x). */
|
||||
private static isFdGl(glCode: string): boolean {
|
||||
return glCode.startsWith('1007040');
|
||||
}
|
||||
|
||||
/** An FD bank is mapped to its own FD GL; any other party to a non-FD investment GL. */
|
||||
get partyGlOptions(): InvestmentGlAccount[] {
|
||||
const fd = this.partyForm.bondType === 'FD';
|
||||
return this.investmentGlOptions.filter((g) => InvestmentMastersComponent.isFdGl(g.glCode) === fd);
|
||||
}
|
||||
|
||||
/** Scripts are securities, never an FD with a bank. */
|
||||
get scriptGlOptions(): InvestmentGlAccount[] {
|
||||
return this.investmentGlOptions.filter((g) => !InvestmentMastersComponent.isFdGl(g.glCode));
|
||||
}
|
||||
|
||||
// -------------------- Bank / Party Master --------------------
|
||||
/** Preview of the code the backend will assign; the saved code always comes from the backend. */
|
||||
get nextPartyCode(): string {
|
||||
@@ -192,6 +208,11 @@ export class InvestmentMastersComponent implements OnInit {
|
||||
this.toast('An FD bank needs its Interest GL as well.');
|
||||
return;
|
||||
}
|
||||
const tds = f.bondType === 'FD' && !!f.tdsApplicable;
|
||||
if (tds && !(Number(f.tdsRate) > 0 && Number(f.tdsRate) < 100)) {
|
||||
this.toast('Enter the TDS rate (%) this bank deducts on FD interest.');
|
||||
return;
|
||||
}
|
||||
const body = {
|
||||
bondType: f.bondType,
|
||||
partyName: f.partyName,
|
||||
@@ -205,6 +226,8 @@ export class InvestmentMastersComponent implements OnInit {
|
||||
bankType: f.bankType ?? '',
|
||||
glAccountId: Number(f.glAccountId),
|
||||
interestGlAccountId: f.bondType === 'FD' && f.interestGlAccountId ? Number(f.interestGlAccountId) : null,
|
||||
tdsApplicable: tds,
|
||||
tdsRate: tds ? Number(f.tdsRate) : null,
|
||||
rbiCode: f.rbiCode ?? '',
|
||||
limit: f.limit ?? null,
|
||||
leiNo: f.leiNo ?? '',
|
||||
|
||||
Reference in New Issue
Block a user