Fixed bug that default_currency and shipping costs fields of supplier were not editable

This commit is contained in:
Jan Böhmer 2023-02-11 23:18:21 +01:00
parent 7569bffa1d
commit 1faeddccb2

View file

@ -50,7 +50,7 @@ class SupplierForm extends CompanyForm
'required' => false, 'required' => false,
'label' => 'supplier.edit.default_currency', 'label' => 'supplier.edit.default_currency',
'disable_not_selectable' => true, 'disable_not_selectable' => true,
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]); ]);
$builder->add('shipping_costs', BigDecimalMoneyType::class, [ $builder->add('shipping_costs', BigDecimalMoneyType::class, [
@ -58,7 +58,7 @@ class SupplierForm extends CompanyForm
'currency' => $this->default_currency, 'currency' => $this->default_currency,
'scale' => 3, 'scale' => 3,
'label' => 'supplier.shipping_costs.label', 'label' => 'supplier.shipping_costs.label',
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]); ]);
} }
} }