Block undo Loan Interest Refund transaction
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
aa3e70e5c5
commit
a736f4bf74
+11
-1
@@ -75,7 +75,7 @@ export class ViewTransactionComponent implements OnInit {
|
||||
this.transactionData = data.loansAccountTransaction;
|
||||
this.transactionType = this.transactionData.type;
|
||||
this.allowEdition = !this.transactionData.manuallyReversed && !this.allowTransactionEdition(this.transactionData.type.id);
|
||||
this.allowUndo = !this.transactionData.manuallyReversed;
|
||||
this.allowUndo = this.allowUndoTransaction(this.transactionData.manuallyReversed, this.transactionType);
|
||||
this.allowChargeback = this.allowChargebackTransaction(this.transactionType) && !this.transactionData.manuallyReversed;
|
||||
let transactionsChargebackRelated = false;
|
||||
if (this.transactionData.transactionRelations) {
|
||||
@@ -128,6 +128,16 @@ export class ViewTransactionComponent implements OnInit {
|
||||
|| transactionType.merchantIssuedRefund || transactionType.downPayment);
|
||||
}
|
||||
|
||||
allowUndoTransaction(manuallyReversed: boolean, transactionType: LoanTransactionType): boolean {
|
||||
if (manuallyReversed) {
|
||||
return false;
|
||||
}
|
||||
if (transactionType.interestRefund) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Undo the loans transaction
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user