1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace NFePHP\EFD\Elements\ICMSIPI; |
4
|
|
|
|
5
|
|
|
use NFePHP\EFD\Common\Element; |
6
|
|
|
use NFePHP\EFD\Common\ElementInterface; |
7
|
|
|
use \stdClass; |
8
|
|
|
|
9
|
|
|
class D610 extends Element implements ElementInterface |
10
|
|
|
{ |
11
|
|
|
const REG = 'D610'; |
12
|
|
|
const LEVEL = 3; |
13
|
|
|
const PARENT = ''; |
14
|
|
|
|
15
|
|
|
protected $parameters = [ |
16
|
|
|
'COD_CLASS' => [ |
17
|
|
|
'type' => 'numeric', |
18
|
|
|
'regex' => '^(\d{4})$', |
19
|
|
|
'required' => true, |
20
|
|
|
'info' => 'Código de classificação do item do serviço de comunicação ou de telecomunicação,' |
21
|
|
|
.' conforme a tabela 4.4.1', |
22
|
|
|
'format' => '' |
23
|
|
|
], |
24
|
|
|
'COD_ITEM' => [ |
25
|
|
|
'type' => 'string', |
26
|
|
|
'regex' => '^[0-9]{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' => '^[0-9]{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' => true, |
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' => '^[0-9]{6}$', |
76
|
|
|
'required' => true, |
77
|
|
|
'info' => 'Alíquota do ICMS', |
78
|
|
|
'format' => '' |
79
|
|
|
], |
80
|
|
|
'VL_BC_ICMS' => [ |
81
|
|
|
'type' => 'numeric', |
82
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
83
|
|
|
'required' => true, |
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' => true, |
91
|
|
|
'info' => 'Valor acumulado do ICMS debitado', |
92
|
|
|
'format' => '15v2' |
93
|
|
|
], |
94
|
|
|
'VL_BC_ICMS_UF' => [ |
95
|
|
|
'type' => 'numeric', |
96
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
97
|
|
|
'required' => true, |
98
|
|
|
'info' => 'Valor da base de cálculo do ICMS a outras UFs', |
99
|
|
|
'format' => '15v2' |
100
|
|
|
], |
101
|
|
|
'VL_ICMS_UF' => [ |
102
|
|
|
'type' => 'numeric', |
103
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
104
|
|
|
'required' => true, |
105
|
|
|
'info' => 'Valor do ICMS a outras UFs', |
106
|
|
|
'format' => '15v2' |
107
|
|
|
], |
108
|
|
|
'VL_RED_BC' => [ |
109
|
|
|
'type' => 'numeric', |
110
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
111
|
|
|
'required' => true, |
112
|
|
|
'info' => 'Valor não tributado em função da redução da base de cálculo do ICMS, referente à combinação' |
113
|
|
|
.' de CST_ICMS, CFOP e alíquota do ICMS.', |
114
|
|
|
'format' => '15v2' |
115
|
|
|
], |
116
|
|
|
'VL_PIS' => [ |
117
|
|
|
'type' => 'numeric', |
118
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
119
|
|
|
'required' => true, |
120
|
|
|
'info' => 'Valor acumulado do PIS', |
121
|
|
|
'format' => '15v2' |
122
|
|
|
], |
123
|
|
|
'VL_COFINS' => [ |
124
|
|
|
'type' => 'numeric', |
125
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
126
|
|
|
'required' => true, |
127
|
|
|
'info' => 'Valor acumulado da COFINS', |
128
|
|
|
'format' => '15v2' |
129
|
|
|
], |
130
|
|
|
'COD_CTA' => [ |
131
|
|
|
'type' => 'string', |
132
|
|
|
'regex' => '^[0-9]{0}$', |
133
|
|
|
'required' => true, |
134
|
|
|
'info' => 'Código da conta analítica contábil debitada/creditada', |
135
|
|
|
'format' => '' |
136
|
|
|
] |
137
|
|
|
]; |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Constructor |
141
|
|
|
* @param \stdClass $std |
142
|
|
|
*/ |
143
|
|
|
public function __construct(\stdClass $std) |
144
|
|
|
{ |
145
|
|
|
parent::__construct(self::REG); |
146
|
|
|
$this->std = $this->standarize($std); |
147
|
|
|
} |
148
|
|
|
} |
149
|
|
|
|