From 1a0b67f361b4f6d77439e75539117c8b9ba8dc0a Mon Sep 17 00:00:00 2001 From: buchmann Date: Fri, 24 Jul 2026 14:40:39 +0200 Subject: [PATCH] Consider the prices of built instances of subprojects --- src/Services/ProjectSystem/ProjectBuildHelper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Services/ProjectSystem/ProjectBuildHelper.php b/src/Services/ProjectSystem/ProjectBuildHelper.php index e011d980..ac346284 100644 --- a/src/Services/ProjectSystem/ProjectBuildHelper.php +++ b/src/Services/ProjectSystem/ProjectBuildHelper.php @@ -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());