| @@ 8-36 (lines=29) @@ | ||
| 5 | use NFePHP\EFD\Common\Element; |
|
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | ||
| 8 | class D001 extends Element implements ElementInterface |
|
| 9 | { |
|
| 10 | const REG = 'D001'; |
|
| 11 | const LEVEL = 1; |
|
| 12 | const PARENT = '0000'; |
|
| 13 | ||
| 14 | protected $parameters = [ |
|
| 15 | 'IND_MOV' => [ |
|
| 16 | 'type' => 'string', |
|
| 17 | 'regex' => '^(0|1)$', |
|
| 18 | 'required' => false, |
|
| 19 | 'info' => 'Indicador de movimento' . |
|
| 20 | ' 0- Bloco com dados informados' . |
|
| 21 | ' 1- Bloco sem dados informados', |
|
| 22 | 'format' => '' |
|
| 23 | ], |
|
| 24 | ||
| 25 | ]; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Constructor |
|
| 29 | * @param \stdClass $std |
|
| 30 | */ |
|
| 31 | public function __construct(\stdClass $std) |
|
| 32 | { |
|
| 33 | parent::__construct(self::REG); |
|
| 34 | $this->std = $this->standarize($std); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 9-37 (lines=29) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class M001 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'M001'; |
|
| 12 | const LEVEL = 2; |
|
| 13 | const PARENT = '0000'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'IND_MOV' => [ |
|
| 17 | 'type' => 'string', |
|
| 18 | 'regex' => '^(0|1)$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Indicador de movimento ' . |
|
| 21 | ' 0- Bloco com dados informados ' . |
|
| 22 | ' 1- Bloco sem dados informados ', |
|
| 23 | 'format' => '' |
|
| 24 | ], |
|
| 25 | ||
| 26 | ]; |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Constructor |
|
| 30 | * @param \stdClass $std |
|
| 31 | */ |
|
| 32 | public function __construct(\stdClass $std) |
|
| 33 | { |
|
| 34 | parent::__construct(self::REG); |
|
| 35 | $this->std = $this->standarize($std); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| @@ 9-37 (lines=29) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class P001 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'P001'; |
|
| 12 | const LEVEL = 1; |
|
| 13 | const PARENT = '0000'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'IND_MOV' => [ |
|
| 17 | 'type' => 'string', |
|
| 18 | 'regex' => '^(0|1)$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Indicador de movimento ' . |
|
| 21 | ' 0 - Bloco com dados informados ' . |
|
| 22 | ' 1 - Bloco sem dados informados ', |
|
| 23 | 'format' => '' |
|
| 24 | ], |
|
| 25 | ||
| 26 | ]; |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Constructor |
|
| 30 | * @param \stdClass $std |
|
| 31 | */ |
|
| 32 | public function __construct(\stdClass $std) |
|
| 33 | { |
|
| 34 | parent::__construct(self::REG); |
|
| 35 | $this->std = $this->standarize($std); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| @@ 9-37 (lines=29) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class Z1001 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = '1001'; |
|
| 12 | const LEVEL = 2; |
|
| 13 | const PARENT = '0000'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'IND_MOV' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 18 | 'regex' => '^(0|1)$', |
|
| 19 | 'required' => false, |
|
| 20 | 'info' => 'Indicador de movimento ' . |
|
| 21 | ' 0 - Bloco com dados informados ' . |
|
| 22 | ' 1 - Bloco sem dados informados ', |
|
| 23 | 'format' => '' |
|
| 24 | ], |
|
| 25 | ||
| 26 | ]; |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Constructor |
|
| 30 | * @param \stdClass $std |
|
| 31 | */ |
|
| 32 | public function __construct(\stdClass $std) |
|
| 33 | { |
|
| 34 | parent::__construct(self::REG); |
|
| 35 | $this->std = $this->standarize($std); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| @@ 9-36 (lines=28) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class C001 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'C001'; |
|
| 12 | const LEVEL = 1; |
|
| 13 | const PARENT = ''; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'IND_MOV' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 18 | 'regex' => '^[0-1]{1}$', |
|
| 19 | 'required' => true, |
|
| 20 | 'info' => 'Indicador de movimento: ' |
|
| 21 | . '0- Bloco com dados informados; ' |
|
| 22 | . '1- Bloco sem dados informados', |
|
| 23 | 'format' => '' |
|
| 24 | ] |
|
| 25 | ]; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Constructor |
|
| 29 | * @param \stdClass $std |
|
| 30 | */ |
|
| 31 | public function __construct(\stdClass $std) |
|
| 32 | { |
|
| 33 | parent::__construct(self::REG); |
|
| 34 | $this->std = $this->standarize($std); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 18-45 (lines=28) @@ | ||
| 15 | * Validação do Registro: registro obrigatório e único. Se o campo IND_MOV tiver valor igual a 1 (um), só devem |
|
| 16 | * ser informados este registro de abertura e o registro D990, que é o registro de fechamento do Bloco D. |
|
| 17 | */ |
|
| 18 | class D001 extends Element implements ElementInterface |
|
| 19 | { |
|
| 20 | const REG = 'D001'; |
|
| 21 | const LEVEL = 1; |
|
| 22 | const PARENT = ''; |
|
| 23 | ||
| 24 | protected $parameters = [ |
|
| 25 | 'IND_MOV' => [ |
|
| 26 | 'type' => 'numeric', |
|
| 27 | 'regex' => '^[0-1]{1}$', |
|
| 28 | 'required' => true, |
|
| 29 | 'info' => 'Indicador de movimento: ' |
|
| 30 | . '0- Bloco com dados informados; ' |
|
| 31 | . '1- Bloco sem dados informados', |
|
| 32 | 'format' => '' |
|
| 33 | ] |
|
| 34 | ]; |
|
| 35 | ||
| 36 | /** |
|
| 37 | * Constructor |
|
| 38 | * @param \stdClass $std |
|
| 39 | */ |
|
| 40 | public function __construct(\stdClass $std) |
|
| 41 | { |
|
| 42 | parent::__construct(self::REG); |
|
| 43 | $this->std = $this->standarize($std); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||
| @@ 9-36 (lines=28) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class E001 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'E001'; |
|
| 12 | const LEVEL = 1; |
|
| 13 | const PARENT = ''; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'IND_MOV' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 18 | 'regex' => '^[0|1]{1}$', |
|
| 19 | 'required' => true, |
|
| 20 | 'info' => 'Indicador de movimento:' |
|
| 21 | . '0- Bloco com dados informados;' |
|
| 22 | . '1- Bloco sem dados informados', |
|
| 23 | 'format' => '' |
|
| 24 | ] |
|
| 25 | ]; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Constructor |
|
| 29 | * @param \stdClass $std |
|
| 30 | */ |
|
| 31 | public function __construct(\stdClass $std) |
|
| 32 | { |
|
| 33 | parent::__construct(self::REG); |
|
| 34 | $this->std = $this->standarize($std); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 19-46 (lines=28) @@ | ||
| 16 | * caso apresente o inventário de 31/12 na EFD ICMS IPI de dezembro ou janeiro, |
|
| 17 | * deve repetir a informação na escrituração de fevereiro. |
|
| 18 | */ |
|
| 19 | class G001 extends Element implements ElementInterface |
|
| 20 | { |
|
| 21 | const REG = 'G001'; |
|
| 22 | const LEVEL = 1; |
|
| 23 | const PARENT = ''; |
|
| 24 | ||
| 25 | protected $parameters = [ |
|
| 26 | 'IND_MOV' => [ |
|
| 27 | 'type' => 'numeric', |
|
| 28 | 'regex' => '^[0-1]{1}$', |
|
| 29 | 'required' => true, |
|
| 30 | 'info' => 'Indicador de movimento: ' |
|
| 31 | . '0- Bloco com dados informados; ' |
|
| 32 | . '1- Bloco sem dados informados', |
|
| 33 | 'format' => '' |
|
| 34 | ] |
|
| 35 | ]; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Constructor |
|
| 39 | * @param \stdClass $std |
|
| 40 | */ |
|
| 41 | public function __construct(\stdClass $std) |
|
| 42 | { |
|
| 43 | parent::__construct(self::REG); |
|
| 44 | $this->std = $this->standarize($std); |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| @@ 19-46 (lines=28) @@ | ||
| 16 | * caso apresente o inventário de 31/12 na EFD ICMS IPI de dezembro ou janeiro, |
|
| 17 | * deve repetir a informação na escrituração de fevereiro. |
|
| 18 | */ |
|
| 19 | class H001 extends Element implements ElementInterface |
|
| 20 | { |
|
| 21 | const REG = 'H001'; |
|
| 22 | const LEVEL = 0; |
|
| 23 | const PARENT = ''; |
|
| 24 | ||
| 25 | protected $parameters = [ |
|
| 26 | 'IND_MOV' => [ |
|
| 27 | 'type' => 'numeric', |
|
| 28 | 'regex' => '^[0-1]{1}$', |
|
| 29 | 'required' => true, |
|
| 30 | 'info' => 'Indicador de movimento: ' |
|
| 31 | . '0- Bloco com dados informados; ' |
|
| 32 | . '1- Bloco sem dados informados', |
|
| 33 | 'format' => '' |
|
| 34 | ] |
|
| 35 | ]; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Constructor |
|
| 39 | * @param \stdClass $std |
|
| 40 | */ |
|
| 41 | public function __construct(\stdClass $std) |
|
| 42 | { |
|
| 43 | parent::__construct(self::REG); |
|
| 44 | $this->std = $this->standarize($std); |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| @@ 9-36 (lines=28) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class Z1001 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = '1001'; |
|
| 12 | const LEVEL = 1; |
|
| 13 | const PARENT = ''; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'IND_MOV' => [ |
|
| 17 | 'type' => 'numeric', |
|
| 18 | 'regex' => '^[0|1]$', |
|
| 19 | 'required' => true, |
|
| 20 | 'info' => 'Indicador de movimento: ' |
|
| 21 | .'0- Bloco com dados informados; ' |
|
| 22 | .'1- Bloco sem dados informados', |
|
| 23 | 'format' => '' |
|
| 24 | ] |
|
| 25 | ]; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Constructor |
|
| 29 | * @param \stdClass $std |
|
| 30 | */ |
|
| 31 | public function __construct(\stdClass $std) |
|
| 32 | { |
|
| 33 | parent::__construct(self::REG); |
|
| 34 | $this->std = $this->standarize($std); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 9-37 (lines=29) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class Z1390 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = '1390'; |
|
| 12 | const LEVEL = 2; |
|
| 13 | const PARENT = '1001'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'COD_PROD' => [ |
|
| 17 | 'type' => 'string', |
|
| 18 | 'regex' => '^0[1|2|3]$', |
|
| 19 | 'required' => true, |
|
| 20 | 'info' => 'Código do produto: ' |
|
| 21 | .'01 – Álcool Etílico Hidratado Carburante ' |
|
| 22 | .'02 - Álcool Etílico Anidro Carburante ' |
|
| 23 | .'03 – Açúcar', |
|
| 24 | 'format' => '' |
|
| 25 | ] |
|
| 26 | ]; |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Constructor |
|
| 30 | * @param \stdClass $std |
|
| 31 | */ |
|
| 32 | public function __construct(\stdClass $std) |
|
| 33 | { |
|
| 34 | parent::__construct(self::REG); |
|
| 35 | $this->std = $this->standarize($std); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| @@ 9-34 (lines=26) @@ | ||
| 6 | use NFePHP\EFD\Common\ElementInterface; |
|
| 7 | use \stdClass; |
|
| 8 | ||
| 9 | class K300 extends Element implements ElementInterface |
|
| 10 | { |
|
| 11 | const REG = 'K300'; |
|
| 12 | const LEVEL = 3; |
|
| 13 | const PARENT = 'K100'; |
|
| 14 | ||
| 15 | protected $parameters = [ |
|
| 16 | 'DT_PROD' => [ |
|
| 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 do reconhecimento da produção ocorrida no terceiro', |
|
| 21 | 'format' => '' |
|
| 22 | ] |
|
| 23 | ]; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * Constructor |
|
| 27 | * @param \stdClass $std |
|
| 28 | */ |
|
| 29 | public function __construct(\stdClass $std) |
|
| 30 | { |
|
| 31 | parent::__construct(self::REG); |
|
| 32 | $this->std = $this->standarize($std); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||