116 lines
4.8 KiB
HTML
116 lines
4.8 KiB
HTML
<!--
|
|
Copyright since 2025 Mifos Initiative
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
-->
|
|
|
|
<div class="container">
|
|
<mat-card>
|
|
@if (transactionType.withdrawal) {
|
|
<h2 mat-title>
|
|
{{ 'labels.menus.' + actionName | translate }} {{ 'labels.heading.Recurring Deposit Transactions' | translate }}
|
|
</h2>
|
|
}
|
|
|
|
<form [formGroup]="depositRecurringDepositForm" (ngSubmit)="submit()">
|
|
<mat-card-content>
|
|
<div class="layout-column">
|
|
<mat-form-field (click)="transactionDatePicker.open()">
|
|
<mat-label>{{ 'labels.inputs.Transaction Date' | translate }}</mat-label>
|
|
<input
|
|
matInput
|
|
[min]="minDate"
|
|
[max]="maxDate"
|
|
[matDatepicker]="transactionDatePicker"
|
|
required
|
|
formControlName="transactionDate"
|
|
/>
|
|
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
|
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
|
@if (depositRecurringDepositForm.controls.transactionDate.hasError('required')) {
|
|
<mat-error>
|
|
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
|
</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mifosx-input-amount
|
|
[currency]="currency"
|
|
[isRequired]="true"
|
|
[inputFormControl]="depositRecurringDepositForm.controls.transactionAmount"
|
|
[inputLabel]="'Transaction Amount'"
|
|
>
|
|
</mifosx-input-amount>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Payment Type Id' | translate }}</mat-label>
|
|
<mat-select formControlName="paymentTypeId" required>
|
|
@for (paymentType of paymentTypes; track paymentType) {
|
|
<mat-option [value]="paymentType.id">
|
|
{{ paymentType.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
@if (depositRecurringDepositForm.controls.paymentTypeId.hasError('required')) {
|
|
<mat-error>
|
|
{{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }}
|
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
|
</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<div class="flex-fill">
|
|
<span class="expandcollapsebutton m-l-10 m-t-40 flex-75" (click)="addPaymentDetails()">
|
|
<mat-slide-toggle>
|
|
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
|
<span class="m-l-10">{{ 'labels.inputs.Show Payment Details' | translate }}</span>
|
|
</div>
|
|
</mat-slide-toggle>
|
|
</span>
|
|
</div>
|
|
|
|
@if (showPaymentDetails) {
|
|
<mat-form-field>
|
|
<mat-label> {{ 'labels.inputs.Account' | translate }} #</mat-label>
|
|
<input matInput formControlName="accountNumber" />
|
|
</mat-form-field>
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Cheque' | translate }} #</mat-label>
|
|
<input matInput formControlName="checkNumber" />
|
|
</mat-form-field>
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Routing Code' | translate }}</mat-label>
|
|
<input matInput formControlName="routingCode" />
|
|
</mat-form-field>
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Reciept' | translate }} #</mat-label>
|
|
<input matInput formControlName="receiptNumber" />
|
|
</mat-form-field>
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Bank' | translate }} #</mat-label>
|
|
<input matInput formControlName="bankNumber" />
|
|
</mat-form-field>
|
|
}
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
|
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
|
</mat-form-field>
|
|
</div>
|
|
</mat-card-content>
|
|
|
|
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
|
<button type="button" mat-raised-button [routerLink]="['../../general']">
|
|
{{ 'labels.buttons.Cancel' | translate }}
|
|
</button>
|
|
<button mat-raised-button color="primary" [disabled]="!depositRecurringDepositForm.valid">
|
|
{{ 'labels.buttons.Submit' | translate }}
|
|
</button>
|
|
</mat-card-actions>
|
|
</form>
|
|
</mat-card>
|
|
</div>
|