feat(tasks,savings,cashier): facility charge mapping screen, chained approve+activate, popup diff dialog, cash/transfer-only teller flow
Adds a Products > Facility Charge Mappings screen so each of the 16 facility toggles can be pointed at a real charge, backing the mapped-charge validation added on the backend. Bulk-approve on the pending accounts screen now chains straight into activation (matching the single-account approve flow) instead of leaving accounts sitting in Approved; the same screen's Confirm button no longer stays disabled on pre-filled but untouched dialogs. Add Charge is hidden on not-yet-active savings accounts, and Transfer Funds is disabled entirely pending a proper transfer flow. The pending savings-account edit "Proposed Changes" panel is now a MatDialog showing only the fields that actually changed, replacing the old always-open inline diff table. The teller transaction-entry Payment Type dropdown is filtered to Cash/Transfer only, mirroring the backend's retirement of the other system-defined payment types so share withdrawal and GL transfers now settle the same way real transfers do. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -778,23 +778,33 @@ export class TransactionEntryComponent implements OnInit, OnDestroy {
|
||||
loadingAccount = false;
|
||||
accountError = '';
|
||||
|
||||
/** Share redemption settlement is always a book-transfer to the linked savings account — never a
|
||||
* cash handover. A Share (SHR) row's own TXN TP. never offers a cash payment type, and neither
|
||||
* does its paired CR (savings) row in "Enter Bank Transfer" mode — that CR row's payment type is
|
||||
* the one that actually governs how the settlement credit posts (see submitShareRedemptionTransfer()).
|
||||
* Every other account type/mode keeps the full, unfiltered list. */
|
||||
/**
|
||||
* A teller only ever picks Cash or Transfer — which specific internal settlement it actually is
|
||||
* (a share redemption, a dividend payout, a GL-to-GL or GL-to-bank book entry) is business logic
|
||||
* the backend already threads through from whichever payment type the clerk picked here (see
|
||||
* ClerkShareWithdrawalRequestApiResource#creditLinkedSavingsAccount on the backend), not a separate
|
||||
* teller-facing choice. System-defined payment types (Share Redemption Transfer, Dividend Claim
|
||||
* Settlement, the loan repayment-adjustment types, ...) exist purely as internal audit labels and
|
||||
* are never offered here.
|
||||
*
|
||||
* Share redemption settlement is always a book-transfer to the linked savings account — never a
|
||||
* cash handover. A Share (SHR) row's own TXN TP. never offers a cash payment type, and neither
|
||||
* does its paired CR (savings) row in "Enter Bank Transfer" mode — that CR row's payment type is
|
||||
* the one that actually governs how the settlement credit posts (see submitShareRedemptionTransfer()).
|
||||
*/
|
||||
paymentTypesForRow(row: TxnRow): any[] {
|
||||
const tellerFacing = this.paymentTypes.filter((pt: any) => !pt.isSystemDefined);
|
||||
if (row.acTyp === 'SHR') {
|
||||
return this.paymentTypes.filter((pt: any) => !pt.isCashPayment);
|
||||
return tellerFacing.filter((pt: any) => !pt.isCashPayment);
|
||||
}
|
||||
const isShareSettlementCredit =
|
||||
row.typ === 'Enter Bank Transfer' &&
|
||||
row.dbCr === 'Cr' &&
|
||||
this.rows.some((r) => r.typ === 'Enter Bank Transfer' && r.dbCr === 'Dr' && r.acTyp === 'SHR');
|
||||
if (isShareSettlementCredit) {
|
||||
return this.paymentTypes.filter((pt: any) => !pt.isCashPayment);
|
||||
return tellerFacing.filter((pt: any) => !pt.isCashPayment);
|
||||
}
|
||||
return this.paymentTypes;
|
||||
return tellerFacing;
|
||||
}
|
||||
|
||||
// Per-row account id/name map: acNo → Fineract id/name (used for multi-row disbursement)
|
||||
@@ -1563,7 +1573,7 @@ export class TransactionEntryComponent implements OnInit, OnDestroy {
|
||||
if (settlementPaymentType?.isCashPayment) {
|
||||
this.showAlert('error', 'Cash Not Allowed for Share Transactions', [
|
||||
'Share redemption settlement is always a book-transfer to the linked savings account, never cash.',
|
||||
'Select a non-cash Payment Type on the CR row (e.g. Transfer or Share Redemption Transfer).'
|
||||
'Select Transfer as the Payment Type on the CR row.'
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user