Code Duplication    Length = 299-299 lines in 2 locations

src/Greenter/Model/Perception/Perception.php 1 location

@@ 20-318 (lines=299) @@
17
 * Class Perception
18
 * @package Greenter\Model\Perception
19
 */
20
class Perception implements DocumentInterface
21
{
22
    use PerceptionValidator;
23
24
    /**
25
     * Serie del Documento (ejem: P001)
26
     *
27
     * @Assert\NotBlank()
28
     * @Assert\Length(max="4")
29
     * @var string
30
     */
31
    private $serie;
32
33
    /**
34
     * @Assert\NotBlank()
35
     * @Assert\Length(max="8")
36
     * @var string
37
     */
38
    private $correlativo;
39
40
    /**
41
     * @Assert\Date()
42
     * @var \DateTime
43
     */
44
    private $fechaEmision;
45
46
    /**
47
     * @Assert\NotBlank()
48
     * @Assert\Valid()
49
     * @var Company
50
     */
51
    private $company;
52
53
    /**
54
     * @Assert\NotBlank()
55
     * @Assert\Valid()
56
     * @var Client
57
     */
58
    private $proveedor;
59
60
    /**
61
     * @Assert\NotBlank()
62
     * @Assert\Length(min="2", max="2")
63
     * @var string
64
     */
65
    private $regimen;
66
67
    /**
68
     * @Assert\NotBlank()
69
     * @var float
70
     */
71
    private $tasa;
72
73
    /**
74
     * Importe total Percibido.
75
     *
76
     * @Assert\NotBlank()
77
     * @var float
78
     */
79
    private $impPercibido;
80
81
    /**
82
     * Importe total Cobrado.
83
     *
84
     * @Assert\NotBlank()
85
     * @var float
86
     */
87
    private $impCobrado;
88
89
    /**
90
     * @Assert\Length(max="250")
91
     * @var string
92
     */
93
    private $observacion;
94
95
    /**
96
     * Dato del Comprobante relacionado.
97
     *
98
     * @Assert\NotBlank()
99
     * @Assert\Valid()
100
     * @var PerceptionDetail[]
101
     */
102
    private $details;
103
104
    /**
105
     * @return string
106
     */
107
    public function getSerie()
108
    {
109
        return $this->serie;
110
    }
111
112
    /**
113
     * @param string $serie
114
     * @return Perception
115
     */
116
    public function setSerie($serie)
117
    {
118
        $this->serie = $serie;
119
        return $this;
120
    }
121
122
    /**
123
     * @return string
124
     */
125
    public function getCorrelativo()
126
    {
127
        return $this->correlativo;
128
    }
129
130
    /**
131
     * @param string $correlativo
132
     * @return Perception
133
     */
134
    public function setCorrelativo($correlativo)
135
    {
136
        $this->correlativo = $correlativo;
137
        return $this;
138
    }
139
140
    /**
141
     * @return \DateTime
142
     */
143
    public function getFechaEmision()
144
    {
145
        return $this->fechaEmision;
146
    }
147
148
    /**
149
     * @param \DateTime $fechaEmision
150
     * @return Perception
151
     */
152
    public function setFechaEmision($fechaEmision)
153
    {
154
        $this->fechaEmision = $fechaEmision;
155
        return $this;
156
    }
157
158
    /**
159
     * @return Company
160
     */
161
    public function getCompany()
162
    {
163
        return $this->company;
164
    }
165
166
    /**
167
     * @param Company $company
168
     * @return Perception
169
     */
170
    public function setCompany($company)
171
    {
172
        $this->company = $company;
173
        return $this;
174
    }
175
176
    /**
177
     * @return Client
178
     */
179
    public function getProveedor()
180
    {
181
        return $this->proveedor;
182
    }
183
184
    /**
185
     * @param Client $proveedor
186
     * @return Perception
187
     */
188
    public function setProveedor($proveedor)
189
    {
190
        $this->proveedor = $proveedor;
191
        return $this;
192
    }
193
194
    /**
195
     * @return string
196
     */
197
    public function getRegimen()
198
    {
199
        return $this->regimen;
200
    }
201
202
    /**
203
     * @param string $regimen
204
     * @return Perception
205
     */
206
    public function setRegimen($regimen)
207
    {
208
        $this->regimen = $regimen;
209
        return $this;
210
    }
211
212
    /**
213
     * @return float
214
     */
215
    public function getTasa()
216
    {
217
        return $this->tasa;
218
    }
219
220
    /**
221
     * @param float $tasa
222
     * @return Perception
223
     */
224
    public function setTasa($tasa)
225
    {
226
        $this->tasa = $tasa;
227
        return $this;
228
    }
229
230
    /**
231
     * @return float
232
     */
233
    public function getImpPercibido()
234
    {
235
        return $this->impPercibido;
236
    }
237
238
    /**
239
     * @param float $impPercibido
240
     * @return Perception
241
     */
242
    public function setImpPercibido($impPercibido)
243
    {
244
        $this->impPercibido = $impPercibido;
245
        return $this;
246
    }
247
248
    /**
249
     * @return float
250
     */
251
    public function getImpCobrado()
252
    {
253
        return $this->impCobrado;
254
    }
255
256
    /**
257
     * @param float $impCobrado
258
     * @return Perception
259
     */
260
    public function setImpCobrado($impCobrado)
261
    {
262
        $this->impCobrado = $impCobrado;
263
        return $this;
264
    }
265
266
    /**
267
     * @return string
268
     */
269
    public function getObservacion()
270
    {
271
        return $this->observacion;
272
    }
273
274
    /**
275
     * @param string $observacion
276
     * @return Perception
277
     */
278
    public function setObservacion($observacion)
279
    {
280
        $this->observacion = $observacion;
281
        return $this;
282
    }
283
284
    /**
285
     * @return PerceptionDetail[]
286
     */
287
    public function getDetails()
288
    {
289
        return $this->details;
290
    }
291
292
    /**
293
     * @param PerceptionDetail[] $details
294
     * @return Perception
295
     */
296
    public function setDetails($details)
297
    {
298
        $this->details = $details;
299
        return $this;
300
    }
301
302
    /**
303
     * Get FileName without extension.
304
     *
305
     * @return string
306
     */
307
    public function getName()
308
    {
309
        $parts = [
310
            $this->company->getRuc(),
311
            '40',
312
            $this->getSerie(),
313
            $this->getCorrelativo(),
314
        ];
315
316
        return join('-', $parts);
317
    }
318
}

src/Greenter/Model/Retention/Retention.php 1 location

@@ 21-319 (lines=299) @@
18
 * Class Retention
19
 * @package Greenter\Model\Retention
20
 */
21
class Retention implements DocumentInterface
22
{
23
    use RetentionValidator;
24
25
    /**
26
     * Serie del Documento (ejem: R001)
27
     *
28
     * @Assert\NotBlank()
29
     * @Assert\Length(max="4")
30
     * @var string
31
     */
32
    private $serie;
33
34
    /**
35
     * @Assert\NotBlank()
36
     * @Assert\Length(max="8")
37
     * @var string
38
     */
39
    private $correlativo;
40
41
    /**
42
     * @Assert\Date()
43
     * @var \DateTime
44
     */
45
    private $fechaEmision;
46
47
    /**
48
     * @Assert\NotBlank()
49
     * @Assert\Valid()
50
     * @var Company
51
     */
52
    private $company;
53
54
    /**
55
     * @Assert\NotBlank()
56
     * @Assert\Valid()
57
     * @var Client
58
     */
59
    private $proveedor;
60
61
    /**
62
     * @Assert\NotBlank()
63
     * @Assert\Length(min="2", max="2")
64
     * @var string
65
     */
66
    private $regimen;
67
68
    /**
69
     * @Assert\NotBlank()
70
     * @var float
71
     */
72
    private $tasa;
73
74
    /**
75
     * Importe total Retenido
76
     *
77
     * @Assert\NotBlank()
78
     * @var float
79
     */
80
    private $impRetenido;
81
82
    /**
83
     * Importe total Pagado
84
     *
85
     * @Assert\NotBlank()
86
     * @var float
87
     */
88
    private $impPagado;
89
90
    /**
91
     * @Assert\Length(max="250")
92
     * @var string
93
     */
94
    private $observacion;
95
96
    /**
97
     * Dato del Comprobante relacionado.
98
     *
99
     * @Assert\NotBlank()
100
     * @Assert\Valid()
101
     * @var RetentionDetail[]
102
     */
103
    private $details;
104
105
    /**
106
     * @return string
107
     */
108
    public function getSerie()
109
    {
110
        return $this->serie;
111
    }
112
113
    /**
114
     * @param string $serie
115
     * @return Retention
116
     */
117
    public function setSerie($serie)
118
    {
119
        $this->serie = $serie;
120
        return $this;
121
    }
122
123
    /**
124
     * @return string
125
     */
126
    public function getCorrelativo()
127
    {
128
        return $this->correlativo;
129
    }
130
131
    /**
132
     * @param string $correlativo
133
     * @return Retention
134
     */
135
    public function setCorrelativo($correlativo)
136
    {
137
        $this->correlativo = $correlativo;
138
        return $this;
139
    }
140
141
    /**
142
     * @return \DateTime
143
     */
144
    public function getFechaEmision()
145
    {
146
        return $this->fechaEmision;
147
    }
148
149
    /**
150
     * @param \DateTime $fechaEmision
151
     * @return Retention
152
     */
153
    public function setFechaEmision($fechaEmision)
154
    {
155
        $this->fechaEmision = $fechaEmision;
156
        return $this;
157
    }
158
159
    /**
160
     * @return Client
161
     */
162
    public function getProveedor()
163
    {
164
        return $this->proveedor;
165
    }
166
167
    /**
168
     * @param Client $proveedor
169
     * @return Retention
170
     */
171
    public function setProveedor($proveedor)
172
    {
173
        $this->proveedor = $proveedor;
174
        return $this;
175
    }
176
177
    /**
178
     * @return Company
179
     */
180
    public function getCompany()
181
    {
182
        return $this->company;
183
    }
184
185
    /**
186
     * @param Company $company
187
     * @return Retention
188
     */
189
    public function setCompany($company)
190
    {
191
        $this->company = $company;
192
        return $this;
193
    }
194
195
    /**
196
     * @return string
197
     */
198
    public function getRegimen()
199
    {
200
        return $this->regimen;
201
    }
202
203
    /**
204
     * @param string $regimen
205
     * @return Retention
206
     */
207
    public function setRegimen($regimen)
208
    {
209
        $this->regimen = $regimen;
210
        return $this;
211
    }
212
213
    /**
214
     * @return float
215
     */
216
    public function getTasa()
217
    {
218
        return $this->tasa;
219
    }
220
221
    /**
222
     * @param float $tasa
223
     * @return Retention
224
     */
225
    public function setTasa($tasa)
226
    {
227
        $this->tasa = $tasa;
228
        return $this;
229
    }
230
231
    /**
232
     * @return float
233
     */
234
    public function getImpRetenido()
235
    {
236
        return $this->impRetenido;
237
    }
238
239
    /**
240
     * @param float $impRetenido
241
     * @return Retention
242
     */
243
    public function setImpRetenido($impRetenido)
244
    {
245
        $this->impRetenido = $impRetenido;
246
        return $this;
247
    }
248
249
    /**
250
     * @return float
251
     */
252
    public function getImpPagado()
253
    {
254
        return $this->impPagado;
255
    }
256
257
    /**
258
     * @param float $impPagado
259
     * @return Retention
260
     */
261
    public function setImpPagado($impPagado)
262
    {
263
        $this->impPagado = $impPagado;
264
        return $this;
265
    }
266
267
    /**
268
     * @return string
269
     */
270
    public function getObservacion()
271
    {
272
        return $this->observacion;
273
    }
274
275
    /**
276
     * @param string $observacion
277
     * @return Retention
278
     */
279
    public function setObservacion($observacion)
280
    {
281
        $this->observacion = $observacion;
282
        return $this;
283
    }
284
285
    /**
286
     * @return RetentionDetail[]
287
     */
288
    public function getDetails()
289
    {
290
        return $this->details;
291
    }
292
293
    /**
294
     * @param RetentionDetail[] $details
295
     * @return Retention
296
     */
297
    public function setDetails($details)
298
    {
299
        $this->details = $details;
300
        return $this;
301
    }
302
303
    /**
304
     * Get FileName without extension.
305
     *
306
     * @return string
307
     */
308
    public function getName()
309
    {
310
        $parts = [
311
            $this->company->getRuc(),
312
            '20',
313
            $this->getSerie(),
314
            $this->getCorrelativo(),
315
        ];
316
317
        return join('-', $parts);
318
    }
319
}