fix(chequebook,ctsclearing): surface global stock allocation in UI; fix decided-state check
Receive Stock form now displays the actual highest-allocated serial across every series (not just silently prefilling the field), so the operator can see and trust the auto-suggested range start rather than taking it on faith. Fixes a real bug where item.decision (which InwardClearingItem.java always sets to the literal string "PENDING" at creation, never null) was checked with a plain truthy test everywhere a "has this been decided yet" branch was needed. Since "PENDING" is a non-empty string, that check was always true — silently breaking the Decide/View button label, the collapsed validation summary, the "Awaiting settlement" text, and the decision dialog itself (which never showed the actual Pass/Return form, even for still-pending items). Replaced with a proper isDecided() check everywhere. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+8
@@ -185,6 +185,14 @@ export class ItemDecisionDialogComponent implements OnInit, OnDestroy {
|
||||
return good ? 'ok' : 'bad';
|
||||
}
|
||||
|
||||
/** item.decision is NEVER null — InwardClearingItem.java sets it to the literal string "PENDING" at creation,
|
||||
* then "PASS"/"RETURN" once decided. A plain truthy check on it is always true, which silently made this
|
||||
* dialog show the read-only decision summary (and hide the Pass/Return form) for every item, including ones
|
||||
* still genuinely PENDING. */
|
||||
get isDecided(): boolean {
|
||||
return this.item?.decision === 'PASS' || this.item?.decision === 'RETURN';
|
||||
}
|
||||
|
||||
/** What each automatic rule actually compared (amount vs words, instrument date vs the valid-until window,
|
||||
* balance vs amount, etc.) instead of just the pass/fail pill — opened on demand, not always-on clutter. */
|
||||
openValidationDetail(): void {
|
||||
|
||||
Reference in New Issue
Block a user