Test Setup Failed
Push — master ( 99ee47...d58c12 )
by JAIME ELMER
01:53
created

SunatDocument::getFileName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * FACTURA ELECTRÓNICA SUNAT
5
 * UBL 2.1
6
 * Version 1.0
7
 * 
8
 * Copyright 2018, Jaime Cruz
9
 */
10
11
namespace F72X\Sunat\Document;
12
13
use F72X\Company;
14
use F72X\UblComponent\Invoice;
15
use F72X\Sunat\DetailMatrix;
16
17
abstract class SunatDocument extends Invoice {
18
19
    /** @CAT1 Código tipo de documento*/
20
    const DOC_FACTURA       = '01';
21
    const DOC_BOLETA        = '03';
22
    const DOC_NOTA_CREDITO  = '07';
23
    const DOC_NOTA_DEBITO   = '08';
24
25
    const UBL_VERSION_ID = '2.1';
26
    const CUSTUMIZATION_ID = '2.0';
27
28
    /** @var DetailMatrix */
29
    private $DetailMatrix;
30
31
    public function getDetailMatrix() {
32
        return $this->DetailMatrix;
33
    }
34
35
    public function setDetailMatrix(DetailMatrix $DetailMatrix) {
36
        $this->DetailMatrix = $DetailMatrix;
37
        return $this;
38
    }
39
    /**
40
     *    
41
     * @return string Nombre del comprobante de acuerdo con las especificaciones de la SUNAT
42
     */
43
    public function getFileName() {
44
        return Company::getRUC() . '-' . $this->InvoiceTypeCode . '-' . $this->ID . '.xml';
45
    }
46
}
47