1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
4
|
|
|
|
5
|
|
|
use ApiPlatform\Metadata\Post; |
|
|
|
|
6
|
|
|
use ApiPlatform\Metadata\Get; |
|
|
|
|
7
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
|
|
|
8
|
|
|
use ApiPlatform\Metadata\ApiProperty; |
|
|
|
|
9
|
|
|
use ApiPlatform\Metadata\ApiFilter; |
|
|
|
|
10
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
11
|
|
|
use Symfony\Component\Serializer\Annotation\Groups; |
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* InvoiceTax |
14
|
|
|
* |
15
|
|
|
* @ORM\EntityListeners ({ControleOnline\Listener\LogListener::class}) |
16
|
|
|
* @ORM\Table (name="invoice_tax") |
17
|
|
|
* @ORM\Entity |
18
|
|
|
*/ |
19
|
|
|
#[ApiResource(operations: [new Get(security: 'is_granted(\'ROLE_CLIENT\')'), new Get(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')', uriTemplate: '/invoice_taxes/{id}/download-nf', requirements: ['id' => '[\\w-]+'], controller: \App\Controller\DownloadOrderNFAction::class), new Post(uriTemplate: '/invoice_taxes/upload-nf', controller: \App\Controller\UploadOrderNFAction::class, deserialize: false, security: 'is_granted(\'ROLE_CLIENT\')', validationContext: ['groups' => ['Default', 'order_upload_nf']], openapiContext: ['consumes' => ['multipart/form-data']])], formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], normalizationContext: ['groups' => ['invoice_tax_read']], denormalizationContext: ['groups' => ['invoice_tax_write']])] |
20
|
|
|
class InvoiceTax |
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* @var integer |
24
|
|
|
* |
25
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false) |
26
|
|
|
* @ORM\Id |
27
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
28
|
|
|
*/ |
29
|
|
|
private $id; |
30
|
|
|
/** |
31
|
|
|
* @var \Doctrine\Common\Collections\Collection |
|
|
|
|
32
|
|
|
* |
33
|
|
|
* @ORM\OneToMany(targetEntity="ControleOnline\Entity\OrderInvoiceTax", mappedBy="invoiceTax") |
34
|
|
|
*/ |
35
|
|
|
private $order; |
36
|
|
|
/** |
37
|
|
|
* @var string |
38
|
|
|
* |
39
|
|
|
* @ORM\Column(name="invoice", type="string", nullable=false) |
40
|
|
|
*/ |
41
|
|
|
private $invoice; |
42
|
|
|
/** |
43
|
|
|
* @var \Doctrine\Common\Collections\Collection |
44
|
|
|
* |
45
|
|
|
* @ORM\OneToMany(targetEntity="ControleOnline\Entity\ServiceInvoiceTax", mappedBy="service_invoice_tax") |
46
|
|
|
*/ |
47
|
|
|
private $service_invoice_tax; |
48
|
|
|
/** |
49
|
|
|
* @var string |
50
|
|
|
* |
51
|
|
|
* @ORM\Column(name="invoice_key", type="string", nullable=true) |
52
|
|
|
* @Groups({"order_read"}) |
53
|
|
|
*/ |
54
|
|
|
private $invoiceKey; |
55
|
|
|
/** |
56
|
|
|
* @var string |
57
|
|
|
* |
58
|
|
|
* @ORM\Column(name="invoice_number", type="integer", nullable=false) |
59
|
|
|
* @Groups({"order_read"}) |
60
|
|
|
*/ |
61
|
|
|
private $invoiceNumber; |
62
|
|
|
public function __construct() |
63
|
|
|
{ |
64
|
|
|
$this->order = new \Doctrine\Common\Collections\ArrayCollection(); |
|
|
|
|
65
|
|
|
$this->service_invoice_tax = new \Doctrine\Common\Collections\ArrayCollection(); |
66
|
|
|
} |
67
|
|
|
/** |
68
|
|
|
* Get id |
69
|
|
|
* |
70
|
|
|
* @return integer |
71
|
|
|
*/ |
72
|
|
|
public function getId() |
73
|
|
|
{ |
74
|
|
|
return $this->id; |
75
|
|
|
} |
76
|
|
|
/** |
77
|
|
|
* Add OrderInvoice |
78
|
|
|
* |
79
|
|
|
* @param \ControleOnline\Entity\OrderInvoice $order |
80
|
|
|
* @return People |
|
|
|
|
81
|
|
|
*/ |
82
|
|
|
public function addOrder(\ControleOnline\Entity\OrderInvoice $order) |
83
|
|
|
{ |
84
|
|
|
$this->order[] = $order; |
85
|
|
|
return $this; |
|
|
|
|
86
|
|
|
} |
87
|
|
|
/** |
88
|
|
|
* Remove OrderInvoice |
89
|
|
|
* |
90
|
|
|
* @param \ControleOnline\Entity\OrderInvoice $order |
91
|
|
|
*/ |
92
|
|
|
public function removeOrder(\ControleOnline\Entity\OrderInvoice $order) |
93
|
|
|
{ |
94
|
|
|
$this->order->removeElement($order); |
95
|
|
|
} |
96
|
|
|
/** |
97
|
|
|
* Get OrderInvoice |
98
|
|
|
* |
99
|
|
|
* @return \Doctrine\Common\Collections\Collection |
100
|
|
|
*/ |
101
|
|
|
public function getOrder() |
102
|
|
|
{ |
103
|
|
|
return $this->order; |
104
|
|
|
} |
105
|
|
|
/** |
106
|
|
|
* Set invoice |
107
|
|
|
* |
108
|
|
|
* @param string $invoice |
109
|
|
|
* @return Order |
110
|
|
|
*/ |
111
|
|
|
public function setInvoice($invoice) |
112
|
|
|
{ |
113
|
|
|
$this->invoice = $invoice; |
114
|
|
|
return $this; |
|
|
|
|
115
|
|
|
} |
116
|
|
|
/** |
117
|
|
|
* Get invoice |
118
|
|
|
* |
119
|
|
|
* @return string |
120
|
|
|
*/ |
121
|
|
|
public function getInvoice() |
122
|
|
|
{ |
123
|
|
|
return $this->invoice; |
124
|
|
|
} |
125
|
|
|
/** |
126
|
|
|
* Set invoiceKey |
127
|
|
|
* |
128
|
|
|
* @param string $invoice_number |
129
|
|
|
* @return InvoiceTax |
130
|
|
|
*/ |
131
|
|
|
public function setInvoiceKey($invoice_key) |
132
|
|
|
{ |
133
|
|
|
$this->invoiceKey = $invoice_key; |
134
|
|
|
return $this; |
135
|
|
|
} |
136
|
|
|
/** |
137
|
|
|
* Get invoiceNumber |
138
|
|
|
* |
139
|
|
|
* @return string |
140
|
|
|
*/ |
141
|
|
|
public function getInvoiceKey() |
142
|
|
|
{ |
143
|
|
|
return $this->invoiceKey; |
144
|
|
|
} |
145
|
|
|
/** |
146
|
|
|
* Set invoiceNumber |
147
|
|
|
* |
148
|
|
|
* @param integer $invoice_number |
149
|
|
|
* @return InvoiceTax |
150
|
|
|
*/ |
151
|
|
|
public function setInvoiceNumber($invoice_number) |
152
|
|
|
{ |
153
|
|
|
$this->invoiceNumber = $invoice_number; |
154
|
|
|
return $this; |
155
|
|
|
} |
156
|
|
|
/** |
157
|
|
|
* Get invoiceNumber |
158
|
|
|
* |
159
|
|
|
* @return integer |
160
|
|
|
*/ |
161
|
|
|
public function getInvoiceNumber() |
162
|
|
|
{ |
163
|
|
|
return $this->invoiceNumber; |
|
|
|
|
164
|
|
|
} |
165
|
|
|
/** |
166
|
|
|
* Add ServiceInvoiceTax |
167
|
|
|
* |
168
|
|
|
* @param \ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax |
169
|
|
|
* @return InvoiceTax |
170
|
|
|
*/ |
171
|
|
|
public function addServiceInvoiceTax(\ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax) |
|
|
|
|
172
|
|
|
{ |
173
|
|
|
$this->service_invoice_tax[] = $service_invoice_tax; |
174
|
|
|
return $this; |
175
|
|
|
} |
176
|
|
|
/** |
177
|
|
|
* Remove ServiceInvoiceTax |
178
|
|
|
* |
179
|
|
|
* @param \ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax |
180
|
|
|
*/ |
181
|
|
|
public function removeServiceInvoiceTax(\ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax) |
182
|
|
|
{ |
183
|
|
|
$this->service_invoice_tax->removeElement($service_invoice_tax); |
184
|
|
|
} |
185
|
|
|
/** |
186
|
|
|
* Get ServiceInvoiceTax |
187
|
|
|
* |
188
|
|
|
* @return \Doctrine\Common\Collections\Collection |
189
|
|
|
*/ |
190
|
|
|
public function getServiceInvoiceTax() |
191
|
|
|
{ |
192
|
|
|
return $this->service_invoice_tax; |
193
|
|
|
} |
194
|
|
|
} |
195
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths