feat: implement share account actions, view components, and pending checker tasks

This commit is contained in:
2026-08-27 10:23:25 +05:30
parent 1273bdbe0e
commit 83e58376cb
32 changed files with 1699 additions and 93 deletions
@@ -10,17 +10,18 @@
<mat-dialog-content>
<p class="intro">
Enter the voucher number the member was given, or tick the receipts below, to settle against share account
<b>{{ data.accountNo }}</b
>. Tick more than one where the member paid in instalments. The amount is moved out of Share Sundry into share
capital, and any entry fee is posted to fee income.
Tick the receipts that make up this payment to settle share account <b>{{ data.accountNo }}</b
>, then apply. Today's unapplied receipts for this member are listed below — tick more than one where they paid in
instalments. The amount moves out of Share Sundry into share capital, and any entry fee is posted to fee income.
</p>
<!-- For a receipt the list does not carry — one taken on an earlier day, or a slip the member is
holding that is quicker to type than to find. -->
<div class="voucher-lookup">
<input
type="text"
class="voucher-input"
placeholder="Voucher no. (e.g. 000123)"
placeholder="Voucher no. (e.g. CR/001/2608/0001)"
[(ngModel)]="voucherNo"
[disabled]="lookingUp || submitting"
(keyup.enter)="lookupVoucher()"
@@ -51,10 +52,11 @@
<div class="empty">
<mat-icon>info_outline</mat-icon>
<div>
<b>No unapplied receipt for this member.</b>
<b>No unapplied receipt for this member today.</b>
<div class="empty-hint">
Collect the cash first from Cashier &rsaquo; Transaction Entry as a deposit to the Share Sundry GL. Once a
manager approves it, enter the voucher number above.
If the cash was taken on an earlier day, enter that voucher number above. Otherwise collect it first from
Cashier &rsaquo; Transaction Entry as a deposit to the Share Sundry GL — once a manager approves it, the
voucher appears here.
</div>
</div>
</div>
@@ -62,7 +64,7 @@
<table class="receipt-table">
<thead>
<tr>
<th></th>
<th class="col-tick"></th>
<th class="ta-left">Voucher / Receipt</th>
<th class="ta-left">Date</th>
<th class="ta-right">Amount</th>
@@ -71,7 +73,7 @@
<tbody>
@for (r of receipts; track r.id) {
<tr [class.selected]="isSelected(r.id)" (click)="toggle(r.id)">
<td class="ta-center">
<td class="ta-center col-tick">
<!-- Checkboxes, not radios: a member paying in instalments has several receipts
against one application, and all of them settle it together. -->
<input
@@ -83,28 +85,29 @@
</td>
<td class="ta-left mono">{{ r.voucher_no || r.receipt_no }}</td>
<td class="ta-left">{{ r.collection_date }}</td>
<td class="ta-right">
<b>{{ r.amount }}</b>
</td>
<td class="ta-right amount-cell">{{ r.amount | number: '1.2-2' }}</td>
</tr>
}
</tbody>
@if (selectedIds.length > 1) {
<!-- Shown from the first tick rather than the second: the total against what the account needs
is what decides whether the settlement is accepted, so it should be on screen as soon as
there is anything to total. -->
@if (selectedIds.length > 0) {
<tfoot>
<tr class="total-row">
<td></td>
<td class="ta-left" colspan="2">{{ selectedIds.length }} receipts selected</td>
<td class="ta-right">
<b>{{ selectedTotal | number: '1.2-2' }}</b>
<td class="col-tick"></td>
<td class="ta-left" colspan="2">
{{ selectedIds.length }} {{ selectedIds.length === 1 ? 'receipt' : 'receipts' }} selected
</td>
<td class="ta-right amount-cell">{{ selectedTotal | number: '1.2-2' }}</td>
</tr>
</tfoot>
}
</table>
<div class="note">
Select every receipt that makes up this payment. Their total must cover the account's share value plus any entry
fee — anything paid over that is credited to the member's savings account.
Their total must cover the account's share value plus any entry fee — anything paid over that is credited to the
member's savings account.
</div>
}
</mat-dialog-content>