Add build price summary to project info tab

Displays the total BOM price for N builds on the project info page,
using the existing price-tier logic from PricedetailHelper. The user
can adjust the number of builds via a small form; the unit price is
also shown when N > 1.

New backend:
- ProjectBuildHelper gains calculateTotalBuildPrice(),
  calculateUnitBuildPrice(), roundedTotalBuildPrice(), and
  roundedUnitBuildPrice() — bulk-order quantities are factored in so
  that price tiers apply correctly across N builds.
- ProjectController::info() now reads ?n= and passes number_of_builds
  to the template.

Template (_info.html.twig):
- Adds price badge (hidden when no pricing data is available).
- Adds number-of-builds form that reloads the info page.
This commit is contained in:
MayNiklas 2026-04-15 12:38:06 +02:00
parent e9fb0dba51
commit 82e55bc83d
4 changed files with 121 additions and 7 deletions

View file

@ -7212,6 +7212,18 @@ Element 1 -&gt; Element 1.2</target>
<target>Subprojects</target>
</segment>
</unit>
<unit id="prjTtlBP" name="project.info.total_build_price">
<segment state="translated">
<source>project.info.total_build_price</source>
<target>Total build price</target>
</segment>
</unit>
<unit id="prjUntBP" name="project.info.per_unit_price">
<segment state="translated">
<source>project.info.per_unit_price</source>
<target>per unit</target>
</segment>
</unit>
<unit id="7nV.Cmd" name="project.info.bom_add_parts">
<segment state="translated">
<source>project.info.bom_add_parts</source>