1 | <?php |
||
9 | class Z1300 extends Element implements ElementInterface |
||
10 | { |
||
11 | const REG = '1300'; |
||
12 | const LEVEL = 2; |
||
13 | const PARENT = '1001'; |
||
14 | |||
15 | protected $parameters = [ |
||
16 | 'COD_ITEM' => [ |
||
17 | 'type' => 'string', |
||
18 | 'regex' => '^.{1,60}$', |
||
19 | 'required' => true, |
||
20 | 'info' => 'Código do Produto, constante do registro 0200', |
||
21 | 'format' => '' |
||
22 | ], |
||
23 | 'DT_FECH' => [ |
||
24 | 'type' => 'integer', |
||
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' => true, |
||
27 | 'info' => 'Data do fechamento da movimentação', |
||
28 | 'format' => '' |
||
29 | ], |
||
30 | 'ESTQ_ABERT' => [ |
||
31 | 'type' => 'numeric', |
||
32 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
33 | 'required' => true, |
||
34 | 'info' => 'Estoque no início do dia, em litros', |
||
35 | 'format' => '15v3' |
||
36 | ], |
||
37 | 'VOL_ENTR' => [ |
||
38 | 'type' => 'numeric', |
||
39 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
40 | 'required' => true, |
||
41 | 'info' => 'Volume Recebido no dia (em litros)', |
||
42 | 'format' => '15v3' |
||
43 | ], |
||
44 | 'VOL_DISP' => [ |
||
45 | 'type' => 'numeric', |
||
46 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
47 | 'required' => true, |
||
48 | 'info' => 'Volume Disponível (04 + 05), em litros', |
||
49 | 'format' => '15v3' |
||
50 | ], |
||
51 | 'VOL_SAIDAS' => [ |
||
52 | 'type' => 'numeric', |
||
53 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
54 | 'required' => true, |
||
55 | 'info' => 'Volume Total das Saídas, em litros', |
||
56 | 'format' => '15v3' |
||
57 | ], |
||
58 | 'ESTQ_ESCR' => [ |
||
59 | 'type' => 'numeric', |
||
60 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
61 | 'required' => true, |
||
62 | 'info' => 'Estoque Escritural (06 – 07), litros', |
||
63 | 'format' => '15v3' |
||
64 | ], |
||
65 | 'VAL_AJ_PERDA' => [ |
||
66 | 'type' => 'numeric', |
||
67 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
68 | 'required' => true, |
||
69 | 'info' => 'Valor da Perda, em litros', |
||
70 | 'format' => '15v3' |
||
71 | ], |
||
72 | 'VAL_AJ_GANHO' => [ |
||
73 | 'type' => 'numeric', |
||
74 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
75 | 'required' => true, |
||
76 | 'info' => 'Valor do ganho, em litros', |
||
77 | 'format' => '15v3' |
||
78 | ], |
||
79 | 'FECH_FISICO' => [ |
||
80 | 'type' => 'numeric', |
||
81 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
82 | 'required' => true, |
||
83 | 'info' => 'Estoque de Fechamento, em litros', |
||
84 | 'format' => '15v3' |
||
85 | ] |
||
86 | ]; |
||
87 | |||
88 | /** |
||
89 | * Constructor |
||
90 | * @param \stdClass $std |
||
91 | */ |
||
92 | public function __construct(\stdClass $std) |
||
98 | |||
99 | public function postValidation() |
||
123 | } |
||
124 |