mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Added possibility to ignore the checks of withdraw amount when building projects
This fixes #349
This commit is contained in:
parent
b62dc1241d
commit
33a0981981
6 changed files with 118 additions and 2 deletions
|
@ -69,12 +69,12 @@ class ValidProjectBuildRequestValidator extends ConstraintValidator
|
|||
->addViolation();
|
||||
}
|
||||
|
||||
if ($withdraw_sum > $needed_amount) {
|
||||
if ($withdraw_sum > $needed_amount && $value->isDontCheckQuantity() === false) {
|
||||
$this->buildViolationForLot($lot, 'validator.project_build.lot_bigger_than_needed')
|
||||
->addViolation();
|
||||
}
|
||||
|
||||
if ($withdraw_sum < $needed_amount) {
|
||||
if ($withdraw_sum < $needed_amount && $value->isDontCheckQuantity() === false) {
|
||||
$this->buildViolationForLot($lot, 'validator.project_build.lot_smaller_than_needed')
|
||||
->addViolation();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue