@@ 13-114 (lines=102) @@ | ||
10 | * Elemento J100 do Bloco J OBRIGATÓRIO [1:1] |
|
11 | * REGISTRO J100: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA |
|
12 | */ |
|
13 | class J100 extends Element implements ElementInterface |
|
14 | { |
|
15 | const REG = 'J100'; |
|
16 | const LEVEL = 3; |
|
17 | const PARENT = ''; |
|
18 | ||
19 | protected $parameters = [ |
|
20 | 'cod_agl' => [ |
|
21 | 'type' => 'string', |
|
22 | 'regex' => '^[A-Za-z0-9]$', |
|
23 | 'required' => true, |
|
24 | 'info' => 'Código de aglutinação atribuído pela pessoa jurídica.', |
|
25 | 'format' => '' |
|
26 | ], |
|
27 | 'ind_cod_agl' => [ |
|
28 | 'type' => 'string', |
|
29 | 'regex' => '^(T|D)$', |
|
30 | 'required' => true, |
|
31 | 'info' => 'Indicador do tipo de código de aglutinação das linhas:' |
|
32 | .' T – Totalizador (nível que totaliza um ou mais níveis inferiores da demonstração financeira)' |
|
33 | .' D – Detalhe (nível mais detalhado da demonstração financeira)', |
|
34 | 'format' => '' |
|
35 | ], |
|
36 | 'nivel_agl' => [ |
|
37 | 'type' => 'numeric', |
|
38 | 'regex' => '^[0-9]$', |
|
39 | 'required' => true, |
|
40 | 'info' => 'Nível do Código de aglutinação (mesmo conceito do plano de contas – Registro I050).', |
|
41 | 'format' => '' |
|
42 | ], |
|
43 | 'cod_agl_sup' => [ |
|
44 | 'type' => 'string', |
|
45 | 'regex' => '^[A-Za-z0-9]$', |
|
46 | 'required' => false, |
|
47 | 'info' => 'Código de aglutinação sintético/grupo de código de aglutinação de nível superior.', |
|
48 | 'format' => '' |
|
49 | ], |
|
50 | 'ind_grp_bal' => [ |
|
51 | 'type' => 'string', |
|
52 | 'regex' => '^(A|P)$', |
|
53 | 'required' => true, |
|
54 | 'info' => 'Indicador de grupo do balanço: A – Ativo; P – Passivo e Patrimônio Líquido.', |
|
55 | 'format' => '' |
|
56 | ], |
|
57 | 'descr_cod_agl' => [ |
|
58 | 'type' => 'string', |
|
59 | 'regex' => '^[A-Za-z0-9]$', |
|
60 | 'required' => true, |
|
61 | 'info' => 'Descrição do Código de aglutinação.', |
|
62 | 'format' => '' |
|
63 | ], |
|
64 | 'vl_cta_ini' => [ |
|
65 | 'type' => 'numeric', |
|
66 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
67 | 'required' => true, |
|
68 | 'info' => 'Valor inicial do código de aglutinação no Balanço Patrimonial no exercício ' |
|
69 | . 'informado, ou de período definido em norma específica.', |
|
70 | 'format' => '19v2' |
|
71 | ], |
|
72 | 'ind_dc_cta_ini' => [ |
|
73 | 'type' => 'string', |
|
74 | 'regex' => '^(D|C)$', |
|
75 | 'required' => true, |
|
76 | 'info' => 'Indicador da situação do saldo inicial informado no campo anterior: ' |
|
77 | . 'D - Devedor; C – Credor.', |
|
78 | 'format' => '' |
|
79 | ], |
|
80 | 'vl_cta_fin' => [ |
|
81 | 'type' => 'numeric', |
|
82 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
83 | 'required' => true, |
|
84 | 'info' => 'Valor final do código de aglutinação no Balanço Patrimonial no exercício informado, ' |
|
85 | . 'ou de período definido em norma específica.', |
|
86 | 'format' => '19v2' |
|
87 | ], |
|
88 | 'ind_dc_cta_fin' => [ |
|
89 | 'type' => 'string', |
|
90 | 'regex' => '^(D|C)$', |
|
91 | 'required' => true, |
|
92 | 'info' => 'Indicador da situação do saldo final informado no campo anterior: D - Devedor; C – Credor.', |
|
93 | 'format' => '' |
|
94 | ], |
|
95 | 'nota_exp_ref' => [ |
|
96 | 'type' => 'string', |
|
97 | 'regex' => '^[A-Za-z0-9]{12}$', |
|
98 | 'required' => false, |
|
99 | 'info' => 'Referência a numeração das notas explicativas relativas às demonstrações contábeis.', |
|
100 | 'format' => '' |
|
101 | ] |
|
102 | ]; |
|
103 | ||
104 | /** |
|
105 | * Constructor |
|
106 | * @param \stdClass $std |
|
107 | */ |
|
108 | public function __construct(\stdClass $std) |
|
109 | { |
|
110 | parent::__construct(self::REG); |
|
111 | $this->std = $this->standarize($std); |
|
112 | $this->postValidation(); |
|
113 | } |
|
114 | } |
|
115 |
@@ 15-114 (lines=100) @@ | ||
12 | * |
|
13 | * OBS.: Fazer verificacao de tamanho do campo ident_cpf_cnpj quando preencher os dados; |
|
14 | */ |
|
15 | class J930 extends Element implements ElementInterface |
|
16 | { |
|
17 | const REG = 'J930'; |
|
18 | const LEVEL = 3; |
|
19 | const PARENT = ''; |
|
20 | ||
21 | protected $parameters = [ |
|
22 | 'ident_nom' => [ |
|
23 | 'type' => 'string', |
|
24 | 'regex' => '^.{2,100}$', |
|
25 | 'required' => true, |
|
26 | 'info' => 'Nome do signatário.', |
|
27 | 'format' => '' |
|
28 | ], |
|
29 | 'ident_cpf_cnpj' => [ |
|
30 | 'type' => 'numeric', |
|
31 | 'regex' => '^[0-9]{11,14}$', |
|
32 | 'required' => true, |
|
33 | 'info' => 'CPF ou CNPJ', |
|
34 | 'format' => '' |
|
35 | ], |
|
36 | 'ident_qualif' => [ |
|
37 | 'type' => 'string', |
|
38 | 'regex' => '^[0-9]{3}$', |
|
39 | 'required' => true, |
|
40 | 'info' => 'Qualificação do assinante, conforme tabela.', |
|
41 | 'format' => '' |
|
42 | ], |
|
43 | 'cod_assin' => [ |
|
44 | 'type' => 'string', |
|
45 | 'regex' => '^[A-Za-z0-9]{3}$', |
|
46 | 'required' => true, |
|
47 | 'info' => 'Código de qualificação do assinante, conforme tabela.', |
|
48 | 'format' => '' |
|
49 | ], |
|
50 | 'ind_crc' => [ |
|
51 | 'type' => 'string', |
|
52 | 'regex' => '^[A-Za-z0-9]$', |
|
53 | 'required' => false, |
|
54 | 'info' => 'Número de inscrição do contabilista no Conselho Regional de Contabilidade.', |
|
55 | 'format' => '' |
|
56 | ], |
|
57 | 'email' => [ |
|
58 | 'type' => 'string', |
|
59 | 'regex' => '^.{2,250}$', |
|
60 | 'required' => false, |
|
61 | 'info' => 'Email do signatário.', |
|
62 | 'format' => '' |
|
63 | ], |
|
64 | 'fone' => [ |
|
65 | 'type' => 'string', |
|
66 | 'regex' => '^[0-9]{14}$', |
|
67 | 'required' => false, |
|
68 | 'info' => 'Telefone do signatário.', |
|
69 | 'format' => '' |
|
70 | ], |
|
71 | 'uf_crc' => [ |
|
72 | 'type' => 'string', |
|
73 | 'regex' => '^[A-Z]{2}$', |
|
74 | 'required' => false, |
|
75 | 'info' => 'Indicação da unidade da federação que expediu o CRC.', |
|
76 | 'format' => '' |
|
77 | ], |
|
78 | 'num_seq_crc' => [ |
|
79 | 'type' => 'string', |
|
80 | 'regex' => '^[0-9]$', |
|
81 | 'required' => false, |
|
82 | 'info' => 'Número da Certidão de Regularidade Profissional do Contador no ' |
|
83 | . 'seguinte formato: UF/ano/número', |
|
84 | 'format' => '' |
|
85 | ], |
|
86 | 'dt_crc' => [ |
|
87 | 'type' => 'string', |
|
88 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
89 | 'required' => false, |
|
90 | 'info' => 'Data de validade da Certidão de Regularidade Profissional do Contador.', |
|
91 | 'format' => '' |
|
92 | ], |
|
93 | 'ind_resp_legal' => [ |
|
94 | 'type' => 'string', |
|
95 | 'regex' => '^(S|N)$', |
|
96 | 'required' => true, |
|
97 | 'info' => 'Identificação do signatário que será validado como ' |
|
98 | .' responsável pela assinatura da ECD, conforme atos societários:' |
|
99 | .' S – Sim / N – Não', |
|
100 | 'format' => '' |
|
101 | ] |
|
102 | ]; |
|
103 | ||
104 | /** |
|
105 | * Constructor |
|
106 | * @param \stdClass $std |
|
107 | */ |
|
108 | public function __construct(\stdClass $std) |
|
109 | { |
|
110 | parent::__construct(self::REG); |
|
111 | $this->std = $this->standarize($std); |
|
112 | $this->postValidation(); |
|
113 | } |
|
114 | } |
|
115 |