Code Duplication    Length = 75-79 lines in 12 locations

src/Elements/Contribuicoes/A120.php 1 location

@@ 9-86 (lines=78) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class A120 extends Element implements ElementInterface
10
{
11
    const REG = 'A120';
12
    const LEVEL = 4;
13
    const PARENT = 'A120';
14
15
    protected $parameters = [
16
        'VL_TOT_SERV' => [
17
            'type' => 'numeric',
18
            'regex' => '^\d+(\.\d*)?|\.\d+$',
19
            'required' => false,
20
            'info' => 'Valor total do serviço, prestado por pessoa física ou jurídica domiciliada no exterior.',
21
            'format' => '15v2'
22
        ],
23
        'VL_BC_PIS' => [
24
            'type' => 'numeric',
25
            'regex' => '^\d+(\.\d*)?|\.\d+$',
26
            'required' => false,
27
            'info' => 'Valor da base de cálculo da Operação – PIS/PASEP – Importação',
28
            'format' => '15v2'
29
        ],
30
        'VL_PIS_IMP' => [
31
            'type' => 'numeric',
32
            'regex' => '^\d+(\.\d*)?|\.\d+$',
33
            'required' => false,
34
            'info' => 'Valor pago/recolhido de PIS/PASEP – Importação',
35
            'format' => '15v2'
36
        ],
37
        'DT_PAG_PIS' => [
38
            'type' => 'string',
39
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
40
            'required' => false,
41
            'info' => 'Data de pagamento do PIS/PASEP – Importação',
42
            'format' => ''
43
        ],
44
        'VL_BC_COFINS' => [
45
            'type' => 'numeric',
46
            'regex' => '^\d+(\.\d*)?|\.\d+$',
47
            'required' => false,
48
            'info' => 'Valor da base de cálculo da Operação – COFINS – Importação',
49
            'format' => '15v2'
50
        ],
51
        'VL_COFINS_IMP' => [
52
            'type' => 'numeric',
53
            'regex' => '^\d+(\.\d*)?|\.\d+$',
54
            'required' => false,
55
            'info' => 'Valor pago/recolhido de COFINS – Importação',
56
            'format' => '15v2'
57
        ],
58
        'DT_PAG_COFINS' => [
59
            'type' => 'string',
60
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
61
            'required' => false,
62
            'info' => 'Data de pagamento do COFINS – Importação',
63
            'format' => ''
64
        ],
65
        'LOC_EXE_SERV' => [
66
            'type' => 'string',
67
            'regex' => '^.{1}$',
68
            'required' => false,
69
            'info' => 'Local da execução do serviço: 
70
            0 – Executado no País; 
71
            1 – Executado no Exterior, cujo resultado se verifique no País.',
72
            'format' => ''
73
        ],
74
75
    ];
76
77
    /**
78
     * Constructor
79
     * @param \stdClass $std
80
     */
81
    public function __construct(\stdClass $std)
82
    {
83
        parent::__construct(self::REG);
84
        $this->std = $this->standarize($std);
85
    }
86
}
87

src/Elements/Contribuicoes/M115.php 1 location

@@ 9-86 (lines=78) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class M115 extends Element implements ElementInterface
10
{
11
    const REG = 'M115';
12
    const LEVEL = 4;
13
    const PARENT = 'M110';
14
15
    protected $parameters = [
16
        'DET_VALOR_AJ' => [
17
            'type' => 'numeric',
18
            'regex' => '^\d+(\.\d*)?|\.\d+$',
19
            'required' => false,
20
            'info' => 'Detalhamento do valor do crédito reduzido ou acrescido, informado no Campo 03 (VL_AJ) do ' .
21
                'registro M110. ',
22
            'format' => '15v2'
23
        ],
24
        'CST_PIS' => [
25
            'type' => 'string',
26
            'regex' => '^((0[1-9])|49|99)$',
27
            'required' => false,
28
            'info' => 'Código de Situação Tributária referente à operação detalhada neste registro. ',
29
            'format' => ''
30
        ],
31
        'DET_BC_CRED' => [
32
            'type' => 'numeric',
33
            'regex' => '^\d+(\.\d*)?|\.\d+$',
34
            'required' => false,
35
            'info' => 'Detalhamento da base de cálculo geradora de ajuste de crédito ',
36
            'format' => '15v3'
37
        ],
38
        'DET_ALIQ' => [
39
            'type' => 'numeric',
40
            'regex' => '^\d+(\.\d*)?|\.\d+$',
41
            'required' => false,
42
            'info' => 'Detalhamento da alíquota a que se refere o ajuste de crédito ',
43
            'format' => '8v4'
44
        ],
45
        'DT_OPER_AJ' => [
46
            'type' => 'string',
47
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
48
            'required' => false,
49
            'info' => 'Data da operação a que se refere o ajuste informado neste registro. ',
50
            'format' => ''
51
        ],
52
        'DESC_AJ' => [
53
            'type' => 'string',
54
            'regex' => '^(.*)$',
55
            'required' => false,
56
            'info' => 'Descrição da(s) operação(ões) a que se refere o valor informado no Campo 02 ' .
57
                '(DET_VALOR_AJ) ',
58
            'format' => ''
59
        ],
60
        'COD_CTA' => [
61
            'type' => 'string',
62
            'regex' => '^.{0,255}$',
63
            'required' => false,
64
            'info' => 'Código da conta contábil debitada/creditada ',
65
            'format' => ''
66
        ],
67
        'INFO_COMPL' => [
68
            'type' => 'string',
69
            'regex' => '^(.*)$',
70
            'required' => false,
71
            'info' => 'Informação complementar ',
72
            'format' => ''
73
        ],
74
75
    ];
76
77
    /**
78
     * Constructor
79
     * @param \stdClass $std
80
     */
81
    public function __construct(\stdClass $std)
82
    {
83
        parent::__construct(self::REG);
84
        $this->std = $this->standarize($std);
85
    }
86
}
87

src/Elements/Contribuicoes/M225.php 1 location

@@ 9-86 (lines=78) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class M225 extends Element implements ElementInterface
10
{
11
    const REG = 'M225';
12
    const LEVEL = 5;
13
    const PARENT = 'M220';
14
15
    protected $parameters = [
16
        'DET_VALOR_AJ' => [
17
            'type' => 'numeric',
18
            'regex' => '^\d+(\.\d*)?|\.\d+$',
19
            'required' => false,
20
            'info' => 'Detalhamento do valor da contribuição reduzida ou acrescida, informado no Campo 03 ' .
21
                '(VL_AJ) do registro M220. ',
22
            'format' => '15v2'
23
        ],
24
        'CST_PIS' => [
25
            'type' => 'string',
26
            'regex' => '^((0[1-9])|49|99)$',
27
            'required' => false,
28
            'info' => 'Código de Situação Tributária referente à operação detalhada neste registro. ',
29
            'format' => ''
30
        ],
31
        'DET_BC_CRED' => [
32
            'type' => 'numeric',
33
            'regex' => '^\d+(\.\d*)?|\.\d+$',
34
            'required' => false,
35
            'info' => 'Detalhamento da base de cálculo geradora de ajuste de contribuição ',
36
            'format' => '15v3'
37
        ],
38
        'DET_ALIQ' => [
39
            'type' => 'numeric',
40
            'regex' => '^\d+(\.\d*)?|\.\d+$',
41
            'required' => false,
42
            'info' => 'Detalhamento da alíquota a que se refere o ajuste de contribuição ',
43
            'format' => '8v4'
44
        ],
45
        'DT_OPER_AJ' => [
46
            'type' => 'string',
47
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
48
            'required' => false,
49
            'info' => 'Data da operação a que se refere o ajuste informado neste registro. ',
50
            'format' => ''
51
        ],
52
        'DESC_AJ' => [
53
            'type' => 'string',
54
            'regex' => '^(.*)$',
55
            'required' => false,
56
            'info' => 'Descrição da(s) operação(ões) a que se refere o valor informado no Campo 02 ' .
57
                '(DET_VALOR_AJ) ',
58
            'format' => ''
59
        ],
60
        'COD_CTA' => [
61
            'type' => 'string',
62
            'regex' => '^.{0,255}$',
63
            'required' => false,
64
            'info' => 'Código da conta contábil debitada/creditada ',
65
            'format' => ''
66
        ],
67
        'INFO_COMPL' => [
68
            'type' => 'string',
69
            'regex' => '^(.*)$',
70
            'required' => false,
71
            'info' => 'Informação complementar ',
72
            'format' => ''
73
        ],
74
75
    ];
76
77
    /**
78
     * Constructor
79
     * @param \stdClass $std
80
     */
81
    public function __construct(\stdClass $std)
82
    {
83
        parent::__construct(self::REG);
84
        $this->std = $this->standarize($std);
85
    }
86
}
87

src/Elements/Contribuicoes/M515.php 1 location

@@ 9-86 (lines=78) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class M515 extends Element implements ElementInterface
10
{
11
    const REG = 'M515';
12
    const LEVEL = 4;
13
    const PARENT = 'M510';
14
15
    protected $parameters = [
16
        'DET_VALOR_AJ' => [
17
            'type' => 'numeric',
18
            'regex' => '^\d+(\.\d*)?|\.\d+$',
19
            'required' => false,
20
            'info' => 'Detalhamento do valor do crédito reduzido ou acrescido, informado no Campo 03 (VL_AJ) do ' .
21
                'registro M510. ',
22
            'format' => '15v2'
23
        ],
24
        'CST_COFINS' => [
25
            'type' => 'string',
26
            'regex' => '^((5[0-6])|(6[0-6])|(7[0-5])|98|99)$',
27
            'required' => false,
28
            'info' => 'Código de Situação Tributária referente à operação detalhada neste registro. ',
29
            'format' => ''
30
        ],
31
        'DET_BC_CRED' => [
32
            'type' => 'numeric',
33
            'regex' => '^\d+(\.\d*)?|\.\d+$',
34
            'required' => false,
35
            'info' => 'Detalhamento da base de cálculo geradora de ajuste de crédito ',
36
            'format' => '15v3'
37
        ],
38
        'DET_ALIQ' => [
39
            'type' => 'numeric',
40
            'regex' => '^\d+(\.\d*)?|\.\d+$',
41
            'required' => false,
42
            'info' => 'Detalhamento da alíquota a que se refere o ajuste de crédito ',
43
            'format' => '8v4'
44
        ],
45
        'DT_OPER_AJ' => [
46
            'type' => 'string',
47
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
48
            'required' => false,
49
            'info' => 'Data da operação a que se refere o ajuste informado neste registro. ',
50
            'format' => ''
51
        ],
52
        'DESC_AJ' => [
53
            'type' => 'string',
54
            'regex' => '^(.*)$',
55
            'required' => false,
56
            'info' => 'Descrição da(s) operação(ões) a que se refere o valor informado no Campo 02 ' .
57
                '(DET_VALOR_AJ) ',
58
            'format' => ''
59
        ],
60
        'COD_CTA' => [
61
            'type' => 'string',
62
            'regex' => '^.{0,255}$',
63
            'required' => false,
64
            'info' => 'Código da conta contábil debitada/creditada ',
65
            'format' => ''
66
        ],
67
        'INFO_COMPL' => [
68
            'type' => 'string',
69
            'regex' => '^(.*)$',
70
            'required' => false,
71
            'info' => 'Informação complementar ',
72
            'format' => ''
73
        ],
74
75
    ];
76
77
    /**
78
     * Constructor
79
     * @param \stdClass $std
80
     */
81
    public function __construct(\stdClass $std)
82
    {
83
        parent::__construct(self::REG);
84
        $this->std = $this->standarize($std);
85
    }
86
}
87

src/Elements/Contribuicoes/M625.php 1 location

@@ 9-86 (lines=78) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class M625 extends Element implements ElementInterface
10
{
11
    const REG = 'M625';
12
    const LEVEL = 5;
13
    const PARENT = 'N620';
14
15
    protected $parameters = [
16
        'DET_VALOR_AJ' => [
17
            'type' => 'numeric',
18
            'regex' => '^\d+(\.\d*)?|\.\d+$',
19
            'required' => false,
20
            'info' => 'Detalhamento do valor da contribuição reduzida ou acrescida, informado no Campo 03 ' .
21
                '(VL_AJ) do registro M620. ',
22
            'format' => '15v2'
23
        ],
24
        'CST_COFINS' => [
25
            'type' => 'string',
26
            'regex' => '^((5[0-6])|(6[0-6])|(7[0-5])|98|99)$',
27
            'required' => false,
28
            'info' => 'Código de Situação Tributária referente à operação detalhada neste registro. ',
29
            'format' => ''
30
        ],
31
        'DET_BC_CRED' => [
32
            'type' => 'numeric',
33
            'regex' => '^\d+(\.\d*)?|\.\d+$',
34
            'required' => false,
35
            'info' => 'Detalhamento da base de cálculo geradora de ajuste de contribuição ',
36
            'format' => '15v3'
37
        ],
38
        'DET_ALIQ' => [
39
            'type' => 'numeric',
40
            'regex' => '^\d+(\.\d*)?|\.\d+$',
41
            'required' => false,
42
            'info' => 'Detalhamento da alíquota a que se refere o ajuste de contribuição ',
43
            'format' => '8v4'
44
        ],
45
        'DT_OPER_AJ' => [
46
            'type' => 'string',
47
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
48
            'required' => false,
49
            'info' => 'Data da operação a que se refere o ajuste informado neste registro. ',
50
            'format' => ''
51
        ],
52
        'DESC_AJ' => [
53
            'type' => 'string',
54
            'regex' => '^(.*)$',
55
            'required' => false,
56
            'info' => 'Descrição da(s) operação(ões) a que se refere o valor informado no Campo 02 ' .
57
                '(DET_VALOR_AJ) ',
58
            'format' => ''
59
        ],
60
        'COD_CTA' => [
61
            'type' => 'string',
62
            'regex' => '^.{0,255}$',
63
            'required' => false,
64
            'info' => 'Código da conta contábil debitada/creditada ',
65
            'format' => ''
66
        ],
67
        'INFO_COMPL' => [
68
            'type' => 'string',
69
            'regex' => '^(.*)$',
70
            'required' => false,
71
            'info' => 'Informação complementar ',
72
            'format' => ''
73
        ],
74
75
    ];
76
77
    /**
78
     * Constructor
79
     * @param \stdClass $std
80
     */
81
    public function __construct(\stdClass $std)
82
    {
83
        parent::__construct(self::REG);
84
        $this->std = $this->standarize($std);
85
    }
86
}
87

src/Elements/Contribuicoes/Z0140.php 1 location

@@ 9-84 (lines=76) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class Z0140 extends Element implements ElementInterface
10
{
11
    const REG = '0140';
12
    const LEVEL = 2;
13
    const PARENT = '000';
14
15
    protected $parameters = [
16
        'COD_EST' => [
17
            'type' => 'string',
18
            'regex' => '^.{0,60}$',
19
            'required' => false,
20
            'info' => 'Código de identificação do estabelecimento',
21
            'format' => ''
22
        ],
23
        'NOME' => [
24
            'type' => 'string',
25
            'regex' => '^.{0,100}$',
26
            'required' => false,
27
            'info' => 'Nome empresarial do estabelecimento',
28
            'format' => ''
29
        ],
30
        'CNPJ' => [
31
            'type' => 'string',
32
            'regex' => '^[0-9]{14}$',
33
            'required' => false,
34
            'info' => 'Número de inscrição do estabelecimento no CNPJ.',
35
            'format' => ''
36
        ],
37
        'UF' => [
38
            'type' => 'string',
39
            'regex' => '^.{2}$',
40
            'required' => false,
41
            'info' => 'Sigla da unidade da federação do estabelecimento.',
42
            'format' => ''
43
        ],
44
        'IE' => [
45
            'type' => 'string',
46
            'regex' => '^[0-9]{2,14}$',
47
            'required' => false,
48
            'info' => 'Inscrição Estadual do estabelecimento, se contribuinte de ICMS.',
49
            'format' => ''
50
        ],
51
        'COD_MUN' => [
52
            'type' => 'numeric',
53
            'regex' => '^(\d{7})$',
54
            'required' => false,
55
            'info' => 'Código do município do domicílio fiscal do estabelecimento, conforme a tabela IBGE',
56
            'format' => ''
57
        ],
58
        'IM' => [
59
            'type' => 'string',
60
            'regex' => '^(.*)$',
61
            'required' => false,
62
            'info' => 'Inscrição Municipal do estabelecimento, se contribuinte do ISS.',
63
            'format' => ''
64
        ],
65
        'SUFRAMA' => [
66
            'type' => 'string',
67
            'regex' => '^.{9}$',
68
            'required' => false,
69
            'info' => 'Inscrição do estabelecimento na Suframa',
70
            'format' => ''
71
        ],
72
73
    ];
74
75
    /**
76
     * Constructor
77
     * @param \stdClass $std
78
     */
79
    public function __construct(\stdClass $std)
80
    {
81
        parent::__construct(self::REG);
82
        $this->std = $this->standarize($std);
83
    }
84
}
85

src/Elements/Contribuicoes/Z0500.php 1 location

@@ 9-87 (lines=79) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class Z0500 extends Element implements ElementInterface
10
{
11
    const REG = '0500';
12
    const LEVEL = 2;
13
    const PARENT = '0001';
14
15
    protected $parameters = [
16
        'DT_ALT' => [
17
            'type' => 'string',
18
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
19
            'required' => false,
20
            'info' => 'Data da inclusão/alteração',
21
            'format' => ''
22
        ],
23
        'COD_NAT_CC' => [
24
            'type' => 'string',
25
            'regex' => '^(01|02|03|04|05|09)$',
26
            'required' => false,
27
            'info' => 'Código da natureza da conta/grupo de contas: 
28
            01 - Contas de ativo 02 - Contas de passivo; 03 - Patrimônio líquido; 
29
            04 - Contas de resultado; 05 - Contas de compensação; 09 - Outras.',
30
            'format' => ''
31
        ],
32
        'IND_CTA' => [
33
            'type' => 'string',
34
            'regex' => '^(S|A)$',
35
            'required' => false,
36
            'info' => 'Indicador do tipo de conta: S - Sintética (grupo de contas); A - Analítica (conta).',
37
            'format' => ''
38
        ],
39
        'NIVEL' => [
40
            'type' => 'numeric',
41
            'regex' => '^(\d{0,5})$',
42
            'required' => false,
43
            'info' => 'Nível da conta analítica/grupo de contas.',
44
            'format' => ''
45
        ],
46
        'COD_CTA' => [
47
            'type' => 'string',
48
            'regex' => '^.{0,255}$',
49
            'required' => false,
50
            'info' => 'Código da conta analítica/grupo de contas.',
51
            'format' => ''
52
        ],
53
        'NOME_CTA' => [
54
            'type' => 'string',
55
            'regex' => '^.{0,60}$',
56
            'required' => false,
57
            'info' => 'Nome da conta analítica/grupo de contas.',
58
            'format' => ''
59
        ],
60
        'COD_CTA_REF' => [
61
            'type' => 'string',
62
            'regex' => '^.{0,60}$',
63
            'required' => false,
64
            'info' => 'Código da conta correlacionada no Plano de Contas Referenciado, publicado pela RFB.',
65
            'format' => ''
66
        ],
67
        'CNPJ_EST' => [
68
            'type' => 'string',
69
            'regex' => '^[0-9]{14}$',
70
            'required' => false,
71
            'info' => 'CNPJ do estabelecimento, no caso da conta informada no 
72
            campo COD_CTA ser específica de um estabelecimento.',
73
            'format' => ''
74
        ],
75
76
    ];
77
78
    /**
79
     * Constructor
80
     * @param \stdClass $std
81
     */
82
    public function __construct(\stdClass $std)
83
    {
84
        parent::__construct(self::REG);
85
        $this->std = $this->standarize($std);
86
    }
87
}
88

src/Elements/Contribuicoes/Z1800.php 1 location

@@ 9-85 (lines=77) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class Z1800 extends Element implements ElementInterface
10
{
11
    const REG = '1800';
12
    const LEVEL = 2;
13
    const PARENT = '1001';
14
15
    protected $parameters = [
16
        'INC_IMOB' => [
17
            'type' => 'string',
18
            'regex' => '^.{0,90}$',
19
            'required' => false,
20
            'info' => 'Empreendimento objeto de Incorporação Imobiliária, optante pelo RET. ',
21
            'format' => ''
22
        ],
23
        'REC_RECEB_RET' => [
24
            'type' => 'numeric',
25
            'regex' => '^\d+(\.\d*)?|\.\d+$',
26
            'required' => false,
27
            'info' => 'Receitas recebidas pela incorporadora na venda das unidades imobiliárias que compõem a ' .
28
                'incorporação. ',
29
            'format' => '15v2'
30
        ],
31
        'REC_FIN_RET' => [
32
            'type' => 'numeric',
33
            'regex' => '^\d+(\.\d*)?|\.\d+$',
34
            'required' => false,
35
            'info' => 'Receitas Financeiras e Variações Monetárias decorrentes das vendas submetidas ao RET. ',
36
            'format' => '15v2'
37
        ],
38
        'BC_RET' => [
39
            'type' => 'numeric',
40
            'regex' => '^\d+(\.\d*)?|\.\d+$',
41
            'required' => false,
42
            'info' => 'Base de Cálculo do Recolhimento Unificado ',
43
            'format' => '15v2'
44
        ],
45
        'ALIQ_RET' => [
46
            'type' => 'numeric',
47
            'regex' => '^\d+(\.\d*)?|\.\d+$',
48
            'required' => false,
49
            'info' => 'Alíquota do Recolhimento Unificado. ',
50
            'format' => '6v2'
51
        ],
52
        'VL_REC_UNI' => [
53
            'type' => 'numeric',
54
            'regex' => '^\d+(\.\d*)?|\.\d+$',
55
            'required' => false,
56
            'info' => 'Valor do Recolhimento Unificado. ',
57
            'format' => '15v2'
58
        ],
59
        'DT_REC_UNI' => [
60
            'type' => 'string',
61
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
62
            'required' => false,
63
            'info' => 'Data do recolhimento unificado ',
64
            'format' => ''
65
        ],
66
        'COD_REC' => [
67
            'type' => 'string',
68
            'regex' => '^.{0,4}$',
69
            'required' => false,
70
            'info' => 'Código da Receita ',
71
            'format' => ''
72
        ],
73
74
    ];
75
76
    /**
77
     * Constructor
78
     * @param \stdClass $std
79
     */
80
    public function __construct(\stdClass $std)
81
    {
82
        parent::__construct(self::REG);
83
        $this->std = $this->standarize($std);
84
    }
85
}
86

src/Elements/ICMSIPI/C320.php 1 location

@@ 15-93 (lines=79) @@
12
 * não emitidas por ECF, e deve ser apresentado de forma agrupada na combinação CST_ICMS, CFOP e Alíquota de ICMS.
13
 * @package NFePHP\EFD\Elements\ICMSIPI
14
 */
15
class C320 extends Element implements ElementInterface
16
{
17
    const REG = 'C320';
18
    const LEVEL = 3;
19
    const PARENT = 'C300';
20
21
    protected $parameters = [
22
        'CST_ICMS' => [
23
            'type' => 'numeric',
24
            'regex' => '^(\d{3})$',
25
            'required' => false,
26
            'info' => 'Código da Situação Tributária,',
27
            'format' => ''
28
        ],
29
        'CFOP' => [
30
            'type' => 'numeric',
31
            'regex' => '^(\d{4})$',
32
            'required' => false,
33
            'info' => 'Código Fiscal de Operação e Prestação',
34
            'format' => ''
35
        ],
36
        'ALIQ_ICMS' => [
37
            'type' => 'numeric',
38
            'regex' => '^\d+(\.\d*)?|\.\d+$',
39
            'required' => false,
40
            'info' => 'Alíquota do ICMS',
41
            'format' => '6v2'
42
        ],
43
        'VL_OPR' => [
44
            'type' => 'numeric',
45
            'regex' => '^\d+(\.\d*)?|\.\d+$',
46
            'required' => false,
47
            'info' => 'Valor total acumulado das operações correspondentes '
48
                . 'à combinação de CST_ICMS, CFOP e alíquota do ICMS, incluídas '
49
                . 'as despesas acessórias e acréscimos.',
50
            'format' => '15v2'
51
        ],
52
        'VL_BC_ICMS' => [
53
            'type' => 'numeric',
54
            'regex' => '^\d+(\.\d*)?|\.\d+$',
55
            'required' => false,
56
            'info' => 'Valor acumulado da base de cálculo do ICMS, referente
57
            à combinação de CST_ICMS, CFOP, e alíquota do ICMS.',
58
            'format' => '15v2'
59
        ],
60
        'VL_ICMS' => [
61
            'type' => 'numeric',
62
            'regex' => '^\d+(\.\d*)?|\.\d+$',
63
            'required' => false,
64
            'info' => 'Valor acumulado do ICMS, referente à combinação de CST_ICMS, CFOP e alíquota do ICMS.',
65
            'format' => '15v2'
66
        ],
67
        'VL_RED_BC' => [
68
            'type' => 'numeric',
69
            'regex' => '^\d+(\.\d*)?|\.\d+$',
70
            'required' => false,
71
            'info' => 'Valor não tributado em função da redução da base de cálculo do ICMS,
72
            referente à combinação de CST_ICMS, CFOP, e alíquota do ICMS.',
73
            'format' => '15v2'
74
        ],
75
        'COD_OBS' => [
76
            'type' => 'string',
77
            'regex' => '^.{0,6}$',
78
            'required' => false,
79
            'info' => 'Código da observação do lançamento fiscal (campo 02 do Registro 0460)',
80
            'format' => ''
81
        ],
82
    ];
83
84
    /**
85
     * Constructor
86
     * @param \stdClass $std
87
     */
88
    public function __construct(\stdClass $std)
89
    {
90
        parent::__construct(self::REG);
91
        $this->std = $this->standarize($std);
92
    }
93
}
94

src/Elements/ICMSIPI/C390.php 1 location

@@ 16-93 (lines=78) @@
13
 * apresentado de forma agrupada na combinação CST_ICMS, CFOP e Alíquota de ICMS.
14
 * @package NFePHP\EFD\Elements\ICMSIPI
15
 */
16
class C390 extends Element implements ElementInterface
17
{
18
    const REG = 'C390';
19
    const LEVEL = 3;
20
    const PARENT = '';
21
22
    protected $parameters = [
23
        'CST_ICMS' => [
24
            'type' => 'numeric',
25
            'regex' => '^(\d{3})$',
26
            'required' => false,
27
            'info' => 'Código da Situação Tributária, conforme a Tabela indicada no item 4.3.1',
28
            'format' => ''
29
        ],
30
        'CFOP' => [
31
            'type' => 'numeric',
32
            'regex' => '^(5)(\d{3})$',
33
            'required' => false,
34
            'info' => 'Código Fiscal de Operação e Prestação',
35
            'format' => ''
36
        ],
37
        'ALIQ_ICMS' => [
38
            'type' => 'numeric',
39
            'regex' => '^\d+(\.\d*)?|\.\d+$',
40
            'required' => false,
41
            'info' => 'Alíquota do ICMS',
42
            'format' => '6v2'
43
        ],
44
        'VL_OPR' => [
45
            'type' => 'numeric',
46
            'regex' => '^\d+(\.\d*)?|\.\d+$',
47
            'required' => false,
48
            'info' => 'Valor total acumulado das operações correspondentes à combinação de CST_ICMS, 
49
            CFOP e alíquota do ICMS, incluídas as despesas acessórias e acréscimos.',
50
            'format' => '15v2'
51
        ],
52
        'VL_BC_ICMS' => [
53
            'type' => 'numeric',
54
            'regex' => '^\d+(\.\d*)?|\.\d+$',
55
            'required' => false,
56
            'info' => 'Valor acumulado da base de cálculo do ICMS, referente à combinação de CST_ICMS, 
57
            CFOP, e alíquota do ICMS.',
58
            'format' => '15v2'
59
        ],
60
        'VL_ICMS' => [
61
            'type' => 'numeric',
62
            'regex' => '^\d+(\.\d*)?|\.\d+$',
63
            'required' => false,
64
            'info' => 'Valor acumulado do ICMS, referente à combinação de CST_ICMS, CFOP e alíquota do ICMS.',
65
            'format' => '15v2'
66
        ],
67
        'VL_RED_BC' => [
68
            'type' => 'numeric',
69
            'regex' => '^\d+(\.\d*)?|\.\d+$',
70
            'required' => false,
71
            'info' => 'Valor não tributado em função da redução da base de cálculo do ICMS, referente à 
72
            combinação de CST_ICMS, CFOP, e alíquota do ICMS.',
73
            'format' => '15v2'
74
        ],
75
        'COD_OBS' => [
76
            'type' => 'string',
77
            'regex' => '^.{0,6}$',
78
            'required' => false,
79
            'info' => 'Código da observação do lançamento fiscal (campo 02 do Registro 0460)',
80
            'format' => ''
81
        ],
82
    ];
83
84
    /**
85
     * Constructor
86
     * @param \stdClass $std
87
     */
88
    public function __construct(\stdClass $std)
89
    {
90
        parent::__construct(self::REG);
91
        $this->std = $this->standarize($std);
92
    }
93
}
94

src/Elements/ICMSIPI/D190.php 1 location

@@ 9-83 (lines=75) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class D190 extends Element implements ElementInterface
10
{
11
    const REG = 'D190';
12
    const LEVEL = 3;
13
    const PARENT = '';
14
15
    protected $parameters = [
16
        'CST_ICMS' => [
17
            'type' => 'string',
18
            'regex' => '^[0-9]{3}$',
19
            'required' => true,
20
            'info' => 'Código da Situação Tributária',
21
            'format' => ''
22
        ],
23
        'CFOP' => [
24
            'type' => 'string',
25
            'regex' => '^[0-9]{4}$',
26
            'required' => true,
27
            'info' => 'Código Fiscal de Operação e Prestação',
28
            'format' => ''
29
        ],
30
        'ALIQ_ICMS' => [
31
            'type' => 'numeric',
32
            'regex' => '^\d+(\.\d*)?|\.\d+$',
33
            'required' => false,
34
            'info' => 'Alíquota do ICMS',
35
            'format' => '6v2'
36
        ],
37
        'VL_OPR' => [
38
            'type' => 'numeric',
39
            'regex' => '^\d+(\.\d*)?|\.\d+$',
40
            'required' => true,
41
            'info' => '“Valor da Operação',
42
            'format' => '15v2'
43
        ],
44
        'VL_BC_ICMS' => [
45
            'type' => 'numeric',
46
            'regex' => '^\d+(\.\d*)?|\.\d+$',
47
            'required' => true,
48
            'info' => 'Valor da base de cálculo do ICMS',
49
            'format' => '15v2'
50
        ],
51
        'VL_ICMS' => [
52
            'type' => 'numeric',
53
            'regex' => '^\d+(\.\d*)?|\.\d+$',
54
            'required' => true,
55
            'info' => 'Valor do ICMS',
56
            'format' => '15v2'
57
        ],
58
        'VL_RED_BC' => [
59
            'type' => 'numeric',
60
            'regex' => '^\d+(\.\d*)?|\.\d+$',
61
            'required' => true,
62
            'info' => 'Valor da redução da base de cálculo do ICMS',
63
            'format' => '15v2'
64
        ],
65
        'COD_OBS' => [
66
            'type' => 'string',
67
            'regex' => '^.{1,6}$',
68
            'required' => false,
69
            'info' => 'Código da observação do lançamento fiscal',
70
            'format' => ''
71
        ],
72
    ];
73
74
    /**
75
     * Constructor
76
     * @param \stdClass $std
77
     */
78
    public function __construct(\stdClass $std)
79
    {
80
        parent::__construct(self::REG);
81
        $this->std = $this->standarize($std);
82
    }
83
}
84

src/Elements/ICMSIPI/D695.php 1 location

@@ 9-83 (lines=75) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class D695 extends Element implements ElementInterface
10
{
11
    const REG = 'D695';
12
    const LEVEL = 2;
13
    const PARENT = '';
14
15
    protected $parameters = [
16
        'COD_MOD' => [
17
            'type' => 'string',
18
            'regex' => '^.{2}$',
19
            'required' => true,
20
            'info' => 'Código do modelo do documento fiscal, conforme a Tabela 4.1.1.',
21
            'format' => ''
22
        ],
23
        'SER' => [
24
            'type' => 'string',
25
            'regex' => '^.{1,4}$',
26
            'required' => true,
27
            'info' => 'Série do documento fiscal ',
28
            'format' => ''
29
        ],
30
        'NRO_ORD_INI' => [
31
            'type' => 'numeric',
32
            'regex' => '^(\d{9})$',
33
            'required' => true,
34
            'info' => 'Número de ordem inicial ',
35
            'format' => ''
36
        ],
37
        'NRO_ORD_FIN' => [
38
            'type' => 'numeric',
39
            'regex' => '^(\d{9})$',
40
            'required' => true,
41
            'info' => 'Número de ordem final ',
42
            'format' => ''
43
        ],
44
        'DT_DOC_INI' => [
45
            'type' => 'numeric',
46
            'regex' => '^(\d{8})$',
47
            'required' => true,
48
            'info' => 'Data de emissão inicial dos documentos ',
49
            'format' => ''
50
        ],
51
        'DT_DOC_FIN' => [
52
            'type' => 'numeric',
53
            'regex' => '^(\d{8})$',
54
            'required' => true,
55
            'info' => 'Data de emissão final dos documentos ',
56
            'format' => ''
57
        ],
58
        'NOM_MEST' => [
59
            'type' => 'string',
60
            'regex' => '^.{1,33}$',
61
            'required' => true,
62
            'info' => 'Nome do arquivo Mestre de Documento Fiscal',
63
            'format' => ''
64
        ],
65
        'CHV_COD_DIG' => [
66
            'type' => 'string',
67
            'regex' => '^.{1,32}$',
68
            'required' => true,
69
            'info' => 'Chave de codificação digital do arquivo Mestre de Documento Fiscal',
70
            'format' => ''
71
        ],
72
    ];
73
74
    /**
75
     * Constructor
76
     * @param \stdClass $std
77
     */
78
    public function __construct(\stdClass $std)
79
    {
80
        parent::__construct(self::REG);
81
        $this->std = $this->standarize($std);
82
    }
83
}
84