WEB-448 Credit Amount Field Allows Invalid Values (Zero and Negative) in Journal Entry Creation

This commit is contained in:
Soni Jay
2025-12-01 12:38:33 +05:30
parent fe49b281fb
commit d3be34ba5c
2 changed files with 24 additions and 3 deletions
@@ -51,7 +51,14 @@
<mat-form-field class="flex-43">
<mat-label>{{ 'labels.inputs.Debit Amount' | translate }}</mat-label>
<input type="number" matInput required formControlName="amount" />
<input
type="number"
matInput
required
formControlName="amount"
min="1"
(input)="onAmountInput($event)"
/>
<mat-error *ngIf="debits.at(i).controls.amount.hasError('required')">
{{ 'labels.inputs.Debit Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
@@ -92,7 +99,14 @@
<mat-form-field class="flex-43">
<mat-label>{{ 'labels.inputs.Credit Amount' | translate }}</mat-label>
<input type="number" matInput required formControlName="amount" />
<input
type="number"
matInput
required
formControlName="amount"
min="1"
(input)="onAmountInput($event)"
/>
<mat-error *ngIf="credits.at(i).controls.amount.hasError('required')">
{{ 'labels.inputs.Credit Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>