Show product name in hosting order detail
This commit is contained in:
parent
5df2080f92
commit
10e8f0a820
2 changed files with 15 additions and 5 deletions
|
@ -166,12 +166,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
<p>
|
||||||
|
<strong>{% trans "Product" %}:</strong>
|
||||||
|
{{ product_name }}
|
||||||
|
</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<p>
|
<p>
|
||||||
<span>{% trans "Amount" %}: </span>
|
<span>{% trans "Amount" %}: </span>
|
||||||
<strong class="pull-right">{{order.price|floatformat:2|intcomma}} CHF</strong>
|
<strong class="pull-right">{{order.price|floatformat:2|intcomma}} CHF</strong>
|
||||||
</p>
|
</p>
|
||||||
|
{% if order.generic_payment_description %}
|
||||||
|
<p>
|
||||||
|
<span>{% trans "Description" %}: </span>
|
||||||
|
<strong class="pull-right">{{order.generic_payment_description}}</strong>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% if order.subscription_id %}
|
{% if order.subscription_id %}
|
||||||
<p>
|
<p>
|
||||||
<span>{% trans "Recurring" %}: </span>
|
<span>{% trans "Recurring" %}: </span>
|
||||||
|
@ -179,9 +189,6 @@
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12">
|
|
||||||
<hr class="thin-hr">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -59,7 +59,8 @@ from .forms import (
|
||||||
)
|
)
|
||||||
from .mixins import ProcessVMSelectionMixin, HostingContextMixin
|
from .mixins import ProcessVMSelectionMixin, HostingContextMixin
|
||||||
from .models import (
|
from .models import (
|
||||||
HostingOrder, HostingBill, HostingPlan, UserHostingKey, VMDetail
|
HostingOrder, HostingBill, HostingPlan, UserHostingKey, VMDetail,
|
||||||
|
GenericProduct
|
||||||
)
|
)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -865,7 +866,9 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
|
||||||
if obj.generic_product_id is not None:
|
if obj.generic_product_id is not None:
|
||||||
# generic payment case
|
# generic payment case
|
||||||
logger.debug("Generic payment case")
|
logger.debug("Generic payment case")
|
||||||
|
context['product_name'] = GenericProduct.objects.get(
|
||||||
|
id=obj.generic_product_id
|
||||||
|
).product_name
|
||||||
else:
|
else:
|
||||||
# invoice for previous order
|
# invoice for previous order
|
||||||
logger.debug("Invoice of VM order")
|
logger.debug("Invoice of VM order")
|
||||||
|
|
Loading…
Reference in a new issue