| 1 | <?php | ||
| 9 | class K260 extends Element implements ElementInterface | ||
| 10 | { | ||
| 11 | const REG = 'K260'; | ||
| 12 | const LEVEL = 3; | ||
| 13 | const PARENT = 'K100'; | ||
| 14 | |||
| 15 | protected $parameters = [ | ||
| 16 | 'COD_OP_OS' => [ | ||
| 17 | 'type' => 'string', | ||
| 18 |             'regex'    => '^.{1,30}$', | ||
| 19 | 'required' => false, | ||
| 20 | 'info' => 'Código de identificação da ordem de produção', | ||
| 21 | 'format' => '' | ||
| 22 | ], | ||
| 23 | 'COD_ITEM' => [ | ||
| 24 | 'type' => 'string', | ||
| 25 |             'regex'    => '^.{1,60}$', | ||
| 26 | 'required' => true, | ||
| 27 | 'info' => 'Código do item (campo 02 do Registro 0200)', | ||
| 28 | 'format' => '' | ||
| 29 | ], | ||
| 30 | 'DT_SAIDA' => [ | ||
| 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 saída do estoque', | ||
| 35 | 'format' => '' | ||
| 36 | ], | ||
| 37 | 'QTD_SAIDA' => [ | ||
| 38 | 'type' => 'numeric', | ||
| 39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', | ||
| 40 | 'required' => true, | ||
| 41 | 'info' => 'Quantidade de saída do estoque', | ||
| 42 | 'format' => '15v3' | ||
| 43 | ], | ||
| 44 | 'DT_RET' => [ | ||
| 45 | 'type' => 'string', | ||
| 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' => false, | ||
| 48 | 'info' => 'Data de retorno ao estoque (entrada)', | ||
| 49 | 'format' => '' | ||
| 50 | ], | ||
| 51 | 'QTD_RET' => [ | ||
| 52 | 'type' => 'numeric', | ||
| 53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', | ||
| 54 | 'required' => false, | ||
| 55 | 'info' => 'Quantidade de retorno ao estoque (entrada)', | ||
| 56 | 'format' => '15v3' | ||
| 57 | ] | ||
| 58 | ]; | ||
| 59 | |||
| 60 | /** | ||
| 61 | * Constructor | ||
| 62 | * @param \stdClass $std | ||
| 63 | */ | ||
| 64 | public function __construct(\stdClass $std) | ||
| 69 | } | ||
| 70 |