| @@ 9-64 (lines=56) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class C120 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'C120'; |
|
| 12 | const LEVEL = 3; |
|
| 13 | const PARENT = 'C001'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'COD_DOC_IMP' => [ |
|
| 17 | 'type' => 'string', |
|
| 18 | 'regex' => '^(1|0)$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Documento de importação: |
|
| 21 | 0 – Declaração de Importação; 1 – Declaração Simplificada de Importação.', |
|
| 22 | 'format' => '' |
|
| 23 | ], |
|
| 24 | 'NUM_DOC_IMP' => [ |
|
| 25 | 'type' => 'string', |
|
| 26 | 'regex' => '^.{0,10}$', |
|
| 27 | 'required' => false, |
|
| 28 | 'info' => 'Número do documento de Importação.', |
|
| 29 | 'format' => '' |
|
| 30 | ], |
|
| 31 | 'VL_PIS_IMP' => [ |
|
| 32 | 'type' => 'numeric', |
|
| 33 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 34 | 'required' => false, |
|
| 35 | 'info' => 'Valor pago de PIS na importação', |
|
| 36 | 'format' => '15v2' |
|
| 37 | ], |
|
| 38 | 'VL_COFINS_IMP' => [ |
|
| 39 | 'type' => 'numeric', |
|
| 40 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 41 | 'required' => false, |
|
| 42 | 'info' => 'Valor pago de COFINS na importação', |
|
| 43 | 'format' => '15v2' |
|
| 44 | ], |
|
| 45 | 'NUM_ACDRAW' => [ |
|
| 46 | 'type' => 'string', |
|
| 47 | 'regex' => '^.{0,20}$', |
|
| 48 | 'required' => false, |
|
| 49 | 'info' => 'Número do Ato Concessório do regime Drawback', |
|
| 50 | 'format' => '' |
|
| 51 | ], |
|
| 52 | ||
| 53 | ]; |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Constructor |
|
| 57 | * @param \stdClass $std |
|
| 58 | */ |
|
| 59 | public function __construct(\stdClass $std) |
|
| 60 | { |
|
| 61 | parent::__construct(self::REG); |
|
| 62 | $this->std = $this->standarize($std); |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 9-64 (lines=56) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class C199 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'C199'; |
|
| 12 | const LEVEL = 4; |
|
| 13 | const PARENT = 'C190'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'COD_DOC_IMP' => [ |
|
| 17 | 'type' => 'string', |
|
| 18 | 'regex' => '^(0|1)$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Documento de importação: |
|
| 21 | 0 – Declaração de Importação; 1 – Declaração Simplificada de Importação.', |
|
| 22 | 'format' => '' |
|
| 23 | ], |
|
| 24 | 'NUM_DOCIMP' => [ |
|
| 25 | 'type' => 'string', |
|
| 26 | 'regex' => '^.{0,10}$', |
|
| 27 | 'required' => false, |
|
| 28 | 'info' => 'Número do documento de Importação.', |
|
| 29 | 'format' => '' |
|
| 30 | ], |
|
| 31 | 'VL_PIS_IMP' => [ |
|
| 32 | 'type' => 'numeric', |
|
| 33 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 34 | 'required' => false, |
|
| 35 | 'info' => 'Valor pago de PIS na importação', |
|
| 36 | 'format' => '15v2' |
|
| 37 | ], |
|
| 38 | 'VL_COFINS_IMP' => [ |
|
| 39 | 'type' => 'numeric', |
|
| 40 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 41 | 'required' => false, |
|
| 42 | 'info' => 'Valor pago de COFINS na importação', |
|
| 43 | 'format' => '15v2' |
|
| 44 | ], |
|
| 45 | 'NUM_ACDRAW' => [ |
|
| 46 | 'type' => 'string', |
|
| 47 | 'regex' => '^.{0,20}$', |
|
| 48 | 'required' => false, |
|
| 49 | 'info' => 'Número do Ato Concessório do regime Drawback', |
|
| 50 | 'format' => '' |
|
| 51 | ], |
|
| 52 | ||
| 53 | ]; |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Constructor |
|
| 57 | * @param \stdClass $std |
|
| 58 | */ |
|
| 59 | public function __construct(\stdClass $std) |
|
| 60 | { |
|
| 61 | parent::__construct(self::REG); |
|
| 62 | $this->std = $this->standarize($std); |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 9-63 (lines=55) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class C860 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'C860'; |
|
| 12 | const LEVEL = 3; |
|
| 13 | const PARENT = 'C001'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'COD_MOD' => [ |
|
| 17 | 'type' => 'string', |
|
| 18 | 'regex' => '^(59)$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Código do modelo do documento fiscal, conforme a Tabela 4.1.1', |
|
| 21 | 'format' => '' |
|
| 22 | ], |
|
| 23 | 'NR_SAT' => [ |
|
| 24 | 'type' => 'numeric', |
|
| 25 | 'regex' => '^(\d{0,9})$', |
|
| 26 | 'required' => false, |
|
| 27 | 'info' => 'Número de Série do equipamento SAT', |
|
| 28 | 'format' => '' |
|
| 29 | ], |
|
| 30 | 'DT_DOC' => [ |
|
| 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 dos documentos fiscais', |
|
| 35 | 'format' => '' |
|
| 36 | ], |
|
| 37 | 'DOC_INI' => [ |
|
| 38 | 'type' => 'numeric', |
|
| 39 | 'regex' => '^(\d{0,9})$', |
|
| 40 | 'required' => false, |
|
| 41 | 'info' => 'Número do documento inicial', |
|
| 42 | 'format' => '' |
|
| 43 | ], |
|
| 44 | 'DOC_FIM' => [ |
|
| 45 | 'type' => 'numeric', |
|
| 46 | 'regex' => '^(\d{0,9})$', |
|
| 47 | 'required' => false, |
|
| 48 | 'info' => 'Número do documento final', |
|
| 49 | 'format' => '' |
|
| 50 | ], |
|
| 51 | ||
| 52 | ]; |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Constructor |
|
| 56 | * @param \stdClass $std |
|
| 57 | */ |
|
| 58 | public function __construct(\stdClass $std) |
|
| 59 | { |
|
| 60 | parent::__construct(self::REG); |
|
| 61 | $this->std = $this->standarize($std); |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||
| @@ 9-63 (lines=55) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class M350 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'M350'; |
|
| 12 | const LEVEL = 2; |
|
| 13 | const PARENT = 'M300'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'VL_TOT_FOL' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 18 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Valor Total da Folha de Salários ', |
|
| 21 | 'format' => '15v2' |
|
| 22 | ], |
|
| 23 | 'VL_EXC_BC' => [ |
|
| 24 | 'type' => 'numeric', |
|
| 25 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 26 | 'required' => false, |
|
| 27 | 'info' => 'Valor Total das Exclusões à Base de Cálculo ', |
|
| 28 | 'format' => '15v2' |
|
| 29 | ], |
|
| 30 | 'VL_TOT_BC' => [ |
|
| 31 | 'type' => 'numeric', |
|
| 32 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 33 | 'required' => false, |
|
| 34 | 'info' => 'Valor Total da Base de Cálculo ', |
|
| 35 | 'format' => '15v2' |
|
| 36 | ], |
|
| 37 | 'ALIQ_PIS_FOL' => [ |
|
| 38 | 'type' => 'numeric', |
|
| 39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 40 | 'required' => false, |
|
| 41 | 'info' => 'Alíquota do PIS/PASEP – Folha de Salários ', |
|
| 42 | 'format' => '6v2' |
|
| 43 | ], |
|
| 44 | 'VL_TOT_CONT_FOL' => [ |
|
| 45 | 'type' => 'numeric', |
|
| 46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 47 | 'required' => false, |
|
| 48 | 'info' => 'Valor Total da Contribuição Social sobre a Folha de Salários ', |
|
| 49 | 'format' => '15v2' |
|
| 50 | ], |
|
| 51 | ||
| 52 | ]; |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Constructor |
|
| 56 | * @param \stdClass $std |
|
| 57 | */ |
|
| 58 | public function __construct(\stdClass $std) |
|
| 59 | { |
|
| 60 | parent::__construct(self::REG); |
|
| 61 | $this->std = $this->standarize($std); |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||
| @@ 9-68 (lines=60) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class Z0145 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = '0145'; |
|
| 12 | const LEVEL = 3; |
|
| 13 | const PARENT = '0100'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'COD_INC_TRIB' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 18 | 'regex' => '^(1|2)$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Código indicador da incidência tributária no período: |
|
| 21 | 1 – Contribuição Previdenciária apurada no período, exclusivamente com base na Receita Bruta; |
|
| 22 | 2 – Contribuição Previdenciária apurada no período, com base na Receita Bruta e com base nas |
|
| 23 | Remunerações pagas, na forma dos nos incisos I e III do art. 22 da Lei no 8.212, de 1991.', |
|
| 24 | 'format' => '' |
|
| 25 | ], |
|
| 26 | 'VL_REC_TOT' => [ |
|
| 27 | 'type' => 'numeric', |
|
| 28 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 29 | 'required' => false, |
|
| 30 | 'info' => 'Valor da Receita Bruta Total da Pessoa Jurídica no Período', |
|
| 31 | 'format' => '15v2' |
|
| 32 | ], |
|
| 33 | 'VL_REC_ATIV' => [ |
|
| 34 | 'type' => 'numeric', |
|
| 35 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 36 | 'required' => false, |
|
| 37 | 'info' => 'Valor da Receita Bruta da(s) Atividade(s) Sujeita(s) à |
|
| 38 | Contribuição Previdenciária sobre a Receita Bruta', |
|
| 39 | 'format' => '15v2' |
|
| 40 | ], |
|
| 41 | 'VL_REC_DEMAIS_ATIV' => [ |
|
| 42 | 'type' => 'numeric', |
|
| 43 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 44 | 'required' => false, |
|
| 45 | 'info' => 'Valor da Receita Bruta da(s) Atividade(s) não Sujeita(s) à |
|
| 46 | Contribuição Previdenciária sobre a Receita Bruta', |
|
| 47 | 'format' => '15v2' |
|
| 48 | ], |
|
| 49 | 'INFO_COMPL' => [ |
|
| 50 | 'type' => 'string', |
|
| 51 | 'regex' => '^(.*)$', |
|
| 52 | 'required' => false, |
|
| 53 | 'info' => 'Informação complementar', |
|
| 54 | 'format' => '' |
|
| 55 | ], |
|
| 56 | ||
| 57 | ]; |
|
| 58 | ||
| 59 | /** |
|
| 60 | * Constructor |
|
| 61 | * @param \stdClass $std |
|
| 62 | */ |
|
| 63 | public function __construct(\stdClass $std) |
|
| 64 | { |
|
| 65 | parent::__construct(self::REG); |
|
| 66 | $this->std = $this->standarize($std); |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| @@ 16-69 (lines=54) @@ | ||
| 13 | * entradas, somente informar quando o emitente do cupom fiscal for o próprio informante do arquivo. |
|
| 14 | * @package NFePHP\EFD\Elements\ICMSIPI |
|
| 15 | */ |
|
| 16 | class C114 extends Element implements ElementInterface |
|
| 17 | { |
|
| 18 | const REG = 'C114'; |
|
| 19 | const LEVEL = 4; |
|
| 20 | const PARENT = 'C110'; |
|
| 21 | ||
| 22 | protected $parameters = [ |
|
| 23 | 'COD_MOD' => [ |
|
| 24 | 'type' => 'string', |
|
| 25 | 'regex' => '^(02|2D|2E)+$', |
|
| 26 | 'required' => true, |
|
| 27 | 'info' => 'Código do modelo do documento fiscalValor total do estoque', |
|
| 28 | 'format' => '' |
|
| 29 | ], |
|
| 30 | 'ECF_FAB' => [ |
|
| 31 | 'type' => 'string', |
|
| 32 | 'regex' => '^[A-z0-9]{1,21}+$', |
|
| 33 | 'required' => true, |
|
| 34 | 'info' => 'Número de série de fabricação do ECF', |
|
| 35 | 'format' => '' |
|
| 36 | ], |
|
| 37 | 'ECF_CX' => [ |
|
| 38 | 'type' => 'numeric', |
|
| 39 | 'regex' => '^[1-9]{1}([0-9]{1,2})?+$', |
|
| 40 | 'required' => true, |
|
| 41 | 'info' => 'Número do caixa atribuído ao ECF', |
|
| 42 | 'format' => '' |
|
| 43 | ], |
|
| 44 | 'NUM_DOC' => [ |
|
| 45 | 'type' => 'numeric', |
|
| 46 | 'regex' => '^[1-9]{1}([0-9]{1,8})?+$', |
|
| 47 | 'required' => true, |
|
| 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' => true, |
|
| 55 | 'info' => 'Data da emissão do documento fiscal', |
|
| 56 | 'format' => '' |
|
| 57 | ], |
|
| 58 | ]; |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Constructor |
|
| 62 | * @param \stdClass $std |
|
| 63 | */ |
|
| 64 | public function __construct(\stdClass $std) |
|
| 65 | { |
|
| 66 | parent::__construct(self::REG); |
|
| 67 | $this->std = $this->standarize($std); |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| @@ 16-69 (lines=54) @@ | ||
| 13 | * indicando operação de entrada. |
|
| 14 | * @package NFePHP\EFD\Elements\ICMSIPI |
|
| 15 | */ |
|
| 16 | class C120 extends Element implements ElementInterface |
|
| 17 | { |
|
| 18 | const REG = 'C120'; |
|
| 19 | const LEVEL = 3; |
|
| 20 | const PARENT = 'C100'; |
|
| 21 | ||
| 22 | protected $parameters = [ |
|
| 23 | 'COD_DOC_IMP' => [ |
|
| 24 | 'type' => 'string', |
|
| 25 | 'regex' => '^(0|1)+$', |
|
| 26 | 'required' => true, |
|
| 27 | 'info' => 'Documento de importação', |
|
| 28 | 'format' => '' |
|
| 29 | ], |
|
| 30 | 'NUM_DOC_IMP' => [ |
|
| 31 | 'type' => 'string', |
|
| 32 | 'regex' => '^([0-9]{10,12})+$', |
|
| 33 | 'required' => true, |
|
| 34 | 'info' => 'Número do documento de Importação', |
|
| 35 | 'format' => '' |
|
| 36 | ], |
|
| 37 | 'PIS_IMP' => [ |
|
| 38 | 'type' => 'numeric', |
|
| 39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 40 | 'required' => false, |
|
| 41 | 'info' => 'Valor pago de PIS na importação', |
|
| 42 | 'format' => '15v2' |
|
| 43 | ], |
|
| 44 | 'COFINS_IMP' => [ |
|
| 45 | 'type' => 'numeric', |
|
| 46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 47 | 'required' => false, |
|
| 48 | 'info' => 'Valor pago de COFINS na importação', |
|
| 49 | 'format' => '15v2' |
|
| 50 | ], |
|
| 51 | 'NUM_ACDRAW' => [ |
|
| 52 | 'type' => 'string', |
|
| 53 | 'regex' => '^([0-9]{1,20})$', |
|
| 54 | 'required' => false, |
|
| 55 | 'info' => 'Número do Ato Concessório do regime Drawback', |
|
| 56 | 'format' => '' |
|
| 57 | ], |
|
| 58 | ]; |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Constructor |
|
| 62 | * @param \stdClass $std |
|
| 63 | */ |
|
| 64 | public function __construct(\stdClass $std) |
|
| 65 | { |
|
| 66 | parent::__construct(self::REG); |
|
| 67 | $this->std = $this->standarize($std); |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| @@ 15-68 (lines=54) @@ | ||
| 12 | * operações interestaduais e nas operações com substituído intermediário. |
|
| 13 | * @package NFePHP\EFD\Elements\ICMSIPI |
|
| 14 | */ |
|
| 15 | class C179 extends Element implements ElementInterface |
|
| 16 | { |
|
| 17 | const REG = 'C179'; |
|
| 18 | const LEVEL = 4; |
|
| 19 | const PARENT = 'C170'; |
|
| 20 | ||
| 21 | protected $parameters = [ |
|
| 22 | 'BC_ST_ORIG_DEST' => [ |
|
| 23 | 'type' => 'numeric', |
|
| 24 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 25 | 'required' => false, |
|
| 26 | 'info' => 'Valor da base de cálculo ST na origem/destino em operações interestaduais.', |
|
| 27 | 'format' => '15v2' |
|
| 28 | ], |
|
| 29 | 'ICMS_ST_REP' => [ |
|
| 30 | 'type' => 'numeric', |
|
| 31 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 32 | 'required' => false, |
|
| 33 | 'info' => 'Valor do ICMS-ST a repassar/deduzir em operações interestaduais', |
|
| 34 | 'format' => '15v2' |
|
| 35 | ], |
|
| 36 | 'ICMS_ST_COMPL' => [ |
|
| 37 | 'type' => 'numeric', |
|
| 38 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 39 | 'required' => false, |
|
| 40 | 'info' => 'Valor do ICMS-ST a complementar à UF de destino', |
|
| 41 | 'format' => '15v2' |
|
| 42 | ], |
|
| 43 | 'BC_RET' => [ |
|
| 44 | 'type' => 'numeric', |
|
| 45 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 46 | 'required' => false, |
|
| 47 | 'info' => 'Valor da BC de retenção em remessa promovida por Substituído intermediário', |
|
| 48 | 'format' => '15v2' |
|
| 49 | ], |
|
| 50 | 'ICMS_RET' => [ |
|
| 51 | 'type' => 'numeric', |
|
| 52 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 53 | 'required' => false, |
|
| 54 | 'info' => 'Valor da parcela do imposto retido em remessa promovida por substituído intermediário', |
|
| 55 | 'format' => '' |
|
| 56 | ], |
|
| 57 | ]; |
|
| 58 | ||
| 59 | /** |
|
| 60 | * Constructor |
|
| 61 | * @param \stdClass $std |
|
| 62 | */ |
|
| 63 | public function __construct(\stdClass $std) |
|
| 64 | { |
|
| 65 | parent::__construct(self::REG); |
|
| 66 | $this->std = $this->standarize($std); |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| @@ 9-63 (lines=55) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class C860 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'C860'; |
|
| 12 | const LEVEL = 4; |
|
| 13 | const PARENT = 'C800'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'COD_MOD' => [ |
|
| 17 | 'type' => 'string', |
|
| 18 | 'regex' => '^.{1,2}$', |
|
| 19 | 'required' => true, |
|
| 20 | 'info' => 'Código do modelo do documento fiscal, conforme a Tabela', |
|
| 21 | 'format' => '' |
|
| 22 | ], |
|
| 23 | 'NR_SAT' => [ |
|
| 24 | 'type' => 'numeric', |
|
| 25 | 'regex' => '^(\d{1,9})$', |
|
| 26 | 'required' => true, |
|
| 27 | 'info' => 'Número de Série do equipamento SAT', |
|
| 28 | 'format' => '' |
|
| 29 | ], |
|
| 30 | 'DT_DOC' => [ |
|
| 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' => true, |
|
| 34 | 'info' => 'Data de emissão dos documentos fiscais', |
|
| 35 | 'format' => '' |
|
| 36 | ], |
|
| 37 | 'DOC_INI' => [ |
|
| 38 | 'type' => 'numeric', |
|
| 39 | 'regex' => '^(\d{1,6})$', |
|
| 40 | 'required' => true, |
|
| 41 | 'info' => 'Número do documento inicial', |
|
| 42 | 'format' => '' |
|
| 43 | ], |
|
| 44 | 'DOC_FIM' => [ |
|
| 45 | 'type' => 'numeric', |
|
| 46 | 'regex' => '^(\d{1,6})$', |
|
| 47 | 'required' => true, |
|
| 48 | 'info' => 'Número do documento final', |
|
| 49 | 'format' => '' |
|
| 50 | ], |
|
| 51 | ||
| 52 | ]; |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Constructor |
|
| 56 | * @param \stdClass $std |
|
| 57 | */ |
|
| 58 | public function __construct(\stdClass $std) |
|
| 59 | { |
|
| 60 | parent::__construct(self::REG); |
|
| 61 | $this->std = $this->standarize($std); |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||
| @@ 14-67 (lines=54) @@ | ||
| 11 | * REGISTRO C870: ITENS DO RESUMO DIÁRIO DOS DOCUMENTOS (CF-E-SAT) (CÓDIGO 59) |
|
| 12 | * @package NFePHP\EFD\Elements\ICMSIPI |
|
| 13 | */ |
|
| 14 | class C870 extends Element implements ElementInterface |
|
| 15 | { |
|
| 16 | const REG = 'C870'; |
|
| 17 | const LEVEL = 3; |
|
| 18 | const PARENT = 'C800'; |
|
| 19 | ||
| 20 | protected $parameters = [ |
|
| 21 | 'COD_ITEM' => [ |
|
| 22 | 'type' => 'string', |
|
| 23 | 'regex' => '^[0-9]{60}$', |
|
| 24 | 'required' => true, |
|
| 25 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
|
| 26 | 'format' => '' |
|
| 27 | ], |
|
| 28 | 'QTD' => [ |
|
| 29 | 'type' => 'numeric', |
|
| 30 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 31 | 'required' => true, |
|
| 32 | 'info' => 'Quantidade do item', |
|
| 33 | 'format' => '15v5' |
|
| 34 | ], |
|
| 35 | 'UNID' => [ |
|
| 36 | 'type' => 'string', |
|
| 37 | 'regex' => '^[0-9]{6}$', |
|
| 38 | 'required' => true, |
|
| 39 | 'info' => 'Unidade do item (Campo 02 do registro 0190)', |
|
| 40 | 'format' => '' |
|
| 41 | ], |
|
| 42 | 'CST_ICMS' => [ |
|
| 43 | 'type' => 'numeric', |
|
| 44 | 'regex' => '^(\d{1,3})$', |
|
| 45 | 'required' => true, |
|
| 46 | 'info' => 'Código da Situação Tributária, conforme a Tabela indicada no item 4.3.1', |
|
| 47 | 'format' => '' |
|
| 48 | ], |
|
| 49 | 'CFOP' => [ |
|
| 50 | 'type' => 'numeric', |
|
| 51 | 'regex' => '^(\d{1,4})$', |
|
| 52 | 'required' => true, |
|
| 53 | 'info' => 'Código Fiscal de Operação e Prestação do agrupamento de itens', |
|
| 54 | 'format' => '' |
|
| 55 | ], |
|
| 56 | ]; |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Constructor |
|
| 60 | * @param \stdClass $std |
|
| 61 | */ |
|
| 62 | public function __construct(\stdClass $std) |
|
| 63 | { |
|
| 64 | parent::__construct(self::REG); |
|
| 65 | $this->std = $this->standarize($std); |
|
| 66 | } |
|
| 67 | } |
|
| 68 | ||
| @@ 9-62 (lines=54) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class D370 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'D370'; |
|
| 12 | const LEVEL = 5; |
|
| 13 | const PARENT = ''; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'COD_MUN_ORIG' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 18 | 'regex' => '^[0-9]{7}$', |
|
| 19 | 'required' => true, |
|
| 20 | 'info' => 'Código do município de origem do serviço, conforme a tabela IBGE', |
|
| 21 | 'format' => '' |
|
| 22 | ], |
|
| 23 | 'VL_SERV' => [ |
|
| 24 | 'type' => 'numeric', |
|
| 25 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 26 | 'required' => true, |
|
| 27 | 'info' => 'Valor total da prestação de serviço', |
|
| 28 | 'format' => '15v2' |
|
| 29 | ], |
|
| 30 | 'QTD_BILH' => [ |
|
| 31 | 'type' => 'numeric', |
|
| 32 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 33 | 'required' => true, |
|
| 34 | 'info' => 'Quantidade de bilhetes emitidos', |
|
| 35 | 'format' => '' |
|
| 36 | ], |
|
| 37 | 'VL_BC_ICMS' => [ |
|
| 38 | 'type' => 'numeric', |
|
| 39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 40 | 'required' => true, |
|
| 41 | 'info' => 'Valor total da base de cálculo do ICMS', |
|
| 42 | 'format' => '15v2' |
|
| 43 | ], |
|
| 44 | 'VL_ICMS' => [ |
|
| 45 | 'type' => 'numeric', |
|
| 46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 47 | 'required' => true, |
|
| 48 | 'info' => 'Valor total do ICMS', |
|
| 49 | 'format' => '15v2' |
|
| 50 | ] |
|
| 51 | ]; |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Constructor |
|
| 55 | * @param \stdClass $std |
|
| 56 | */ |
|
| 57 | public function __construct(\stdClass $std) |
|
| 58 | { |
|
| 59 | parent::__construct(self::REG); |
|
| 60 | $this->std = $this->standarize($std); |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||
| @@ 28-81 (lines=54) @@ | ||
| 25 | * Nos casos em que a ordem de serviço não for identificada, o campo chave |
|
| 26 | * passa a ser COD_ITEM_ORI. |
|
| 27 | */ |
|
| 28 | class K210 extends Element implements ElementInterface |
|
| 29 | { |
|
| 30 | const REG = 'K210'; |
|
| 31 | const LEVEL = 3; |
|
| 32 | const PARENT = 'K200|K100'; |
|
| 33 | ||
| 34 | protected $parameters = [ |
|
| 35 | 'DT_INI_OS' => [ |
|
| 36 | 'type' => 'string', |
|
| 37 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
| 38 | 'required' => true, |
|
| 39 | 'info' => 'Data de início da ordem de serviço', |
|
| 40 | 'format' => '' |
|
| 41 | ], |
|
| 42 | 'DT_FIN_OS' => [ |
|
| 43 | 'type' => 'string', |
|
| 44 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
|
| 45 | 'required' => true, |
|
| 46 | 'info' => 'Data de conclusão da ordem de serviço', |
|
| 47 | 'format' => '' |
|
| 48 | ], |
|
| 49 | 'COD_DOC_OS' => [ |
|
| 50 | 'type' => 'string', |
|
| 51 | 'regex' => '^.{1,30}$', |
|
| 52 | 'required' => true, |
|
| 53 | 'info' => 'Código de identificação da ordem de serviço', |
|
| 54 | 'format' => '' |
|
| 55 | ], |
|
| 56 | 'COD_ITEM_ORI' => [ |
|
| 57 | 'type' => 'string', |
|
| 58 | 'regex' => '^.{1,60}$', |
|
| 59 | 'required' => true, |
|
| 60 | 'info' => 'Código do item de origem (campo 02 do Registro 0200)', |
|
| 61 | 'format' => '' |
|
| 62 | ], |
|
| 63 | 'QTD_ORI' => [ |
|
| 64 | 'type' => 'numeric', |
|
| 65 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 66 | 'required' => true, |
|
| 67 | 'info' => 'Quantidade de origem – saída do estoque', |
|
| 68 | 'format' => '15v6' |
|
| 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 | ||
| @@ 44-97 (lines=54) @@ | ||
| 41 | * Validação do Registro: A chave deste registro são os campos DT_MOV, |
|
| 42 | * COD_ITEM_ORI e COD_ITEM_DEST |
|
| 43 | */ |
|
| 44 | class K220 extends Element implements ElementInterface |
|
| 45 | { |
|
| 46 | const REG = 'K220'; |
|
| 47 | const LEVEL = 3; |
|
| 48 | const PARENT = 'K215|K210|K200|K100'; |
|
| 49 | ||
| 50 | protected $parameters = [ |
|
| 51 | 'DT_MOV' => [ |
|
| 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' => true, |
|
| 55 | 'info' => 'Data da movimentação interna', |
|
| 56 | 'format' => '' |
|
| 57 | ], |
|
| 58 | 'COD_ITEM_ORI' => [ |
|
| 59 | 'type' => 'string', |
|
| 60 | 'regex' => '^.{1,60}$', |
|
| 61 | 'required' => true, |
|
| 62 | 'info' => 'Código do item de origem (campo 02 do Registro 0200)', |
|
| 63 | 'format' => '' |
|
| 64 | ], |
|
| 65 | 'COD_ITEM_DEST' => [ |
|
| 66 | 'type' => 'string', |
|
| 67 | 'regex' => '^.{1,60}$', |
|
| 68 | 'required' => true, |
|
| 69 | 'info' => 'Código do item de destino (campo 02 do Registro 0200)', |
|
| 70 | 'format' => '' |
|
| 71 | ], |
|
| 72 | 'QTD_ORI' => [ |
|
| 73 | 'type' => 'numeric', |
|
| 74 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 75 | 'required' => true, |
|
| 76 | 'info' => 'Quantidade movimentada do item de origem', |
|
| 77 | 'format' => '15v6' |
|
| 78 | ], |
|
| 79 | 'QTD_DEST' => [ |
|
| 80 | 'type' => 'numeric', |
|
| 81 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 82 | 'required' => true, |
|
| 83 | 'info' => 'Quantidade movimentada do item de destino', |
|
| 84 | 'format' => '15v6' |
|
| 85 | ], |
|
| 86 | ]; |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Constructor |
|
| 90 | * @param \stdClass $std |
|
| 91 | */ |
|
| 92 | public function __construct(\stdClass $std) |
|
| 93 | { |
|
| 94 | parent::__construct(self::REG); |
|
| 95 | $this->std = $this->standarize($std); |
|
| 96 | } |
|
| 97 | } |
|
| 98 | ||
| @@ 9-62 (lines=54) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class K230 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'K230'; |
|
| 12 | const LEVEL = 3; |
|
| 13 | const PARENT = 'K100'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'DT_INI_OP' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 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 de início da ordem de produção', |
|
| 21 | 'format' => '' |
|
| 22 | ], |
|
| 23 | 'DT_FIN_OP' => [ |
|
| 24 | 'type' => 'numeric', |
|
| 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 conclusão da ordem de produção', |
|
| 28 | 'format' => '' |
|
| 29 | ], |
|
| 30 | 'COD_DOC_OP' => [ |
|
| 31 | 'type' => 'string', |
|
| 32 | 'regex' => '^.{1,60}$', |
|
| 33 | 'required' => true, |
|
| 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_ENC' => [ |
|
| 45 | 'type' => 'numeric', |
|
| 46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
|
| 47 | 'required' => true, |
|
| 48 | 'info' => 'Quantidade de produção acabada', |
|
| 49 | 'format' => '15v6' |
|
| 50 | ], |
|
| 51 | ]; |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Constructor |
|
| 55 | * @param \stdClass $std |
|
| 56 | */ |
|
| 57 | public function __construct(\stdClass $std) |
|
| 58 | { |
|
| 59 | parent::__construct(self::REG); |
|
| 60 | $this->std = $this->standarize($std); |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||