Extend Manual Journal entry to support Asset Externalization
This commit is contained in:
+17
-1
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
|
||||
<div class="container m-b-20" *ngIf="isViewTransaction()">
|
||||
<mat-card class="mat-elevation-z8" *ngIf="dataSource">
|
||||
<mat-card class="mat-elevation-z8" ngClass="{{ journalEntryColor() }}" *ngIf="dataSource">
|
||||
<mat-card-content>
|
||||
<div class="layout-row-wrap">
|
||||
<div class="flex-25 header">
|
||||
@@ -49,6 +49,22 @@
|
||||
<div class="flex-25">
|
||||
{{ dataSource.data[0].submittedOnDate | datetimeFormat }}
|
||||
</div>
|
||||
|
||||
<div class="flex-25 header">
|
||||
{{ 'labels.inputs.Manual Journal Entry' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-25">
|
||||
{{ dataSource.data[0].manualEntry | yesNo }}
|
||||
</div>
|
||||
|
||||
<div class="flex-25 header" *ngIf="dataSource.data[0].externalAssetOwner">
|
||||
{{ 'labels.inputs.External Asset Owner' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-25" *ngIf="dataSource.data[0].externalAssetOwner">
|
||||
{{ dataSource.data[0].externalAssetOwner }}
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
+7
@@ -1,3 +1,6 @@
|
||||
@use 'assets/styles/helper';
|
||||
@use 'assets/styles/colours' as *;
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
|
||||
@@ -5,3 +8,7 @@ table {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.manual-entry {
|
||||
background-color: $manual-entry;
|
||||
}
|
||||
|
||||
+13
-1
@@ -25,6 +25,7 @@ import { DateFormatPipe } from '../../../pipes/date-format.pipe';
|
||||
import { DatetimeFormatPipe } from '../../../pipes/datetime-format.pipe';
|
||||
import { FormatNumberPipe } from '../../../pipes/format-number.pipe';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { YesnoPipe } from '@pipes/yesno.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-view-journal-entry-transaction',
|
||||
@@ -47,7 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
MatRow,
|
||||
DateFormatPipe,
|
||||
DatetimeFormatPipe,
|
||||
FormatNumberPipe
|
||||
FormatNumberPipe,
|
||||
YesnoPipe
|
||||
]
|
||||
})
|
||||
export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
@@ -76,6 +78,8 @@ export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
|
||||
isJournalEntryLoaded = false;
|
||||
|
||||
isManualJournalEntry = false;
|
||||
|
||||
/**
|
||||
* @param {AccountingService} accountingService Accounting Service.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -102,6 +106,7 @@ export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
if (data.transaction.pageItems.length > 0) {
|
||||
this.isJournalEntryLoaded = true;
|
||||
this.transactionId = data.transaction.pageItems[0].transactionId;
|
||||
this.isManualJournalEntry = data.transaction.pageItems[0].manualEntry;
|
||||
}
|
||||
} else if (this.isViewTransfer()) {
|
||||
this.journalEntriesData = data.transferJournalEntryData.journalEntryData.content;
|
||||
@@ -185,4 +190,11 @@ export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
goBack(): void {
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
journalEntryColor(): string {
|
||||
if (this.isManualJournalEntry) {
|
||||
return 'manual-entry';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user