mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-28 20:21:41 +00:00
Show total cost for minimum order quantity in price-tier view (#1384)
The Price column on a part's Shopping information tab divided by price_related_quantity (almost always 1 for imported supplier data), producing redundant "$X / 1" entries that matched the Unit Price column. Compute the total for min_discount_quantity instead, so each tier shows what you'd actually pay for the minimum bulk order.
This commit is contained in:
parent
01d19cd7f7
commit
ab296687de
1 changed files with 3 additions and 2 deletions
|
|
@ -46,8 +46,9 @@
|
|||
{{ detail.MinDiscountQuantity | format_amount(part.partUnit) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ detail.price | format_money(detail.currency) }} / {{ detail.PriceRelatedQuantity | format_amount(part.partUnit) }}
|
||||
{% set tmp = pricedetail_helper.convertMoneyToCurrency(detail.price, detail.currency, app.user.currency ?? null) %}
|
||||
{% set total = detail.PricePerUnit(detail.MinDiscountQuantity) %}
|
||||
{{ total | format_money(detail.currency) }} / {{ detail.MinDiscountQuantity | format_amount(part.partUnit) }}
|
||||
{% set tmp = pricedetail_helper.convertMoneyToCurrency(total, detail.currency, app.user.currency ?? null) %}
|
||||
{% if detail.currency != (app.user.currency ?? null) and tmp is not null and tmp.GreaterThan(0) %}
|
||||
<span class="text-muted">({{ tmp | format_money(app.user.currency ?? null) }})</span>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue