1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of datamolino client. |
5
|
|
|
* |
6
|
|
|
* (c) 2018 cwd.at GmbH <[email protected]> |
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
|
|
|
declare(strict_types=1); |
13
|
|
|
|
14
|
|
|
namespace Cwd\Datamolino\Model\Document; |
15
|
|
|
|
16
|
|
|
class Summary |
17
|
|
|
{ |
18
|
|
|
/** @var float|null */ |
19
|
|
|
private $shipping; |
20
|
|
|
|
21
|
|
|
/** @var float|null */ |
22
|
|
|
private $other_cost1; |
23
|
|
|
|
24
|
|
|
/** @var float|null */ |
25
|
|
|
private $other_cost2; |
26
|
|
|
|
27
|
|
|
/** @var float|null */ |
28
|
|
|
private $other_cost3; |
29
|
|
|
|
30
|
|
|
/** @var float|null */ |
31
|
|
|
private $total_discount; |
32
|
|
|
|
33
|
|
|
/** @var float|null */ |
34
|
|
|
private $payment_amount; |
35
|
|
|
|
36
|
|
|
/** @var float */ |
37
|
|
|
private $paid_deposits = 0; |
38
|
|
|
|
39
|
|
|
/** @var float */ |
40
|
|
|
private $rounding = 0; |
41
|
|
|
|
42
|
|
|
/** @var float */ |
43
|
|
|
private $sub_total = 0; |
44
|
|
|
|
45
|
|
|
/** @var float */ |
46
|
|
|
private $vat_total = 0; |
47
|
|
|
|
48
|
|
|
/** @var float */ |
49
|
|
|
private $total = 0; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @return float|null |
53
|
|
|
*/ |
54
|
|
|
public function getPaymentAmount(): ?float |
55
|
|
|
{ |
56
|
|
|
return $this->payment_amount; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @param float|null $payment_amount |
61
|
|
|
* |
62
|
|
|
* @return Summary |
63
|
|
|
*/ |
64
|
|
|
public function setPaymentAmount(?float $payment_amount): Summary |
65
|
|
|
{ |
66
|
|
|
$this->payment_amount = $payment_amount; |
67
|
|
|
|
68
|
|
|
return $this; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @return float |
73
|
|
|
*/ |
74
|
|
|
public function getPaidDeposits(): float |
75
|
|
|
{ |
76
|
|
|
return $this->paid_deposits; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @param float $paid_deposits |
81
|
|
|
* |
82
|
|
|
* @return Summary |
83
|
|
|
*/ |
84
|
|
|
public function setPaidDeposits(float $paid_deposits): Summary |
85
|
|
|
{ |
86
|
|
|
$this->paid_deposits = $paid_deposits; |
87
|
|
|
|
88
|
|
|
return $this; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return float |
93
|
|
|
*/ |
94
|
|
|
public function getRounding(): float |
95
|
|
|
{ |
96
|
|
|
return $this->rounding; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @param float $rounding |
101
|
|
|
* |
102
|
|
|
* @return Summary |
103
|
|
|
*/ |
104
|
|
|
public function setRounding(float $rounding): Summary |
105
|
|
|
{ |
106
|
|
|
$this->rounding = $rounding; |
107
|
|
|
|
108
|
|
|
return $this; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @return float |
113
|
|
|
*/ |
114
|
|
|
public function getSubTotal(): float |
115
|
|
|
{ |
116
|
|
|
return $this->sub_total; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* @param float $sub_total |
121
|
|
|
* |
122
|
|
|
* @return Summary |
123
|
|
|
*/ |
124
|
|
|
public function setSubTotal(float $sub_total): Summary |
125
|
|
|
{ |
126
|
|
|
$this->sub_total = $sub_total; |
127
|
|
|
|
128
|
|
|
return $this; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @return float |
133
|
|
|
*/ |
134
|
|
|
public function getVatTotal(): float |
135
|
|
|
{ |
136
|
|
|
return $this->vat_total; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @param float $vat_total |
141
|
|
|
* |
142
|
|
|
* @return Summary |
143
|
|
|
*/ |
144
|
|
|
public function setVatTotal(float $vat_total): Summary |
145
|
|
|
{ |
146
|
|
|
$this->vat_total = $vat_total; |
147
|
|
|
|
148
|
|
|
return $this; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @return float |
153
|
|
|
*/ |
154
|
|
|
public function getTotal(): float |
155
|
|
|
{ |
156
|
|
|
return $this->total; |
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
/** |
160
|
|
|
* @param float $total |
161
|
|
|
* |
162
|
|
|
* @return Summary |
163
|
|
|
*/ |
164
|
|
|
public function setTotal(float $total): Summary |
165
|
|
|
{ |
166
|
|
|
$this->total = $total; |
167
|
|
|
|
168
|
|
|
return $this; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @return float|null |
173
|
|
|
*/ |
174
|
|
|
public function getShipping(): ?float |
175
|
|
|
{ |
176
|
|
|
return $this->shipping; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @param float|null $shipping |
181
|
|
|
* |
182
|
|
|
* @return Summary |
183
|
|
|
*/ |
184
|
|
|
public function setShipping(?float $shipping): Summary |
185
|
|
|
{ |
186
|
|
|
$this->shipping = $shipping; |
187
|
|
|
|
188
|
|
|
return $this; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* @return float|null |
193
|
|
|
*/ |
194
|
|
|
public function getOtherCost1(): ?float |
195
|
|
|
{ |
196
|
|
|
return $this->other_cost1; |
197
|
|
|
} |
198
|
|
|
|
199
|
|
|
/** |
200
|
|
|
* @param float|null $other_cost1 |
201
|
|
|
* |
202
|
|
|
* @return Summary |
203
|
|
|
*/ |
204
|
|
|
public function setOtherCost1(?float $other_cost1): Summary |
205
|
|
|
{ |
206
|
|
|
$this->other_cost1 = $other_cost1; |
207
|
|
|
|
208
|
|
|
return $this; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @return float|null |
213
|
|
|
*/ |
214
|
|
|
public function getOtherCost2(): ?float |
215
|
|
|
{ |
216
|
|
|
return $this->other_cost2; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
/** |
220
|
|
|
* @param float|null $other_cost2 |
221
|
|
|
* |
222
|
|
|
* @return Summary |
223
|
|
|
*/ |
224
|
|
|
public function setOtherCost2(?float $other_cost2): Summary |
225
|
|
|
{ |
226
|
|
|
$this->other_cost2 = $other_cost2; |
227
|
|
|
|
228
|
|
|
return $this; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @return float|null |
233
|
|
|
*/ |
234
|
|
|
public function getOtherCost3(): ?float |
235
|
|
|
{ |
236
|
|
|
return $this->other_cost3; |
237
|
|
|
} |
238
|
|
|
|
239
|
|
|
/** |
240
|
|
|
* @param float|null $other_cost3 |
241
|
|
|
* |
242
|
|
|
* @return Summary |
243
|
|
|
*/ |
244
|
|
|
public function setOtherCost3(?float $other_cost3): Summary |
245
|
|
|
{ |
246
|
|
|
$this->other_cost3 = $other_cost3; |
247
|
|
|
|
248
|
|
|
return $this; |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/** |
252
|
|
|
* @return float|null |
253
|
|
|
*/ |
254
|
|
|
public function getTotalDiscount(): ?float |
255
|
|
|
{ |
256
|
|
|
return $this->total_discount; |
257
|
|
|
} |
258
|
|
|
|
259
|
|
|
/** |
260
|
|
|
* @param float|null $total_discount |
261
|
|
|
* |
262
|
|
|
* @return Summary |
263
|
|
|
*/ |
264
|
|
|
public function setTotalDiscount(?float $total_discount): Summary |
265
|
|
|
{ |
266
|
|
|
$this->total_discount = $total_discount; |
267
|
|
|
|
268
|
|
|
return $this; |
269
|
|
|
} |
270
|
|
|
} |
271
|
|
|
|