mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-08-03 15:11:40 +00:00
Consider the prices of built instances of subprojects
This commit is contained in:
parent
a0435a56bd
commit
1a0b67f361
1 changed files with 5 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue