Savings account status and substatus management (#1606)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2022-12-26 23:38:53 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent d0dc2aabb2
commit e2fbfc9c2f
23 changed files with 215 additions and 125 deletions
+3 -1
View File
@@ -36,6 +36,7 @@ import { ProvisioningEntriesComponent } from './provisioning-entries/provisionin
import { CreateProvisioningEntryComponent } from './provisioning-entries/create-provisioning-entry/create-provisioning-entry.component';
import { ViewProvisioningEntryComponent } from './provisioning-entries/view-provisioning-entry/view-provisioning-entry.component';
import { ViewProvisioningJournalEntriesComponent } from './provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component';
import { PipesModule } from 'app/pipes/pipes.module';
/**
* Accounting Module
@@ -46,7 +47,8 @@ import { ViewProvisioningJournalEntriesComponent } from './provisioning-entries/
imports: [
SharedModule,
DirectivesModule,
AccountingRoutingModule
AccountingRoutingModule,
PipesModule
],
declarations: [
AccountingComponent,
@@ -90,7 +90,7 @@
<ng-container matColumnDef="transactionDate">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Transaction Date </th>
<td mat-cell *matCellDef="let journalEntry"> {{ journalEntry.transactionDate }} </td>
<td mat-cell *matCellDef="let journalEntry"> {{ journalEntry.transactionDate | dateFormat }} </td>
</ng-container>
<ng-container matColumnDef="glAccountType">
@@ -105,7 +105,7 @@
<ng-container matColumnDef="submittedOnDate">
<th mat-header-cell *matHeaderCellDef> Submitted on date </th>
<td mat-cell *matCellDef="let journalEntry"> {{ journalEntry.submittedOnDate }} </td>
<td mat-cell *matCellDef="let journalEntry"> {{ journalEntry.submittedOnDate | datetimeFormat }} </td>
</ng-container>
<ng-container matColumnDef="glAccountCode">
@@ -120,12 +120,12 @@
<ng-container matColumnDef="debit">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Debit </th>
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'DEBIT'"> {{ (journalEntry.currency.displaySymbol || journalEntry.currency.code) + ' ' + journalEntry.amount }} </span></td>
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'DEBIT'"> {{ (journalEntry.currency.displaySymbol || journalEntry.currency.code) + ' ' + journalEntry.amount | number }} </span></td>
</ng-container>
<ng-container matColumnDef="credit">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Credit </th>
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'CREDIT'"> {{ (journalEntry.currency.displaySymbol || journalEntry.currency.code) + ' ' + journalEntry.amount }} </span></td>
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'CREDIT'"> {{ (journalEntry.currency.displaySymbol || journalEntry.currency.code) + ' ' + journalEntry.amount | number }} </span></td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
@@ -133,6 +133,6 @@
</table>
<mat-paginator [length]="dataSource?.records$ | async" [pageSize]="10" [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
<mat-paginator [length]="dataSource?.records$ | async" [pageSize]="25" [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
@@ -21,7 +21,7 @@
<tr>
<th>Transaction Date</th>
<td>{{ data.journalEntry.transactionDate }}</td>
<td>{{ data.journalEntry.transactionDate | dateFormat }}</td>
</tr>
<tr>
@@ -45,10 +45,15 @@
<span *ngIf="data.journalEntry.entryType.value === 'DEBIT'">Debit</span>
</th>
<td>
{{ (data.journalEntry.currency.displaySymbol || data.journalEntry.currency.code) + ' ' + data.journalEntry.amount }}
{{ data.journalEntry.currency.displaySymbol }} {{ data.journalEntry.amount | number }}
</td>
</tr>
<tr>
<th>Currency</th>
<td>({{ data.journalEntry.currency.code }}) {{ data.journalEntry.currency.name }}</td>
</tr>
<tr *ngIf="data.journalEntry.referenceNumber">
<th>Reference Number</th>
<td>{{ data.journalEntry.referenceNumber }}</td>
@@ -100,7 +105,7 @@
<tr>
<th>Submitted on</th>
<td>{{ data.journalEntry.submittedOnDate }}</td>
<td>{{ data.journalEntry.submittedOnDate | datetimeFormat }}</td>
</tr>
</table>
@@ -1,8 +1,7 @@
<div fxLayout="row" fxLayoutAlign="end" class="container m-b-20" *ngIf="dataSource?.data[0].manualEntry">
<button mat-raised-button color="primary" (click)="revertTransaction()" *mifosxHasPermission="'REVERSE_JOURNALENTRY'" [disabled]="dataSource?.data[0].reversed">
<span *ngIf="!dataSource.data[0].reversed">
<fa-icon icon="undo"></fa-icon>&nbsp;&nbsp;
Revert Transaction
<fa-icon icon="undo" class="m-r-10"></fa-icon>Revert Transaction
</span>
<span *ngIf="dataSource.data[0].reversed">Transaction Reverted</span>
</button>
@@ -29,7 +28,7 @@
</div>
<div fxFlex="25%" fxFlex.lt-md="50%">
{{ dataSource.data[0].transactionDate }}
{{ dataSource.data[0].transactionDate | dateFormat }}
</div>
<div fxFlex="25%" fxFlex.lt-md="50%" class="header">
@@ -45,7 +44,7 @@
</div>
<div fxFlex="25%" fxFlex.lt-md="50%">
{{ dataSource.data[0].submittedOnDate }}
{{ dataSource.data[0].submittedOnDate | datetimeFormat }}
</div>
</div>
@@ -61,33 +60,33 @@
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Entry ID </th>
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> Entry ID </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.id }} </td>
</ng-container>
<ng-container matColumnDef="glAccountType">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Type </th>
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> Type </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountType.value }} </td>
</ng-container>
<ng-container matColumnDef="glAccountCode">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Account Code </th>
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> Account Code </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountCode }} </td>
</ng-container>
<ng-container matColumnDef="glAccountName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Account Name </th>
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> Account Name </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountName }} </td>
</ng-container>
<ng-container matColumnDef="debit">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Debit </th>
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) + ' ' + transaction.amount }} </span></td>
<th mat-header-cell class="r-amount" *matHeaderCellDef mat-sort-header> Debit </th>
<td mat-cell class="r-amount" *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) + ' ' + transaction.amount }} </span></td>
</ng-container>
<ng-container matColumnDef="credit">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Credit </th>
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) + ' ' + transaction.amount }} </span></td>
<th mat-header-cell class="r-amount" *matHeaderCellDef mat-sort-header> Credit </th>
<td mat-cell class="r-amount" *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) + ' ' + transaction.amount }} </span></td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
@@ -97,4 +96,7 @@
<mat-paginator [pageSizeOptions]="[5, 10]" showFirstLastButtons></mat-paginator>
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column">
<button type="button" color="primary" mat-raised-button (click)="goBack()">Back</button>
</div>
</div>
@@ -8,6 +8,10 @@
}
}
.container {
max-width: 75rem;
}
table {
width: 100%;
@@ -12,6 +12,7 @@ import { AccountingService } from '../accounting.service';
/** Custom Components */
import { RevertTransactionComponent } from '../revert-transaction/revert-transaction.component';
import { ViewJournalEntryComponent } from '../view-journal-entry/view-journal-entry.component';
import { Location } from '@angular/common';
/**
* View transaction component.
@@ -48,7 +49,8 @@ export class ViewTransactionComponent implements OnInit {
constructor(private accountingService: AccountingService,
private route: ActivatedRoute,
private router: Router,
public dialog: MatDialog) { }
public dialog: MatDialog,
private location: Location) { }
/**
* Retrieves the transaction data from `resolve` and sets the transaction table.
@@ -108,4 +110,8 @@ export class ViewTransactionComponent implements OnInit {
});
}
goBack(): void {
this.location.back();
}
}