Skip to content

Commit 10c4fc0

Browse files
committed
Retour PR
1 parent bc7e3af commit 10c4fc0

2 files changed

Lines changed: 1 addition & 33 deletions

File tree

app/config/packages/backoffice_menu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ parameters:
236236
niveau: 'ROLE_ADMIN'
237237
extra_routes:
238238
- admin_accounting_invoices_list
239+
- admin_accounting_invoices_edit
239240
compta_journal:
240241
nom: 'Journal'
241242
url: '/admin/accounting/journal/list'

sources/AppBundle/Accounting/Form/InvoiceType.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,31 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
2626
{
2727
$builder->add('invoiceDate', DateType::class, [
2828
'label' => 'Date facture',
29-
'required' => true,
3029
'widget' => 'single_text',
3130
])->add('company', TextType::class, [
3231
'label' => 'Société',
33-
'empty_data' => '',
3432
'constraints' => [
3533
new Assert\NotBlank(),
36-
new Assert\Type('string'),
3734
new Assert\Length(max: 50),
3835
],
3936
])->add('service', TextType::class, [
4037
'label' => 'Service',
4138
'required' => false,
42-
'empty_data' => '',
4339
'constraints' => [
44-
new Assert\Type('string'),
4540
new Assert\Length(max: 50),
4641
],
4742
])->add('address', TextareaType::class, [
4843
'label' => 'Adresse',
49-
'empty_data' => '',
50-
'constraints' => [
51-
new Assert\Type('string'),
52-
],
5344
])->add('zipcode', TextType::class, [
5445
'label' => 'Code postal',
55-
'empty_data' => '',
5646
'constraints' => [
5747
new Assert\NotBlank(),
58-
new Assert\Type('string'),
5948
new Assert\Length(max: 10),
6049
],
6150
])->add('city', TextType::class, [
6251
'label' => 'Ville',
63-
'empty_data' => '',
6452
'constraints' => [
6553
new Assert\NotBlank(),
66-
new Assert\Type('string'),
6754
new Assert\Length(max: 50),
6855
],
6956
])->add('countryId', ChoiceType::class, [
@@ -72,71 +59,53 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
7259
])->add('lastname', TextType::class, [
7360
'label' => 'Nom',
7461
'required' => false,
75-
'empty_data' => '',
7662
'constraints' => [
77-
new Assert\Type('string'),
7863
new Assert\Length(max: 50),
7964
],
8065
])->add('firstname', TextType::class, [
8166
'label' => 'Prénom',
8267
'required' => false,
83-
'empty_data' => '',
8468
'constraints' => [
85-
new Assert\Type('string'),
8669
new Assert\Length(max: 50),
8770
],
8871
])->add('phone', TextType::class, [
8972
'label' => 'Tel',
9073
'required' => false,
91-
'empty_data' => '',
9274
'constraints' => [
93-
new Assert\Type('string'),
9475
new Assert\Length(max: 30),
9576
],
9677
])->add('email', EmailType::class, [
9778
'label' => 'Email (facture)',
98-
'required' => true,
99-
'empty_data' => '',
10079
'constraints' => [
10180
new Assert\NotBlank(),
102-
new Assert\Type('string'),
10381
new Assert\Length(max: 100),
10482
],
10583
])->add('tvaIntra', TextType::class, [
10684
'label' => 'TVA intracommunautaire (facture)',
10785
'required' => false,
108-
'empty_data' => '',
10986
'constraints' => [
110-
new Assert\Type('string'),
11187
new Assert\Length(max: 20),
11288
],
11389
])->add('refClt1', TextType::class, [
11490
'label' => 'Référence client',
11591
'required' => false,
116-
'empty_data' => '',
11792
'constraints' => [
118-
new Assert\Type('string'),
11993
new Assert\Length(max: 50),
12094
],
12195
])->add('refClt2', TextType::class, [
12296
'label' => 'Référence client 2',
12397
'required' => false,
124-
'empty_data' => '',
12598
'constraints' => [
126-
new Assert\Type('string'),
12799
new Assert\Length(max: 50),
128100
],
129101
])->add('refClt3', TextType::class, [
130102
'label' => 'Référence client 3',
131103
'required' => false,
132-
'empty_data' => '',
133104
'constraints' => [
134-
new Assert\Type('string'),
135105
new Assert\Length(max: 50),
136106
],
137107
])->add('observation', TextareaType::class, [
138108
'required' => false,
139-
'empty_data' => '',
140109
'label' => 'Observation',
141110
])->add('currency', EnumType::class, [
142111
'required' => false,
@@ -154,15 +123,13 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
154123
'required' => false,
155124
'attr' => ['readonly' => 'readonly'],
156125
'constraints' => [
157-
new Assert\Type('string'),
158126
new Assert\Length(max: 50),
159127
],
160128
])->add('invoiceNumber', TextType::class, [
161129
'label' => 'Numéro facture',
162130
'required' => false,
163131
'attr' => ['readonly' => 'readonly'],
164132
'constraints' => [
165-
new Assert\Type('string'),
166133
new Assert\Length(max: 50),
167134
],
168135
])->add('paymentStatus', EnumType::class, [

0 commit comments

Comments
 (0)