1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Fousky\Component\iDoklad\Model\IssuedInvoices; |
4
|
|
|
|
5
|
|
|
use Fousky\Component\iDoklad\LOV\IssuedInvoiceItemTypeEnum; |
6
|
|
|
use Fousky\Component\iDoklad\LOV\PriceTypeEnum; |
7
|
|
|
use Fousky\Component\iDoklad\LOV\VatRateTypeEnum; |
8
|
|
|
use Fousky\Component\iDoklad\Model\iDokladAbstractModel; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @method null|float getAmount() |
12
|
|
|
* @method null|string getCode() |
13
|
|
|
* @method null|\DateTime getDateLastChange() |
14
|
|
|
* @method null|int getId() |
15
|
|
|
* @method null|int getInvoiceId() |
16
|
|
|
* @method null|bool getIsRoundedItem() |
17
|
|
|
* @method null|bool getIsTaxMovement() |
18
|
|
|
* @method null|IssuedInvoiceItemTypeEnum getItemType() |
19
|
|
|
* @method null|string getName() |
20
|
|
|
* @method null|float getPrice() |
21
|
|
|
* @method null|int getPriceListItemId() |
22
|
|
|
* @method null|float getPriceTotalWithoutVat() |
23
|
|
|
* @method null|float getPriceTotalWithoutVatHc() |
24
|
|
|
* @method null|float getPriceTotalWithVat() |
25
|
|
|
* @method null|float getPriceTotalWithVatHc() |
26
|
|
|
* @method null|PriceTypeEnum getPriceType() |
27
|
|
|
* @method null|float getPriceUnitVat() |
28
|
|
|
* @method null|float getPriceUnitVatHc() |
29
|
|
|
* @method null|float getPriceUnitWithoutVat() |
30
|
|
|
* @method null|float getPriceUnitWithoutVatHc() |
31
|
|
|
* @method null|float getPriceUnitWithVat() |
32
|
|
|
* @method null|float getPriceUnitWithVatHc() |
33
|
|
|
* @method null|float getTotalPrice() |
34
|
|
|
* @method null|string getUnit() |
35
|
|
|
* @method null|float getUnitPrice() |
36
|
|
|
* @method null|float getVatRate() |
37
|
|
|
* @method null|VatRateTypeEnum getVatRateType() |
38
|
|
|
* @method null|float getVatTotal() |
39
|
|
|
* @method null|float getVatTotalHc() |
40
|
|
|
* |
41
|
|
|
* @author Lukáš Brzák <[email protected]> |
42
|
|
|
*/ |
43
|
|
View Code Duplication |
class IssuedInvoiceItemApiModel extends iDokladAbstractModel |
|
|
|
|
44
|
|
|
{ |
45
|
|
|
public $Amount; |
46
|
|
|
|
47
|
|
|
public $Code; |
48
|
|
|
|
49
|
|
|
public $DateLastChange; |
50
|
|
|
|
51
|
|
|
public $Id; |
52
|
|
|
|
53
|
|
|
public $InvoiceId; |
54
|
|
|
|
55
|
|
|
public $IsRoundedItem; |
56
|
|
|
|
57
|
|
|
public $IsTaxMovement; |
58
|
|
|
|
59
|
|
|
public $ItemType; |
60
|
|
|
|
61
|
|
|
public $Name; |
62
|
|
|
|
63
|
|
|
public $Price; |
64
|
|
|
|
65
|
|
|
public $PriceListItemId; |
66
|
|
|
|
67
|
|
|
public $PriceTotalWithoutVat; |
68
|
|
|
|
69
|
|
|
public $PriceTotalWithoutVatHc; |
70
|
|
|
|
71
|
|
|
public $PriceTotalWithVat; |
72
|
|
|
|
73
|
|
|
public $PriceTotalWithVatHc; |
74
|
|
|
|
75
|
|
|
public $PriceType; |
76
|
|
|
|
77
|
|
|
public $PriceUnitVat; |
78
|
|
|
|
79
|
|
|
public $PriceUnitVatHc; |
80
|
|
|
|
81
|
|
|
public $PriceUnitWithoutVat; |
82
|
|
|
|
83
|
|
|
public $PriceUnitWithoutVatHc; |
84
|
|
|
|
85
|
|
|
public $PriceUnitWithVat; |
86
|
|
|
|
87
|
|
|
public $PriceUnitWithVatHc; |
88
|
|
|
|
89
|
|
|
public $TotalPrice; |
90
|
|
|
|
91
|
|
|
public $Unit; |
92
|
|
|
|
93
|
|
|
public $UnitPrice; |
94
|
|
|
|
95
|
|
|
public $VatRate; |
96
|
|
|
|
97
|
|
|
public $VatRateType; |
98
|
|
|
|
99
|
|
|
public $VatTotal; |
100
|
|
|
|
101
|
|
|
public $VatTotalHc; |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return array |
105
|
|
|
*/ |
106
|
|
|
public static function getEnumMap(): array |
107
|
|
|
{ |
108
|
|
|
return [ |
109
|
|
|
'ItemType' => IssuedInvoiceItemTypeEnum::class, |
110
|
|
|
'PriceType' => PriceTypeEnum::class, |
111
|
|
|
'VatRateType' => VatRateTypeEnum::class, |
112
|
|
|
]; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @return array |
117
|
|
|
*/ |
118
|
|
|
public static function getDateMap(): array |
119
|
|
|
{ |
120
|
|
|
return [ |
121
|
|
|
'DateLastChange', |
122
|
|
|
]; |
123
|
|
|
} |
124
|
|
|
} |
125
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.