Code Duplication    Length = 299-299 lines in 2 locations

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

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

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

@@ 20-318 (lines=299) @@
17
 * Class Retention
18
 * @package Greenter\Model\Retention
19
 */
20
class Retention
21
{
22
    use RetentionValidator;
23
24
    /**
25
     * Serie del Documento (ejem: R001)
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 Retenido
75
     *
76
     * @Assert\NotBlank()
77
     * @var float
78
     */
79
    private $impRetenido;
80
81
    /**
82
     * Importe total Pagado
83
     *
84
     * @Assert\NotBlank()
85
     * @var float
86
     */
87
    private $impPagado;
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 RetentionDetail[]
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 Retention
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 Retention
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 Retention
151
     */
152
    public function setFechaEmision($fechaEmision)
153
    {
154
        $this->fechaEmision = $fechaEmision;
155
        return $this;
156
    }
157
158
    /**
159
     * @return Client
160
     */
161
    public function getProveedor()
162
    {
163
        return $this->proveedor;
164
    }
165
166
    /**
167
     * @param Client $proveedor
168
     * @return Retention
169
     */
170
    public function setProveedor($proveedor)
171
    {
172
        $this->proveedor = $proveedor;
173
        return $this;
174
    }
175
176
    /**
177
     * @return Company
178
     */
179
    public function getCompany()
180
    {
181
        return $this->company;
182
    }
183
184
    /**
185
     * @param Company $company
186
     * @return Retention
187
     */
188
    public function setCompany($company)
189
    {
190
        $this->company = $company;
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 Retention
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 Retention
223
     */
224
    public function setTasa($tasa)
225
    {
226
        $this->tasa = $tasa;
227
        return $this;
228
    }
229
230
    /**
231
     * @return float
232
     */
233
    public function getImpRetenido()
234
    {
235
        return $this->impRetenido;
236
    }
237
238
    /**
239
     * @param float $impRetenido
240
     * @return Retention
241
     */
242
    public function setImpRetenido($impRetenido)
243
    {
244
        $this->impRetenido = $impRetenido;
245
        return $this;
246
    }
247
248
    /**
249
     * @return float
250
     */
251
    public function getImpPagado()
252
    {
253
        return $this->impPagado;
254
    }
255
256
    /**
257
     * @param float $impPagado
258
     * @return Retention
259
     */
260
    public function setImpPagado($impPagado)
261
    {
262
        $this->impPagado = $impPagado;
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 Retention
277
     */
278
    public function setObservacion($observacion)
279
    {
280
        $this->observacion = $observacion;
281
        return $this;
282
    }
283
284
    /**
285
     * @return RetentionDetail[]
286
     */
287
    public function getDetails()
288
    {
289
        return $this->details;
290
    }
291
292
    /**
293
     * @param RetentionDetail[] $details
294
     * @return Retention
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 getFileName()
308
    {
309
        $parts = [
310
            $this->company->getRuc(),
311
            '20',
312
            $this->getSerie(),
313
            $this->getCorrelativo(),
314
        ];
315
316
        return join('-', $parts);
317
    }
318
}