Skip to content
Permalink
Browse files
Merge pull request #54 from markvanveen/develop
Show ledger balance
  • Loading branch information
markvanveen committed Nov 3, 2017
2 parents 8cff27c + a3e1edf commit c97119c5e63c038eed11ad32e16b490189f66049
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 3 deletions.
@@ -33,7 +33,8 @@ export class GeneralLedgerComponent implements OnInit {
columns: any[] = [
{ name: 'identifier', label: 'Id', tooltip: 'Id' },
{ name: 'name', label: 'Name', tooltip: 'Name' },
{ name: 'description', label: 'Description', tooltip: 'Description' }
{ name: 'description', label: 'Description', tooltip: 'Description' },
{ name: 'totalValue', label: 'Balance', tooltip: 'Balance', format: value => value ? value.toFixed(2) : '-' }
];

constructor(private router: Router, private route: ActivatedRoute, private store: AccountingStore) {}
@@ -36,6 +36,10 @@ <h3 matLine translate>Subledgers</h3>
<h3 matLine translate>Type</h3>
<p matLine>{{ledger.type}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Balance</h3>
<p matLine>{{ledger.totalValue | displayFimsNumber}}</p>
</mat-list-item>
</mat-list>
</div>
<div layout="row">
@@ -27,6 +27,10 @@
<h3 matLine translate>Type</h3>
<p matLine>{{ledger.type}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Balance</h3>
<p matLine>{{ledger.totalValue | displayFimsNumber}}</p>
</mat-list-item>
</mat-list>
</div>
<div layout="row">
@@ -44,7 +44,8 @@ export class SubLedgerListComponent implements OnInit, OnDestroy {
columns: any[] = [
{ name: 'identifier', label: 'Id' },
{ name: 'name', label: 'Name' },
{ name: 'description', label: 'Description' }
{ name: 'description', label: 'Description' },
{ name: 'totalValue', label: 'Balance', format: value => value ? value.toFixed(2) : '-' }
];

constructor(private route: ActivatedRoute, private router: Router, private store: AccountingStore, private translate: TranslateService,
@@ -31,7 +31,7 @@ <h3 mat-subheader translate>Details</h3>
<h3 matLine translate>Account</h3>
<p matLine>
<a [routerLink]="['/accounting/accounts/detail', instance.accountIdentifier, 'entries']">
{{instance.accountIdentifier}}
{{instance.alternativeAccountNumber ? instance.alternativeAccountNumber : instance.accountNumber}}
</a>
</p>
</mat-list-item>
@@ -26,6 +26,7 @@ export interface Account {
balance?: number;
referenceAccount?: string;
ledger: string;
alternativeAccountNumber?: string;
state?: AccountState;
createdOn?: string;
createdBy?: string;
@@ -24,6 +24,7 @@ export interface Ledger {
description?: string;
subLedgers: Ledger[];
showAccountsInChart: boolean;
totalValue?: string;
createdOn?: string;
createdBy?: string;
lastModifiedOn?: string;
@@ -18,6 +18,7 @@ export interface ProductInstance {
customerIdentifier: string;
productIdentifier: string;
accountIdentifier?: string;
alternativeAccountNumber?: string;
beneficiaries?: string[];
state?: string;
balance?: number;

0 comments on commit c97119c

Please sign in to comment.