Fixed service wiring configuration

This commit is contained in:
Jan Böhmer 2023-06-11 14:50:47 +02:00
parent 98dc553938
commit f63b6d7207
14 changed files with 29 additions and 35 deletions

View file

@ -32,7 +32,7 @@ use Symfony\Component\Security\Core\Security;
class CurrencyAdminForm extends BaseEntityAdminForm
{
public function __construct(\Symfony\Bundle\SecurityBundle\Security $security, EventCommentNeededHelper $eventCommentNeededHelper, private readonly string $default_currency)
public function __construct(\Symfony\Bundle\SecurityBundle\Security $security, EventCommentNeededHelper $eventCommentNeededHelper, private readonly string $base_currency)
{
parent::__construct($security, $eventCommentNeededHelper);
}
@ -51,7 +51,7 @@ class CurrencyAdminForm extends BaseEntityAdminForm
$builder->add('exchange_rate', BigDecimalMoneyType::class, [
'required' => false,
'label' => 'currency.edit.exchange_rate',
'currency' => $this->default_currency,
'currency' => $this->base_currency,
'scale' => 6,
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]);

View file

@ -32,7 +32,7 @@ use Symfony\Component\Security\Core\Security;
class SupplierForm extends CompanyForm
{
public function __construct(\Symfony\Bundle\SecurityBundle\Security $security, EventCommentNeededHelper $eventCommentNeededHelper, protected string $default_currency)
public function __construct(\Symfony\Bundle\SecurityBundle\Security $security, EventCommentNeededHelper $eventCommentNeededHelper, protected string $base_currency)
{
parent::__construct($security, $eventCommentNeededHelper);
}
@ -53,7 +53,7 @@ class SupplierForm extends CompanyForm
$builder->add('shipping_costs', BigDecimalMoneyType::class, [
'required' => false,
'currency' => $this->default_currency,
'currency' => $this->base_currency,
'scale' => 3,
'label' => 'supplier.shipping_costs.label',
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),