DDS: agent collection entry screen, per-agent GL account, maturity auto close
The Daily Transaction Entry screen no longer composes a Party Tran. An agent records their own round elsewhere; this screen reads back what they wrote down, shows what it adds up to, and settles the day once a clerk has counted the cash against it. Nothing is typed here and nothing is edited - what settles is what the entries say, to the rupee. Agent Master now asks which ledger account the agent's collections pass through, one agent to an account, and offers only the accounts that can carry them. The DDS scheme product is kept out of the agent's own savings list for the same reason the server refuses it: debits are blocked on those accounts, so commission paid into one would go in and never come out. The DDS product carries a Maturity Auto Close setting, asked as Yes/No to match the Auto Interest Post question directly above it, and Batch Processing offers the run that applies it. Also: the report viewer stops printing two money columns ungrouped and stops totalling a column that holds a word, and an agent's birth date cannot be picked later than eighteen years ago. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
57a61b3057
commit
e2eff9914f
@@ -6,538 +6,221 @@
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
|
||||
<div class="pm-container">
|
||||
<div class="pm-header">
|
||||
<button mat-stroked-button [routerLink]="['../']" class="pm-back">
|
||||
<i class="fas fa-arrow-left"></i> Deposits
|
||||
</button>
|
||||
<h2 class="pm-header__title">Party Master Entry</h2>
|
||||
<div class="pl-root">
|
||||
<div class="pl-header">
|
||||
<div class="pl-header-left">
|
||||
<div class="pl-header-ic"><fa-icon icon="users"></fa-icon></div>
|
||||
<div class="pl-header-text">
|
||||
<h2>Party Master</h2>
|
||||
<p>The DDS accounts on file — each one a customer collected from daily.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl-header-right">
|
||||
<div class="pl-count-chip" matTooltip="Total parties">
|
||||
<fa-icon icon="users"></fa-icon>
|
||||
<strong>{{ totalCount }}</strong>
|
||||
<span>{{ totalCount === 1 ? 'party' : 'parties' }}</span>
|
||||
</div>
|
||||
<button class="pl-create-btn" type="button" [routerLink]="['create']">
|
||||
<fa-icon icon="plus"></fa-icon>
|
||||
<span>Create Party</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pm-card">
|
||||
<form [formGroup]="partyForm">
|
||||
<mat-tab-group class="pm-tabs" [(selectedIndex)]="selectedTabIndex" animationDuration="200ms">
|
||||
<mat-tab label="Main Detail">
|
||||
<div class="pm-tab-content">
|
||||
<div class="pm-section">
|
||||
<div class="pm-section__header">
|
||||
<i class="fas fa-id-card"></i>
|
||||
<h3>Identity</h3>
|
||||
</div>
|
||||
<div class="pm-grid">
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Client ID</mat-label>
|
||||
<input matInput required formControlName="clientId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Sub Type</mat-label>
|
||||
<mat-select required formControlName="subType">
|
||||
@for (type of subTypes; track type) {
|
||||
<mat-option [value]="type">{{ type }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Agent ID</mat-label>
|
||||
<input matInput required formControlName="agentId" />
|
||||
</mat-form-field>
|
||||
|
||||
@if (linkedSavingsAccountId) {
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Savings Account</mat-label>
|
||||
<input matInput [value]="'Linked (id ' + linkedSavingsAccountId + ')'" disabled />
|
||||
</mat-form-field>
|
||||
} @else {
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Savings Account No (if any)</mat-label>
|
||||
<input matInput formControlName="savingsAccountNo" />
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Party Code</mat-label>
|
||||
<input matInput formControlName="partyCode" placeholder="Auto-generated" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Last A/c</mat-label>
|
||||
<input matInput formControlName="lastAccount" placeholder="—" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Nominal</mat-label>
|
||||
<mat-select required formControlName="nominal">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field pm-field--wide">
|
||||
<mat-label>Party Name</mat-label>
|
||||
<input matInput required formControlName="partyName" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field pm-field--wide">
|
||||
<mat-label>Party Name 1</mat-label>
|
||||
<input matInput formControlName="partyName1" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pm-section">
|
||||
<div class="pm-section__header">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
<h3>Address & Contact</h3>
|
||||
</div>
|
||||
<div class="pm-grid">
|
||||
<mat-form-field appearance="outline" class="pm-field pm-field--wide">
|
||||
<mat-label>Address 1</mat-label>
|
||||
<input matInput required formControlName="address1" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field pm-field--wide">
|
||||
<mat-label>Address 2</mat-label>
|
||||
<input matInput formControlName="address2" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field pm-field--wide">
|
||||
<mat-label>Address 3</mat-label>
|
||||
<input matInput formControlName="address3" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>City</mat-label>
|
||||
<input matInput required formControlName="city" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Pincode</mat-label>
|
||||
<input matInput required formControlName="pincode" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Gender</mat-label>
|
||||
<mat-select formControlName="gender">
|
||||
<mat-option value="Male">Male</mat-option>
|
||||
<mat-option value="Female">Female</mat-option>
|
||||
<mat-option value="Other">Other</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Telephone</mat-label>
|
||||
<input matInput formControlName="telephone" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Mobile No (SMS)</mat-label>
|
||||
<input matInput required formControlName="mobileNoSms" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pm-section">
|
||||
<div class="pm-section__header">
|
||||
<i class="fas fa-shield-alt"></i>
|
||||
<h3>KYC</h3>
|
||||
</div>
|
||||
<div class="pm-grid">
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Aadhar No</mat-label>
|
||||
<input matInput formControlName="aadharNo" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>PAN Card No</mat-label>
|
||||
<input matInput formControlName="panCardNo" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>CKYC ID</mat-label>
|
||||
<input matInput formControlName="ckycId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Operation</mat-label>
|
||||
<mat-select required formControlName="operation">
|
||||
@for (op of operations; track op) {
|
||||
<mat-option [value]="op">{{ op }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Birth Date</mat-label>
|
||||
<input matInput [matDatepicker]="birthPicker" formControlName="birthDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="birthPicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #birthPicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Occupation</mat-label>
|
||||
<mat-select formControlName="occupation">
|
||||
@for (occ of occupations; track occ) {
|
||||
<mat-option [value]="occ">{{ occ }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Risk</mat-label>
|
||||
<mat-select formControlName="risk">
|
||||
@for (r of riskLevels; track r) {
|
||||
<mat-option [value]="r">{{ r }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pm-section">
|
||||
<div class="pm-section__header">
|
||||
<i class="fas fa-user-friends"></i>
|
||||
<h3>Minor / Guardian</h3>
|
||||
</div>
|
||||
<div class="pm-grid">
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Adult / Minor</mat-label>
|
||||
<mat-select required formControlName="adultMinor">
|
||||
@for (opt of adultMinorOptions; track opt) {
|
||||
<mat-option [value]="opt">{{ opt }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Minor Date</mat-label>
|
||||
<input matInput [matDatepicker]="minorPicker" formControlName="minorDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="minorPicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #minorPicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Guardian Client ID</mat-label>
|
||||
<input matInput formControlName="guardianClientId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Min. A/c Opt</mat-label>
|
||||
<input matInput formControlName="minAccountOpt" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Relation</mat-label>
|
||||
<input matInput formControlName="relation" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pm-section">
|
||||
<div class="pm-section__header">
|
||||
<i class="fas fa-calendar-day"></i>
|
||||
<h3>Scheme Terms</h3>
|
||||
</div>
|
||||
<div class="pm-grid">
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Opening Date</mat-label>
|
||||
<input matInput required [matDatepicker]="openingPicker" formControlName="openingDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="openingPicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #openingPicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Month</mat-label>
|
||||
<input matInput type="number" formControlName="month" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Maturity Date</mat-label>
|
||||
<input matInput formControlName="maturityDate" placeholder="Calculated" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Reopen Date</mat-label>
|
||||
<input matInput [matDatepicker]="reopenPicker" formControlName="reopenDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="reopenPicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #reopenPicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Deposit Amt</mat-label>
|
||||
<input matInput type="number" formControlName="depositAmount" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Daily Deposit Amt</mat-label>
|
||||
<input matInput required type="number" formControlName="dailyDepositAmount" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Days</mat-label>
|
||||
<input matInput required type="number" formControlName="days" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Ledger No</mat-label>
|
||||
<input matInput formControlName="ledgerNo" placeholder="Auto-generated" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Mat. Amt</mat-label>
|
||||
<input matInput formControlName="maturityAmount" placeholder="Calculated" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Interest Rate</mat-label>
|
||||
<input matInput formControlName="interestRate" placeholder="From product" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Withdraw Type</mat-label>
|
||||
<mat-select formControlName="withdrawType">
|
||||
@for (type of withdrawTypes; track type) {
|
||||
<mat-option [value]="type">{{ type }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pm-section">
|
||||
<div class="pm-section__header">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
<h3>Status & Overdue Flags</h3>
|
||||
</div>
|
||||
<div class="pm-grid">
|
||||
<div class="pm-checkbox-field">
|
||||
<mat-checkbox formControlName="od1Flag">OD1 Flag</mat-checkbox>
|
||||
</div>
|
||||
<div class="pm-checkbox-field">
|
||||
<mat-checkbox formControlName="od2Flag">OD2 Flag</mat-checkbox>
|
||||
</div>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Lien</mat-label>
|
||||
<mat-select formControlName="lien">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Pay Date</mat-label>
|
||||
<input matInput [matDatepicker]="payDatePicker" formControlName="payDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="payDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #payDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Payment Amount</mat-label>
|
||||
<input matInput type="number" formControlName="paymentAmount" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Current Bal</mat-label>
|
||||
<input matInput formControlName="currentBalance" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Opening Bal</mat-label>
|
||||
<input matInput type="number" formControlName="openingBalance" />
|
||||
</mat-form-field>
|
||||
|
||||
<div class="pm-checkbox-field">
|
||||
<mat-checkbox formControlName="isSmsActive">Is SMS Active</mat-checkbox>
|
||||
</div>
|
||||
<div class="pm-checkbox-field">
|
||||
<mat-checkbox formControlName="isEmailActive">Is Email Active</mat-checkbox>
|
||||
</div>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Int.Calc</mat-label>
|
||||
<input matInput formControlName="interestCalc" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Interest Date</mat-label>
|
||||
<input matInput [matDatepicker]="interestDatePicker" formControlName="interestDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="interestDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #interestDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field pm-field--wide">
|
||||
<mat-label>Sp.Description</mat-label>
|
||||
<input matInput formControlName="spDescription" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Fr'z CD</mat-label>
|
||||
<mat-select formControlName="freezeCode">
|
||||
@for (code of freezeCodes; track code) {
|
||||
<mat-option [value]="code">{{ code }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Adv Code</mat-label>
|
||||
<mat-select formControlName="advCode">
|
||||
@for (code of advCodes; track code) {
|
||||
<mat-option [value]="code">{{ code }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (partyForm.get('advCode').value === 'Transfer To Saving') {
|
||||
<div class="pm-section">
|
||||
<div class="pm-section__header">
|
||||
<i class="fas fa-exchange-alt"></i>
|
||||
<h3>Maturity Payout Routing</h3>
|
||||
</div>
|
||||
<div class="pm-grid">
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Credit To Branch</mat-label>
|
||||
<input matInput required formControlName="creditToBranch" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Credit To A/C Type</mat-label>
|
||||
<input matInput required formControlName="creditToAccountType" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Credit To A/C</mat-label>
|
||||
<input matInput required formControlName="creditToAccount" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-tab>
|
||||
|
||||
<mat-tab label="Nominee's Detail">
|
||||
<div class="pm-tab-content">
|
||||
<div class="pm-section">
|
||||
<div class="pm-grid">
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Nominee</mat-label>
|
||||
<mat-select formControlName="nomineeApplicable">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-radio-group formControlName="nomineeSplitMode" class="pm-radio-group">
|
||||
<mat-radio-button value="Percentage">Percentage</mat-radio-button>
|
||||
<mat-radio-button value="Sequence">Sequence</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
|
||||
<button mat-stroked-button type="button" class="pm-add-nominee" (click)="addNominee()">
|
||||
<i class="fas fa-plus"></i> Add Nominee
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (nominees.length === 0) {
|
||||
<p class="pm-empty">No nominees added yet.</p>
|
||||
}
|
||||
|
||||
@for (nominee of nominees.controls; track nominee; let i = $index) {
|
||||
<div class="pm-nominee-row" [formGroup]="$any(nominee)">
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Nom.Dt</mat-label>
|
||||
<input matInput required [matDatepicker]="nomDatePicker" formControlName="nominationDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="nomDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #nomDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput required formControlName="name" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Mobile No</mat-label>
|
||||
<input matInput formControlName="mobileNo" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Birth Dt</mat-label>
|
||||
<input matInput [matDatepicker]="nomBirthPicker" formControlName="birthDate" />
|
||||
<mat-datepicker-toggle matIconSuffix [for]="nomBirthPicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #nomBirthPicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Minor</mat-label>
|
||||
<mat-select required formControlName="minor">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Relation</mat-label>
|
||||
<input matInput required formControlName="relation" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Gender</mat-label>
|
||||
<mat-select required formControlName="gender">
|
||||
<mat-option value="Male">Male</mat-option>
|
||||
<mat-option value="Female">Female</mat-option>
|
||||
<mat-option value="Other">Other</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="pm-field">
|
||||
<mat-label>Guar. Name</mat-label>
|
||||
<input matInput formControlName="guardianName" />
|
||||
</mat-form-field>
|
||||
<button
|
||||
mat-icon-button
|
||||
type="button"
|
||||
class="pm-remove-nominee"
|
||||
(click)="removeNominee(i)"
|
||||
matTooltip="Remove nominee"
|
||||
>
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
@if (isClosed) {
|
||||
<div class="pm-callout">
|
||||
<i class="fas fa-lock"></i>
|
||||
<span>This account is closed. No further collections or edits are possible.</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="pm-action-bar">
|
||||
<button mat-raised-button type="button" (click)="exit()">Exit</button>
|
||||
<button mat-stroked-button type="button" (click)="cancel()">Cancel</button>
|
||||
<button mat-stroked-button type="button" (click)="retrieve()">Retrieve</button>
|
||||
@if (partyId && !isClosed) {
|
||||
<button
|
||||
mat-stroked-button
|
||||
type="button"
|
||||
color="warn"
|
||||
matTooltip="Balance must be zero before closing"
|
||||
(click)="closeAccount()"
|
||||
>
|
||||
<i class="fas fa-lock" style="margin-right: 6px"></i> Close Account
|
||||
</button>
|
||||
<!--
|
||||
Matured accounts still open. Money the bank owes a customer that nobody has been told about, so
|
||||
it is called out on the screen an officer already opens rather than left on a report they would
|
||||
have to think to run.
|
||||
-->
|
||||
@if (dueForClosureCount > 0) {
|
||||
<a class="pm-due-banner" [routerLink]="['dueforclosure']">
|
||||
<fa-icon icon="clipboard-check" class="pm-due-banner__ic"></fa-icon>
|
||||
<span class="pm-due-banner__text">
|
||||
<strong>{{ dueForClosureCount }}</strong>
|
||||
{{ dueForClosureCount === 1 ? 'account has' : 'accounts have' }} matured and
|
||||
{{ dueForClosureCount === 1 ? 'is' : 'are' }} still open —
|
||||
<!-- Nil once every one of them has been paid: what is left then is the closing, not the money. -->
|
||||
@if (dueForClosurePayable > 0) {
|
||||
<strong>{{ dueForClosurePayable | number: '1.2-2' }}</strong> still owed to customers.
|
||||
} @else {
|
||||
paid in full, waiting to be closed.
|
||||
}
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
type="button"
|
||||
[disabled]="partyForm.invalid || isClosed"
|
||||
(click)="save()"
|
||||
>
|
||||
Save
|
||||
</span>
|
||||
<span class="pm-due-banner__cta">Settle {{ dueForClosureCount === 1 ? 'it' : 'them' }} <fa-icon icon="arrow-right"></fa-icon></span>
|
||||
</a>
|
||||
}
|
||||
|
||||
<div class="pl-kpis">
|
||||
<div class="pl-kpi pl-kpi--blue">
|
||||
<div class="pl-kpi-ic"><fa-icon icon="users"></fa-icon></div>
|
||||
<div>
|
||||
<div class="pl-kpi-n">{{ activeCount | number }}</div>
|
||||
<div class="pl-kpi-l">Open Accounts</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl-kpi pl-kpi--purple" matTooltip="What the agents should collect between them on a full collection day">
|
||||
<div class="pl-kpi-ic"><fa-icon icon="calendar-day"></fa-icon></div>
|
||||
<div>
|
||||
<div class="pl-kpi-n">{{ totalDailyDue | number: '1.2-2' }}</div>
|
||||
<div class="pl-kpi-l">Daily Collection Due</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl-kpi pl-kpi--teal" matTooltip="Every open account's running balance added up">
|
||||
<div class="pl-kpi-ic"><fa-icon icon="wallet"></fa-icon></div>
|
||||
<div>
|
||||
<div class="pl-kpi-n">{{ totalCurrentBalance | number: '1.2-2' }}</div>
|
||||
<div class="pl-kpi-l">Total Deposits Held</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pl-card">
|
||||
<div class="pl-toolbar">
|
||||
<div class="pl-search">
|
||||
<fa-icon icon="search" class="pl-search-ic"></fa-icon>
|
||||
<input type="text" (input)="applyFilter($any($event.target).value)" placeholder="Search by code, name or agent…" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (totalCount === 0) {
|
||||
<div class="pl-empty">
|
||||
<div class="pl-empty-ic"><fa-icon icon="users"></fa-icon></div>
|
||||
<h3>No parties yet</h3>
|
||||
<p>Open one so an agent can start collecting daily deposits against it.</p>
|
||||
<button class="pl-create-btn" type="button" [routerLink]="['create']">
|
||||
<fa-icon icon="plus"></fa-icon>
|
||||
<span>Create Party</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
} @else {
|
||||
<div class="pl-table-wrap">
|
||||
<table mat-table [dataSource]="dataSource" matSort class="pl-table">
|
||||
<ng-container matColumnDef="partyCode">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Party Code</th>
|
||||
<td mat-cell *matCellDef="let p">
|
||||
<div class="pl-product-cell">
|
||||
<div class="pl-product-icon"><fa-icon icon="user"></fa-icon></div>
|
||||
<div class="pl-product-meta">
|
||||
<div class="pl-product-name">{{ p.partyCode }}</div>
|
||||
<div class="pl-product-sub">{{ p.city || '—' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="partyName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Party Name</th>
|
||||
<td mat-cell *matCellDef="let p">{{ p.partyName }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="subType">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Sub Type</th>
|
||||
<td mat-cell *matCellDef="let p">
|
||||
<span class="pl-tag" [matTooltip]="p.subType">{{ p.subTypeDescription || p.subType }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="agentName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Collected By</th>
|
||||
<td mat-cell *matCellDef="let p">
|
||||
<div class="pl-product-meta">
|
||||
<div class="pl-product-name">{{ p.agentName || '—' }}</div>
|
||||
<div class="pl-product-sub">{{ p.agentCode }}</div>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!--
|
||||
The customer's real deposit account. A party without one is money the bank's books do not
|
||||
know about, so it is called out rather than shown as a blank cell.
|
||||
-->
|
||||
<ng-container matColumnDef="savingsAccountNo">
|
||||
<th mat-header-cell *matHeaderCellDef>DDS Account</th>
|
||||
<td mat-cell *matCellDef="let p">
|
||||
@if (p.savingsAccountNo) {
|
||||
<div class="pl-product-meta">
|
||||
<div class="pm-list-account">{{ p.savingsAccountNo }}</div>
|
||||
<div class="pl-product-sub">{{ p.savingsAccountStatus }}</div>
|
||||
</div>
|
||||
} @else {
|
||||
<span class="pm-list-no-account">Not opened</span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="dailyDepositAmount">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header class="num">Daily Deposit</th>
|
||||
<td mat-cell *matCellDef="let p" class="num">{{ p.dailyDepositAmount | number: '1.2-2' }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="currentBalance">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header class="num">Current Balance</th>
|
||||
<td mat-cell *matCellDef="let p" class="num">
|
||||
<strong>{{ p.currentBalance | number: '1.2-2' }}</strong>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef>Status</th>
|
||||
<td mat-cell *matCellDef="let p">
|
||||
<span class="pm-pill" [class.pm-pill--off]="p.status === 'CLOSED'">
|
||||
{{ p.status === 'CLOSED' ? 'Closed' : 'Active' }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="nominees">
|
||||
<th mat-header-cell *matHeaderCellDef>Nominees</th>
|
||||
<td mat-cell *matCellDef="let p">
|
||||
@if (nomineeCount(p) > 0) {
|
||||
<button
|
||||
type="button"
|
||||
class="pl-nominee-btn"
|
||||
(click)="showNominees(p)"
|
||||
matTooltip="See who this account is nominated to"
|
||||
>
|
||||
{{ nomineeCount(p) }} nominated
|
||||
</button>
|
||||
} @else {
|
||||
<span class="pl-muted">None</span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef class="num">Actions</th>
|
||||
<td mat-cell *matCellDef="let p" class="num">
|
||||
<button
|
||||
type="button"
|
||||
class="pl-action-btn pl-action-btn--edit"
|
||||
[routerLink]="[p.id, 'edit']"
|
||||
[matTooltip]="p.status === 'CLOSED' ? 'View this closed party' : 'Edit this party'"
|
||||
>
|
||||
<fa-icon [icon]="p.status === 'CLOSED' ? 'eye' : 'edit'"></fa-icon>
|
||||
<span>{{ p.status === 'CLOSED' ? 'View' : 'Edit' }}</span>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: displayedColumns"
|
||||
class="pl-row"
|
||||
[class.pm-row--closed]="row.status === 'CLOSED'"
|
||||
></tr>
|
||||
</table>
|
||||
|
||||
@if (filteredCount === 0 && totalCount > 0) {
|
||||
<div class="pl-no-match">
|
||||
<fa-icon icon="search"></fa-icon>
|
||||
<span>No parties match your filter.</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" [pageSize]="10" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user