Works:
Balance sheet Ledger Cash Flow along with urls Balance sheet schema does not enforce multiple_of for amounts as multiple_of borks on random figures
This commit is contained in:
@ -21,21 +21,21 @@
|
||||
<ng-container matColumnDef="group">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Group</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.group}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef>{{info.footer.group}}</mat-footer-cell>
|
||||
<mat-footer-cell *matFooterCellDef>{{info.footer?.group}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.name}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef>{{info.footer.name}}</mat-footer-cell>
|
||||
<mat-footer-cell *matFooterCellDef>{{info.footer?.name}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- SubAmount Column -->
|
||||
<ng-container matColumnDef="subAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{row.subAmount | currency:'INR' | clear}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{info.footer.subAmount | currency:'INR' | clear}}
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{info.footer?.subAmount | currency:'INR' | clear}}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<ng-container matColumnDef="total">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Total</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{row.amount | currency:'INR' | clear}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{info.footer.amount | currency:'INR' | clear}}
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{info.footer?.amount | currency:'INR' | clear}}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -43,15 +43,12 @@ export class BalanceSheetComponent implements OnInit {
|
||||
}
|
||||
|
||||
show() {
|
||||
const info = this.getInfo();
|
||||
this.router.navigate(['balance-sheet', info.date]);
|
||||
const date = this.getDate();
|
||||
this.router.navigate(['balance-sheet', date]);
|
||||
}
|
||||
|
||||
getInfo(): BalanceSheet {
|
||||
getDate(): string {
|
||||
const formModel = this.form.value;
|
||||
|
||||
return {
|
||||
date: moment(formModel.date).format('DD-MMM-YYYY')
|
||||
};
|
||||
return moment(formModel.date).format('DD-MMM-YYYY');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,12 @@
|
||||
export class BalanceSheetItem {
|
||||
name?: string;
|
||||
group?: string;
|
||||
amount?: number;
|
||||
subAmount?: number;
|
||||
order: number;
|
||||
}
|
||||
export class BalanceSheet {
|
||||
date: string;
|
||||
body?: any[];
|
||||
footer?: any[];
|
||||
body: BalanceSheetItem[];
|
||||
footer?: BalanceSheetItem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user