Fix to display due or submitted date in Loan charges (#1830)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
640f3b46f7
commit
a9b8543120
@@ -20,14 +20,15 @@
|
||||
<td mat-cell *matCellDef="let charge"> {{ charge.chargeTimeType.value }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="dueDate" *ngIf="!useDueDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Submitted On </th>
|
||||
<td mat-cell *matCellDef="let charge"> {{ charge.submittedOnDate | dateFormat }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="dueDate" *ngIf="useDueDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Due as of </th>
|
||||
<td mat-cell *matCellDef="let charge"> {{ charge.dueDate | dateFormat }} </td>
|
||||
<ng-container matColumnDef="dueDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header [hide]="useDueDate">
|
||||
<span *ngIf="useDueDate"> Due as of </span>
|
||||
<span *ngIf="!useDueDate"> Submitted On </span>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
<span *ngIf="useDueDate">{{ charge.dueDate | dateFormat }}</span>
|
||||
<span *ngIf="!useDueDate">{{ charge.submittedOnDate | dateFormat }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="calculationtype">
|
||||
|
||||
@@ -147,15 +147,13 @@ export class LoansViewComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// Allow ChargeOff only If there loan is not already ChargeOff
|
||||
if (!this.loanDetailsData.chargedOff) {
|
||||
// Charge-Off only when there is not Interest Recalculation and the Interest Rate is zero
|
||||
if (!this.loanDetailsData.chargedOff && !this.loanDetailsData.isInterestRecalculationEnabled && this.loanDetailsData.interestRatePerPeriod === 0) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Charge-Off',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CHARGEOFF_LOAN'
|
||||
});
|
||||
}
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Charge-Off',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CHARGEOFF_LOAN'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user