mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-20 10:57:40 +02:00
Enforce positive values for min quantities and price quantites.
This commit is contained in:
parent
63508293bd
commit
b6ee0d1323
2 changed files with 7 additions and 2 deletions
|
@ -48,8 +48,12 @@ class PricedetailType extends AbstractType
|
|||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
//No labels needed, we define translation in templates
|
||||
$builder->add("min_discount_quantity", IntegerType::class);
|
||||
$builder->add("price_related_quantity", IntegerType::class);
|
||||
$builder->add("min_discount_quantity", IntegerType::class, [
|
||||
'attr' => ['min' => 1]
|
||||
]);
|
||||
$builder->add("price_related_quantity", IntegerType::class, [
|
||||
'attr' => ['min' => 1]
|
||||
]);
|
||||
$builder->add("price", NumberType::class);
|
||||
$builder->add("currency", CurrencyEntityType::class, ['required' => false]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue