@@ 9-77 (lines=69) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C180 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C180'; |
|
12 | const LEVEL = 3; |
|
13 | const PARENT = 'C001'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'COD_MOD' => [ |
|
17 | 'type' => 'string', |
|
18 | 'regex' => '^(55|65)$', |
|
19 | 'required' => false, |
|
20 | 'info' => 'Texto fixo contendo "55" ou “65”(Código da NF-e ou da NFC-e, conforme a Tabela 4.1.1)', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'DT_DOC_INI' => [ |
|
24 | 'type' => 'string', |
|
25 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
26 | 'required' => false, |
|
27 | 'info' => 'Data de Emissão Inicial dos Documentos', |
|
28 | 'format' => '' |
|
29 | ], |
|
30 | 'DT_DOC_FIN' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Data de Emissão Final dos Documentos', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'COD_ITEM' => [ |
|
38 | 'type' => 'string', |
|
39 | 'regex' => '^.{0,60}$', |
|
40 | 'required' => false, |
|
41 | 'info' => 'Código do Item (campo 02 do Registro 0200)', |
|
42 | 'format' => '' |
|
43 | ], |
|
44 | 'COD_NCM' => [ |
|
45 | 'type' => 'string', |
|
46 | 'regex' => '^.{8}$', |
|
47 | 'required' => false, |
|
48 | 'info' => 'Código da Nomenclatura Comum do Mercosul', |
|
49 | 'format' => '' |
|
50 | ], |
|
51 | 'EX_IPI' => [ |
|
52 | 'type' => 'string', |
|
53 | 'regex' => '^.{0,3}$', |
|
54 | 'required' => false, |
|
55 | 'info' => 'Código EX, conforme a TIPI', |
|
56 | 'format' => '' |
|
57 | ], |
|
58 | 'VL_TOT_ITEM' => [ |
|
59 | 'type' => 'numeric', |
|
60 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
61 | 'required' => false, |
|
62 | 'info' => 'Valor Total do Item', |
|
63 | 'format' => '15v2' |
|
64 | ], |
|
65 | ||
66 | ]; |
|
67 | ||
68 | /** |
|
69 | * Constructor |
|
70 | * @param \stdClass $std |
|
71 | */ |
|
72 | public function __construct(\stdClass $std) |
|
73 | { |
|
74 | parent::__construct(self::REG); |
|
75 | $this->std = $this->standarize($std); |
|
76 | } |
|
77 | } |
|
78 |
@@ 9-77 (lines=69) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C190 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C190'; |
|
12 | const LEVEL = 3; |
|
13 | const PARENT = 'C100'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'COD_MOD' => [ |
|
17 | 'type' => 'string', |
|
18 | 'regex' => '^(55)$', |
|
19 | 'required' => false, |
|
20 | 'info' => 'Texto fixo contendo "55" (Código da Nota Fiscal Eletrônica, modelo 55, conforme a Tabela 4.1.1)', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'DT_REF_INI' => [ |
|
24 | 'type' => 'string', |
|
25 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
26 | 'required' => false, |
|
27 | 'info' => 'Data Inicial de Referência da Consolidação', |
|
28 | 'format' => '' |
|
29 | ], |
|
30 | 'DT_REF_FIN' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Data Final de Referência da Consolidação', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'COD_ITEM' => [ |
|
38 | 'type' => 'string', |
|
39 | 'regex' => '^.{0,60}$', |
|
40 | 'required' => false, |
|
41 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
|
42 | 'format' => '' |
|
43 | ], |
|
44 | 'COD_NCM' => [ |
|
45 | 'type' => 'string', |
|
46 | 'regex' => '^.{8}$', |
|
47 | 'required' => false, |
|
48 | 'info' => 'Código da Nomenclatura Comum do Mercosul', |
|
49 | 'format' => '' |
|
50 | ], |
|
51 | 'EX_IPI' => [ |
|
52 | 'type' => 'string', |
|
53 | 'regex' => '^.{0,3}$', |
|
54 | 'required' => false, |
|
55 | 'info' => 'Código EX, conforme a TIPI', |
|
56 | 'format' => '' |
|
57 | ], |
|
58 | 'VL_TOT_ITEM' => [ |
|
59 | 'type' => 'numeric', |
|
60 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
61 | 'required' => false, |
|
62 | 'info' => 'Valor Total do Item', |
|
63 | 'format' => '15v2' |
|
64 | ], |
|
65 | ||
66 | ]; |
|
67 | ||
68 | /** |
|
69 | * Constructor |
|
70 | * @param \stdClass $std |
|
71 | */ |
|
72 | public function __construct(\stdClass $std) |
|
73 | { |
|
74 | parent::__construct(self::REG); |
|
75 | $this->std = $this->standarize($std); |
|
76 | } |
|
77 | } |
|
78 |
@@ 9-78 (lines=70) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C380 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C380'; |
|
12 | const LEVEL = 3; |
|
13 | const PARENT = 'C100'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'COD_MOD' => [ |
|
17 | 'type' => 'string', |
|
18 | 'regex' => '^(02)$', |
|
19 | 'required' => false, |
|
20 | 'info' => 'Código do modelo do documento fiscal, conforme a |
|
21 | Tabela 4.1.1 (Código 02 – Nota Fiscal de Venda a Consumidor)', |
|
22 | 'format' => '' |
|
23 | ], |
|
24 | 'DT_DOC_INI' => [ |
|
25 | 'type' => 'string', |
|
26 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
27 | 'required' => false, |
|
28 | 'info' => 'Data de Emissão Inicial dos Documentos', |
|
29 | 'format' => '' |
|
30 | ], |
|
31 | 'DT_DOC_FIN' => [ |
|
32 | 'type' => 'string', |
|
33 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
34 | 'required' => false, |
|
35 | 'info' => 'Data de Emissão Final dos Documentos', |
|
36 | 'format' => '' |
|
37 | ], |
|
38 | 'NUM_DOC_INI' => [ |
|
39 | 'type' => 'numeric', |
|
40 | 'regex' => '^(\d{0,6})$', |
|
41 | 'required' => false, |
|
42 | 'info' => 'Número do documento fiscal inicial', |
|
43 | 'format' => '' |
|
44 | ], |
|
45 | 'NUM_DOC_FIN' => [ |
|
46 | 'type' => 'numeric', |
|
47 | 'regex' => '^(\d{0,6})$', |
|
48 | 'required' => false, |
|
49 | 'info' => 'Número do documento fiscal final', |
|
50 | 'format' => '' |
|
51 | ], |
|
52 | 'VL_DOC' => [ |
|
53 | 'type' => 'numeric', |
|
54 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
55 | 'required' => false, |
|
56 | 'info' => 'Valor total dos documentos emitidos', |
|
57 | 'format' => '15v2' |
|
58 | ], |
|
59 | 'VL_DOC_CANC' => [ |
|
60 | 'type' => 'numeric', |
|
61 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
62 | 'required' => false, |
|
63 | 'info' => 'Valor total dos documentos cancelados', |
|
64 | 'format' => '15v2' |
|
65 | ], |
|
66 | ||
67 | ]; |
|
68 | ||
69 | /** |
|
70 | * Constructor |
|
71 | * @param \stdClass $std |
|
72 | */ |
|
73 | public function __construct(\stdClass $std) |
|
74 | { |
|
75 | parent::__construct(self::REG); |
|
76 | $this->std = $this->standarize($std); |
|
77 | } |
|
78 | } |
|
79 |
@@ 9-77 (lines=69) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C395 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C395'; |
|
12 | const LEVEL = 3; |
|
13 | const PARENT = 'C100'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'COD_MOD' => [ |
|
17 | 'type' => 'string', |
|
18 | 'regex' => '^(02|2D|2E|59|60|65)$', |
|
19 | 'required' => false, |
|
20 | 'info' => 'Código do modelo do documento fiscal, conforme a Tabela 4.1.1', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'COD_PART' => [ |
|
24 | 'type' => 'string', |
|
25 | 'regex' => '^.{0,60}$', |
|
26 | 'required' => false, |
|
27 | 'info' => 'Código do participante emitente do documento (campo 02 do Registro 0150).', |
|
28 | 'format' => '' |
|
29 | ], |
|
30 | 'SER' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^.{0,3}$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Série do documento fiscal', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'SUB_SER' => [ |
|
38 | 'type' => 'string', |
|
39 | 'regex' => '^.{0,3}$', |
|
40 | 'required' => false, |
|
41 | 'info' => 'Subsérie do documento fiscal', |
|
42 | 'format' => '' |
|
43 | ], |
|
44 | 'NUM_DOC' => [ |
|
45 | 'type' => 'string', |
|
46 | 'regex' => '^.{0,6}$', |
|
47 | 'required' => false, |
|
48 | 'info' => 'Número do documento fiscal', |
|
49 | 'format' => '' |
|
50 | ], |
|
51 | 'DT_DOC' => [ |
|
52 | 'type' => 'string', |
|
53 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
54 | 'required' => false, |
|
55 | 'info' => 'Data da emissão do documento fiscal', |
|
56 | 'format' => '' |
|
57 | ], |
|
58 | 'VL_DOC' => [ |
|
59 | 'type' => 'numeric', |
|
60 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
61 | 'required' => false, |
|
62 | 'info' => 'Valor total do documento fiscal', |
|
63 | 'format' => '15v2' |
|
64 | ], |
|
65 | ||
66 | ]; |
|
67 | ||
68 | /** |
|
69 | * Constructor |
|
70 | * @param \stdClass $std |
|
71 | */ |
|
72 | public function __construct(\stdClass $std) |
|
73 | { |
|
74 | parent::__construct(self::REG); |
|
75 | $this->std = $this->standarize($std); |
|
76 | } |
|
77 | } |
|
78 |
@@ 9-77 (lines=69) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C501 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C501'; |
|
12 | const LEVEL = 4; |
|
13 | const PARENT = 'C500'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'CST_PIS' => [ |
|
17 | 'type' => 'numeric', |
|
18 | 'regex' => '^((5[0-6])|(6[0-6])|(7[0-5])|98|99)$', |
|
19 | 'required' => false, |
|
20 | 'info' => 'Código da Situação Tributária referente ao PIS/PASEP', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'VL_ITEM' => [ |
|
24 | 'type' => 'numeric', |
|
25 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
26 | 'required' => false, |
|
27 | 'info' => 'Valor total dos itens', |
|
28 | 'format' => '15v2' |
|
29 | ], |
|
30 | 'NAT_BC_CRED' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^(01|02|04|13)$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Código da Base de Cálculo do Crédito, conforme a Tabela indicada no item 4.3.7.', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'VL_BC_PIS' => [ |
|
38 | 'type' => 'numeric', |
|
39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
40 | 'required' => false, |
|
41 | 'info' => 'Valor da base de cálculo do PIS/PASEP', |
|
42 | 'format' => '15v2' |
|
43 | ], |
|
44 | 'ALIQ_PIS' => [ |
|
45 | 'type' => 'numeric', |
|
46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
47 | 'required' => false, |
|
48 | 'info' => 'Alíquota do PIS/PASEP (em percentual)', |
|
49 | 'format' => '8v4' |
|
50 | ], |
|
51 | 'VL_PIS' => [ |
|
52 | 'type' => 'numeric', |
|
53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
54 | 'required' => false, |
|
55 | 'info' => 'Valor do PIS/PASEP', |
|
56 | 'format' => '15v2' |
|
57 | ], |
|
58 | 'COD_CTA' => [ |
|
59 | 'type' => 'string', |
|
60 | 'regex' => '^.{0,255}$', |
|
61 | 'required' => false, |
|
62 | 'info' => 'Código da conta analítica contábil debitada/creditada', |
|
63 | 'format' => '' |
|
64 | ], |
|
65 | ||
66 | ]; |
|
67 | ||
68 | /** |
|
69 | * Constructor |
|
70 | * @param \stdClass $std |
|
71 | */ |
|
72 | public function __construct(\stdClass $std) |
|
73 | { |
|
74 | parent::__construct(self::REG); |
|
75 | $this->std = $this->standarize($std); |
|
76 | } |
|
77 | } |
|
78 |
@@ 9-77 (lines=69) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C505 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C505'; |
|
12 | const LEVEL = 4; |
|
13 | const PARENT = 'C500'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'CST_COFINS' => [ |
|
17 | 'type' => 'numeric', |
|
18 | 'regex' => '^((5[0-6])|(6[0-6])|(7[0-5])|98|99)$', |
|
19 | 'required' => false, |
|
20 | 'info' => 'Código da Situação Tributária referente a COFINS', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'VL_ITEM' => [ |
|
24 | 'type' => 'numeric', |
|
25 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
26 | 'required' => false, |
|
27 | 'info' => 'Valor total dos itens', |
|
28 | 'format' => '15v2' |
|
29 | ], |
|
30 | 'NAT_BC_CRED' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^(01|02|04|13)$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Código da Base de Cálculo do Crédito, conforme a Tabela indicada no item 4.3.7', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'VL_BC_COFINS' => [ |
|
38 | 'type' => 'numeric', |
|
39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
40 | 'required' => false, |
|
41 | 'info' => 'Valor da base de cálculo da COFINS', |
|
42 | 'format' => '15v2' |
|
43 | ], |
|
44 | 'ALIQ_COFINS' => [ |
|
45 | 'type' => 'numeric', |
|
46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
47 | 'required' => false, |
|
48 | 'info' => 'Alíquota da COFINS (em percentual)', |
|
49 | 'format' => '8v4' |
|
50 | ], |
|
51 | 'VL_COFINS' => [ |
|
52 | 'type' => 'numeric', |
|
53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
54 | 'required' => false, |
|
55 | 'info' => 'Valor da COFINS', |
|
56 | 'format' => '15v2' |
|
57 | ], |
|
58 | 'COD_CTA' => [ |
|
59 | 'type' => 'string', |
|
60 | 'regex' => '^.{0,255}$', |
|
61 | 'required' => false, |
|
62 | 'info' => 'Código da conta analítica contábil debitada/creditada', |
|
63 | 'format' => '' |
|
64 | ], |
|
65 | ||
66 | ]; |
|
67 | ||
68 | /** |
|
69 | * Constructor |
|
70 | * @param \stdClass $std |
|
71 | */ |
|
72 | public function __construct(\stdClass $std) |
|
73 | { |
|
74 | parent::__construct(self::REG); |
|
75 | $this->std = $this->standarize($std); |
|
76 | } |
|
77 | } |
|
78 |
@@ 9-76 (lines=68) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C130 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C130'; |
|
12 | const LEVEL = 3; |
|
13 | const PARENT = 'C100'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'VL_SERV_NT' => [ |
|
17 | 'type' => 'numeric', |
|
18 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
19 | 'required' => true, |
|
20 | 'info' => 'Valor dos serviços sob não-incidência ou nãotributados pelo ICMS', |
|
21 | 'format' => '15v2' |
|
22 | ], |
|
23 | 'VL_BC_ISSQN' => [ |
|
24 | 'type' => 'numeric', |
|
25 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
26 | 'required' => true, |
|
27 | 'info' => 'Valor da base de cálculo do ISSQN', |
|
28 | 'format' => '15v2' |
|
29 | ], |
|
30 | 'VL_ISSQN' => [ |
|
31 | 'type' => 'numeric', |
|
32 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Valor do ISSQN', |
|
35 | 'format' => '15v2' |
|
36 | ], |
|
37 | 'VL_BC_IRRF' => [ |
|
38 | 'type' => 'numeric', |
|
39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
40 | 'required' => false, |
|
41 | 'info' => 'Valor da base de cálculo do Imposto de Renda Retido na Fonte', |
|
42 | 'format' => '15v2' |
|
43 | ], |
|
44 | 'VL_IRRF' => [ |
|
45 | 'type' => 'numeric', |
|
46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
47 | 'required' => false, |
|
48 | 'info' => 'Valor do Imposto de Renda - Retido na Fonte', |
|
49 | 'format' => '15v2' |
|
50 | ], |
|
51 | 'VL_BC_PREV' => [ |
|
52 | 'type' => 'numeric', |
|
53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
54 | 'required' => false, |
|
55 | 'info' => 'Valor da base de cálculo de retenção da Previdência Social', |
|
56 | 'format' => '15v2' |
|
57 | ], |
|
58 | 'VL_PREV' => [ |
|
59 | 'type' => 'numeric', |
|
60 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
61 | 'required' => false, |
|
62 | 'info' => 'Valor destacado para retenção da Previdência Social', |
|
63 | 'format' => '15v2' |
|
64 | ], |
|
65 | ]; |
|
66 | ||
67 | /** |
|
68 | * Constructor |
|
69 | * @param \stdClass $std |
|
70 | */ |
|
71 | public function __construct(\stdClass $std) |
|
72 | { |
|
73 | parent::__construct(self::REG); |
|
74 | $this->std = $this->standarize($std); |
|
75 | } |
|
76 | } |
|
77 |
@@ 9-76 (lines=68) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C197 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C197'; |
|
12 | const LEVEL = 4; |
|
13 | const PARENT = 'C190'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'COD_AJ' => [ |
|
17 | 'type' => 'string', |
|
18 | 'regex' => '^.{10}$', |
|
19 | 'required' => true, |
|
20 | 'info' => 'Código do ajustes/benefício/incentivo, conforme tabela indicada no item 5.3.', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'DESCR_COMPL_AJ' => [ |
|
24 | 'type' => 'string', |
|
25 | 'regex' => '^(.*)$', |
|
26 | 'required' => false, |
|
27 | 'info' => 'Descrição complementar do ajuste do documento fiscal', |
|
28 | 'format' => '' |
|
29 | ], |
|
30 | 'COD_ITEM' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^.{0,60}$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'VL_BC_ICMS' => [ |
|
38 | 'type' => 'numeric', |
|
39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
40 | 'required' => false, |
|
41 | 'info' => 'Base de cálculo do ICMS ou do ICMS ST', |
|
42 | 'format' => '15v2' |
|
43 | ], |
|
44 | 'ALIQ_ICMS' => [ |
|
45 | 'type' => 'numeric', |
|
46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
47 | 'required' => false, |
|
48 | 'info' => 'Alíquota do ICMS', |
|
49 | 'format' => '6v2' |
|
50 | ], |
|
51 | 'VL_ICMS' => [ |
|
52 | 'type' => 'numeric', |
|
53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
54 | 'required' => false, |
|
55 | 'info' => 'Valor do ICMS ou do ICMS ST', |
|
56 | 'format' => '15v2' |
|
57 | ], |
|
58 | 'VL_OUTROS' => [ |
|
59 | 'type' => 'numeric', |
|
60 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
61 | 'required' => false, |
|
62 | 'info' => 'Outros valores', |
|
63 | 'format' => '15v2' |
|
64 | ], |
|
65 | ]; |
|
66 | ||
67 | /** |
|
68 | * Constructor |
|
69 | * @param \stdClass $std |
|
70 | */ |
|
71 | public function __construct(\stdClass $std) |
|
72 | { |
|
73 | parent::__construct(self::REG); |
|
74 | $this->std = $this->standarize($std); |
|
75 | } |
|
76 | } |
|
77 |
@@ 14-81 (lines=68) @@ | ||
11 | * DOCUMENTO FISCAL |
|
12 | * @package NFePHP\EFD\Elements\ICMSIPI |
|
13 | */ |
|
14 | class C597 extends Element implements ElementInterface |
|
15 | { |
|
16 | const REG = 'C597'; |
|
17 | const LEVEL = 4; |
|
18 | const PARENT = 'C595'; |
|
19 | ||
20 | protected $parameters = [ |
|
21 | 'COD_AJ' => [ |
|
22 | 'type' => 'string', |
|
23 | 'regex' => '^[0-9]{10}$', |
|
24 | 'required' => true, |
|
25 | 'info' => 'Código do ajustes/benefício/incentivo, conforme tabela indicada no item 5.3.', |
|
26 | 'format' => '' |
|
27 | ], |
|
28 | 'DESCR_COMPL_AJ' => [ |
|
29 | 'type' => 'string', |
|
30 | 'regex' => '^[0-9]{0}$', |
|
31 | 'required' => true, |
|
32 | 'info' => 'Descrição complementar do ajuste do documento fiscal', |
|
33 | 'format' => '' |
|
34 | ], |
|
35 | 'COD_ITEM' => [ |
|
36 | 'type' => 'string', |
|
37 | 'regex' => '^[0-9]{60}$', |
|
38 | 'required' => true, |
|
39 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
|
40 | 'format' => '' |
|
41 | ], |
|
42 | 'VL_BC_ICMS' => [ |
|
43 | 'type' => 'numeric', |
|
44 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
45 | 'required' => true, |
|
46 | 'info' => 'Base de cálculo do ICMS ou do ICMS ST', |
|
47 | 'format' => '15v2' |
|
48 | ], |
|
49 | 'ALIQ_ICMS' => [ |
|
50 | 'type' => 'numeric', |
|
51 | 'regex' => '^[0-9]{6}$', |
|
52 | 'required' => true, |
|
53 | 'info' => 'Alíquota do ICMS', |
|
54 | 'format' => '' |
|
55 | ], |
|
56 | 'VL_ICMS' => [ |
|
57 | 'type' => 'numeric', |
|
58 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
59 | 'required' => true, |
|
60 | 'info' => 'Valor do ICMS ou do ICMS ST', |
|
61 | 'format' => '15v2' |
|
62 | ], |
|
63 | 'VL_OUTROS' => [ |
|
64 | 'type' => 'numeric', |
|
65 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
66 | 'required' => true, |
|
67 | 'info' => 'Outros valores', |
|
68 | 'format' => '15v2' |
|
69 | ] |
|
70 | ]; |
|
71 | ||
72 | /** |
|
73 | * Constructor |
|
74 | * @param \stdClass $std |
|
75 | */ |
|
76 | public function __construct(\stdClass $std) |
|
77 | { |
|
78 | parent::__construct(self::REG); |
|
79 | $this->std = $this->standarize($std); |
|
80 | } |
|
81 | } |
|
82 |
@@ 14-81 (lines=68) @@ | ||
11 | * REGISTRO C810: ITENS DO DOCUMENTO DO CUPOM FISCAL ELETRÔNICO – SAT (CF-E-SAT) (CÓDIGO 59): |
|
12 | * @package NFePHP\EFD\Elements\ICMSIPI |
|
13 | */ |
|
14 | class C810 extends Element implements ElementInterface |
|
15 | { |
|
16 | const REG = 'C810'; |
|
17 | const LEVEL = 3; |
|
18 | const PARENT = 'C800'; |
|
19 | ||
20 | protected $parameters = [ |
|
21 | 'NUM_ITEM' => [ |
|
22 | 'type' => 'numeric', |
|
23 | 'regex' => '^[0-9]{3}$', |
|
24 | 'required' => true, |
|
25 | 'info' => 'Número do item no documento fiscal', |
|
26 | 'format' => '' |
|
27 | ], |
|
28 | 'COD_ITEM' => [ |
|
29 | 'type' => 'string', |
|
30 | 'regex' => '^[0-9]{60}$', |
|
31 | 'required' => true, |
|
32 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
|
33 | 'format' => '' |
|
34 | ], |
|
35 | 'QTD' => [ |
|
36 | 'type' => 'numeric', |
|
37 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
38 | 'required' => true, |
|
39 | 'info' => 'Quantidade do item', |
|
40 | 'format' => '15v5' |
|
41 | ], |
|
42 | 'UNID' => [ |
|
43 | 'type' => 'string', |
|
44 | 'regex' => '^[0-9]{6}$', |
|
45 | 'required' => true, |
|
46 | 'info' => 'Unidade do item (Campo 02 do registro 0190)', |
|
47 | 'format' => '' |
|
48 | ], |
|
49 | 'VL_ITEM' => [ |
|
50 | 'type' => 'numeric', |
|
51 | 'regex' => '^[0-9]{2}$', |
|
52 | 'required' => true, |
|
53 | 'info' => 'Valor total do item (mercadorias ou serviços)', |
|
54 | 'format' => '' |
|
55 | ], |
|
56 | 'CST_ICMS' => [ |
|
57 | 'type' => 'string', |
|
58 | 'regex' => '^[0-9]{3}$', |
|
59 | 'required' => true, |
|
60 | 'info' => 'Código da Situação Tributária', |
|
61 | 'format' => '' |
|
62 | ], |
|
63 | 'CFOP' => [ |
|
64 | 'type' => 'string', |
|
65 | 'regex' => '^[0-9]{4}$', |
|
66 | 'required' => true, |
|
67 | 'info' => 'Código Fiscal de Operação e Prestação', |
|
68 | 'format' => '' |
|
69 | ], |
|
70 | ]; |
|
71 | ||
72 | /** |
|
73 | * Constructor |
|
74 | * @param \stdClass $std |
|
75 | */ |
|
76 | public function __construct(\stdClass $std) |
|
77 | { |
|
78 | parent::__construct(self::REG); |
|
79 | $this->std = $this->standarize($std); |
|
80 | } |
|
81 | } |
|
82 |
@@ 9-80 (lines=72) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class C890 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'C890'; |
|
12 | const LEVEL = 4; |
|
13 | const PARENT = ''; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'CST_ICMS' => [ |
|
17 | 'type' => 'numeric', |
|
18 | 'regex' => '^(\d{1,3})$', |
|
19 | 'required' => true, |
|
20 | 'info' => 'Código da Situação Tributária, conforme a Tabela indicada no item 4.3.1', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'CFOP' => [ |
|
24 | 'type' => 'numeric', |
|
25 | 'regex' => '^(\d{1,4})$', |
|
26 | 'required' => true, |
|
27 | 'info' => 'Código Fiscal de Operação e Prestação do agrupamento de itens', |
|
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 total do CF-e” na combinação de CST_ICMS, CFOP e ALÍQUOTA DO ICMS |
|
42 | , correspondente ao somatório do valor líquido dos itens.', |
|
43 | 'format' => '15v2' |
|
44 | ], |
|
45 | 'VL_BC_ICMS' => [ |
|
46 | 'type' => 'numeric', |
|
47 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
48 | 'required' => true, |
|
49 | 'info' => 'Valor acumulado da base de cálculo do ICMS, |
|
50 | referente à combinação de CST_ICMS, CFOP e ALÍQUOTA DO ICMS.', |
|
51 | 'format' => '15v2' |
|
52 | ], |
|
53 | 'VL_ICMS' => [ |
|
54 | 'type' => 'numeric', |
|
55 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
56 | 'required' => true, |
|
57 | 'info' => 'Parcela correspondente ao "Valor do ICMS" |
|
58 | referente à combinação de CST_ICMS, CFOP e alíquota do ICMS.', |
|
59 | 'format' => '15v2' |
|
60 | ], |
|
61 | 'COD_OBS' => [ |
|
62 | 'type' => 'string', |
|
63 | 'regex' => '^.{0,6}$', |
|
64 | 'required' => false, |
|
65 | 'info' => 'Código da observação do lançamento fiscal', |
|
66 | 'format' => '' |
|
67 | ], |
|
68 | ||
69 | ]; |
|
70 | ||
71 | /** |
|
72 | * Constructor |
|
73 | * @param \stdClass $std |
|
74 | */ |
|
75 | public function __construct(\stdClass $std) |
|
76 | { |
|
77 | parent::__construct(self::REG); |
|
78 | $this->std = $this->standarize($std); |
|
79 | } |
|
80 | } |
|
81 |
@@ 9-76 (lines=68) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class D160 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'D160'; |
|
12 | const LEVEL = 3; |
|
13 | const PARENT = ''; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'DESPACHO' => [ |
|
17 | 'type' => 'string', |
|
18 | 'regex' => '^[0-9]{0}$', |
|
19 | 'required' => true, |
|
20 | 'info' => 'Identificação do número do despacho', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'CNPJ_CPF_REM' => [ |
|
24 | 'type' => 'numeric', |
|
25 | 'regex' => '^[0-9]{14}$', |
|
26 | 'required' => true, |
|
27 | 'info' => 'CNPJ ou CPF do remetente das mercadorias que constam na nota fiscal', |
|
28 | 'format' => '' |
|
29 | ], |
|
30 | 'IE_REM' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^[0-9]{14}$', |
|
33 | 'required' => true, |
|
34 | 'info' => 'Inscrição Estadual do remetente das mercadorias que constam na nota fiscal', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'COD_MUN_ORI' => [ |
|
38 | 'type' => 'numeric', |
|
39 | 'regex' => '', |
|
40 | 'required' => true, |
|
41 | 'info' => 'Código do Município de origem, conforme tabela IBGE', |
|
42 | 'format' => '' |
|
43 | ], |
|
44 | 'CNPJ_CPF_DEST' => [ |
|
45 | 'type' => 'numeric', |
|
46 | 'regex' => '^[0-9]{14}$', |
|
47 | 'required' => true, |
|
48 | 'info' => 'CNPJ ou CPF do destinatário das mercadorias que constam na nota fiscal', |
|
49 | 'format' => '' |
|
50 | ], |
|
51 | 'IE_DEST' => [ |
|
52 | 'type' => 'string', |
|
53 | 'regex' => '^[0-9]{14}$', |
|
54 | 'required' => true, |
|
55 | 'info' => 'Inscrição Estadual do destinatário das mercadorias que constam na nota fiscal.', |
|
56 | 'format' => '' |
|
57 | ], |
|
58 | 'COD_MUN_DEST' => [ |
|
59 | 'type' => 'numeric', |
|
60 | 'regex' => '^[0-9]{7}$', |
|
61 | 'required' => true, |
|
62 | 'info' => 'Código do Município de destino, conforme tabela IBGE', |
|
63 | 'format' => '' |
|
64 | ] |
|
65 | ]; |
|
66 | ||
67 | /** |
|
68 | * Constructor |
|
69 | * @param \stdClass $std |
|
70 | */ |
|
71 | public function __construct(\stdClass $std) |
|
72 | { |
|
73 | parent::__construct(self::REG); |
|
74 | $this->std = $this->standarize($std); |
|
75 | } |
|
76 | } |
|
77 |
@@ 9-76 (lines=68) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class D197 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'D197'; |
|
12 | const LEVEL = 4; |
|
13 | const PARENT = ''; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'COD_AJ' => [ |
|
17 | 'type' => 'string', |
|
18 | 'regex' => '^[0-9]{10}$', |
|
19 | 'required' => true, |
|
20 | 'info' => 'Código do ajustes/benefício/incentivo, conforme tabela indicada no item 5.3', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'DESCR_COMPL_AJ' => [ |
|
24 | 'type' => 'string', |
|
25 | 'regex' => '^[0-9]{0}$', |
|
26 | 'required' => true, |
|
27 | 'info' => 'Descrição complementar do ajuste do documento fiscal', |
|
28 | 'format' => '' |
|
29 | ], |
|
30 | 'COD_ITEM' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^[0-9]{60}$', |
|
33 | 'required' => true, |
|
34 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'VL_BC_ICMS' => [ |
|
38 | 'type' => 'numeric', |
|
39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
40 | 'required' => true, |
|
41 | 'info' => 'Base de cálculo do ICMS ou do ICMS ST', |
|
42 | 'format' => '15v2' |
|
43 | ], |
|
44 | 'ALIQ_ICMS' => [ |
|
45 | 'type' => 'numeric', |
|
46 | 'regex' => '^[0-9]{6}$', |
|
47 | 'required' => true, |
|
48 | 'info' => 'Alíquota do ICMS', |
|
49 | 'format' => '' |
|
50 | ], |
|
51 | 'VL_ICMS' => [ |
|
52 | 'type' => 'numeric', |
|
53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
54 | 'required' => true, |
|
55 | 'info' => 'Valor do ICMS ou do ICMS ST', |
|
56 | 'format' => '15v2' |
|
57 | ], |
|
58 | 'VL_OUTROS' => [ |
|
59 | 'type' => 'numeric', |
|
60 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
61 | 'required' => true, |
|
62 | 'info' => 'Outros valores', |
|
63 | 'format' => '15v2' |
|
64 | ] |
|
65 | ]; |
|
66 | ||
67 | /** |
|
68 | * Constructor |
|
69 | * @param \stdClass $std |
|
70 | */ |
|
71 | public function __construct(\stdClass $std) |
|
72 | { |
|
73 | parent::__construct(self::REG); |
|
74 | $this->std = $this->standarize($std); |
|
75 | } |
|
76 | } |
|
77 |
@@ 9-76 (lines=68) @@ | ||
6 | use NFePHP\EFD\Common\ElementInterface; |
|
7 | use \stdClass; |
|
8 | ||
9 | class K270 extends Element implements ElementInterface |
|
10 | { |
|
11 | const REG = 'K270'; |
|
12 | const LEVEL = 3; |
|
13 | const PARENT = 'K100'; |
|
14 | ||
15 | protected $parameters = [ |
|
16 | 'DT_INI_AP' => [ |
|
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' => true, |
|
20 | 'info' => 'Data inicial do período de apuração', |
|
21 | 'format' => '' |
|
22 | ], |
|
23 | 'DT_FIN_AP' => [ |
|
24 | 'type' => 'string', |
|
25 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
26 | 'required' => true, |
|
27 | 'info' => 'Data final do período de apuração', |
|
28 | 'format' => '' |
|
29 | ], |
|
30 | 'COD_OP_OS' => [ |
|
31 | 'type' => 'string', |
|
32 | 'regex' => '^.{1,30}$', |
|
33 | 'required' => false, |
|
34 | 'info' => 'Código de identificação da ordem de produção', |
|
35 | 'format' => '' |
|
36 | ], |
|
37 | 'COD_ITEM' => [ |
|
38 | 'type' => 'string', |
|
39 | 'regex' => '^.{1,60}$', |
|
40 | 'required' => true, |
|
41 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
|
42 | 'format' => '' |
|
43 | ], |
|
44 | 'QTD_COR_POS' => [ |
|
45 | 'type' => 'numeric', |
|
46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
47 | 'required' => true, |
|
48 | 'info' => 'Quantidade de correção positiva de apontamento', |
|
49 | 'format' => '15v3' |
|
50 | ], |
|
51 | 'QTD_COR_NEG' => [ |
|
52 | 'type' => 'numeric', |
|
53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
54 | 'required' => true, |
|
55 | 'info' => 'Quantidade de correção negativa de apontamento', |
|
56 | 'format' => '15v3' |
|
57 | ], |
|
58 | 'ORIGEM' => [ |
|
59 | 'type' => 'string', |
|
60 | 'regex' => '^[1-9]{}1$', |
|
61 | 'required' => true, |
|
62 | 'info' => 'Codigo de origem', |
|
63 | 'format' => '' |
|
64 | ] |
|
65 | ]; |
|
66 | ||
67 | /** |
|
68 | * Constructor |
|
69 | * @param \stdClass $std |
|
70 | */ |
|
71 | public function __construct(\stdClass $std) |
|
72 | { |
|
73 | parent::__construct(self::REG); |
|
74 | $this->std = $this->standarize($std); |
|
75 | } |
|
76 | } |
|
77 |