|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the core-library package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) 2019 WEBEWEB |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace WBW\Library\Core\ThirdParty\Adoria\Model; |
|
13
|
|
|
|
|
14
|
|
|
use DateTime; |
|
15
|
|
|
use WBW\Library\Core\Model\Attribute\StringAccountingCodeTrait; |
|
16
|
|
|
use WBW\Library\Core\Model\Attribute\StringReferenceTrait; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Line. |
|
20
|
|
|
* |
|
21
|
|
|
* @author webeweb <https://github.com/webeweb/> |
|
22
|
|
|
* @package WBW\Library\Core\ThirdParty\Adoria\Model |
|
23
|
|
|
*/ |
|
24
|
|
|
class Line { |
|
25
|
|
|
|
|
26
|
|
|
use StringAccountingCodeTrait; |
|
27
|
|
|
use StringReferenceTrait; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* Amount. |
|
31
|
|
|
* |
|
32
|
|
|
* @var string|null |
|
33
|
|
|
*/ |
|
34
|
|
|
private $amount; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* Amount sign. |
|
38
|
|
|
* |
|
39
|
|
|
* @var string|null |
|
40
|
|
|
*/ |
|
41
|
|
|
private $amountSign; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* Analytic code. |
|
45
|
|
|
* |
|
46
|
|
|
* @var string|null |
|
47
|
|
|
*/ |
|
48
|
|
|
private $analyticCode; |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* Booking journal code. |
|
52
|
|
|
* |
|
53
|
|
|
* @var string|null |
|
54
|
|
|
*/ |
|
55
|
|
|
private $bookingJournalCode; |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* Currency. |
|
59
|
|
|
* |
|
60
|
|
|
* @var string|null |
|
61
|
|
|
*/ |
|
62
|
|
|
private $currency; |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* Free field. |
|
66
|
|
|
* |
|
67
|
|
|
* @var string|null |
|
68
|
|
|
*/ |
|
69
|
|
|
private $freeField; |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* Invoice date. |
|
73
|
|
|
* |
|
74
|
|
|
* @var DateTime|null |
|
75
|
|
|
*/ |
|
76
|
|
|
private $invoiceDate; |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* Invoice due date. |
|
80
|
|
|
* |
|
81
|
|
|
* @var DateTime|null |
|
82
|
|
|
*/ |
|
83
|
|
|
private $invoiceDueDate; |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* Invoice number. |
|
87
|
|
|
* |
|
88
|
|
|
* @var string|null |
|
89
|
|
|
*/ |
|
90
|
|
|
private $invoiceNumber; |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* Subledger account. |
|
94
|
|
|
* |
|
95
|
|
|
* @var string|null |
|
96
|
|
|
*/ |
|
97
|
|
|
private $subledgerAccount; |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* Constructor. |
|
101
|
|
|
*/ |
|
102
|
|
|
public function __construct() { |
|
103
|
|
|
// NOTHING TO DO |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* Get the amount. |
|
108
|
|
|
* |
|
109
|
|
|
* @return string|null Returns the amount. |
|
110
|
|
|
*/ |
|
111
|
|
|
public function getAmount(): ?string { |
|
112
|
|
|
return $this->amount; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* Get the amount sign. |
|
117
|
|
|
* |
|
118
|
|
|
* @return string|null Returns the amount sign. |
|
119
|
|
|
*/ |
|
120
|
|
|
public function getAmountSign(): ?string { |
|
121
|
|
|
return $this->amountSign; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
/** |
|
125
|
|
|
* Get the analytic code. |
|
126
|
|
|
* |
|
127
|
|
|
* @return string|null Returns the analytic code. |
|
128
|
|
|
*/ |
|
129
|
|
|
public function getAnalyticCode(): ?string { |
|
130
|
|
|
return $this->analyticCode; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
/** |
|
134
|
|
|
* Get the booking journal code. |
|
135
|
|
|
* |
|
136
|
|
|
* @return string|null Returns the booking journal code. |
|
137
|
|
|
*/ |
|
138
|
|
|
public function getBookingJournalCode(): ?string { |
|
139
|
|
|
return $this->bookingJournalCode; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* Get the currency. |
|
144
|
|
|
* |
|
145
|
|
|
* @return string|null Returns the currency. |
|
146
|
|
|
*/ |
|
147
|
|
|
public function getCurrency(): ?string { |
|
148
|
|
|
return $this->currency; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* Get the free field. |
|
153
|
|
|
* |
|
154
|
|
|
* @return string|null Returns the free field. |
|
155
|
|
|
*/ |
|
156
|
|
|
public function getFreeField(): ?string { |
|
157
|
|
|
return $this->freeField; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
/** |
|
161
|
|
|
* Get the invoice date. |
|
162
|
|
|
* |
|
163
|
|
|
* @return DateTime|null Returns the invoice date. |
|
164
|
|
|
*/ |
|
165
|
|
|
public function getInvoiceDate(): ?DateTime { |
|
166
|
|
|
return $this->invoiceDate; |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
|
|
/** |
|
170
|
|
|
* Get the invoice date. |
|
171
|
|
|
* |
|
172
|
|
|
* @return DateTime|null Returns the invoice date. |
|
173
|
|
|
*/ |
|
174
|
|
|
public function getInvoiceDueDate(): ?DateTime { |
|
175
|
|
|
return $this->invoiceDueDate; |
|
176
|
|
|
} |
|
177
|
|
|
|
|
178
|
|
|
/** |
|
179
|
|
|
* Get the invoice number. |
|
180
|
|
|
* |
|
181
|
|
|
* @return string|null Returns the invoice number. |
|
182
|
|
|
*/ |
|
183
|
|
|
public function getInvoiceNumber(): ?string { |
|
184
|
|
|
return $this->invoiceNumber; |
|
185
|
|
|
} |
|
186
|
|
|
|
|
187
|
|
|
/** |
|
188
|
|
|
* Get the subledger account. |
|
189
|
|
|
* |
|
190
|
|
|
* @return string|null Returns the subledger account. |
|
191
|
|
|
*/ |
|
192
|
|
|
public function getSubledgerAccount(): ?string { |
|
193
|
|
|
return $this->subledgerAccount; |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
/** |
|
197
|
|
|
* Set the amount. |
|
198
|
|
|
* |
|
199
|
|
|
* @param string|null $amount The amount. |
|
200
|
|
|
* @return Line Returns this line. |
|
201
|
|
|
*/ |
|
202
|
|
|
public function setAmount(?string $amount): Line { |
|
203
|
|
|
$this->amount = $amount; |
|
204
|
|
|
return $this; |
|
205
|
|
|
} |
|
206
|
|
|
|
|
207
|
|
|
/** |
|
208
|
|
|
* Set the amount sign. |
|
209
|
|
|
* |
|
210
|
|
|
* @param string|null $amountSign The amount sign. |
|
211
|
|
|
* @return Line Returns this line. |
|
212
|
|
|
*/ |
|
213
|
|
|
public function setAmountSign(?string $amountSign): Line { |
|
214
|
|
|
$this->amountSign = $amountSign; |
|
215
|
|
|
return $this; |
|
216
|
|
|
} |
|
217
|
|
|
|
|
218
|
|
|
/** |
|
219
|
|
|
* Set the analytic code. |
|
220
|
|
|
* |
|
221
|
|
|
* @param string|null $analyticCode The analytic code. |
|
222
|
|
|
* @return Line Returns this line. |
|
223
|
|
|
*/ |
|
224
|
|
|
public function setAnalyticCode(?string $analyticCode): Line { |
|
225
|
|
|
$this->analyticCode = $analyticCode; |
|
226
|
|
|
return $this; |
|
227
|
|
|
} |
|
228
|
|
|
|
|
229
|
|
|
/** |
|
230
|
|
|
* Set the booking journal code. |
|
231
|
|
|
* |
|
232
|
|
|
* @param string|null $bookingJournalCode The booking journal code. |
|
233
|
|
|
* @return Line Returns this line. |
|
234
|
|
|
*/ |
|
235
|
|
|
public function setBookingJournalCode(?string $bookingJournalCode): Line { |
|
236
|
|
|
$this->bookingJournalCode = $bookingJournalCode; |
|
237
|
|
|
return $this; |
|
238
|
|
|
} |
|
239
|
|
|
|
|
240
|
|
|
/** |
|
241
|
|
|
* Set the currency. |
|
242
|
|
|
* |
|
243
|
|
|
* @param string|null $currency The currency. |
|
244
|
|
|
* @return Line Returns this line. |
|
245
|
|
|
*/ |
|
246
|
|
|
public function setCurrency(?string $currency): Line { |
|
247
|
|
|
$this->currency = $currency; |
|
248
|
|
|
return $this; |
|
249
|
|
|
} |
|
250
|
|
|
|
|
251
|
|
|
/** |
|
252
|
|
|
* Set the free field. |
|
253
|
|
|
* |
|
254
|
|
|
* @param string|null $freeField The free field. |
|
255
|
|
|
* @return Line Returns this line. |
|
256
|
|
|
*/ |
|
257
|
|
|
public function setFreeField(?string $freeField): Line { |
|
258
|
|
|
$this->freeField = $freeField; |
|
259
|
|
|
return $this; |
|
260
|
|
|
} |
|
261
|
|
|
|
|
262
|
|
|
/** |
|
263
|
|
|
* Set the invoice date. |
|
264
|
|
|
* |
|
265
|
|
|
* @param DateTime|null $invoiceDate The invoice date. |
|
266
|
|
|
* @return Line Returns this line. |
|
267
|
|
|
*/ |
|
268
|
|
|
public function setInvoiceDate(?DateTime $invoiceDate): Line { |
|
269
|
|
|
$this->invoiceDate = $invoiceDate; |
|
270
|
|
|
return $this; |
|
271
|
|
|
} |
|
272
|
|
|
|
|
273
|
|
|
/** |
|
274
|
|
|
* Set the invoice due date. |
|
275
|
|
|
* |
|
276
|
|
|
* @param DateTime|null $invoiceDueDate The invoice due date. |
|
277
|
|
|
* @return Line Returns this line. |
|
278
|
|
|
*/ |
|
279
|
|
|
public function setInvoiceDueDate(?DateTime $invoiceDueDate): Line { |
|
280
|
|
|
$this->invoiceDueDate = $invoiceDueDate; |
|
281
|
|
|
return $this; |
|
282
|
|
|
} |
|
283
|
|
|
|
|
284
|
|
|
/** |
|
285
|
|
|
* Set the invoice number. |
|
286
|
|
|
* |
|
287
|
|
|
* @param string|null $invoiceNumber The invoice number. |
|
288
|
|
|
* @return Line Returns this line. |
|
289
|
|
|
*/ |
|
290
|
|
|
public function setInvoiceNumber(?string $invoiceNumber): Line { |
|
291
|
|
|
$this->invoiceNumber = $invoiceNumber; |
|
292
|
|
|
return $this; |
|
293
|
|
|
} |
|
294
|
|
|
|
|
295
|
|
|
/** |
|
296
|
|
|
* Set the subledger account. |
|
297
|
|
|
* |
|
298
|
|
|
* @param string|null $subledgerAccount The subledger account. |
|
299
|
|
|
* @return Line Returns this line. |
|
300
|
|
|
*/ |
|
301
|
|
|
public function setSubledgerAccount(?string $subledgerAccount): Line { |
|
302
|
|
|
$this->subledgerAccount = $subledgerAccount; |
|
303
|
|
|
return $this; |
|
304
|
|
|
} |
|
305
|
|
|
} |
|
306
|
|
|
|