Advanced payment allocation supports Cumulative or Progressive Loan Schedule (#1904)

Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
José Alberto Hernández
2023-11-18 17:03:46 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent d8a279fc51
commit df71736fd6
22 changed files with 1624 additions and 1921 deletions
@@ -73,7 +73,7 @@ export class TransactionsTabComponent implements OnInit {
*/
showTransactions(transactionsData: any) {
if (transactionsData.transfer) {
this.router.navigate([`account-transfers/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route });
this.router.navigate([`../transfer-funds/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route });
} else {
this.router.navigate([transactionsData.id, 'general'], { relativeTo: this.route });
}
@@ -1,10 +1,12 @@
<div fxLayoutAlign="end" class="container m-b-20" fxLayoutGap="2%"
*ngIf="!(transactionData.interestedPostedAsOn === false && (transactionData.transactionType.id === 17 || transactionData.transactionType.id === 3))">
<span *mifosxHasPermission="'ADJUSTTRANSACTION_SAVINGSACCOUNT'">
<button mat-raised-button color="primary" *ngIf="transactionData.transactionType.value == 'Transfer' || transactionData.reversed == 'true'
|| transactionData.transactionType.id==3 || transactionData.transactionType.id==17" [routerLink]="'edit'">
<fa-icon icon="edit" class="m-r-10"></fa-icon>Edit
</button>
<div fxLayoutAlign="end" class="container m-b-20" fxLayoutGap="2%">
<span
*ngIf="!(transactionData.interestedPostedAsOn === false && (transactionData.transactionType.id === 17 || transactionData.transactionType.id === 3))">
<span *mifosxHasPermission="'ADJUSTTRANSACTION_SAVINGSACCOUNT'">
<button mat-raised-button color="primary" *ngIf="transactionData.transactionType.value == 'Transfer' || transactionData.reversed == 'true'
|| transactionData.transactionType.id==3 || transactionData.transactionType.id==17" [routerLink]="'edit'">
<fa-icon icon="edit" class="m-r-10"></fa-icon>Edit
</button>
</span>
</span>
<span *ngIf="!transactionData.reversed && transactionData.transactionType.amountHold">
<button mat-raised-button color="primary" *mifosxHasPermission="'RELEASEAMOUNT_SAVINGSACCOUNT'"
@@ -12,10 +14,12 @@
<fa-icon icon="lock-open" class="m-r-10"></fa-icon>Release Amount
</button>
</span>
<button mat-raised-button color="warn" *mifosxHasPermission="'UNDOTRANSACTION_SAVINGSACCOUNT'"
(click)="undoTransaction()" [disabled]="transactionData.reversed">
<fa-icon icon="undo" class="m-r-10"></fa-icon>Undo
</button>
<span *ngIf="allowUndo()">
<button mat-raised-button color="warn" *mifosxHasPermission="'UNDOTRANSACTION_SAVINGSACCOUNT'"
(click)="undoTransaction()">
<fa-icon icon="undo" class="m-r-10"></fa-icon>Undo
</button>
</span>
</div>
<div class="container">
@@ -33,6 +33,13 @@ export class SavingsTransactionGeneralTabComponent implements OnInit {
ngOnInit(): void {
}
allowUndo(): boolean {
if (this.transactionData.reversed && this.transactionData.transactionType.amountHold) {
return false;
}
return !this.transactionData.reversed;
}
releaseAmount(): void {
const releaseAmountDialogRef = this.dialog.open(ReleaseAmountDialogComponent);
releaseAmountDialogRef.afterClosed().subscribe((response: any) => {