Allow to set if prices contain VAT or not in orderdetail

This commit is contained in:
Jan Böhmer 2026-02-08 21:54:34 +01:00
parent f95e39748e
commit 3bff5fa8bd
8 changed files with 159 additions and 21 deletions

View file

@ -22,6 +22,7 @@ declare(strict_types=1);
namespace App\Form\Part;
use App\Form\Type\TriStateCheckboxType;
use Symfony\Bundle\SecurityBundle\Security;
use App\Entity\Parts\MeasurementUnit;
use App\Entity\Parts\Supplier;
@ -73,6 +74,11 @@ class OrderdetailType extends AbstractType
'label' => 'orderdetails.edit.obsolete',
]);
$builder->add('pricesIncludesVAT', TriStateCheckboxType::class, [
'required' => false,
'label' => 'orderdetails.edit.prices_includes_vat',
]);
//Add pricedetails after we know the data, so we can set the default currency
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options): void {
/** @var Orderdetail $orderdetail */