diff --git a/src/Form/Part/OrderdetailType.php b/src/Form/Part/OrderdetailType.php index 30aad202..09623b75 100644 --- a/src/Form/Part/OrderdetailType.php +++ b/src/Form/Part/OrderdetailType.php @@ -53,7 +53,7 @@ class OrderdetailType extends AbstractType $builder->add('supplier', StructuralEntityType::class, ['class' => Supplier::class, 'disable_not_selectable' => true]); - $builder->add('supplierProductUrl', UrlType::class, [ + $builder->add('supplier_product_url', UrlType::class, [ 'required' => false, 'empty_data' => "" ]); @@ -64,7 +64,7 @@ class OrderdetailType extends AbstractType ]); //Attachment section - $builder->add('priceDetails', CollectionType::class, [ + $builder->add('pricedetails', CollectionType::class, [ 'entry_type' => PricedetailType::class, 'allow_add' => true, 'allow_delete' => true, 'label' => false, diff --git a/src/Form/Part/PartBaseType.php b/src/Form/Part/PartBaseType.php index f9315edd..9aa2fa63 100644 --- a/src/Form/Part/PartBaseType.php +++ b/src/Form/Part/PartBaseType.php @@ -145,7 +145,7 @@ class PartBaseType extends AbstractType ]); //Attachment section - $builder->add('orderDetails', CollectionType::class, [ + $builder->add('orderdetails', CollectionType::class, [ 'entry_type' => OrderdetailType::class, 'allow_add' => true, 'allow_delete' => true, 'label' => false, diff --git a/src/Form/Part/PricedetailType.php b/src/Form/Part/PricedetailType.php index ff980270..ce6040e7 100644 --- a/src/Form/Part/PricedetailType.php +++ b/src/Form/Part/PricedetailType.php @@ -47,8 +47,8 @@ class PricedetailType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { - $builder->add("minDiscountQuantity", IntegerType::class); - $builder->add("priceRelatedQuantity", IntegerType::class); + $builder->add("min_discount_quantity", IntegerType::class); + $builder->add("price_related_quantity", IntegerType::class); $builder->add("price", NumberType::class); $builder->add("currency", CurrencyEntityType::class, ['required' => false]); } @@ -57,6 +57,7 @@ class PricedetailType extends AbstractType { $resolver->setDefaults([ 'data_class' => Pricedetail::class, + 'error_bubbling' => false ]); } } \ No newline at end of file diff --git a/templates/Parts/edit/_orderdetails.html.twig b/templates/Parts/edit/_orderdetails.html.twig index 2212c1fc..21aa3631 100644 --- a/templates/Parts/edit/_orderdetails.html.twig +++ b/templates/Parts/edit/_orderdetails.html.twig @@ -1,8 +1,8 @@ {% form_theme form with ['Parts/edit/edit_form_styles.html.twig', "bootstrap_4_layout.html.twig"] %} - +
- {% for detail in form.orderDetails %} + {% for detail in form.orderdetails %} {{ form_widget(detail) }} {% endfor %} diff --git a/templates/Parts/edit/edit_form_styles.html.twig b/templates/Parts/edit/edit_form_styles.html.twig index da6d09db..ea72b8ee 100644 --- a/templates/Parts/edit/edit_form_styles.html.twig +++ b/templates/Parts/edit/edit_form_styles.html.twig @@ -2,7 +2,7 @@ {% form_theme form.currency 'Form/extendedBootstrap4_layout.html.twig' %} - + - + {% endblock %} @@ -26,11 +27,11 @@
{{ form_widget(form.minDiscountQuantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.minDiscountQuantity) }}{{ form_widget(form.min_discount_quantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.min_discount_quantity) }}
{{ form_widget(form.price) }} @@ -13,10 +13,11 @@ {{ form_errors(form.price) }} {{ form_errors(form.currency) }}
{{ form_widget(form.priceRelatedQuantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.price) }}{{ form_widget(form.price_related_quantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.price_related_quantity) }} + {{ form_errors(form) }}
{{ form_row(form.supplier, {'attr': {'class': 'form-control-sm'}}) }} {{ form_row(form.supplierpartnr, {'attr': {'class': 'form-control-sm'}}) }} - {{ form_row(form.supplierProductUrl, {'attr': {'class': 'form-control-sm'}}) }} + {{ form_row(form.supplier_product_url, {'attr': {'class': 'form-control-sm'}}) }} {{ form_widget(form.obsolete) }} - +
@@ -40,7 +41,7 @@ - {% for price in form.priceDetails %} + {% for price in form.pricedetails %} {{ form_widget(price) }} {% endfor %} @@ -55,6 +56,7 @@ + {{ form_errors(form) }} {% endblock %} \ No newline at end of file
Min Qty.