Passed
Branch master (a43e58)
by Giancarlos
04:04
created

Invoice::setAnticipo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Giansalex
5
 * Date: 15/07/2017
6
 * Time: 21:05
7
 */
8
9
namespace Greenter\Model\Sale;
10
11
use Greenter\Xml\Validator\InvoiceValidator;
12
use Symfony\Component\Validator\Constraints as Assert;
13
14
/**
15
 * Class Invoice
16
 * @package Greenter\Model\Sale
17
 */
18
class Invoice extends BaseSale
19
{
20
    use InvoiceValidator;
21
22
    /**
23
     * Tipo operacion (Catálogo 17).
24
     * @var string
25
     */
26
    private $tipoOperacion;
27
28
    /**
29
     * @var float
30
     */
31
    private $mtoOperGratuitas;
32
33
    /**
34
     * @var float
35
     */
36
    private $sumDsctoGlobal;
37
38
    /**
39
     * @var float
40
     */
41
    private $mtoDescuentos;
42
43
    /**
44
     * @Assert\Valid()
45
     *
46
     * @var SalePerception
47
     */
48
    private $perception;
49
50
    /**
51
     * Orden de Compra relacionado.
52
     *
53
     * @var string
54
     */
55
    private $compra;
56
57
    /**
58
     * Guias de Remision relacionado (caso de uso en venta itinerante).
59
     *
60
     * @Assert\Valid()
61
     *
62
     * @var Document[]
63
     */
64
    private $guias;
65
66
    /**
67
     * @Assert\Valid()
68
     *
69
     * @var Prepayment
70
     */
71
    private $anticipo;
72
73
    /**
74
     * @Assert\Valid()
75
     *
76
     * @var Detraction
77
     */
78
    private $detraccion;
79
80
    /**
81
     * Utilizado cuando se trata de una Factura Guia.
82
     *
83
     * @var EmbededDespatch
84
     */
85
    private $guiaEmbebida;
86
87
    /**
88
     * @return string
89
     */
90 12
    public function getTipoOperacion()
91
    {
92 12
        return $this->tipoOperacion;
93
    }
94
95
    /**
96
     * @param string $tipoOperacion
97
     * @return Invoice
98
     */
99 12
    public function setTipoOperacion($tipoOperacion)
100
    {
101 12
        $this->tipoOperacion = $tipoOperacion;
102 12
        return $this;
103
    }
104
105
    /**
106
     * @return float
107
     */
108 12
    public function getSumDsctoGlobal()
109
    {
110 12
        return $this->sumDsctoGlobal;
111
    }
112
113
    /**
114
     * @param float $sumDsctoGlobal
115
     * @return Invoice
116
     */
117 12
    public function setSumDsctoGlobal($sumDsctoGlobal)
118
    {
119 12
        $this->sumDsctoGlobal = $sumDsctoGlobal;
120 12
        return $this;
121
    }
122
123
    /**
124
     * @return float
125
     */
126 12
    public function getMtoDescuentos()
127
    {
128 12
        return $this->mtoDescuentos;
129
    }
130
131
    /**
132
     * @param float $mtoDescuentos
133
     * @return Invoice
134
     */
135 12
    public function setMtoDescuentos($mtoDescuentos)
136
    {
137 12
        $this->mtoDescuentos = $mtoDescuentos;
138 12
        return $this;
139
    }
140
141
    /**
142
     * @return float
143
     */
144 12
    public function getMtoOperGratuitas()
145
    {
146 12
        return $this->mtoOperGratuitas;
147
    }
148
149
    /**
150
     * @param float $mtoOperGratuitas
151
     * @return Invoice
152
     */
153 12
    public function setMtoOperGratuitas($mtoOperGratuitas)
154
    {
155 12
        $this->mtoOperGratuitas = $mtoOperGratuitas;
156 12
        return $this;
157
    }
158
159
    /**
160
     * @return SalePerception
161
     */
162 12
    public function getPerception()
163
    {
164 12
        return $this->perception;
165
    }
166
167
    /**
168
     * @param SalePerception $perception
169
     * @return Invoice
170
     */
171 12
    public function setPerception($perception)
172
    {
173 12
        $this->perception = $perception;
174 12
        return $this;
175
    }
176
177
    /**
178
     * @return string
179
     */
180 12
    public function getCompra()
181
    {
182 12
        return $this->compra;
183
    }
184
185
    /**
186
     * @param string $compra
187
     * @return Invoice
188
     */
189 12
    public function setCompra($compra)
190
    {
191 12
        $this->compra = $compra;
192 12
        return $this;
193
    }
194
195
    /**
196
     * @return Document[]
197
     */
198 12
    public function getGuias()
199
    {
200 12
        return $this->guias;
201
    }
202
203
    /**
204
     * @param Document[] $guias
205
     * @return Invoice
206
     */
207 12
    public function setGuias($guias)
208
    {
209 12
        $this->guias = $guias;
210 12
        return $this;
211
    }
212
213
    /**
214
     * @return Prepayment
215
     */
216
    public function getAnticipo()
217
    {
218
        return $this->anticipo;
219
    }
220
221
    /**
222
     * @param Prepayment $anticipo
223
     * @return Invoice
224
     */
225 12
    public function setAnticipo($anticipo)
226
    {
227 12
        $this->anticipo = $anticipo;
228 12
        return $this;
229
    }
230
231
    /**
232
     * @return Detraction
233
     */
234 12
    public function getDetraccion()
235
    {
236 12
        return $this->detraccion;
237
    }
238
239
    /**
240
     * @param Detraction $detraccion
241
     * @return Invoice
242
     */
243 12
    public function setDetraccion($detraccion)
244
    {
245 12
        $this->detraccion = $detraccion;
246 12
        return $this;
247
    }
248
249
    /**
250
     * @return EmbededDespatch
251
     */
252 12
    public function getGuiaEmbebida()
253
    {
254 12
        return $this->guiaEmbebida;
255
    }
256
257
    /**
258
     * @param EmbededDespatch $guiaEmbebida
259
     * @return Invoice
260
     */
261 12
    public function setGuiaEmbebida($guiaEmbebida)
262
    {
263 12
        $this->guiaEmbebida = $guiaEmbebida;
264 12
        return $this;
265
    }
266
}