From c7a0f7bf93b371478fe9fd049b8de050fcace94e Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Tue, 26 May 2026 12:41:53 +0200 Subject: [PATCH] Show total cost for minimum order quantity in price-tier view 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. --- templates/parts/info/_order_infos.html.twig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/parts/info/_order_infos.html.twig b/templates/parts/info/_order_infos.html.twig index 9aa9d888c..ef62d6f30 100644 --- a/templates/parts/info/_order_infos.html.twig +++ b/templates/parts/info/_order_infos.html.twig @@ -46,8 +46,9 @@ {{ detail.MinDiscountQuantity | format_amount(part.partUnit) }} - {{ 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) %} ({{ tmp | format_money(app.user.currency ?? null) }}) {% endif %}