1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace InvoiceNinjaModule\Model; |
6
|
|
|
|
7
|
|
|
use DateTime; |
8
|
|
|
use DateTimeInterface; |
9
|
|
|
use InvoiceNinjaModule\Model\Interfaces\InvoiceInterface; |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* Class Invoice |
13
|
|
|
* @codeCoverageIgnore |
14
|
|
|
*/ |
15
|
|
|
final class Invoice extends Base implements InvoiceInterface |
16
|
|
|
{ |
17
|
|
|
private string $projectId = ''; |
18
|
|
|
private float $amount = 0; |
19
|
|
|
private float $balance = 0; |
20
|
|
|
private string $clientId = ''; |
21
|
|
|
private string $vendorId = ''; |
22
|
|
|
private int $statusId = InvoiceInterface::STATUS_DRAFT; |
23
|
|
|
private string $designId = ''; |
24
|
|
|
private string $recurringId = ''; |
25
|
|
|
private string $number = ''; |
26
|
|
|
private float $discount = 0; |
27
|
|
|
private string $poNumber = ''; |
28
|
|
|
private string $date = ''; |
29
|
|
|
private string $lastSentDate = ''; |
30
|
|
|
private string $nextSendDate = ''; |
31
|
|
|
private string $dueDate = ''; |
32
|
|
|
private string $terms = ''; |
33
|
|
|
private string $publicNotes = ''; |
34
|
|
|
private string $privateNotes = ''; |
35
|
|
|
private bool $usesInclusiveTaxes = false; |
36
|
|
|
private string $taxName1 = ''; |
37
|
|
|
private float $taxRate1 = 0; |
38
|
|
|
private string $taxName2 = ''; |
39
|
|
|
private float $taxRate2 = 0; |
40
|
|
|
private string $taxName3 = ''; |
41
|
|
|
private float $taxRate3 = 0; |
42
|
|
|
private float $totalTaxes = 0; |
43
|
|
|
private bool $isAmountDiscount = false; |
44
|
|
|
private string $footer = ''; |
45
|
|
|
private int $partial = 0; |
46
|
|
|
private string $partialDueDate = ''; |
47
|
|
|
private string $customValue1 = ''; |
48
|
|
|
private string $customValue2 = ''; |
49
|
|
|
private string $customValue3 = ''; |
50
|
|
|
private string $customValue4 = ''; |
51
|
|
|
private bool $hasTasks = false; |
52
|
|
|
private bool $hasExpenses = false; |
53
|
|
|
private float $customSurcharge1 = 0; |
54
|
|
|
private float $customSurcharge2 = 0; |
55
|
|
|
private float $customSurcharge3 = 0; |
56
|
|
|
private float $customSurcharge4 = 0; |
57
|
|
|
private float $exchangeRate = 1; |
58
|
|
|
private bool $customSurchargeTax1 = false; |
59
|
|
|
private bool $customSurchargeTax2 = false; |
60
|
|
|
private bool $customSurchargeTax3 = false; |
61
|
|
|
private bool $customSurchargeTax4 = false; |
62
|
|
|
/** @var InvoiceItem[] */ |
63
|
|
|
private array $lineItems = []; |
64
|
|
|
private string $entityType = ''; //invoice? |
65
|
|
|
private string $reminder1Sent = ''; |
66
|
|
|
private string $reminder2Sent = ''; |
67
|
|
|
private string $reminder3Sent = ''; |
68
|
|
|
private string $reminderLastSent = ''; |
69
|
|
|
private float $paidToDate = 0; |
70
|
|
|
private string $subscriptionId = ''; |
71
|
|
|
private bool $autoBillEnabled = false; |
72
|
|
|
private array $invitations = []; |
73
|
|
|
private array $documents = []; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return string |
77
|
|
|
*/ |
78
|
|
|
public function getProjectId(): string |
79
|
|
|
{ |
80
|
|
|
return $this->projectId; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @param string $projectId |
85
|
|
|
*/ |
86
|
|
|
public function setProjectId(string $projectId): void |
87
|
|
|
{ |
88
|
|
|
$this->projectId = $projectId; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return float|int |
93
|
|
|
*/ |
94
|
|
|
public function getAmount(): float|int |
95
|
|
|
{ |
96
|
|
|
return $this->amount; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @param float|int $amount |
101
|
|
|
*/ |
102
|
|
|
public function setAmount(float|int $amount): void |
103
|
|
|
{ |
104
|
|
|
$this->amount = $amount; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* @return float|int |
109
|
|
|
*/ |
110
|
|
|
public function getBalance(): float|int |
111
|
|
|
{ |
112
|
|
|
return $this->balance; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @param float|int $balance |
117
|
|
|
*/ |
118
|
|
|
public function setBalance(float|int $balance): void |
119
|
|
|
{ |
120
|
|
|
$this->balance = $balance; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return string |
125
|
|
|
*/ |
126
|
|
|
public function getClientId(): string |
127
|
|
|
{ |
128
|
|
|
return $this->clientId; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @param string $clientId |
133
|
|
|
*/ |
134
|
|
|
public function setClientId(string $clientId): void |
135
|
|
|
{ |
136
|
|
|
$this->clientId = $clientId; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @return string |
141
|
|
|
*/ |
142
|
|
|
public function getVendorId(): string |
143
|
|
|
{ |
144
|
|
|
return $this->vendorId; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @param string $vendorId |
149
|
|
|
*/ |
150
|
|
|
public function setVendorId(string $vendorId): void |
151
|
|
|
{ |
152
|
|
|
$this->vendorId = $vendorId; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @return int |
157
|
|
|
*/ |
158
|
|
|
public function getStatusId(): int |
159
|
|
|
{ |
160
|
|
|
return $this->statusId; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @param int $statusId |
165
|
|
|
*/ |
166
|
|
|
public function setStatusId(int $statusId): void |
167
|
|
|
{ |
168
|
|
|
$this->statusId = $statusId; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @return string |
173
|
|
|
*/ |
174
|
|
|
public function getDesignId(): string |
175
|
|
|
{ |
176
|
|
|
return $this->designId; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @param string $designId |
181
|
|
|
*/ |
182
|
|
|
public function setDesignId(string $designId): void |
183
|
|
|
{ |
184
|
|
|
$this->designId = $designId; |
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* @return string |
189
|
|
|
*/ |
190
|
|
|
public function getRecurringId(): string |
191
|
|
|
{ |
192
|
|
|
return $this->recurringId; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* @param string $recurringId |
197
|
|
|
*/ |
198
|
|
|
public function setRecurringId(string $recurringId): void |
199
|
|
|
{ |
200
|
|
|
$this->recurringId = $recurringId; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @return string |
205
|
|
|
*/ |
206
|
|
|
public function getNumber(): string |
207
|
|
|
{ |
208
|
|
|
return $this->number; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @param string $number |
213
|
|
|
*/ |
214
|
|
|
public function setNumber(string $number): void |
215
|
|
|
{ |
216
|
|
|
$this->number = $number; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
/** |
220
|
|
|
* @return float|int |
221
|
|
|
*/ |
222
|
|
|
public function getDiscount(): float|int |
223
|
|
|
{ |
224
|
|
|
return $this->discount; |
225
|
|
|
} |
226
|
|
|
|
227
|
|
|
/** |
228
|
|
|
* @param float|int $discount |
229
|
|
|
*/ |
230
|
|
|
public function setDiscount(float|int $discount): void |
231
|
|
|
{ |
232
|
|
|
$this->discount = $discount; |
233
|
|
|
} |
234
|
|
|
|
235
|
|
|
/** |
236
|
|
|
* @return string |
237
|
|
|
*/ |
238
|
|
|
public function getPoNumber(): string |
239
|
|
|
{ |
240
|
|
|
return $this->poNumber; |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* @param string $poNumber |
245
|
|
|
*/ |
246
|
|
|
public function setPoNumber(string $poNumber): void |
247
|
|
|
{ |
248
|
|
|
$this->poNumber = $poNumber; |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/** |
252
|
|
|
* @return DateTimeInterface |
253
|
|
|
*/ |
254
|
|
|
public function getDate(): DateTimeInterface |
255
|
|
|
{ |
256
|
|
|
return DateTime::createFromFormat('Y-m-d', $this->date); |
257
|
|
|
} |
258
|
|
|
|
259
|
|
|
/** |
260
|
|
|
* @param DateTimeInterface $date |
261
|
|
|
*/ |
262
|
|
|
public function setDate(DateTimeInterface $date): void |
263
|
|
|
{ |
264
|
|
|
$this->date = $date->format('Y-m-d'); |
265
|
|
|
} |
266
|
|
|
|
267
|
|
|
/** |
268
|
|
|
* @return string |
269
|
|
|
*/ |
270
|
|
|
public function getLastSentDate(): string |
271
|
|
|
{ |
272
|
|
|
return $this->lastSentDate; |
273
|
|
|
} |
274
|
|
|
|
275
|
|
|
/** |
276
|
|
|
* @param string $lastSentDate |
277
|
|
|
*/ |
278
|
|
|
public function setLastSentDate(string $lastSentDate): void |
279
|
|
|
{ |
280
|
|
|
$this->lastSentDate = $lastSentDate; |
281
|
|
|
} |
282
|
|
|
|
283
|
|
|
/** |
284
|
|
|
* @return string |
285
|
|
|
*/ |
286
|
|
|
public function getNextSendDate(): string |
287
|
|
|
{ |
288
|
|
|
return $this->nextSendDate; |
289
|
|
|
} |
290
|
|
|
|
291
|
|
|
/** |
292
|
|
|
* @param string $nextSendDate |
293
|
|
|
*/ |
294
|
|
|
public function setNextSendDate(string $nextSendDate): void |
295
|
|
|
{ |
296
|
|
|
$this->nextSendDate = $nextSendDate; |
297
|
|
|
} |
298
|
|
|
|
299
|
|
|
/** |
300
|
|
|
* @return DateTimeInterface |
301
|
|
|
*/ |
302
|
|
|
public function getDueDate(): DateTimeInterface |
303
|
|
|
{ |
304
|
|
|
return DateTime::createFromFormat('Y-m-d', $this->dueDate); |
305
|
|
|
} |
306
|
|
|
|
307
|
|
|
/** |
308
|
|
|
* @param DateTimeInterface $dueDate |
309
|
|
|
*/ |
310
|
|
|
public function setDueDate(DateTimeInterface $dueDate): void |
311
|
|
|
{ |
312
|
|
|
$this->dueDate = $dueDate->format('Y-m-d'); |
313
|
|
|
} |
314
|
|
|
|
315
|
|
|
/** |
316
|
|
|
* @return string |
317
|
|
|
*/ |
318
|
|
|
public function getTerms(): string |
319
|
|
|
{ |
320
|
|
|
return $this->terms; |
321
|
|
|
} |
322
|
|
|
|
323
|
|
|
/** |
324
|
|
|
* @param string $terms |
325
|
|
|
*/ |
326
|
|
|
public function setTerms(string $terms): void |
327
|
|
|
{ |
328
|
|
|
$this->terms = $terms; |
329
|
|
|
} |
330
|
|
|
|
331
|
|
|
/** |
332
|
|
|
* @return string |
333
|
|
|
*/ |
334
|
|
|
public function getPublicNotes(): string |
335
|
|
|
{ |
336
|
|
|
return $this->publicNotes; |
337
|
|
|
} |
338
|
|
|
|
339
|
|
|
/** |
340
|
|
|
* @param string $publicNotes |
341
|
|
|
*/ |
342
|
|
|
public function setPublicNotes(string $publicNotes): void |
343
|
|
|
{ |
344
|
|
|
$this->publicNotes = $publicNotes; |
345
|
|
|
} |
346
|
|
|
|
347
|
|
|
/** |
348
|
|
|
* @return string |
349
|
|
|
*/ |
350
|
|
|
public function getPrivateNotes(): string |
351
|
|
|
{ |
352
|
|
|
return $this->privateNotes; |
353
|
|
|
} |
354
|
|
|
|
355
|
|
|
/** |
356
|
|
|
* @param string $privateNotes |
357
|
|
|
*/ |
358
|
|
|
public function setPrivateNotes(string $privateNotes): void |
359
|
|
|
{ |
360
|
|
|
$this->privateNotes = $privateNotes; |
361
|
|
|
} |
362
|
|
|
|
363
|
|
|
/** |
364
|
|
|
* @return bool |
365
|
|
|
*/ |
366
|
|
|
public function isUsesInclusiveTaxes(): bool |
367
|
|
|
{ |
368
|
|
|
return $this->usesInclusiveTaxes; |
369
|
|
|
} |
370
|
|
|
|
371
|
|
|
/** |
372
|
|
|
* @param bool $usesInclusiveTaxes |
373
|
|
|
*/ |
374
|
|
|
public function setUsesInclusiveTaxes(bool $usesInclusiveTaxes): void |
375
|
|
|
{ |
376
|
|
|
$this->usesInclusiveTaxes = $usesInclusiveTaxes; |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
/** |
380
|
|
|
* @return string |
381
|
|
|
*/ |
382
|
|
|
public function getTaxName1(): string |
383
|
|
|
{ |
384
|
|
|
return $this->taxName1; |
385
|
|
|
} |
386
|
|
|
|
387
|
|
|
/** |
388
|
|
|
* @param string $taxName1 |
389
|
|
|
*/ |
390
|
|
|
public function setTaxName1(string $taxName1): void |
391
|
|
|
{ |
392
|
|
|
$this->taxName1 = $taxName1; |
393
|
|
|
} |
394
|
|
|
|
395
|
|
|
/** |
396
|
|
|
* @return float|int |
397
|
|
|
*/ |
398
|
|
|
public function getTaxRate1(): float|int |
399
|
|
|
{ |
400
|
|
|
return $this->taxRate1; |
401
|
|
|
} |
402
|
|
|
|
403
|
|
|
/** |
404
|
|
|
* @param float|int $taxRate1 |
405
|
|
|
*/ |
406
|
|
|
public function setTaxRate1(float|int $taxRate1): void |
407
|
|
|
{ |
408
|
|
|
$this->taxRate1 = $taxRate1; |
409
|
|
|
} |
410
|
|
|
|
411
|
|
|
/** |
412
|
|
|
* @return string |
413
|
|
|
*/ |
414
|
|
|
public function getTaxName2(): string |
415
|
|
|
{ |
416
|
|
|
return $this->taxName2; |
417
|
|
|
} |
418
|
|
|
|
419
|
|
|
/** |
420
|
|
|
* @param string $taxName2 |
421
|
|
|
*/ |
422
|
|
|
public function setTaxName2(string $taxName2): void |
423
|
|
|
{ |
424
|
|
|
$this->taxName2 = $taxName2; |
425
|
|
|
} |
426
|
|
|
|
427
|
|
|
/** |
428
|
|
|
* @return float|int |
429
|
|
|
*/ |
430
|
|
|
public function getTaxRate2(): float|int |
431
|
|
|
{ |
432
|
|
|
return $this->taxRate2; |
433
|
|
|
} |
434
|
|
|
|
435
|
|
|
/** |
436
|
|
|
* @param float|int $taxRate2 |
437
|
|
|
*/ |
438
|
|
|
public function setTaxRate2(float|int $taxRate2): void |
439
|
|
|
{ |
440
|
|
|
$this->taxRate2 = $taxRate2; |
441
|
|
|
} |
442
|
|
|
|
443
|
|
|
/** |
444
|
|
|
* @return string |
445
|
|
|
*/ |
446
|
|
|
public function getTaxName3(): string |
447
|
|
|
{ |
448
|
|
|
return $this->taxName3; |
449
|
|
|
} |
450
|
|
|
|
451
|
|
|
/** |
452
|
|
|
* @param string $taxName3 |
453
|
|
|
*/ |
454
|
|
|
public function setTaxName3(string $taxName3): void |
455
|
|
|
{ |
456
|
|
|
$this->taxName3 = $taxName3; |
457
|
|
|
} |
458
|
|
|
|
459
|
|
|
/** |
460
|
|
|
* @return float|int |
461
|
|
|
*/ |
462
|
|
|
public function getTaxRate3(): float|int |
463
|
|
|
{ |
464
|
|
|
return $this->taxRate3; |
465
|
|
|
} |
466
|
|
|
|
467
|
|
|
/** |
468
|
|
|
* @param float|int $taxRate3 |
469
|
|
|
*/ |
470
|
|
|
public function setTaxRate3(float|int $taxRate3): void |
471
|
|
|
{ |
472
|
|
|
$this->taxRate3 = $taxRate3; |
473
|
|
|
} |
474
|
|
|
|
475
|
|
|
/** |
476
|
|
|
* @return float|int |
477
|
|
|
*/ |
478
|
|
|
public function getTotalTaxes(): float|int |
479
|
|
|
{ |
480
|
|
|
return $this->totalTaxes; |
481
|
|
|
} |
482
|
|
|
|
483
|
|
|
/** |
484
|
|
|
* @param float|int $totalTaxes |
485
|
|
|
*/ |
486
|
|
|
public function setTotalTaxes(float|int $totalTaxes): void |
487
|
|
|
{ |
488
|
|
|
$this->totalTaxes = $totalTaxes; |
489
|
|
|
} |
490
|
|
|
|
491
|
|
|
/** |
492
|
|
|
* @return bool |
493
|
|
|
*/ |
494
|
|
|
public function isAmountDiscount(): bool |
495
|
|
|
{ |
496
|
|
|
return $this->isAmountDiscount; |
497
|
|
|
} |
498
|
|
|
|
499
|
|
|
/** |
500
|
|
|
* @param bool $isAmountDiscount |
501
|
|
|
*/ |
502
|
|
|
public function setIsAmountDiscount(bool $isAmountDiscount): void |
503
|
|
|
{ |
504
|
|
|
$this->isAmountDiscount = $isAmountDiscount; |
505
|
|
|
} |
506
|
|
|
|
507
|
|
|
/** |
508
|
|
|
* @return string |
509
|
|
|
*/ |
510
|
|
|
public function getFooter(): string |
511
|
|
|
{ |
512
|
|
|
return $this->footer; |
513
|
|
|
} |
514
|
|
|
|
515
|
|
|
/** |
516
|
|
|
* @param string $footer |
517
|
|
|
*/ |
518
|
|
|
public function setFooter(string $footer): void |
519
|
|
|
{ |
520
|
|
|
$this->footer = $footer; |
521
|
|
|
} |
522
|
|
|
|
523
|
|
|
/** |
524
|
|
|
* @return int |
525
|
|
|
*/ |
526
|
|
|
public function getPartial(): int |
527
|
|
|
{ |
528
|
|
|
return $this->partial; |
529
|
|
|
} |
530
|
|
|
|
531
|
|
|
/** |
532
|
|
|
* @param int $partial |
533
|
|
|
*/ |
534
|
|
|
public function setPartial(int $partial): void |
535
|
|
|
{ |
536
|
|
|
$this->partial = $partial; |
537
|
|
|
} |
538
|
|
|
|
539
|
|
|
/** |
540
|
|
|
* @return string |
541
|
|
|
*/ |
542
|
|
|
public function getPartialDueDate(): string |
543
|
|
|
{ |
544
|
|
|
return $this->partialDueDate; |
545
|
|
|
} |
546
|
|
|
|
547
|
|
|
/** |
548
|
|
|
* @param string $partialDueDate |
549
|
|
|
*/ |
550
|
|
|
public function setPartialDueDate(string $partialDueDate): void |
551
|
|
|
{ |
552
|
|
|
$this->partialDueDate = $partialDueDate; |
553
|
|
|
} |
554
|
|
|
|
555
|
|
|
/** |
556
|
|
|
* @return string |
557
|
|
|
*/ |
558
|
|
|
public function getCustomValue1(): string |
559
|
|
|
{ |
560
|
|
|
return $this->customValue1; |
561
|
|
|
} |
562
|
|
|
|
563
|
|
|
/** |
564
|
|
|
* @param string $customValue1 |
565
|
|
|
*/ |
566
|
|
|
public function setCustomValue1(string $customValue1): void |
567
|
|
|
{ |
568
|
|
|
$this->customValue1 = $customValue1; |
569
|
|
|
} |
570
|
|
|
|
571
|
|
|
/** |
572
|
|
|
* @return string |
573
|
|
|
*/ |
574
|
|
|
public function getCustomValue2(): string |
575
|
|
|
{ |
576
|
|
|
return $this->customValue2; |
577
|
|
|
} |
578
|
|
|
|
579
|
|
|
/** |
580
|
|
|
* @param string $customValue2 |
581
|
|
|
*/ |
582
|
|
|
public function setCustomValue2(string $customValue2): void |
583
|
|
|
{ |
584
|
|
|
$this->customValue2 = $customValue2; |
585
|
|
|
} |
586
|
|
|
|
587
|
|
|
/** |
588
|
|
|
* @return string |
589
|
|
|
*/ |
590
|
|
|
public function getCustomValue3(): string |
591
|
|
|
{ |
592
|
|
|
return $this->customValue3; |
593
|
|
|
} |
594
|
|
|
|
595
|
|
|
/** |
596
|
|
|
* @param string $customValue3 |
597
|
|
|
*/ |
598
|
|
|
public function setCustomValue3(string $customValue3): void |
599
|
|
|
{ |
600
|
|
|
$this->customValue3 = $customValue3; |
601
|
|
|
} |
602
|
|
|
|
603
|
|
|
/** |
604
|
|
|
* @return string |
605
|
|
|
*/ |
606
|
|
|
public function getCustomValue4(): string |
607
|
|
|
{ |
608
|
|
|
return $this->customValue4; |
609
|
|
|
} |
610
|
|
|
|
611
|
|
|
/** |
612
|
|
|
* @param string $customValue4 |
613
|
|
|
*/ |
614
|
|
|
public function setCustomValue4(string $customValue4): void |
615
|
|
|
{ |
616
|
|
|
$this->customValue4 = $customValue4; |
617
|
|
|
} |
618
|
|
|
|
619
|
|
|
/** |
620
|
|
|
* @return bool |
621
|
|
|
*/ |
622
|
|
|
public function isHasTasks(): bool |
623
|
|
|
{ |
624
|
|
|
return $this->hasTasks; |
625
|
|
|
} |
626
|
|
|
|
627
|
|
|
/** |
628
|
|
|
* @param bool $hasTasks |
629
|
|
|
*/ |
630
|
|
|
public function setHasTasks(bool $hasTasks): void |
631
|
|
|
{ |
632
|
|
|
$this->hasTasks = $hasTasks; |
633
|
|
|
} |
634
|
|
|
|
635
|
|
|
/** |
636
|
|
|
* @return bool |
637
|
|
|
*/ |
638
|
|
|
public function isHasExpenses(): bool |
639
|
|
|
{ |
640
|
|
|
return $this->hasExpenses; |
641
|
|
|
} |
642
|
|
|
|
643
|
|
|
/** |
644
|
|
|
* @param bool $hasExpenses |
645
|
|
|
*/ |
646
|
|
|
public function setHasExpenses(bool $hasExpenses): void |
647
|
|
|
{ |
648
|
|
|
$this->hasExpenses = $hasExpenses; |
649
|
|
|
} |
650
|
|
|
|
651
|
|
|
/** |
652
|
|
|
* @return float|int |
653
|
|
|
*/ |
654
|
|
|
public function getCustomSurcharge1(): float|int |
655
|
|
|
{ |
656
|
|
|
return $this->customSurcharge1; |
657
|
|
|
} |
658
|
|
|
|
659
|
|
|
/** |
660
|
|
|
* @param float|int $customSurcharge1 |
661
|
|
|
*/ |
662
|
|
|
public function setCustomSurcharge1(float|int $customSurcharge1): void |
663
|
|
|
{ |
664
|
|
|
$this->customSurcharge1 = $customSurcharge1; |
665
|
|
|
} |
666
|
|
|
|
667
|
|
|
/** |
668
|
|
|
* @return float|int |
669
|
|
|
*/ |
670
|
|
|
public function getCustomSurcharge2(): float|int |
671
|
|
|
{ |
672
|
|
|
return $this->customSurcharge2; |
673
|
|
|
} |
674
|
|
|
|
675
|
|
|
/** |
676
|
|
|
* @param float|int $customSurcharge2 |
677
|
|
|
*/ |
678
|
|
|
public function setCustomSurcharge2(float|int $customSurcharge2): void |
679
|
|
|
{ |
680
|
|
|
$this->customSurcharge2 = $customSurcharge2; |
681
|
|
|
} |
682
|
|
|
|
683
|
|
|
/** |
684
|
|
|
* @return float|int |
685
|
|
|
*/ |
686
|
|
|
public function getCustomSurcharge3(): float|int |
687
|
|
|
{ |
688
|
|
|
return $this->customSurcharge3; |
689
|
|
|
} |
690
|
|
|
|
691
|
|
|
/** |
692
|
|
|
* @param float|int $customSurcharge3 |
693
|
|
|
*/ |
694
|
|
|
public function setCustomSurcharge3(float|int $customSurcharge3): void |
695
|
|
|
{ |
696
|
|
|
$this->customSurcharge3 = $customSurcharge3; |
697
|
|
|
} |
698
|
|
|
|
699
|
|
|
/** |
700
|
|
|
* @return float|int |
701
|
|
|
*/ |
702
|
|
|
public function getCustomSurcharge4(): float|int |
703
|
|
|
{ |
704
|
|
|
return $this->customSurcharge4; |
705
|
|
|
} |
706
|
|
|
|
707
|
|
|
/** |
708
|
|
|
* @param float|int $customSurcharge4 |
709
|
|
|
*/ |
710
|
|
|
public function setCustomSurcharge4(float|int $customSurcharge4): void |
711
|
|
|
{ |
712
|
|
|
$this->customSurcharge4 = $customSurcharge4; |
713
|
|
|
} |
714
|
|
|
|
715
|
|
|
/** |
716
|
|
|
* @return float|int |
717
|
|
|
*/ |
718
|
|
|
public function getExchangeRate(): float|int |
719
|
|
|
{ |
720
|
|
|
return $this->exchangeRate; |
721
|
|
|
} |
722
|
|
|
|
723
|
|
|
/** |
724
|
|
|
* @param float|int $exchangeRate |
725
|
|
|
*/ |
726
|
|
|
public function setExchangeRate(float|int $exchangeRate): void |
727
|
|
|
{ |
728
|
|
|
$this->exchangeRate = $exchangeRate; |
729
|
|
|
} |
730
|
|
|
|
731
|
|
|
/** |
732
|
|
|
* @return bool |
733
|
|
|
*/ |
734
|
|
|
public function isCustomSurchargeTax1(): bool |
735
|
|
|
{ |
736
|
|
|
return $this->customSurchargeTax1; |
737
|
|
|
} |
738
|
|
|
|
739
|
|
|
/** |
740
|
|
|
* @param bool $customSurchargeTax1 |
741
|
|
|
*/ |
742
|
|
|
public function setCustomSurchargeTax1(bool $customSurchargeTax1): void |
743
|
|
|
{ |
744
|
|
|
$this->customSurchargeTax1 = $customSurchargeTax1; |
745
|
|
|
} |
746
|
|
|
|
747
|
|
|
/** |
748
|
|
|
* @return bool |
749
|
|
|
*/ |
750
|
|
|
public function isCustomSurchargeTax2(): bool |
751
|
|
|
{ |
752
|
|
|
return $this->customSurchargeTax2; |
753
|
|
|
} |
754
|
|
|
|
755
|
|
|
/** |
756
|
|
|
* @param bool $customSurchargeTax2 |
757
|
|
|
*/ |
758
|
|
|
public function setCustomSurchargeTax2(bool $customSurchargeTax2): void |
759
|
|
|
{ |
760
|
|
|
$this->customSurchargeTax2 = $customSurchargeTax2; |
761
|
|
|
} |
762
|
|
|
|
763
|
|
|
/** |
764
|
|
|
* @return bool |
765
|
|
|
*/ |
766
|
|
|
public function isCustomSurchargeTax3(): bool |
767
|
|
|
{ |
768
|
|
|
return $this->customSurchargeTax3; |
769
|
|
|
} |
770
|
|
|
|
771
|
|
|
/** |
772
|
|
|
* @param bool $customSurchargeTax3 |
773
|
|
|
*/ |
774
|
|
|
public function setCustomSurchargeTax3(bool $customSurchargeTax3): void |
775
|
|
|
{ |
776
|
|
|
$this->customSurchargeTax3 = $customSurchargeTax3; |
777
|
|
|
} |
778
|
|
|
|
779
|
|
|
/** |
780
|
|
|
* @return bool |
781
|
|
|
*/ |
782
|
|
|
public function isCustomSurchargeTax4(): bool |
783
|
|
|
{ |
784
|
|
|
return $this->customSurchargeTax4; |
785
|
|
|
} |
786
|
|
|
|
787
|
|
|
/** |
788
|
|
|
* @param bool $customSurchargeTax4 |
789
|
|
|
*/ |
790
|
|
|
public function setCustomSurchargeTax4(bool $customSurchargeTax4): void |
791
|
|
|
{ |
792
|
|
|
$this->customSurchargeTax4 = $customSurchargeTax4; |
793
|
|
|
} |
794
|
|
|
|
795
|
|
|
/** |
796
|
|
|
* @return InvoiceItem[] |
797
|
|
|
*/ |
798
|
|
|
public function getLineItems(): array |
799
|
|
|
{ |
800
|
|
|
return $this->lineItems; |
801
|
|
|
} |
802
|
|
|
|
803
|
|
|
/** |
804
|
|
|
* @param InvoiceItem[] $lineItems |
805
|
|
|
*/ |
806
|
|
|
public function setLineItems(array $lineItems): void |
807
|
|
|
{ |
808
|
|
|
$this->lineItems = $lineItems; |
809
|
|
|
} |
810
|
|
|
|
811
|
|
|
/** |
812
|
|
|
* @return string |
813
|
|
|
*/ |
814
|
|
|
public function getEntityType(): string |
815
|
|
|
{ |
816
|
|
|
return $this->entityType; |
817
|
|
|
} |
818
|
|
|
|
819
|
|
|
/** |
820
|
|
|
* @param string $entityType |
821
|
|
|
*/ |
822
|
|
|
public function setEntityType(string $entityType): void |
823
|
|
|
{ |
824
|
|
|
$this->entityType = $entityType; |
825
|
|
|
} |
826
|
|
|
|
827
|
|
|
/** |
828
|
|
|
* @return string |
829
|
|
|
*/ |
830
|
|
|
public function getReminder1Sent(): string |
831
|
|
|
{ |
832
|
|
|
return $this->reminder1Sent; |
833
|
|
|
} |
834
|
|
|
|
835
|
|
|
/** |
836
|
|
|
* @param string $reminder1Sent |
837
|
|
|
*/ |
838
|
|
|
public function setReminder1Sent(string $reminder1Sent): void |
839
|
|
|
{ |
840
|
|
|
$this->reminder1Sent = $reminder1Sent; |
841
|
|
|
} |
842
|
|
|
|
843
|
|
|
/** |
844
|
|
|
* @return string |
845
|
|
|
*/ |
846
|
|
|
public function getReminder2Sent(): string |
847
|
|
|
{ |
848
|
|
|
return $this->reminder2Sent; |
849
|
|
|
} |
850
|
|
|
|
851
|
|
|
/** |
852
|
|
|
* @param string $reminder2Sent |
853
|
|
|
*/ |
854
|
|
|
public function setReminder2Sent(string $reminder2Sent): void |
855
|
|
|
{ |
856
|
|
|
$this->reminder2Sent = $reminder2Sent; |
857
|
|
|
} |
858
|
|
|
|
859
|
|
|
/** |
860
|
|
|
* @return string |
861
|
|
|
*/ |
862
|
|
|
public function getReminder3Sent(): string |
863
|
|
|
{ |
864
|
|
|
return $this->reminder3Sent; |
865
|
|
|
} |
866
|
|
|
|
867
|
|
|
/** |
868
|
|
|
* @param string $reminder3Sent |
869
|
|
|
*/ |
870
|
|
|
public function setReminder3Sent(string $reminder3Sent): void |
871
|
|
|
{ |
872
|
|
|
$this->reminder3Sent = $reminder3Sent; |
873
|
|
|
} |
874
|
|
|
|
875
|
|
|
/** |
876
|
|
|
* @return string |
877
|
|
|
*/ |
878
|
|
|
public function getReminderLastSent(): string |
879
|
|
|
{ |
880
|
|
|
return $this->reminderLastSent; |
881
|
|
|
} |
882
|
|
|
|
883
|
|
|
/** |
884
|
|
|
* @param string $reminderLastSent |
885
|
|
|
*/ |
886
|
|
|
public function setReminderLastSent(string $reminderLastSent): void |
887
|
|
|
{ |
888
|
|
|
$this->reminderLastSent = $reminderLastSent; |
889
|
|
|
} |
890
|
|
|
|
891
|
|
|
/** |
892
|
|
|
* @return float|int |
893
|
|
|
*/ |
894
|
|
|
public function getPaidToDate(): float|int |
895
|
|
|
{ |
896
|
|
|
return $this->paidToDate; |
897
|
|
|
} |
898
|
|
|
|
899
|
|
|
/** |
900
|
|
|
* @param float|int $paidToDate |
901
|
|
|
*/ |
902
|
|
|
public function setPaidToDate(float|int $paidToDate): void |
903
|
|
|
{ |
904
|
|
|
$this->paidToDate = $paidToDate; |
905
|
|
|
} |
906
|
|
|
|
907
|
|
|
/** |
908
|
|
|
* @return string |
909
|
|
|
*/ |
910
|
|
|
public function getSubscriptionId(): string |
911
|
|
|
{ |
912
|
|
|
return $this->subscriptionId; |
913
|
|
|
} |
914
|
|
|
|
915
|
|
|
/** |
916
|
|
|
* @param string $subscriptionId |
917
|
|
|
*/ |
918
|
|
|
public function setSubscriptionId(string $subscriptionId): void |
919
|
|
|
{ |
920
|
|
|
$this->subscriptionId = $subscriptionId; |
921
|
|
|
} |
922
|
|
|
|
923
|
|
|
/** |
924
|
|
|
* @return bool |
925
|
|
|
*/ |
926
|
|
|
public function isAutoBillEnabled(): bool |
927
|
|
|
{ |
928
|
|
|
return $this->autoBillEnabled; |
929
|
|
|
} |
930
|
|
|
|
931
|
|
|
/** |
932
|
|
|
* @param bool $autoBillEnabled |
933
|
|
|
*/ |
934
|
|
|
public function setAutoBillEnabled(bool $autoBillEnabled): void |
935
|
|
|
{ |
936
|
|
|
$this->autoBillEnabled = $autoBillEnabled; |
937
|
|
|
} |
938
|
|
|
|
939
|
|
|
/** |
940
|
|
|
* @return Invitation[] |
941
|
|
|
*/ |
942
|
|
|
public function getInvitations(): array |
943
|
|
|
{ |
944
|
|
|
return $this->invitations; |
945
|
|
|
} |
946
|
|
|
|
947
|
|
|
/** |
948
|
|
|
* @param Invitation[] $invitations |
949
|
|
|
*/ |
950
|
|
|
public function setInvitations(array $invitations): void |
951
|
|
|
{ |
952
|
|
|
$this->invitations = $invitations; |
953
|
|
|
} |
954
|
|
|
|
955
|
|
|
/** |
956
|
|
|
* @return array |
957
|
|
|
*/ |
958
|
|
|
public function getDocuments(): array |
959
|
|
|
{ |
960
|
|
|
return $this->documents; |
961
|
|
|
} |
962
|
|
|
|
963
|
|
|
/** |
964
|
|
|
* @param array $documents |
965
|
|
|
*/ |
966
|
|
|
public function setDocuments(array $documents): void |
967
|
|
|
{ |
968
|
|
|
$this->documents = $documents; |
969
|
|
|
} |
970
|
|
|
} |
971
|
|
|
|