feat: cash-only registers, day book sections and DD amendments
This commit is contained in:
@@ -49,6 +49,18 @@ export class SponsorDDService {
|
||||
return this.http.get<any>(`/sponsordd/leaflets/by-number/${ddNumber}`);
|
||||
}
|
||||
|
||||
getNextAvailableLeaflet(branchId?: number, sponsorBankId?: number, inventoryId?: number): Observable<any> {
|
||||
const params: any = {};
|
||||
if (branchId) params.branchId = branchId;
|
||||
if (sponsorBankId) params.sponsorBankId = sponsorBankId;
|
||||
if (inventoryId) params.inventoryId = inventoryId;
|
||||
return this.http.get<any>('/sponsordd/leaflets/next-available', { params });
|
||||
}
|
||||
|
||||
getSponsorBanks(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/sponsorbanks');
|
||||
}
|
||||
|
||||
// ── Actions ──
|
||||
issueDemandDraft(
|
||||
leafletId: number,
|
||||
@@ -102,6 +114,7 @@ export class SponsorDDService {
|
||||
chequeNumber?: string;
|
||||
chequeBankName?: string;
|
||||
cashierDepositRequestId?: number;
|
||||
denominationData?: string;
|
||||
}
|
||||
): Observable<any> {
|
||||
return this.http.post<any>(`/sponsordd/leaflets/${leafletId}/issue-request`, data);
|
||||
@@ -205,6 +218,35 @@ export class SponsorDDService {
|
||||
return this.http.post<any>(`/sponsordd/reprint-requests/${id}/reject`, { rejectionReason });
|
||||
}
|
||||
|
||||
// ── DD amendment requests (maker-checker) ──
|
||||
// Correcting an issued draft's beneficiary, or the branch and city it is payable at. Nothing else
|
||||
// is amendable: the money behind the face value has already moved, so a draft wrong in that way
|
||||
// is cancelled and re-issued rather than edited.
|
||||
|
||||
/**
|
||||
* Maker step. A field left blank keeps what the draft already carries, so correcting only the
|
||||
* city does not mean retyping the beneficiary and risking a second mistake.
|
||||
*/
|
||||
requestDdAmendment(
|
||||
leafletId: number,
|
||||
changes: { beneficiaryName?: string; payableAtBranch?: string; payableAtCity?: string; reason: string }
|
||||
): Observable<any> {
|
||||
return this.http.post<any>(`/sponsordd/leaflets/${leafletId}/amendment-request`, changes);
|
||||
}
|
||||
|
||||
getAllAmendmentRequests(status?: string): Observable<any[]> {
|
||||
const params = status ? { status } : {};
|
||||
return this.http.get<any[]>('/sponsordd/amendment-requests', { params });
|
||||
}
|
||||
|
||||
approveAmendmentRequest(id: number): Observable<any> {
|
||||
return this.http.post<any>(`/sponsordd/amendment-requests/${id}/approve`, {});
|
||||
}
|
||||
|
||||
rejectAmendmentRequest(id: number, rejectionReason: string): Observable<any> {
|
||||
return this.http.post<any>(`/sponsordd/amendment-requests/${id}/reject`, { rejectionReason });
|
||||
}
|
||||
|
||||
// ── Approver signature (stamped onto the printed DD) ──
|
||||
// Reuses Fineract's generic document-attachment API (entityType is a free-form string with
|
||||
// no per-type backend wiring required) rather than building dedicated signature storage.
|
||||
|
||||
Reference in New Issue
Block a user