feat(investment): share investment screens on live data
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
<div class="pg-eyebrow">TREASURY · INVESTMENT · SHARE</div>
|
||||
<h1 class="pg-title">Share Entry</h1>
|
||||
<p class="pg-sub">
|
||||
Equity and cooperative-society share holdings — Purchase, Dividend, Sell and Write-off entries.
|
||||
Shares of the DCCB / State Co-op Bank, co-operative societies in the area of operation, and membership shares
|
||||
(NPCI, CCIL, SWIFT, Umbrella Organisation, IDPIC) — held as AFS. No other company's shares.
|
||||
</p>
|
||||
</div>
|
||||
@if (activeTab === 'holdings') {
|
||||
@@ -47,7 +48,7 @@
|
||||
[class.pg-btn--active]="activeTab === 'dividend'"
|
||||
(click)="setTab('dividend')"
|
||||
>
|
||||
02 Share Interest / Dividend Entry
|
||||
02 Share Dividend Entry
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -55,7 +56,7 @@
|
||||
[class.pg-btn--active]="activeTab === 'sell'"
|
||||
(click)="setTab('sell')"
|
||||
>
|
||||
03 Share Sell Entry
|
||||
03 Share Refund / Retirement
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -74,31 +75,63 @@
|
||||
<table class="pg-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cert No</th>
|
||||
<th>Deal / Cert No</th>
|
||||
<th>Institution</th>
|
||||
<th>Script</th>
|
||||
<th>Party</th>
|
||||
<th class="num">Units</th>
|
||||
<th class="num">Rate</th>
|
||||
<th class="num">Shares</th>
|
||||
<th class="num">Face Value</th>
|
||||
<th class="num">Book Value</th>
|
||||
<th class="num">Dividends</th>
|
||||
<th>Purchase Date</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (h of holdings; track h.certNo) {
|
||||
@for (d of deals; track d.id) {
|
||||
<tr>
|
||||
<td>
|
||||
<span class="pg-chip">{{ h.certNo }}</span>
|
||||
<span class="pg-chip">{{ d.dealNo }}</span> <small>{{ d.certNo }}</small>
|
||||
</td>
|
||||
<td>{{ h.scriptName }}</td>
|
||||
<td>{{ h.party }}</td>
|
||||
<td class="num">{{ h.units | number }}</td>
|
||||
<td class="num">₹{{ h.purchaseRate | number: '1.2-2' }}</td>
|
||||
<td class="num">₹{{ h.faceValue | number: '1.2-2' }}</td>
|
||||
<td>{{ h.purchaseDate }}</td>
|
||||
<td>
|
||||
<span [class]="statusClass(h)">{{ h.status }}</span>
|
||||
{{ d.partyName }}<br /><small
|
||||
>{{ institutionLabel(dealParty(d)?.institutionType)
|
||||
}}{{ dealParty(d)?.inLiquidation ? ' · in liquidation' : '' }}</small
|
||||
>
|
||||
</td>
|
||||
<td>{{ d.scriptCode }} {{ d.scriptDesc }}</td>
|
||||
<td class="num">{{ d.balanceUnits | number: '1.0-0' }}</td>
|
||||
<td class="num">₹{{ faceHeld(d) | number: '1.2-2' }}</td>
|
||||
<td class="num">₹{{ carryingValue(d) | number: '1.2-2' }}</td>
|
||||
<td class="num">₹{{ dividendsReceived(d) | number: '1.2-2' }}</td>
|
||||
<td>{{ d.settlementDate }}</td>
|
||||
<td>
|
||||
<span [class]="statusClass(d.status)">{{ d.status }}</span>
|
||||
</td>
|
||||
<td>
|
||||
@if (d.status === 'PENDING_SETTLEMENT') {
|
||||
<button
|
||||
type="button"
|
||||
class="pg-btn pg-btn--primary"
|
||||
[disabled]="settlingDealId !== null"
|
||||
(click)="settleDeal(d)"
|
||||
>
|
||||
Settle
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="pg-btn pg-btn--ghost"
|
||||
[disabled]="settlingDealId !== null"
|
||||
(click)="dropDeal(d)"
|
||||
>
|
||||
Drop
|
||||
</button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
} @empty {
|
||||
<tr>
|
||||
<td colspan="10" class="pg-empty">No share holdings yet.</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
@@ -106,143 +139,408 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- PURCHASE ENTRY -->
|
||||
<!-- 01 PURCHASE ENTRY -->
|
||||
@if (activeTab === 'purchase') {
|
||||
<div class="pg-card">
|
||||
<div class="pos-section-label">Investment - Share Purchase Entry</div>
|
||||
<div class="pos-section-label">Investment - Share Purchase Entry (AFS)</div>
|
||||
<div class="inv-form-grid">
|
||||
<label class="inv-form-field"
|
||||
><span>Cert No</span><input type="text" [(ngModel)]="purchaseForm.certNo" readonly
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Script Code</span><input type="text" [(ngModel)]="purchaseForm.scriptCode"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Script/Company Name *</span><input type="text" [(ngModel)]="purchaseForm.scriptName"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Party / Exchange</span><input type="text" [(ngModel)]="purchaseForm.party"
|
||||
/></label>
|
||||
<label class="inv-form-field">
|
||||
<span>Sub Type</span>
|
||||
<select [(ngModel)]="purchaseForm.subType">
|
||||
<option value="EQUITY">EQUITY</option>
|
||||
<option value="CO-OP SHARE">CO-OP SHARE</option>
|
||||
<span>* Institution</span>
|
||||
<select [(ngModel)]="purchaseForm.partyId" (ngModelChange)="refreshLimit()">
|
||||
<option [ngValue]="null">-- Select --</option>
|
||||
@for (p of parties; track p.id) {
|
||||
<option [ngValue]="p.id">{{ p.partyCode }} — {{ p.partyName }}</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
@if (purchaseParty; as p) {
|
||||
<label class="inv-form-field"
|
||||
><span>Institution Type</span><input type="text" [value]="institutionLabel(p.institutionType)" readonly
|
||||
/></label>
|
||||
}
|
||||
<label class="inv-form-field">
|
||||
<span>* Share Script</span>
|
||||
<select [(ngModel)]="purchaseForm.scriptId" (ngModelChange)="onScriptChange()">
|
||||
<option [ngValue]="null">-- Select --</option>
|
||||
@for (s of scripts; track s.id) {
|
||||
<option [ngValue]="s.id">{{ s.scriptCode }} — {{ s.scriptDesc }}</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
<label class="inv-form-field"
|
||||
><span>No. of Units *</span><input type="number" [(ngModel)]="purchaseForm.units" min="0"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Purchase Rate *</span><input type="number" [(ngModel)]="purchaseForm.purchaseRate" min="0" step="0.01"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Purchase Date *</span
|
||||
><mifosx-date-ddmmyyyy [(ngModel)]="purchaseForm.purchaseDate"></mifosx-date-ddmmyyyy
|
||||
><span>* Deal Date</span
|
||||
><mifosx-date-ddmmyyyy
|
||||
[(ngModel)]="purchaseForm.dealDate"
|
||||
(ngModelChange)="refreshLimit()"
|
||||
></mifosx-date-ddmmyyyy
|
||||
></label>
|
||||
<label class="inv-form-field">
|
||||
<span>Settlement</span>
|
||||
<select [(ngModel)]="purchaseForm.settlementType">
|
||||
<option value="T+0">T+0</option>
|
||||
<option value="T+1">T+1</option>
|
||||
<option value="T+2">T+2</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="inv-form-field"
|
||||
><span>Broker Code</span><input type="text" [(ngModel)]="purchaseForm.brokerCode"
|
||||
><span>* No. of Shares</span
|
||||
><input type="number" min="1" step="1" [(ngModel)]="purchaseForm.shares" (ngModelChange)="refreshLimit()"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>CR To A/c</span><input type="text" [(ngModel)]="purchaseForm.crToAc"
|
||||
><span>Face Value per Share</span
|
||||
><input
|
||||
type="text"
|
||||
[value]="purchaseScript ? '₹' + (purchaseScript.faceValuePerUnit | number: '1.2-2') : ''"
|
||||
readonly
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>* Price per Share (₹)</span
|
||||
><input
|
||||
type="number"
|
||||
min="0"
|
||||
step="0.01"
|
||||
[(ngModel)]="purchaseForm.pricePerShare"
|
||||
(ngModelChange)="refreshLimit()"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Face Value</span><input type="text" [value]="'₹' + (purchaseFaceValue | number: '1.2-2')" readonly
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Amount Paid</span><input type="text" [value]="'₹' + (purchaseAmount | number: '1.2-2')" readonly
|
||||
/></label>
|
||||
<label class="inv-form-field">
|
||||
<span>* Paid from (Bank GL)</span>
|
||||
<select [(ngModel)]="purchaseForm.bankGlCode">
|
||||
@for (b of bankOptions; track b.glCode) {
|
||||
<option [value]="b.glCode">{{ b.glCode }} — {{ b.glName }}</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
<label class="inv-form-field"
|
||||
><span>Category</span><input type="text" value="AFS (Available For Sale)" readonly
|
||||
/></label>
|
||||
</div>
|
||||
|
||||
@if (shareLimit; as l) {
|
||||
<div class="pos-section-label">
|
||||
RBI Limit — shares of co-operative societies (owned funds as on {{ l.asOnDate }})
|
||||
</div>
|
||||
@if (!l.exempt) {
|
||||
<table class="pg-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Limit</th>
|
||||
<th class="num">Allowed</th>
|
||||
<th class="num">Now</th>
|
||||
<th class="num">After this deal</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
All co-operative societies — 2% of owned funds
|
||||
{{
|
||||
l.ownedFunds !== null && l.ownedFunds !== undefined
|
||||
? '₹' + (l.ownedFunds | number: '1.2-2')
|
||||
: '(not entered)'
|
||||
}}
|
||||
</td>
|
||||
<td class="num">
|
||||
{{ l.coopLimit !== null && l.coopLimit !== undefined ? '₹' + (l.coopLimit | number: '1.2-2') : '—' }}
|
||||
</td>
|
||||
<td class="num">₹{{ l.coopOutstanding | number: '1.2-2' }}</td>
|
||||
<td class="num">₹{{ l.coopAfter | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
@if (l.partyName) {
|
||||
<tr>
|
||||
<td>
|
||||
{{ l.partyName }} — 5% of subscribed capital
|
||||
{{
|
||||
l.subscribedCapital !== null && l.subscribedCapital !== undefined
|
||||
? '₹' + (l.subscribedCapital | number: '1.2-2')
|
||||
: '(not entered)'
|
||||
}}
|
||||
</td>
|
||||
<td class="num">
|
||||
{{
|
||||
l.institutionLimit !== null && l.institutionLimit !== undefined
|
||||
? '₹' + (l.institutionLimit | number: '1.2-2')
|
||||
: '—'
|
||||
}}
|
||||
</td>
|
||||
<td class="num">₹{{ l.institutionOutstanding | number: '1.2-2' }}</td>
|
||||
<td class="num">₹{{ l.institutionAfter | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
<p class="inv-hint" [class.inv-hint--bad]="!l.withinLimits">{{ l.message }}</p>
|
||||
@if (!l.exempt && (l.ownedFunds === null || l.ownedFunds === undefined)) {
|
||||
<div class="inv-form-grid">
|
||||
<label class="inv-form-field"
|
||||
><span>* Owned Funds as on {{ l.asOnDate }} (₹)</span
|
||||
><input type="number" min="0" [(ngModel)]="ownedFunds" placeholder="Paid-up share capital + reserves"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Total Deposits as on {{ l.asOnDate }} (₹)</span
|
||||
><input
|
||||
type="number"
|
||||
min="0"
|
||||
[(ngModel)]="totalDeposits"
|
||||
placeholder="Only if not entered on the FD screen"
|
||||
/></label>
|
||||
</div>
|
||||
<div class="inv-form-actions">
|
||||
<button type="button" class="pg-btn pg-btn--primary" [disabled]="saving" (click)="saveOwnedFunds()">
|
||||
Save Owned Funds
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@if (shareLimitError) {
|
||||
<p class="inv-hint inv-hint--bad">{{ shareLimitError }}</p>
|
||||
}
|
||||
|
||||
<div class="pos-section-label">Accounting (posted on Settle, dated the settlement date)</div>
|
||||
<p class="inv-hint">
|
||||
Dr 100706 Investment in Shares / Cr {{ purchaseForm.bankGlCode }} ₹{{ purchaseAmount | number: '1.2-2' }}
|
||||
</p>
|
||||
<div class="inv-form-actions">
|
||||
<button type="button" class="pg-btn pg-btn--ghost" (click)="cancelPurchase()">Cancel</button>
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="savePurchase()">Save</button>
|
||||
<button
|
||||
type="button"
|
||||
class="pg-btn pg-btn--primary"
|
||||
[disabled]="saving || (shareLimit !== null && !shareLimit.withinLimits)"
|
||||
(click)="savePurchase()"
|
||||
>
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- DIVIDEND ENTRY -->
|
||||
<!-- 02 DIVIDEND ENTRY -->
|
||||
@if (activeTab === 'dividend') {
|
||||
<div class="pg-card">
|
||||
<div class="pos-section-label">Investment - Share Interest / Dividend Entry</div>
|
||||
<div class="pos-section-label">Investment - Share Dividend Entry (income when received)</div>
|
||||
<div class="inv-form-grid">
|
||||
<label class="inv-form-field">
|
||||
<span>Cert No *</span>
|
||||
<select [(ngModel)]="dividendCertNo">
|
||||
<option value="">-- Select --</option>
|
||||
@for (h of activeHoldings; track h.certNo) {
|
||||
<option [value]="h.certNo">{{ h.certNo }} — {{ h.scriptName }}</option>
|
||||
<span>* Holding</span>
|
||||
<select [(ngModel)]="dividend.purchaseId" (ngModelChange)="onDividendDealChange()">
|
||||
<option [ngValue]="null">-- Select --</option>
|
||||
@for (d of dividendDeals; track d.id) {
|
||||
<option [ngValue]="d.id">
|
||||
{{ d.dealNo }} — {{ d.partyName }} ({{ d.balanceUnits | number: '1.0-0' }} shares)
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
@if (dividendHolding; as h) {
|
||||
<label class="inv-form-field"><span>Units Held</span><input type="text" [value]="h.units" readonly /></label>
|
||||
}
|
||||
<label class="inv-form-field"
|
||||
><span>Dividend per Share *</span><input type="number" [(ngModel)]="dividendPerShare" min="0" step="0.01"
|
||||
><span>* Date Received</span><mifosx-date-ddmmyyyy [(ngModel)]="dividend.dividendDate"></mifosx-date-ddmmyyyy
|
||||
></label>
|
||||
<label class="inv-form-field"
|
||||
><span>* Dividend Amount (₹)</span><input type="number" min="0" step="0.01" [(ngModel)]="dividend.amount"
|
||||
/></label>
|
||||
<label class="inv-form-field">
|
||||
<span>* Received in (Bank GL)</span>
|
||||
<select [(ngModel)]="dividend.bankGlCode">
|
||||
<option value="">-- Select --</option>
|
||||
@for (b of bankOptions; track b.glCode) {
|
||||
<option [value]="b.glCode">{{ b.glCode }} — {{ b.glName }}</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
<label class="inv-form-field"
|
||||
><span>Total Dividend (computed)</span
|
||||
><input type="text" [value]="'₹' + (dividendAmount | number: '1.2-2')" readonly
|
||||
><span>Remarks</span
|
||||
><input type="text" maxlength="500" [(ngModel)]="dividend.remarks" placeholder="e.g. Dividend for FY 2025-26"
|
||||
/></label>
|
||||
</div>
|
||||
<p class="inv-hint">
|
||||
Dr {{ dividend.bankGlCode || 'Bank' }} / Cr 400404 Dividend on Investments ₹{{
|
||||
dividend.amount || 0 | number: '1.2-2'
|
||||
}}
|
||||
</p>
|
||||
<div class="inv-form-actions">
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="saveDividend()">Save</button>
|
||||
<button type="button" class="pg-btn pg-btn--primary" [disabled]="saving" (click)="saveDividend()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- SELL ENTRY -->
|
||||
<!-- 03 REFUND / RETIREMENT -->
|
||||
@if (activeTab === 'sell') {
|
||||
<div class="pg-card">
|
||||
<div class="pos-section-label">Investment - Share Sell Entry</div>
|
||||
<div class="pos-section-label">Investment - Share Refund / Retirement Entry</div>
|
||||
<div class="inv-form-grid">
|
||||
<label class="inv-form-field">
|
||||
<span>Cert No *</span>
|
||||
<select [(ngModel)]="sellCertNo">
|
||||
<option value="">-- Select --</option>
|
||||
@for (h of activeHoldings; track h.certNo) {
|
||||
<option [value]="h.certNo">{{ h.certNo }} — {{ h.scriptName }}</option>
|
||||
<span>* Holding</span>
|
||||
<select [(ngModel)]="refund.purchaseId" (ngModelChange)="onRefundDealChange()">
|
||||
<option [ngValue]="null">-- Select --</option>
|
||||
@for (d of activeDeals; track d.id) {
|
||||
<option [ngValue]="d.id">
|
||||
{{ d.dealNo }} — {{ d.partyName }} ({{ d.balanceUnits | number: '1.0-0' }} shares)
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
@if (sellHolding; as h) {
|
||||
<label class="inv-form-field"><span>Units Held</span><input type="text" [value]="h.units" readonly /></label>
|
||||
}
|
||||
<label class="inv-form-field"
|
||||
><span>Units to Sell *</span><input type="number" [(ngModel)]="sellUnits" min="0"
|
||||
><span>* Refund Date</span
|
||||
><mifosx-date-ddmmyyyy
|
||||
[(ngModel)]="refund.dealDate"
|
||||
(ngModelChange)="refreshRefundQuote()"
|
||||
></mifosx-date-ddmmyyyy
|
||||
></label>
|
||||
<label class="inv-form-field"
|
||||
><span>* Shares Refunded</span
|
||||
><input type="number" min="1" step="1" [(ngModel)]="refund.units" (ngModelChange)="refreshRefundQuote()"
|
||||
/></label>
|
||||
<label class="inv-form-field"
|
||||
><span>Sell Rate *</span><input type="number" [(ngModel)]="sellRate" min="0" step="0.01"
|
||||
><span>* Price per Share (₹)</span
|
||||
><input
|
||||
type="number"
|
||||
min="0"
|
||||
step="0.01"
|
||||
[(ngModel)]="refund.pricePerShare"
|
||||
(ngModelChange)="refreshRefundQuote()"
|
||||
/></label>
|
||||
<label class="inv-form-field">
|
||||
<span>* Received in (Bank GL)</span>
|
||||
<select [(ngModel)]="refund.bankGlCode" (ngModelChange)="refreshRefundQuote()">
|
||||
<option value="">-- Select --</option>
|
||||
@for (b of bankOptions; track b.glCode) {
|
||||
<option [value]="b.glCode">{{ b.glCode }} — {{ b.glName }}</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
<label class="inv-form-field"
|
||||
><span>Consideration (computed)</span
|
||||
><input type="text" [value]="'₹' + (sellConsideration | number: '1.2-2')" readonly
|
||||
><span>Remarks</span><input type="text" maxlength="500" [(ngModel)]="refund.remarks"
|
||||
/></label>
|
||||
</div>
|
||||
@if (refundQuote; as q) {
|
||||
<table class="pg-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Amount received</td>
|
||||
<td class="num">₹{{ q.consideration | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Book value taken off (Cr 100706)</td>
|
||||
<td class="num">₹{{ q.bookValueSold | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ q.profitLoss >= 0 ? 'Profit (Cr 400405)' : 'Loss (Dr 500605)' }}</td>
|
||||
<td class="num">₹{{ (q.profitLoss >= 0 ? q.profitLoss : -q.profitLoss) | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Settlement date</td>
|
||||
<td class="num">{{ q.settlementDate }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
@if (refundQuoteError) {
|
||||
<p class="inv-hint inv-hint--bad">{{ refundQuoteError }}</p>
|
||||
}
|
||||
<div class="inv-form-actions">
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="saveSell()">Save</button>
|
||||
<button type="button" class="pg-btn pg-btn--primary" [disabled]="saving || !refundQuote" (click)="saveRefund()">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="pos-section-label">Pending Refunds (posted on Settle)</div>
|
||||
<table class="pg-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Deal No</th>
|
||||
<th>Institution</th>
|
||||
<th class="num">Shares</th>
|
||||
<th class="num">Amount</th>
|
||||
<th class="num">Profit / Loss</th>
|
||||
<th>Settlement Date</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (s of pendingRefunds; track s.id) {
|
||||
<tr>
|
||||
<td>
|
||||
<span class="pg-chip">{{ s.dealNo }}</span>
|
||||
</td>
|
||||
<td>{{ s.partyName }}</td>
|
||||
<td class="num">{{ s.units | number: '1.0-0' }}</td>
|
||||
<td class="num">₹{{ s.netAmount | number: '1.2-2' }}</td>
|
||||
<td class="num">
|
||||
{{ s.profitLoss < 0 ? 'Loss' : 'Profit' }} ₹{{
|
||||
(s.profitLoss < 0 ? -s.profitLoss : s.profitLoss) | number: '1.2-2'
|
||||
}}
|
||||
</td>
|
||||
<td>{{ s.settlementDate }}</td>
|
||||
<td>
|
||||
<button
|
||||
type="button"
|
||||
class="pg-btn pg-btn--primary"
|
||||
[disabled]="busySaleId !== null"
|
||||
(click)="settleRefund(s)"
|
||||
>
|
||||
Settle
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="pg-btn pg-btn--ghost"
|
||||
[disabled]="busySaleId !== null"
|
||||
(click)="dropRefund(s)"
|
||||
>
|
||||
Drop
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
} @empty {
|
||||
<tr>
|
||||
<td colspan="7" class="pg-empty">No pending refunds.</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- WRITE OFF ENTRY -->
|
||||
<!-- 04 WRITE OFF ENTRY -->
|
||||
@if (activeTab === 'writeoff') {
|
||||
<div class="pg-card">
|
||||
<div class="pos-section-label">Investment - Share Write Off Entry</div>
|
||||
<div class="inv-form-grid">
|
||||
<label class="inv-form-field">
|
||||
<span>Cert No *</span>
|
||||
<select [(ngModel)]="writeoffCertNo">
|
||||
<option value="">-- Select --</option>
|
||||
@for (h of activeHoldings; track h.certNo) {
|
||||
<option [value]="h.certNo">{{ h.certNo }} — {{ h.scriptName }}</option>
|
||||
<span>* Holding</span>
|
||||
<select [(ngModel)]="writeoffPurchaseId">
|
||||
<option [ngValue]="null">-- Select --</option>
|
||||
@for (d of activeDeals; track d.id) {
|
||||
<option [ngValue]="d.id">{{ d.dealNo }} — {{ d.partyName }}</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
@if (writeoffHolding; as h) {
|
||||
@if (writeoffDeal; as d) {
|
||||
<label class="inv-form-field"
|
||||
><span>Face Value to be Written Off</span
|
||||
><input type="text" [value]="'₹' + (h.faceValue | number: '1.2-2')" readonly
|
||||
><span>Book Value</span><input type="text" [value]="'₹' + (carryingValue(d) | number: '1.2-2')" readonly
|
||||
/></label>
|
||||
}
|
||||
<label class="inv-form-field"><span>Reason *</span><input type="text" [(ngModel)]="writeoffReason" /></label>
|
||||
<label class="inv-form-field"
|
||||
><span>* Amount to Write Off (₹)</span><input type="number" min="0" step="0.01" [(ngModel)]="writeoffAmount"
|
||||
/></label>
|
||||
<label class="inv-form-field"><span>* Reason</span><input type="text" [(ngModel)]="writeoffReason" /></label>
|
||||
</div>
|
||||
@if (writeoffDeal) {
|
||||
<p class="inv-hint">
|
||||
@if (writeoffInLiquidation) {
|
||||
The institution is in liquidation: the shares may be written off in full; they stay held at nil until the
|
||||
liquidator pays.
|
||||
} @else {
|
||||
Only part of the book value can be written off; enter a refund to close the holding.
|
||||
}
|
||||
Dr 500605 Loss on Investments / Cr 100706 Investment in Shares.
|
||||
</p>
|
||||
}
|
||||
<div class="inv-form-actions">
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="saveWriteoff()">Save</button>
|
||||
<button type="button" class="pg-btn pg-btn--primary" [disabled]="saving" (click)="saveWriteoff()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -262,7 +560,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (t of txns; track t.voucherNo) {
|
||||
@for (t of txns; track $index) {
|
||||
<tr>
|
||||
<td>{{ t.txnDate }}</td>
|
||||
<td>
|
||||
@@ -273,6 +571,10 @@
|
||||
<td>{{ t.particulars }}</td>
|
||||
<td class="num">₹{{ t.amount | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
} @empty {
|
||||
<tr>
|
||||
<td colspan="6" class="pg-empty">No share transactions yet.</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user