Agent Master Entry

{{ agentId ? 'Update this collection agent.' : 'Register a collection agent, their accounts and guarantors.' }}

Agent Details @if (tabHasError(0)) { }

Agent Details

Choose the branch, then find the client who will act as agent - their name, address and accounts are filled in from them.

Home Branch @for (office of offices; track office.id) { {{ office.name }} } The branch this agent's collections belong to Client ID or Name @if (clientNeedsSearch) { Press search to find this client by name or mobile number } @else if (clientAlreadyAgent) { This client is already agent {{ clientAlreadyAgent }} } @else if (clientAgeProblem) { {{ clientAgeProblem }} } @else if (clientOtherBranch) { This client belongs to another branch } @else if (clientLookupFailed) { No client found with this ID } @else if (loadedClientName) { {{ loadedClientName }} }
Agent Code {{ (agentId ? agentForm.get('agentCode')?.value : expectedAgentCode) || '—' }} {{ agentId ? 'Assigned when this agent was opened' : 'Expected - assigned when saved' }}
Agent Name ID Agent Opening Date {{ agentId ? 'The date this agent was opened' : 'Business date' }} Agent Birth Date From the client's record
Address & Contact @if (tabHasError(1)) { }

Address & Contact

Filled from the client; change anything that differs for the agent.

Agent Address (Line 1) Agent Address (Line 2) Agent City Agent PinCode Agent Telephone
Accounts @if (tabHasError(2)) { }

Accounts

The ledger account the agent's cash passes through, and the savings account commission is paid into.

GL Account @for (account of filteredGlAccounts; track account.id) { {{ account.glCode }} · {{ account.name }} } This agent's collections pass through it. One agent to an account. Agent Saving A/C Type @for (accountType of savingsAccountTypes; track accountType) { {{ savingsAccountTypeCodes[accountType] || accountType }} } @if (savingsAccountTypes.length === 0) { @if (loadedClientName) { {{ loadedClientName }} has no savings account — commission can only be paid into one } @else { Enter a Client ID first — types come from that client's own accounts } } Agent Saving A/C No @for (account of accountsOfChosenType; track account.id) { {{ account.accountNo }} } @if (accountsOfChosenType.length === 0) { Choose an A/C Type first } @if (savingsInfoLoading) {
Reading the account…
} @else if (savingsInfoFailed) {
Could not read this account's balance just now.
} @else if (savingsInfo) {
Account Status {{ savingsInfo.status }}
Balance {{ savingsInfo.symbol }}{{ savingsInfo.balance | number: '1.2-2' }}
Hold {{ savingsInfo.symbol }}{{ savingsInfo.hold | number: '1.2-2' }}
Available Balance {{ savingsInfo.symbol }}{{ savingsInfo.available | number: '1.2-2' }}
}
Guarantors @if (guarantors.length > 0) { {{ guarantors.length }} } @if (tabHasError(3)) { }

Guarantor's Detail

Someone other than the agent who stands behind them. Add as many as are needed.

@if (guarantors.length === 0) {

No guarantors added yet.

} @for (guarantor of guarantors.controls; track guarantor; let i = $index) {
{{ i + 1 }} Guarantor {{ i + 1 }}
Client ID or Name @if (guarantor.get('clientId')?.hasError('selfGuarantor')) { The agent cannot be their own guarantor } @else if (guarantor.get('clientId')?.hasError('duplicateGuarantor')) { This client is already a guarantor above } @else if (guarantor.get('clientId')?.hasError('pattern')) { Press search to find this client by name or mobile number } Guarantor Name Telephone Address 1 Address 2 City Pin Code
}
@if (agentId) { Balances @if (tabHasError(4)) { }

Balances

What the agent holds on the books at the start.

Agent Current Balance Agent Opening Balance
}
@if (selectedTabIndex > 0) { } @if (selectedTabIndex < tabCount - 1) { }