mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-09 08:48:26 +01:00
Allow to directly add build as stock to the associated builds part.
This commit is contained in:
@@ -135,13 +135,13 @@ class ProjectBuildHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Withdraw the parts from the stock using the given ProjectBuildRequest.
|
||||
* Withdraw the parts from the stock using the given ProjectBuildRequest and create the build parts entries, if needed.
|
||||
* The ProjectBuildRequest has to be validated before!!
|
||||
* You have to flush changes to DB afterwards
|
||||
* @param ProjectBuildRequest $buildRequest
|
||||
* @return void
|
||||
*/
|
||||
public function doWithdrawForProjectBuildRequest(ProjectBuildRequest $buildRequest): void
|
||||
public function doBuild(ProjectBuildRequest $buildRequest): void
|
||||
{
|
||||
$message = $buildRequest->getComment();
|
||||
$message .= ' (Project build: '.$buildRequest->getProject()->getName().')';
|
||||
@@ -154,5 +154,9 @@ class ProjectBuildHelper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($buildRequest->getAddBuildsToBuildsPart()) {
|
||||
$this->withdraw_add_helper->add($buildRequest->getBuildsPartLot(), $buildRequest->getNumberOfBuilds(), $message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user