Consider the prices of built instances of subprojects

This commit is contained in:
buchmann 2026-07-24 14:40:39 +02:00
parent a0435a56bd
commit 1a0b67f361

View file

@ -242,7 +242,11 @@ final readonly class ProjectBuildHelper
* taking bulk pricing into account for N builds.
*/
private function getBomEntryUnitPrice(ProjectBOMEntry $entry, int $number_of_builds, ?Currency $currency): ?BigDecimal
{
{
if ($entry->getPart() && $entry->getPart()->getBuiltProject() instanceof Project){
return $this->calculateTotalBuildPrice($entry->getPart()->getBuiltProject(), intval($entry->getQuantity()), $entry->getPriceCurrency());
}
if ($entry->getPart() instanceof Part) {
$total_qty = $entry->getQuantity() * $number_of_builds;
$min_order = $this->pricedetailHelper->getMinOrderAmount($entry->getPart());