| @@ 15-76 (lines=62) @@ | ||
| 12 | * |
|
| 13 | * Alterar campos: val_debd / val_credd / val_deb_mf / val_cred_mf |
|
| 14 | */ |
|
| 15 | class I310 extends Element implements ElementInterface |
|
| 16 | { |
|
| 17 | const REG = 'I310'; |
|
| 18 | const LEVEL = 4; |
|
| 19 | const PARENT = ''; |
|
| 20 | ||
| 21 | protected $parameters = [ |
|
| 22 | 'cod_cta' => [ |
|
| 23 | 'type' => 'string', |
|
| 24 | 'regex' => '^[A-Za-z0-9]$', |
|
| 25 | 'required' => true, |
|
| 26 | 'info' => 'Código da conta analítica debitada/creditada.', |
|
| 27 | 'format' => '' |
|
| 28 | ], |
|
| 29 | 'cod_ccus' => [ |
|
| 30 | 'type' => 'string', |
|
| 31 | 'regex' => '^[A-Za-z0-9]$', |
|
| 32 | 'required' => false, |
|
| 33 | 'info' => 'Código do centro de custos.', |
|
| 34 | 'format' => '' |
|
| 35 | ], |
|
| 36 | 'val_debd' => [ |
|
| 37 | 'type' => 'string', |
|
| 38 | 'regex' => '^[0-9]{19}$', |
|
| 39 | 'required' => true, |
|
| 40 | 'info' => 'Total dos débitos do dia.', |
|
| 41 | 'format' => '' |
|
| 42 | ], |
|
| 43 | 'val_credd' => [ |
|
| 44 | 'type' => 'string', |
|
| 45 | 'regex' => '^[0-9]{19}$', |
|
| 46 | 'required' => true, |
|
| 47 | 'info' => 'Total dos créditos do dia.', |
|
| 48 | 'format' => '' |
|
| 49 | ], |
|
| 50 | 'val_deb_mf' => [ |
|
| 51 | 'type' => 'string', |
|
| 52 | 'regex' => '^[0-9]{19}$', |
|
| 53 | 'required' => false, |
|
| 54 | 'info' => 'Total dos débitos do dia em moeda funcional, convertido para reais.', |
|
| 55 | 'format' => '' |
|
| 56 | ], |
|
| 57 | 'val_cred_mf' => [ |
|
| 58 | 'type' => 'string', |
|
| 59 | 'regex' => '^[0-9]{19}$', |
|
| 60 | 'required' => false, |
|
| 61 | 'info' => 'Total dos créditos do dia em moeda funcional, convertido para reais.', |
|
| 62 | 'format' => '' |
|
| 63 | ] |
|
| 64 | ]; |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Constructor |
|
| 68 | * @param \stdClass $std |
|
| 69 | */ |
|
| 70 | public function __construct(\stdClass $std) |
|
| 71 | { |
|
| 72 | parent::__construct(self::REG); |
|
| 73 | $this->std = $this->standarize($std); |
|
| 74 | $this->postValidation(); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | ||
| @@ 13-74 (lines=62) @@ | ||
| 10 | * Elemento I510 do Bloco I OBRIGATÓRIO [1:1] |
|
| 11 | * REGISTRO I510: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA |
|
| 12 | */ |
|
| 13 | class I510 extends Element implements ElementInterface |
|
| 14 | { |
|
| 15 | const REG = 'I510'; |
|
| 16 | const LEVEL = 3; |
|
| 17 | const PARENT = ''; |
|
| 18 | ||
| 19 | protected $parameters = [ |
|
| 20 | 'nm_campo' => [ |
|
| 21 | 'type' => 'string', |
|
| 22 | 'regex' => '^[A-Za-z0-9]{16}$', |
|
| 23 | 'required' => true, |
|
| 24 | 'info' => 'Nome do campo, sem espaços em branco ou caractere especial.', |
|
| 25 | 'format' => '' |
|
| 26 | ], |
|
| 27 | 'desc_campo' => [ |
|
| 28 | 'type' => 'string', |
|
| 29 | 'regex' => '^[A-Za-z0-9]{50}$', |
|
| 30 | 'required' => true, |
|
| 31 | 'info' => 'Descrição do campo (utilizada na visualização do Livro Auxiliar).', |
|
| 32 | 'format' => '' |
|
| 33 | ], |
|
| 34 | 'tipo_campo' => [ |
|
| 35 | 'type' => 'string', |
|
| 36 | 'regex' => '^(N|C)$', |
|
| 37 | 'required' => true, |
|
| 38 | 'info' => 'Tipo do campo: N – Numérico; C – Caractere.', |
|
| 39 | 'format' => '' |
|
| 40 | ], |
|
| 41 | 'tam_campo' => [ |
|
| 42 | 'type' => 'numeric', |
|
| 43 | 'regex' => '^[0-9]{3}$', |
|
| 44 | 'required' => true, |
|
| 45 | 'info' => 'Tamanho da campo.', |
|
| 46 | 'format' => '' |
|
| 47 | ], |
|
| 48 | 'dec_campo' => [ |
|
| 49 | 'type' => 'numeric', |
|
| 50 | 'regex' => '^[0-9]{2}$', |
|
| 51 | 'required' => false, |
|
| 52 | 'info' => 'Quantidade de casas decimais para campos tipo “N”.', |
|
| 53 | 'format' => '' |
|
| 54 | ], |
|
| 55 | 'col_campo' => [ |
|
| 56 | 'type' => 'numeric', |
|
| 57 | 'regex' => '^[0-9]{3}$', |
|
| 58 | 'required' => true, |
|
| 59 | 'info' => 'Largura da coluna no relatório (em quantidade de caracteres).', |
|
| 60 | 'format' => '' |
|
| 61 | ] |
|
| 62 | ]; |
|
| 63 | ||
| 64 | /** |
|
| 65 | * Constructor |
|
| 66 | * @param \stdClass $std |
|
| 67 | */ |
|
| 68 | public function __construct(\stdClass $std) |
|
| 69 | { |
|
| 70 | parent::__construct(self::REG); |
|
| 71 | $this->std = $this->standarize($std); |
|
| 72 | $this->postValidation(); |
|
| 73 | } |
|
| 74 | } |
|
| 75 | ||
| @@ 15-77 (lines=63) @@ | ||
| 12 | * |
|
| 13 | * Alterar campos: vl_cta e vl_cta_mf |
|
| 14 | */ |
|
| 15 | class I355 extends Element implements ElementInterface |
|
| 16 | { |
|
| 17 | const REG = 'I355'; |
|
| 18 | const LEVEL = 4; |
|
| 19 | const PARENT = ''; |
|
| 20 | ||
| 21 | protected $parameters = [ |
|
| 22 | 'cod_cta' => [ |
|
| 23 | 'type' => 'string', |
|
| 24 | 'regex' => '^[A-Za-z0-9]$', |
|
| 25 | 'required' => true, |
|
| 26 | 'info' => 'Código da conta analítica de resultado.', |
|
| 27 | 'format' => '' |
|
| 28 | ], |
|
| 29 | 'cod_ccus' => [ |
|
| 30 | 'type' => 'string', |
|
| 31 | 'regex' => '^[A-Za-z0-9]$', |
|
| 32 | 'required' => false, |
|
| 33 | 'info' => 'Código do centro de custos.', |
|
| 34 | 'format' => '' |
|
| 35 | ], |
|
| 36 | 'vl_cta' => [ |
|
| 37 | 'type' => 'string', |
|
| 38 | 'regex' => '^[0-9]{19}$', |
|
| 39 | 'required' => true, |
|
| 40 | 'info' => 'Valor do saldo final antes do lançamento de encerramento.', |
|
| 41 | 'format' => '' |
|
| 42 | ], |
|
| 43 | 'ind_dc' => [ |
|
| 44 | 'type' => 'string', |
|
| 45 | 'regex' => '^(D|C)$', |
|
| 46 | 'required' => true, |
|
| 47 | 'info' => 'Indicador da situação do saldo final: D - Devedor; C - Credor.', |
|
| 48 | 'format' => '' |
|
| 49 | ], |
|
| 50 | 'vl_cta_mf' => [ |
|
| 51 | 'type' => 'string', |
|
| 52 | 'regex' => '^[0-9]{19}$', |
|
| 53 | 'required' => false, |
|
| 54 | 'info' => 'Valor do saldo final antes do lançamento de encerramento em moeda funcional,' |
|
| 55 | . ' convertido para reais.', |
|
| 56 | 'format' => '' |
|
| 57 | ], |
|
| 58 | 'ind_dc_mf' => [ |
|
| 59 | 'type' => 'string', |
|
| 60 | 'regex' => '^(D|C)$', |
|
| 61 | 'required' => false, |
|
| 62 | 'info' => 'Indicador da situação do saldo final em moeda funcional: D - Devedor; C - Credor.', |
|
| 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 | $this->postValidation(); |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||
| @@ 13-76 (lines=64) @@ | ||
| 10 | * Elemento K200 do Bloco K OBRIGATÓRIO [1:1] |
|
| 11 | * REGISTRO K200: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA |
|
| 12 | */ |
|
| 13 | class K200 extends Element implements ElementInterface |
|
| 14 | { |
|
| 15 | const REG = 'K200'; |
|
| 16 | const LEVEL = 3; |
|
| 17 | const PARENT = ''; |
|
| 18 | ||
| 19 | protected $parameters = [ |
|
| 20 | 'cod_nat' => [ |
|
| 21 | 'type' => 'string', |
|
| 22 | 'regex' => '^[A-Za-z0-9]{2}$', |
|
| 23 | 'required' => true, |
|
| 24 | 'info' => 'Código da natureza da conta/grupo de contas, conforme tabela publicada pelo Sped.', |
|
| 25 | 'format' => '' |
|
| 26 | ], |
|
| 27 | 'ind_cta' => [ |
|
| 28 | 'type' => 'string', |
|
| 29 | 'regex' => '^(S|A)$', |
|
| 30 | 'required' => true, |
|
| 31 | 'info' => 'Indicador do tipo de conta:' |
|
| 32 | . ' S - Sintética (grupo de contas);' |
|
| 33 | . ' A - Analítica (conta).', |
|
| 34 | 'format' => '' |
|
| 35 | ], |
|
| 36 | 'nivel' => [ |
|
| 37 | 'type' => 'numeric', |
|
| 38 | 'regex' => '^[0-9]$', |
|
| 39 | 'required' => true, |
|
| 40 | 'info' => 'Nível da conta.', |
|
| 41 | 'format' => '' |
|
| 42 | ], |
|
| 43 | 'cod_cta' => [ |
|
| 44 | 'type' => 'string', |
|
| 45 | 'regex' => '^[A-Za-z0-9]$', |
|
| 46 | 'required' => true, |
|
| 47 | 'info' => 'Código da conta.', |
|
| 48 | 'format' => '' |
|
| 49 | ], |
|
| 50 | 'cod_cta_sup' => [ |
|
| 51 | 'type' => 'string', |
|
| 52 | 'regex' => '^[A-Za-z0-9]$', |
|
| 53 | 'required' => false, |
|
| 54 | 'info' => 'Código da conta superior', |
|
| 55 | 'format' => '' |
|
| 56 | ], |
|
| 57 | 'cta' => [ |
|
| 58 | 'type' => 'string', |
|
| 59 | 'regex' => '^[A-Za-z0-9]$', |
|
| 60 | 'required' => true, |
|
| 61 | 'info' => 'Nome da conta.', |
|
| 62 | 'format' => '' |
|
| 63 | ] |
|
| 64 | ]; |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Constructor |
|
| 68 | * @param \stdClass $std |
|
| 69 | */ |
|
| 70 | public function __construct(\stdClass $std) |
|
| 71 | { |
|
| 72 | parent::__construct(self::REG); |
|
| 73 | $this->std = $this->standarize($std); |
|
| 74 | $this->postValidation(); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | ||