mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +02:00
Allow to directly add build as stock to the associated builds part.
This commit is contained in:
parent
015c71cbd2
commit
2f42eb7cff
7 changed files with 207 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue