Completed
Push — master ( c97ce9...476a1d )
by Giancarlos
03:06
created

BaseSale::getMtoIGV()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Giansalex
5
 * Date: 17/07/2017
6
 * Time: 23:26
7
 */
8
9
namespace Greenter\Model\Sale;
10
11
/**
12
 * Class BaseSale
13
 * @package Greenter\Model\Sale
14
 */
15
class BaseSale
16
{
17
    /**
18
     * @Assert\NotBlank()
19
     * @Assert\Length(max="2")
20
     * @var string
21
     */
22
    protected $tipoDoc;
23
24
    /**
25
     * @Assert\NotBlank()
26
     * @Assert\Length(max="4")
27
     * @var string
28
     */
29
    protected $serie;
30
31
    /**
32
     * @Assert\NotBlank()
33
     * @Assert\Length(max="8")
34
     * @var string
35
     */
36
    protected $correlativo;
37
38
    /**
39
     * @Assert\Date()
40
     * @var \DateTime
41
     */
42
    protected $fechaEmision;
43
44
    /**
45
     * @Assert\NotBlank()
46
     * @Assert\Length(max="1")
47
     * @var string
48
     */
49
    protected $tipoDocUsuario;
50
51
    /**
52
     * @Assert\NotBlank()
53
     * @Assert\Length(max="15")
54
     * @var string
55
     */
56
    protected $numDocUsuario;
57
58
    /**
59
     * @Assert\NotBlank()
60
     * @Assert\Length(max="100")
61
     * @var string
62
     */
63
    protected $rznSocialUsuario;
64
65
    /**
66
     * @Assert\NotBlank()
67
     * @Assert\Length(max="3")
68
     * @var string
69
     */
70
    protected $tipoMoneda;
71
72
    /**
73
     * @var float
74
     */
75
    protected $sumOtrosCargos;
76
77
    /**
78
     * @Assert\NotBlank()
79
     * @var float
80
     */
81
    protected $mtoOperGravadas;
82
83
    /**
84
     * @Assert\NotBlank()
85
     * @var float
86
     */
87
    protected $mtoOperInafectas;
88
89
    /**
90
     * @Assert\NotBlank()
91
     * @var float
92
     */
93
    protected $mtoOperExoneradas;
94
95
    /**
96
     * @var float
97
     */
98
    protected $mtoIGV;
99
100
    /**
101
     * @var float
102
     */
103
    protected $mtoISC;
104
105
    /**
106
     * @var float
107
     */
108
    protected $mtoOtrosTributos;
109
110
    /**
111
     * Importe total de la venta, cesión en uso o del servicio prestado.
112
     *
113
     * @Assert\NotBlank()
114
     * @var float
115
     */
116
    protected $mtoImpVenta;
117
118
    /**
119
     * @Assert\Valid()
120
     * @var SaleDetail[]
121
     */
122
    protected $details;
123
124
    /**
125
     * @Assert\Valid()
126
     * @var Legend[]
127
     */
128
    protected $legends;
129
130
    /**
131
     * @Assert\Valid()
132
     * @var Document[]
133
     */
134
    protected $relDocs;
135
136
    /**
137
     * @return string
138
     */
139 18
    public function getTipoDoc()
140
    {
141 18
        return $this->tipoDoc;
142
    }
143
144
    /**
145
     * @param string $tipoDoc
146
     * @return BaseSale
147
     */
148 36
    public function setTipoDoc($tipoDoc)
149
    {
150 36
        $this->tipoDoc = $tipoDoc;
151 36
        return $this;
152
    }
153
154
    /**
155
     * @return string
156
     */
157 18
    public function getSerie()
158
    {
159 18
        return $this->serie;
160
    }
161
162
    /**
163
     * @param string $serie
164
     * @return BaseSale
165
     */
166 36
    public function setSerie($serie)
167
    {
168 36
        $this->serie = $serie;
169 36
        return $this;
170
    }
171
172
    /**
173
     * @return string
174
     */
175 18
    public function getCorrelativo()
176
    {
177 18
        return $this->correlativo;
178
    }
179
180
    /**
181
     * @param string $correlativo
182
     * @return BaseSale
183
     */
184 36
    public function setCorrelativo($correlativo)
185
    {
186 36
        $this->correlativo = $correlativo;
187 36
        return $this;
188
    }
189
190
    /**
191
     * @return \DateTime
192
     */
193 18
    public function getFechaEmision()
194
    {
195 18
        return $this->fechaEmision;
196
    }
197
198
    /**
199
     * @param \DateTime $fechaEmision
200
     * @return BaseSale
201
     */
202
    public function setFechaEmision($fechaEmision)
203
    {
204
        $this->fechaEmision = $fechaEmision;
205
        return $this;
206
    }
207
208
    /**
209
     * @return string
210
     */
211 18
    public function getTipoDocUsuario()
212
    {
213 18
        return $this->tipoDocUsuario;
214
    }
215
216
    /**
217
     * @param string $tipoDocUsuario
218
     * @return BaseSale
219
     */
220 36
    public function setTipoDocUsuario($tipoDocUsuario)
221
    {
222 36
        $this->tipoDocUsuario = $tipoDocUsuario;
223 36
        return $this;
224
    }
225
226
    /**
227
     * @return string
228
     */
229 18
    public function getNumDocUsuario()
230
    {
231 18
        return $this->numDocUsuario;
232
    }
233
234
    /**
235
     * @param string $numDocUsuario
236
     * @return BaseSale
237
     */
238 36
    public function setNumDocUsuario($numDocUsuario)
239
    {
240 36
        $this->numDocUsuario = $numDocUsuario;
241 36
        return $this;
242
    }
243
244
    /**
245
     * @return string
246
     */
247 18
    public function getRznSocialUsuario()
248
    {
249 18
        return $this->rznSocialUsuario;
250
    }
251
252
    /**
253
     * @param string $rznSocialUsuario
254
     * @return BaseSale
255
     */
256 36
    public function setRznSocialUsuario($rznSocialUsuario)
257
    {
258 36
        $this->rznSocialUsuario = $rznSocialUsuario;
259 36
        return $this;
260
    }
261
262
    /**
263
     * @return mixed
264
     */
265 18
    public function getTipoMoneda()
266
    {
267 18
        return $this->tipoMoneda;
268
    }
269
270
    /**
271
     * @param mixed $tipoMoneda
272
     * @return BaseSale
273
     */
274 36
    public function setTipoMoneda($tipoMoneda)
275
    {
276 36
        $this->tipoMoneda = $tipoMoneda;
277 36
        return $this;
278
    }
279
280
    /**
281
     * @return mixed
282
     */
283 18
    public function getSumOtrosCargos()
284
    {
285 18
        return $this->sumOtrosCargos;
286
    }
287
288
    /**
289
     * @param mixed $sumOtrosCargos
290
     * @return BaseSale
291
     */
292
    public function setSumOtrosCargos($sumOtrosCargos)
293
    {
294
        $this->sumOtrosCargos = $sumOtrosCargos;
295
        return $this;
296
    }
297
298
    /**
299
     * @return mixed
300
     */
301 18
    public function getMtoOperGravadas()
302
    {
303 18
        return $this->mtoOperGravadas;
304
    }
305
306
    /**
307
     * @param mixed $mtoOperGravadas
308
     * @return BaseSale
309
     */
310 36
    public function setMtoOperGravadas($mtoOperGravadas)
311
    {
312 36
        $this->mtoOperGravadas = $mtoOperGravadas;
313 36
        return $this;
314
    }
315
316
    /**
317
     * @return mixed
318
     */
319 18
    public function getMtoOperInafectas()
320
    {
321 18
        return $this->mtoOperInafectas;
322
    }
323
324
    /**
325
     * @param mixed $mtoOperInafectas
326
     * @return BaseSale
327
     */
328 36
    public function setMtoOperInafectas($mtoOperInafectas)
329
    {
330 36
        $this->mtoOperInafectas = $mtoOperInafectas;
331 36
        return $this;
332
    }
333
334
    /**
335
     * @return float
336
     */
337 18
    public function getMtoOperExoneradas()
338
    {
339 18
        return $this->mtoOperExoneradas;
340
    }
341
342
    /**
343
     * @param float $mtoOperExoneradas
344
     * @return BaseSale
345
     */
346 36
    public function setMtoOperExoneradas($mtoOperExoneradas)
347
    {
348 36
        $this->mtoOperExoneradas = $mtoOperExoneradas;
349 36
        return $this;
350
    }
351
352
    /**
353
     * @return mixed
354
     */
355 18
    public function getMtoIGV()
356
    {
357 18
        return $this->mtoIGV;
358
    }
359
360
    /**
361
     * @param mixed $mtoIGV
362
     * @return BaseSale
363
     */
364 36
    public function setMtoIGV($mtoIGV)
365
    {
366 36
        $this->mtoIGV = $mtoIGV;
367 36
        return $this;
368
    }
369
370
    /**
371
     * @return mixed
372
     */
373 18
    public function getMtoISC()
374
    {
375 18
        return $this->mtoISC;
376
    }
377
378
    /**
379
     * @param mixed $mtoISC
380
     * @return BaseSale
381
     */
382
    public function setMtoISC($mtoISC)
383
    {
384
        $this->mtoISC = $mtoISC;
385
        return $this;
386
    }
387
388
    /**
389
     * @return float
390
     */
391 18
    public function getMtoOtrosTributos()
392
    {
393 18
        return $this->mtoOtrosTributos;
394
    }
395
396
    /**
397
     * @param float $mtoOtrosTributos
398
     * @return BaseSale
399
     */
400
    public function setMtoOtrosTributos($mtoOtrosTributos)
401
    {
402
        $this->mtoOtrosTributos = $mtoOtrosTributos;
403
        return $this;
404
    }
405
406
    /**
407
     * @return float
408
     */
409 18
    public function getMtoImpVenta()
410
    {
411 18
        return $this->mtoImpVenta;
412
    }
413
414
    /**
415
     * @param float $mtoImpVenta
416
     * @return BaseSale
417
     */
418 36
    public function setMtoImpVenta($mtoImpVenta)
419
    {
420 36
        $this->mtoImpVenta = $mtoImpVenta;
421 36
        return $this;
422
    }
423
424
    /**
425
     * @return SaleDetail[]
426
     */
427 18
    public function getDetails()
428
    {
429 18
        return $this->details;
430
    }
431
432
    /**
433
     * @param SaleDetail[] $details
434
     * @return BaseSale
435
     */
436 36
    public function setDetails($details)
437
    {
438 36
        $this->details = $details;
439 36
        return $this;
440
    }
441
442
    /**
443
     * @return Legend[]
444
     */
445 18
    public function getLegends()
446
    {
447 18
        return $this->legends;
448
    }
449
450
    /**
451
     * @param Legend[] $legends
452
     * @return BaseSale
453
     */
454 36
    public function setLegends($legends)
455
    {
456 36
        $this->legends = $legends;
457 36
        return $this;
458
    }
459
460
    /**
461
     * @return Document[]
462
     */
463 18
    public function getRelDocs()
464
    {
465 18
        return $this->relDocs;
466
    }
467
468
    /**
469
     * @param Document[] $relDocs
470
     * @return BaseSale
471
     */
472
    public function setRelDocs($relDocs)
473
    {
474
        $this->relDocs = $relDocs;
475
        return $this;
476
    }
477
478
    /**
479
     * Get FileName without extension.
480
     *
481
     * @param string $ruc Ruc de la Empresa.
482
     * @return string
483
     */
484 12
    public function getFileName($ruc)
485
    {
486
        $parts = [
487 12
            $ruc,
488 12
            $this->getTipoDoc(),
489 12
            $this->getSerie(),
490 12
            $this->getCorrelativo(),
491 12
        ];
492
493 12
        return join('-', $parts);
494
    }
495
}