DDS: approvals tab, vouchers, payout & close, Sundry GL search, closure tab, fixes
This commit is contained in:
@@ -339,6 +339,37 @@ export class OrganizationService {
|
||||
* @param {string | number} clientId Client ID.
|
||||
* @returns {Observable<any>} id, accountNo, productName and balance for each.
|
||||
*/
|
||||
/** The liability GL accounts a DDS balance can be parked in, for the clerk to search and pick. */
|
||||
getDdsSundryAccounts(): Observable<any> {
|
||||
return this.http.get('/dds/parties/sundryaccounts');
|
||||
}
|
||||
|
||||
/** DDS entries waiting on (or already past) a checker - PENDING, APPROVED or REJECTED. */
|
||||
getDdsApprovals(status: string, fromDate?: string, toDate?: string): Observable<any> {
|
||||
const params: any = { status };
|
||||
if (fromDate) {
|
||||
params.fromDate = fromDate;
|
||||
}
|
||||
if (toDate) {
|
||||
params.toDate = toDate;
|
||||
}
|
||||
return this.http.get('/dds/approvals', { params });
|
||||
}
|
||||
|
||||
getDdsApproval(commandId: string | number): Observable<any> {
|
||||
return this.http.get(`/dds/approvals/${commandId}`);
|
||||
}
|
||||
|
||||
/** Approves or rejects a DDS entry; an approval returns the voucher it moved under. */
|
||||
actOnDdsApproval(commandId: string | number, command: 'approve' | 'reject'): Observable<any> {
|
||||
return this.http.post(`/dds/approvals/${commandId}`, {}, { params: { command } });
|
||||
}
|
||||
|
||||
/** How a closed DDS account was closed: by whom, what it came to and where the money went. */
|
||||
getPartyClosure(partyId: string | number): Observable<any> {
|
||||
return this.http.get(`/dds/parties/${partyId}/closure`);
|
||||
}
|
||||
|
||||
getCreditableAccounts(clientId: string | number): Observable<any> {
|
||||
return this.http.get('/dds/parties/creditaccounts', { params: { clientId: String(clientId) } });
|
||||
}
|
||||
@@ -376,6 +407,14 @@ export class OrganizationService {
|
||||
return this.http.post(`/dds/parties/${partyId}?command=prematureclose`, closeCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes a DDS account early inside its scheme's lock-in, for the reason given. Its own permission,
|
||||
* so it goes to a manager for approval; the scheme's lock-in is not changed.
|
||||
*/
|
||||
prematureCloseOverrideParty(partyId: string | number, closeCommand: any): Observable<any> {
|
||||
return this.http.post(`/dds/parties/${partyId}?command=prematurecloseoverride`, closeCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {any} transaction Daily transaction batch (PARTY_TRAN collections or a WITHDRAW_DEPOSITE transfer) to post.
|
||||
* @returns {Observable<any>}
|
||||
@@ -404,6 +443,26 @@ export class OrganizationService {
|
||||
return this.http.post('/dds/collectionentries/settle', settlement);
|
||||
}
|
||||
|
||||
/** Everything the agent still has outstanding, whatever day it was written - what a receipt is applied against. */
|
||||
getAgentPendingCollections(agentId: any): Observable<any> {
|
||||
return this.http.get(`/dds/collectionentries/pending?agentId=${agentId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* The cashier's receipts into the agent's GL account: the DDS receipts ready to apply, or - with a
|
||||
* voucher number - that one voucher in whatever state, so the screen can say why it cannot be used.
|
||||
*/
|
||||
getAgentCashReceipts(agentId: any, voucherNo?: string, includeWaiting = false): Observable<any> {
|
||||
const voucher = voucherNo ? `&voucherNo=${encodeURIComponent(voucherNo)}` : '';
|
||||
const waiting = includeWaiting ? '&includeWaiting=true' : '';
|
||||
return this.http.get(`/dds/collectionentries/cashreceipts?agentId=${agentId}${voucher}${waiting}`);
|
||||
}
|
||||
|
||||
/** A cashier receipt's own Dr/Cr lines. */
|
||||
getCashReceiptGlEntries(receiptId: any): Observable<any> {
|
||||
return this.http.get(`/dds/collectionentries/cashreceipts/${receiptId}/glentries`);
|
||||
}
|
||||
|
||||
/**
|
||||
* An agent's DDS transactions. The daily entry screen uses this to show what has already been
|
||||
* keyed for the agent today, so the same collection book is not entered twice.
|
||||
@@ -417,6 +476,16 @@ export class OrganizationService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} partyId DDS account (party) id.
|
||||
* @returns {Observable<any>} Everything posted to that DDS account, most recent first.
|
||||
*/
|
||||
getPartyTransactionsOfParty(partyId: string | number): Observable<any> {
|
||||
return this.http.get('/dds/partytransactions', {
|
||||
params: new HttpParams().set('partyId', String(partyId))
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} DDS Commission Slabs data
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user