mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
sale price in pricing table
This commit is contained in:
parent
1b7ade9405
commit
030865f8dd
@ -79,6 +79,20 @@
|
|||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if total_part_price %}
|
||||||
|
<h4>{% trans 'Sale Price' %}</h4>
|
||||||
|
<table class='table table-striped table-condensed'>
|
||||||
|
<tr>
|
||||||
|
<td><b>{% trans 'Unit Cost' %}</b></td>
|
||||||
|
<td colspan='2'>{% include "price.html" with price=unit_part_price %}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>{% trans 'Total Cost' %}</b></td>
|
||||||
|
<td colspan='2'>{% include "price.html" with price=total_part_price %}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if min_unit_buy_price or min_unit_bom_price %}
|
{% if min_unit_buy_price or min_unit_bom_price %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class='alert alert-danger alert-block'>
|
<div class='alert alert-danger alert-block'>
|
||||||
|
@ -2055,6 +2055,12 @@ class PartPricing(AjaxView):
|
|||||||
ctx['max_total_bom_price'] = max_bom_price
|
ctx['max_total_bom_price'] = max_bom_price
|
||||||
ctx['max_unit_bom_price'] = max_unit_bom_price
|
ctx['max_unit_bom_price'] = max_unit_bom_price
|
||||||
|
|
||||||
|
# part pricing information
|
||||||
|
part_price = part.get_price(quantity)
|
||||||
|
if part_price is not None:
|
||||||
|
ctx['total_part_price'] = round(part_price, 3)
|
||||||
|
ctx['unit_part_price'] = round(part_price / quantity, 3)
|
||||||
|
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user