mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Fixed service wiring configuration
This commit is contained in:
parent
98dc553938
commit
f63b6d7207
14 changed files with 29 additions and 35 deletions
|
@ -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),
|
||||
]);
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue