-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
699245e
commit 18dffd8
Showing
8 changed files
with
300 additions
and
7 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
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
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,59 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block scripts %} | ||
<!--Chart.js--> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js"></script> | ||
{% endblock %} | ||
|
||
{% block title %} | ||
Reports | Payers Spending | ||
{% endblock %} | ||
|
||
{% block main %} | ||
<h1>Payers Spending Report</h1> | ||
<br> | ||
|
||
<!--Charts courtesty of Chart.js: https://www.chartjs.org/--> | ||
<div class="chart-container" style="position: relative; height:40vh"> | ||
<canvas id="payersChart" width="400" height="400"></canvas> | ||
</div> | ||
<p><small class="text-muted">Chart note: does not include payers that represent less than 1% of overall spending</small></p> | ||
<br> | ||
|
||
<h3>Total Paid Per Payer</h3> | ||
<div class="table-responsive"> | ||
<table class="table table-hover table-striped table-sm"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Payer</th> | ||
<th scope="col">Amount</th> | ||
<th scope="col">% of total</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for payer in payers %} | ||
<tr> | ||
<td>{{ payer["name"] }}</td> | ||
<td>{{ payer["amount"] | usd }}</td> | ||
<td>{{ payer["percentAmount"] }}%</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th>Total</th> | ||
<th>{{ payers | sum(attribute="amount") | usd }}</th> | ||
<th>{{ payers | sum(attribute="percentAmount")}}%</th> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
|
||
<script src="/static/js/reports.js"></script> | ||
<script> | ||
var payersData = JSON.stringify({{ payers | tojson }}); | ||
loadPayersData(payersData); | ||
</script> | ||
|
||
{% endblock %} | ||
|
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
Oops, something went wrong.