DDS Interest & Commission

Calculate, check and post DDS interest and agent commission, and close matured accounts

1

Choose the job

Each month: Calculate first, check the preview, then Post.

@for (group of jobGroups; track group.title) {
{{ group.title }} {{ group.hint }}
@for (code of group.steps; track code; let last = $last) { @if (!last) { } }
}
2

{{ jobTypeLabel }} {{ isPostingJob ? 'Moves money' : 'Calculation only' }}

Which branches, agents and accounts, and as of which date.

Job Type @for (type of jobTypes; track type.code) { {{ type.label }} } {{ isPostingJob ? 'Posting Date' : 'Interest Date' }} Branch @for (scope of branchScopes; track scope) { {{ scope }} } @if (isBranchSelected) {
Branches ({{ selectedOfficeNames.size }} selected)
@for (office of offices; track office.id) { {{ office.name }} } @if (offices.length === 0) { Loading branches... }
}
Agents
From to To
@if (!isCommissionJob) {
Parties
From to To
}
@if (isPostingJob) { {{ jobTypeLabel }} moves what has already been calculated to where it belongs — into the customer's balance, or out to the agent. Generate lists it first; nothing moves until you press Post. } @else { {{ jobTypeLabel }} works out what has been earned since the last run and records it against each account. It does not become spendable until the matching Posting job runs. Generate previews it; nothing is recorded until you press Post. }
@if (generatedRun) { }
@if (generatedRun) {
3

{{ labelOf(generatedRun.jobType) }} — preview

Run #{{ generatedRun.id }} · nothing applied yet — check the figures, then Post.

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

Nothing to apply. Either this period has already been processed, or there was no activity in it.

} @else {
Agents{{ agentGroups.length }}
{{ isCommissionJob ? 'Entries' : 'Accounts' }}{{ previewRows.length }}
{{ showsCommissionBreakdown ? 'Total payable' : 'Total' }} ₹ {{ money(previewTotal) }}
Date{{ generatedRun.jobDate | dateFormat }}
{{ isCommissionJob ? 'One line per agent - View shows how their commission was worked out.' : 'Grouped by collecting agent - View shows the DDS accounts under each.' }}
@if (isCommissionJob) { @if (showsCommissionBreakdown) { } @for (group of agentGroups; track group.key) { @for (row of group.rows; track row.id) { @if (showsCommissionBreakdown) { } } }
Agent PeriodCollection Rate Commission TDS Deductions{{ showsCommissionBreakdown ? 'Payable' : 'Amount' }}
{{ row.agentCode }} {{ row.agentName }} {{ row.fromDate | dateFormat }} – {{ row.toDate | dateFormat }}{{ money(row.baseAmount) }} {{ row.ratePercent }}% {{ money(row.grossAmount) }} {{ money(row.tdsAmount) }} {{ money(row.deductionAmount) }}{{ money(row.amount) }}
Total {{ money(previewTotal) }}
} @else { @for (group of agentGroups; track group.key) { }
Agent Accounts Amount
{{ group.initials }} {{ group.agentCode }} {{ group.agentName }} {{ group.rows.length }} {{ money(group.total) }}
Total {{ previewRows.length }} {{ money(previewTotal) }}
}
}
}
@if (postingRunId) {
Posting is running. It continues even if you leave this screen — the list below updates when it finishes.
}

Previous runs

Every run, and whether it was applied.

@if (!runsLoading && recentRuns.length > 0) {
{{ runStats.total }} runs {{ runStats.posted }} posted @if (runStats.pending) { {{ runStats.pending }} not posted } @if (runStats.running) { {{ runStats.running }} running } @if (runStats.failed) { {{ runStats.failed }} failed }
}
@if (runsLoading) {
@for (row of [1, 2, 3, 4]; track row) { }
} @else if (recentRuns.length === 0) {

No batch has been run yet.

} @else {
@for (run of recentRuns; track run.id) { }
# Job Date Entries Amount Status Posted On
#{{ run.id }} {{ labelOf(run.jobType) }} {{ run.jobDate | dateFormat }} {{ run.totalRows }} {{ money(run.totalAmount) }} @switch (run.status) { @case ('POSTED') { Posted } @case ('POSTING') { Running } @case ('FAILED') { Failed } @default { Not posted } } {{ run.postedOnDate ? (run.postedOnDate | dateFormat) : '—' }}
}
@if (selectedGroup; as group) {
{{ group.initials }}

{{ group.agentCode }} {{ group.agentName }}

{{ labelOf(generatedRun?.jobType) }} · Run #{{ generatedRun?.id }} · {{ generatedRun?.jobDate | dateFormat }}

@if (isCommissionJob) { @for (row of group.rows; track row.id) {
@if (showsCommissionBreakdown) {
Collection₹ {{ money(row.baseAmount) }}
Slab rate{{ row.ratePercent }}%
Commission₹ {{ money(row.grossAmount) }}
– TDS₹ {{ money(row.tdsAmount) }}
– Deductions₹ {{ money(row.deductionAmount) }}
}
{{ showsCommissionBreakdown ? 'Payable to agent' : 'To be paid out' }} ₹ {{ money(row.amount) }}

Period {{ row.fromDate | dateFormat }} – {{ row.toDate | dateFormat }}. The agent's collection from all their customers is added up and one slab rate applies to the whole figure.

} } @else {
Accounts{{ group.rows.length }}
Total₹ {{ money(group.total) }}
@for (row of popupRows; track row.id; let i = $index) { } @empty { }
# Party Period Rate Amount
{{ i + 1 }} {{ row.partyCode }} {{ row.partyName }} {{ row.fromDate | dateFormat }} – {{ row.toDate | dateFormat }} {{ row.ratePercent ? row.ratePercent + '%' : '—' }} {{ money(row.amount) }}
No account matches the search.
{{ agentSearch ? 'Total of the accounts shown' : 'Total' }} {{ money(popupTotal) }}
}
}