| 1 | <?php |
||
| 9 | class Z1105 extends Element implements ElementInterface |
||
| 10 | { |
||
| 11 | const REG = '1105'; |
||
| 12 | const LEVEL = 3; |
||
| 13 | const PARENT = '1100'; |
||
| 14 | |||
| 15 | protected $parameters = [ |
||
| 16 | 'COD_MOD' => [ |
||
| 17 | 'type' => 'string', |
||
| 18 | 'regex' => '^[0][1]|[5][5]$', |
||
| 19 | 'required' => true, |
||
| 20 | 'info' => 'Código do modelo da NF, conforme tabela 4.1.1', |
||
| 21 | 'format' => '' |
||
| 22 | ], |
||
| 23 | 'SERIE' => [ |
||
| 24 | 'type' => 'string', |
||
| 25 | 'regex' => '^.{1,3}$', |
||
| 26 | 'required' => false, |
||
| 27 | 'info' => 'Série da Nota Fiscal', |
||
| 28 | 'format' => '' |
||
| 29 | ], |
||
| 30 | 'NUM_DOC' => [ |
||
| 31 | 'type' => 'integer', |
||
| 32 | 'regex' => '^[1-9]\d{0,8}$', |
||
| 33 | 'required' => true, |
||
| 34 | 'info' => 'Número de Nota Fiscal de Exportação emitida pelo Exportador', |
||
| 35 | 'format' => '' |
||
| 36 | ], |
||
| 37 | 'CHV_NFE' => [ |
||
| 38 | 'type' => 'numeric', |
||
| 39 | 'regex' => '^([0-9]{44})?$', |
||
| 40 | 'required' => false, |
||
| 41 | 'info' => 'Chave da Nota Fiscal Eletrônica', |
||
| 42 | 'format' => '' |
||
| 43 | ], |
||
| 44 | 'DT_DOC' => [ |
||
| 45 | 'type' => 'integer', |
||
| 46 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
||
| 47 | 'required' => true, |
||
| 48 | 'info' => 'Data da emissão da NF de exportação', |
||
| 49 | 'format' => '' |
||
| 50 | ], |
||
| 51 | 'COD_ITEM' => [ |
||
| 52 | 'type' => 'string', |
||
| 53 | 'regex' => '^.{1,60}$', |
||
| 54 | 'required' => true, |
||
| 55 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
||
| 56 | 'format' => '' |
||
| 57 | ] |
||
| 58 | ]; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Constructor |
||
| 62 | * @param \stdClass $std |
||
| 63 | */ |
||
| 64 | public function __construct(\stdClass $std) |
||
| 69 | } |
||
| 70 |