feat: update TDS config, RBI reserve returns, current products, and dormancy reports
This commit is contained in:
@@ -935,4 +935,71 @@ export class OrganizationService {
|
||||
updateClearingGlConfig(configKey: string, glAccountId: number | null): Observable<any> {
|
||||
return this.http.put(`/clearingglconfig/${configKey}`, { glAccountId });
|
||||
}
|
||||
|
||||
// ── RBI Reserve Configuration (Form 1 CRR / Form 9 SLR) ──
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} `{ rates[], glRoles[] }` — the effective-dated CRR/SLR percentages
|
||||
* and the GL accounts mapped to each reserve role. Roles with nothing mapped are included, so
|
||||
* the screen can show the gaps rather than hide them.
|
||||
*/
|
||||
getRbiReserveConfig(): Observable<any> {
|
||||
return this.http.get('/rbireserveconfig');
|
||||
}
|
||||
|
||||
/** @returns {Observable<any>} Selectable (postable, non-header) GL accounts plus the rate types. */
|
||||
getRbiReserveConfigTemplate(): Observable<any> {
|
||||
return this.http.get('/rbireserveconfig/template');
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the entire set of GL accounts mapped to one reserve role.
|
||||
*
|
||||
* Each mapping carries the portion of the account's balance the role takes and, on a liability
|
||||
* head, whether that portion is a demand or a time liability. RBI treats part of a savings balance
|
||||
* as demand and the rest as time, so the same account is sent twice under one role with different
|
||||
* classes - which is why this is a list of mappings rather than a list of account ids.
|
||||
*
|
||||
* @param {string} configKey A built-in role (CASH_IN_HAND, BALANCE_WITH_OTHER_BANKS,
|
||||
* DEMAND_TIME_LIABILITIES, SLR_INVESTMENTS) or the key of a head an administrator added.
|
||||
*/
|
||||
updateRbiReserveGlRole(
|
||||
configKey: string,
|
||||
mappings: { glAccountId: number; weightPercentage: number; liabilityClass: string | null }[]
|
||||
): Observable<any> {
|
||||
return this.http.put(`/rbireserveconfig/gl/${configKey}`, { mappings, locale: 'en' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a head to a return - a reserve, a tax payable, anything the bank's chart carries that the
|
||||
* built-in roles do not name. `usage` states how the return consumes it: LIABILITY, ASSET_NET,
|
||||
* MAINTAINED or MEMO.
|
||||
*/
|
||||
createRbiReserveRole(role: { label: string; description: string; group: string; usage: string }): Observable<any> {
|
||||
return this.http.post('/rbireserveconfig/role', { ...role, locale: 'en' });
|
||||
}
|
||||
|
||||
/** Removes an administrator-defined head and the accounts pinned to it. */
|
||||
deleteRbiReserveRole(roleId: number): Observable<any> {
|
||||
return this.http.delete(`/rbireserveconfig/role/${roleId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a CRR or SLR rate with effect from a date. Restating an existing effective date edits that
|
||||
* row; a new date adds one, so past returns keep the rate that was actually in force.
|
||||
*/
|
||||
upsertRbiReserveRate(rateType: string, percentage: number, effectiveFrom: string): Observable<any> {
|
||||
return this.http.post('/rbireserveconfig/rate', {
|
||||
rateType,
|
||||
percentage,
|
||||
effectiveFrom,
|
||||
locale: 'en',
|
||||
dateFormat: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
|
||||
/** @returns {Observable<any>} */
|
||||
deleteRbiReserveRate(rateId: number): Observable<any> {
|
||||
return this.http.delete(`/rbireserveconfig/rate/${rateId}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user