include platform fee in bid list so it's clearly shown before sale

pull/3/head
lalanza808 5 years ago
parent efa639acff
commit 9a4d2781c8

@ -0,0 +1,11 @@
from math import ceil
from django import template
from django.conf import settings
register = template.Library()
@register.filter(is_safe=True)
def determine_platform_fee(value):
platform_fee_xmr = float(value * (settings.PLATFORM_FEE_PERCENT / 100))
return round(platform_fee_xmr, 4)

@ -1154,6 +1154,5 @@ New color: fd4e05
} }
html { html {
background-color: #202222;
min-height: 100%; min-height: 100%;
} }

@ -1,4 +1,5 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% load determine_platform_fee %}
{% block content %} {% block content %}
@ -42,6 +43,7 @@
<th>Bid ID</th> <th>Bid ID</th>
<th>Bidder</th> <th>Bidder</th>
<th>Bid Price (XMR)</th> <th>Bid Price (XMR)</th>
<th>Platform Fees (XMR)</th>
<th>Bid Accepted</th> <th>Bid Accepted</th>
<th>Location</th> <th>Location</th>
<th>Actions</th> <th>Actions</th>
@ -51,6 +53,7 @@
<td>#{{ bid.id }}</td> <td>#{{ bid.id }}</td>
<td>{{ bid.bidder }}</td> <td>{{ bid.bidder }}</td>
<td>{{ bid.bid_price_xmr }}</td> <td>{{ bid.bid_price_xmr }}</td>
<td>{{ bid.bid_price_xmr | determine_platform_fee }}</td>
<td>{{ bid.accepted }}</td> <td>{{ bid.accepted }}</td>
<td>{{ bid.bidder.profile.first.city }}, {{ bid.bidder.profile.first.state }}, {{ bid.bidder.profile.first.country }}</td> <td>{{ bid.bidder.profile.first.city }}, {{ bid.bidder.profile.first.state }}, {{ bid.bidder.profile.first.country }}</td>
<td> <td>