-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cashflow): implement cashflow service report
This commit implements the server-side of the cashflow by service report. It is rather naive at the moment, but provides enough information to begin a daily audit. Features: 1. Only the services that were affected are displayed. 2. The totals are given at the bottom of every single table 3. The cash payment identifiers and patient names are listed. 4. Limited by date range. Next steps: 1. Implement the client-side with validation.
- Loading branch information
Showing
4 changed files
with
186 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
server/controllers/finance/reports/cashflow/reportByService.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{{> head title="CASHFLOW.BY_SERVICE" }} | ||
|
||
<body> | ||
|
||
{{> header}} | ||
|
||
<!-- body --> | ||
<div class="row"> | ||
<div class="col-xs-12"> | ||
|
||
<!-- page title --> | ||
<h2 class="text-center text-capitalize"> | ||
{{translate 'CASHFLOW.BY_SERVICE'}} | ||
</h2> | ||
|
||
<table class="table table-bordered table-condensed" style="font-size:0.75em;"> | ||
<thead> | ||
<tr> | ||
<th>{{translate 'FORM.LABELS.REFERENCE'}}</th> | ||
<th>{{translate 'TABLE.COLUMNS.NAME' }}</th> | ||
{{#each services as |service| }} | ||
<th>{{ service }}</th> | ||
{{/each}} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{#each matrix as | row |}} | ||
<tr> | ||
{{#each row as |value |}} | ||
<td {{#unless @first}}class="text-right"{{/unless}}> | ||
{{#if value}} | ||
{{value}} | ||
{{/if}} | ||
</td> | ||
{{/each}} | ||
</tr> | ||
{{/each}} | ||
</tbody> | ||
|
||
<tfoot> | ||
<tr> | ||
<th colspan="2">{{translate "TABLE.COLUMNS.TOTAL" }}</th> | ||
{{#each aggregates as | aggregate |}} | ||
<th class="text-right">{{currency aggregate.totalCashIncome ../metadata.enterprise.currency_id }}</th> | ||
{{/each}} | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
</div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters