Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #54 from markvanveen/develop
Browse files Browse the repository at this point in the history
Show ledger balance
  • Loading branch information
markvanveen committed Nov 3, 2017
2 parents 8cff27c + a3e1edf commit c97119c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/app/accounting/general-ledger.component.ts
Expand Up @@ -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) {}
Expand Down
4 changes: 4 additions & 0 deletions src/app/accounting/subLedger/sub-ledger.detail.component.html
Expand Up @@ -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">
Expand Down
4 changes: 4 additions & 0 deletions src/app/accounting/subLedger/sub-ledger.list.component.html
Expand Up @@ -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">
Expand Down
3 changes: 2 additions & 1 deletion src/app/accounting/subLedger/sub-ledger.list.component.ts
Expand Up @@ -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,
Expand Down
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/app/services/accounting/domain/account.model.ts
Expand Up @@ -26,6 +26,7 @@ export interface Account {
balance?: number;
referenceAccount?: string;
ledger: string;
alternativeAccountNumber?: string;
state?: AccountState;
createdOn?: string;
createdBy?: string;
Expand Down
1 change: 1 addition & 0 deletions src/app/services/accounting/domain/ledger.model.ts
Expand Up @@ -24,6 +24,7 @@ export interface Ledger {
description?: string;
subLedgers: Ledger[];
showAccountsInChart: boolean;
totalValue?: string;
createdOn?: string;
createdBy?: string;
lastModifiedOn?: string;
Expand Down
Expand Up @@ -18,6 +18,7 @@ export interface ProductInstance {
customerIdentifier: string;
productIdentifier: string;
accountIdentifier?: string;
alternativeAccountNumber?: string;
beneficiaries?: string[];
state?: string;
balance?: number;
Expand Down

0 comments on commit c97119c

Please sign in to comment.