This commit is contained in:
root 2013-12-04 19:34:44 +00:00
commit 334131e009
5 changed files with 5 additions and 6 deletions

View file

@ -1557,7 +1557,7 @@ def org_invoices_api(orgname):
'attempted': i.attempted, 'attempted': i.attempted,
'closed': i.closed, 'closed': i.closed,
'total': i.total, 'total': i.total,
'plan': i.lines.data[0].plan.id 'plan': i.lines.data[0].plan.id if i.lines.data[0].plan else None
} }
permission = AdministerOrganizationPermission(orgname) permission = AdministerOrganizationPermission(orgname)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View file

@ -1274,7 +1274,6 @@ function LogUsageChart(titleMap) {
this.colorScale_ = d3.scale.category20(); this.colorScale_ = d3.scale.category20();
} }
/** /**
* Builds the D3-representation of the data. * Builds the D3-representation of the data.
*/ */
@ -1489,9 +1488,9 @@ LogUsageChart.prototype.draw = function(container, logData) {
chart.multibar.delay(0); chart.multibar.delay(0);
// Create the x-axis domain to encompass a week from today. // Create the x-axis domain to encompass a week from today.
var domain = []; var domain = [];
var datetime = new Date(); var datetime = new Date();
datetime = new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate()); datetime = new Date(datetime.getUTCFullYear(), datetime.getUTCMonth(), datetime.getUTCDate());
for (var i = 7; i >= 0; --i) { for (var i = 7; i >= 0; --i) {
domain.push(offsetDate(datetime, -1 * i)); domain.push(offsetDate(datetime, -1 * i));
} }

View file

@ -93,7 +93,7 @@
</dd> </dd>
<dt>Plan</dt> <dt>Plan</dt>
<dd> <dd>
<span>{{ plan_map[invoice.plan].title }}</span> <span>{{ invoice.plan ? plan_map[invoice.plan].title : '(N/A)' }}</span>
</dd> </dd>
</dl> </dl>
</td> </td>

View file

@ -22,7 +22,7 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.2.1/moment.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.2.1/moment.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.3.10/d3.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.3.3/d3.min.js"></script>
<script src="static/lib/nv.d3.min.js"></script> <script src="static/lib/nv.d3.min.js"></script>
<script src="static/lib/ZeroClipboard.min.js"></script> <script src="static/lib/ZeroClipboard.min.js"></script>