1 | <?php |
||
10 | class C510 extends Element implements ElementInterface |
||
11 | { |
||
12 | const REG = 'C510'; |
||
13 | const LEVEL = 3; |
||
14 | const PARENT = 'C500'; |
||
15 | |||
16 | protected $parameters = [ |
||
17 | 'NUM_ITEM' => [ |
||
18 | 'type' => 'numeric', |
||
19 | 'regex' => '^(\d{1,3})$', |
||
20 | 'required' => true, |
||
21 | 'info' => 'Número sequencial do item no documento fiscal', |
||
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 | 'COD_CLASS' => [ |
||
32 | 'type' => 'numeric', |
||
33 | 'regex' => '^(\d{4})$', |
||
34 | 'required' => false, |
||
35 | 'info' => 'Código de classificação do item de energia', |
||
36 | 'format' => '' |
||
37 | ], |
||
38 | 'QTD' => [ |
||
39 | 'type' => 'numeric', |
||
40 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
41 | 'required' => false, |
||
42 | 'info' => 'Quantidade do item', |
||
43 | 'format' => '15v3' |
||
44 | ], |
||
45 | 'UNID' => [ |
||
46 | 'type' => 'string', |
||
47 | 'regex' => '^.{0,6}$', |
||
48 | 'required' => false, |
||
49 | 'info' => 'Unidade do item (Campo 02 do registro 0190)', |
||
50 | 'format' => '' |
||
51 | ], |
||
52 | 'VL_ITEM' => [ |
||
53 | 'type' => 'numeric', |
||
54 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
55 | 'required' => true, |
||
56 | 'info' => 'Valor do item', |
||
57 | 'format' => '15v2' |
||
58 | ], |
||
59 | 'VL_DESC' => [ |
||
60 | 'type' => 'numeric', |
||
61 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
62 | 'required' => false, |
||
63 | 'info' => 'Valor total do desconto', |
||
64 | 'format' => '15v2' |
||
65 | ], |
||
66 | 'CST_ICMS' => [ |
||
67 | 'type' => 'numeric', |
||
68 | 'regex' => '^(\d{3})$', |
||
69 | 'required' => true, |
||
70 | 'info' => 'Código da Situação Tributária', |
||
71 | 'format' => '' |
||
72 | ], |
||
73 | 'CFOP' => [ |
||
74 | 'type' => 'numeric', |
||
75 | 'regex' => '^(\d{4})$', |
||
76 | 'required' => true, |
||
77 | 'info' => 'Código Fiscal de Operação e Prestação', |
||
78 | 'format' => '' |
||
79 | ], |
||
80 | 'VL_BC_ICMS' => [ |
||
81 | 'type' => 'numeric', |
||
82 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
83 | 'required' => false, |
||
84 | 'info' => 'Valor da base de cálculo do ICMS', |
||
85 | 'format' => '15v2' |
||
86 | ], |
||
87 | 'ALIQ_ICMS' => [ |
||
88 | 'type' => 'numeric', |
||
89 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
90 | 'required' => false, |
||
91 | 'info' => 'Alíquota do ICMS', |
||
92 | 'format' => '6v2' |
||
93 | ], |
||
94 | 'VL_ICMS' => [ |
||
95 | 'type' => 'numeric', |
||
96 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
97 | 'required' => false, |
||
98 | 'info' => 'Valor do ICMS creditado/debitado', |
||
99 | 'format' => '15v2' |
||
100 | ], |
||
101 | 'VL_BC_ICMS_ST' => [ |
||
102 | 'type' => 'numeric', |
||
103 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
104 | 'required' => false, |
||
105 | 'info' => 'Valor da base de cálculo referente à substituição tributária', |
||
106 | 'format' => '15v2' |
||
107 | ], |
||
108 | 'ALIQ_ST' => [ |
||
109 | 'type' => 'numeric', |
||
110 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
111 | 'required' => false, |
||
112 | 'info' => 'Alíquota do ICMS da substituição tributária na unidade da federação de destino', |
||
113 | 'format' => '6v2' |
||
114 | ], |
||
115 | 'VL_ICMS_ST' => [ |
||
116 | 'type' => 'numeric', |
||
117 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
118 | 'required' => false, |
||
119 | 'info' => 'Valor do ICMS referente à substituição tributária', |
||
120 | 'format' => '15v2' |
||
121 | ], |
||
122 | 'IND_REC' => [ |
||
123 | 'type' => 'string', |
||
124 | 'regex' => '^(0|1)$', |
||
125 | 'required' => true, |
||
126 | 'info' => 'Indicador do tipo de receita', |
||
127 | 'format' => '' |
||
128 | ], |
||
129 | 'COD_PART' => [ |
||
130 | 'type' => 'string', |
||
131 | 'regex' => '^.{0,60}$', |
||
132 | 'required' => false, |
||
133 | 'info' => 'Código do participante receptor da receita', |
||
134 | 'format' => '' |
||
135 | ], |
||
136 | 'VL_PIS' => [ |
||
137 | 'type' => 'numeric', |
||
138 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
139 | 'required' => false, |
||
140 | 'info' => 'Valor do PIS', |
||
141 | 'format' => '15v2' |
||
142 | ], |
||
143 | 'VL_COFINS' => [ |
||
144 | 'type' => 'numeric', |
||
145 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
146 | 'required' => false, |
||
147 | 'info' => 'Valor da COFINS', |
||
148 | 'format' => '15v2' |
||
149 | ], |
||
150 | 'COD_CTA' => [ |
||
151 | 'type' => 'string', |
||
152 | 'regex' => '^.*$', |
||
153 | 'required' => false, |
||
154 | 'info' => 'Código da conta analítica contábil debitada/creditada', |
||
155 | 'format' => '' |
||
156 | ], |
||
157 | ]; |
||
158 | |||
159 | /** |
||
160 | * Constructor |
||
161 | * @param \stdClass $std |
||
162 | */ |
||
163 | public function __construct(\stdClass $std) |
||
168 | |||
169 | public function postValidation() |
||
201 | } |
||
202 |