Commit dc2bab3a authored by Olga Brani's avatar Olga Brani
Browse files

Addcredits

parent 46b08a57
......@@ -12,7 +12,11 @@
<em>{{ data.remainingCredits|floatformat:2 }}</em> credits remaining
<span class="info foo">
<em>more info</em>
<span>|<br>Each month you are given 4.000 new credits.</span>
<span>|<br>This month you are given
{% with data|lookup:'bill_addcredits' as bill_addcredits %}
{{ bill_addcredits.0.totalCredits|floatformat:0}}
{% endwith %} new credits.
</span>
</span>
</div>
......
......@@ -954,7 +954,7 @@ def billing(request):
start = datetime(today.year, today.month, 1).strftime("%s")
end = datetime(today.year, today.month, month_last_day).strftime("%s")
r = request_billing.apply(args=(request.user.email,
r = request_billing.apply(args=('pgerakios@grnet.gr',
int(start) * 1000,
int(end) * 1000))
data = {}
......@@ -997,5 +997,6 @@ def clear_billing_data(data):
data['bill_nocredits'] = filter(isnotcredit, data['bill'])
data['bill_vmtime'] = filter(servicefilter('vmtime'), data['bill'])
data['bill_diskspace'] = filter(servicefilter('diskspace'), data['bill'])
data['bill_addcredits'] = filter(servicefilter('addcredits'), data['bill'])
return data
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment