1 | <?php |
||
10 | class C610 extends Element implements ElementInterface |
||
11 | { |
||
12 | const REG = 'C610'; |
||
13 | const LEVEL = 3; |
||
14 | const PARENT = 'C600'; |
||
15 | |||
16 | protected $parameters = [ |
||
17 | 'COD_CLASS' => [ |
||
18 | 'type' => 'numeric', |
||
19 | 'regex' => '^(\d{4})$', |
||
20 | 'required' => false, |
||
21 | 'info' => 'Código de classificação do item de energia elétrica', |
||
22 | 'format' => '' |
||
23 | ], |
||
24 | 'COD_ITEM' => [ |
||
25 | 'type' => 'string', |
||
26 | 'regex' => '^.{1,60}$', |
||
27 | 'required' => true, |
||
28 | 'info' => 'Código do item (campo 02 do Registro 0200)', |
||
29 | 'format' => '' |
||
30 | ], |
||
31 | 'QTD' => [ |
||
32 | 'type' => 'numeric', |
||
33 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
34 | 'required' => true, |
||
35 | 'info' => 'Quantidade acumulada do item', |
||
36 | 'format' => '15v3' |
||
37 | ], |
||
38 | 'UNID' => [ |
||
39 | 'type' => 'string', |
||
40 | 'regex' => '^.{1,6}$', |
||
41 | 'required' => true, |
||
42 | 'info' => 'Unidade do item (Campo 02 do registro 0190)', |
||
43 | 'format' => '' |
||
44 | ], |
||
45 | 'VL_ITEM' => [ |
||
46 | 'type' => 'numeric', |
||
47 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
48 | 'required' => true, |
||
49 | 'info' => 'Valor acumulado do item', |
||
50 | 'format' => '15v2' |
||
51 | ], |
||
52 | 'VL_DESC' => [ |
||
53 | 'type' => 'numeric', |
||
54 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
55 | 'required' => false, |
||
56 | 'info' => 'Valor acumulado dos descontos', |
||
57 | 'format' => '15v2' |
||
58 | ], |
||
59 | 'CST_ICMS' => [ |
||
60 | 'type' => 'numeric', |
||
61 | 'regex' => '^(\d{3})$', |
||
62 | 'required' => true, |
||
63 | 'info' => 'Código da Situação Tributária, conforme a Tabela indicada no item 4.3.1', |
||
64 | 'format' => '' |
||
65 | ], |
||
66 | 'CFOP' => [ |
||
67 | 'type' => 'numeric', |
||
68 | 'regex' => '^(\d{4})$', |
||
69 | 'required' => true, |
||
70 | 'info' => 'Código Fiscal de Operação e Prestação conforme tabela indicada no item 4.2.2.', |
||
71 | 'format' => '' |
||
72 | ], |
||
73 | 'ALIQ_ICMS' => [ |
||
74 | 'type' => 'numeric', |
||
75 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
76 | 'required' => false, |
||
77 | 'info' => 'Alíquota do ICMS', |
||
78 | 'format' => '6v2' |
||
79 | ], |
||
80 | 'VL_BC_ICMS' => [ |
||
81 | 'type' => 'numeric', |
||
82 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
83 | 'required' => false, |
||
84 | 'info' => 'Valor acumulado da base de cálculo do ICMS', |
||
85 | 'format' => '15v2' |
||
86 | ], |
||
87 | 'VL_ICMS' => [ |
||
88 | 'type' => 'numeric', |
||
89 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
90 | 'required' => false, |
||
91 | 'info' => 'Valor acumulado do ICMS debitado', |
||
92 | 'format' => '15v2' |
||
93 | ], |
||
94 | 'VL_BC_ICMS_ST' => [ |
||
95 | 'type' => 'numeric', |
||
96 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
97 | 'required' => false, |
||
98 | 'info' => 'Valor da base de cálculo do ICMS substituição tributária', |
||
99 | 'format' => '15v2' |
||
100 | ], |
||
101 | 'VL_ICMS_ST' => [ |
||
102 | 'type' => 'numeric', |
||
103 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
104 | 'required' => false, |
||
105 | 'info' => 'Valor do ICMS retido por substituição tributária', |
||
106 | 'format' => '15v2' |
||
107 | ], |
||
108 | 'VL_PIS' => [ |
||
109 | 'type' => 'numeric', |
||
110 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
111 | 'required' => false, |
||
112 | 'info' => 'Valor do PIS', |
||
113 | 'format' => '15v2' |
||
114 | ], |
||
115 | 'VL_COFINS' => [ |
||
116 | 'type' => 'numeric', |
||
117 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
118 | 'required' => false, |
||
119 | 'info' => 'Valor da COFINS', |
||
120 | 'format' => '15v2' |
||
121 | ], |
||
122 | 'COD_CTA' => [ |
||
123 | 'type' => 'string', |
||
124 | 'regex' => '^(.*)$', |
||
125 | 'required' => false, |
||
126 | 'info' => 'Código da conta analítica contábil debitada/creditada', |
||
127 | 'format' => '' |
||
128 | ], |
||
129 | |||
130 | ]; |
||
131 | |||
132 | /** |
||
133 | * Constructor |
||
134 | * @param \stdClass $std |
||
135 | */ |
||
136 | public function __construct(\stdClass $std) |
||
142 | |||
143 | public function postValidation() |
||
179 | } |
||
180 |