ipiranga-inovai-project-lib 1.3__py3-none-any.whl → 1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- inovai/models/NFeItem.py +212 -208
- {ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/METADATA +1 -1
- {ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/RECORD +6 -6
- {ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/LICENSE +0 -0
- {ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/WHEEL +0 -0
- {ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/top_level.txt +0 -0
inovai/models/NFeItem.py
CHANGED
|
@@ -6,247 +6,251 @@ from inovai.models.NFeObservacaoItem import NFeObservacaoItem
|
|
|
6
6
|
import xml.etree.ElementTree as ET
|
|
7
7
|
|
|
8
8
|
class NFeItem:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
9
|
+
DIs: [NFeDocImportacao]
|
|
10
|
+
cBarra: str
|
|
11
|
+
cBarraTrib: str
|
|
12
|
+
cEAN: str
|
|
13
|
+
cEANTrib: str
|
|
14
|
+
cest: str
|
|
15
|
+
cfop: str
|
|
16
|
+
codBeneficioFiscal: str
|
|
17
|
+
codConta: str
|
|
18
|
+
codFisJuridicaRef: str
|
|
19
|
+
codigoServLei116: str
|
|
20
|
+
descricaoLei116: str
|
|
21
|
+
dadosCombustivel: NFeItemDadosCombustivel
|
|
22
|
+
dadosExportacao: [NFeItemExportacao]
|
|
23
|
+
dadosObservacaoItem: [NFeObservacaoItem]
|
|
24
|
+
exTIPI: str
|
|
25
|
+
impostos: [NFeImposto]
|
|
26
|
+
impostosDevolvidos: [NFeImposto]
|
|
27
|
+
indFisJuridicaRef: int
|
|
28
|
+
indProduto: str
|
|
29
|
+
indTipoReferencia: str
|
|
30
|
+
item: int
|
|
31
|
+
nbm: str
|
|
32
|
+
ncm: str
|
|
33
|
+
numItemRef: int
|
|
34
|
+
numeroFCI: str
|
|
35
|
+
nve: str
|
|
36
|
+
pedidoExternoItem: int
|
|
37
|
+
pedidoExternoNumero: str
|
|
38
|
+
percentualDevolvido: float
|
|
39
|
+
produtoCodigo: str
|
|
40
|
+
produtoInfo: str
|
|
41
|
+
produtoNome: str
|
|
42
|
+
qtdDevolucaoRef: float
|
|
43
|
+
quantidade: float
|
|
44
|
+
quantidadeTrib: float
|
|
45
|
+
unidadeMedida: str
|
|
46
|
+
unidadeMedidaTrib: str
|
|
47
|
+
valorDesconto: float
|
|
48
|
+
valorDespAduaneira: float
|
|
49
|
+
valorFrete: float
|
|
50
|
+
valorIOF: float
|
|
51
|
+
valorOutros: float
|
|
52
|
+
valorSeguro: float
|
|
53
|
+
valorTotal: float
|
|
54
|
+
valorTotalTrib: float
|
|
55
|
+
valorUnitario: float
|
|
56
|
+
valorUnitarioTrib: float
|
|
57
|
+
|
|
58
|
+
def __init__(self, **json):
|
|
59
|
+
if json:
|
|
60
|
+
for key, typeProp in self.__class__.__dict__['__annotations__'].items():
|
|
61
|
+
# str, float, bool, int
|
|
62
|
+
class_name = str(typeProp).split("'")[1].split(".")[-1]
|
|
63
|
+
|
|
64
|
+
if key in json:
|
|
65
|
+
if isinstance(typeProp, list):
|
|
66
|
+
cls = globals()[class_name]
|
|
67
|
+
items = []
|
|
68
|
+
for item_data in json[key]:
|
|
69
|
+
item = cls(**item_data)
|
|
70
|
+
items.append(item)
|
|
71
|
+
setattr(self, key, items)
|
|
72
|
+
elif class_name not in ('str', 'int', 'float', 'bool'):
|
|
73
|
+
cls = globals()[class_name]
|
|
74
|
+
instance = cls(**json[key])
|
|
75
|
+
setattr(self, key, instance)
|
|
76
|
+
else:
|
|
77
|
+
setattr(self, key, str(json[key]))
|
|
78
|
+
else:
|
|
79
|
+
if isinstance(typeProp, list):
|
|
80
|
+
# cls = globals()[class_name]
|
|
81
|
+
items = []
|
|
82
|
+
setattr(self, key, items)
|
|
83
|
+
elif class_name not in ('str', 'int', 'float', 'bool'):
|
|
84
|
+
cls = globals()[class_name]
|
|
85
|
+
instance = cls()
|
|
86
|
+
setattr(self, key, instance)
|
|
87
|
+
else:
|
|
88
|
+
setattr(self, key, '')
|
|
89
|
+
else:
|
|
90
|
+
for key, typeProp in self.__class__.__dict__['__annotations__'].items():
|
|
91
|
+
class_name = str(typeProp).split("'")[1].split(".")[-1]
|
|
92
|
+
if isinstance(typeProp, list):
|
|
93
|
+
# cls = globals()[class_name]
|
|
94
|
+
items = []
|
|
95
|
+
setattr(self, key, items)
|
|
96
|
+
elif class_name not in ('str', 'int', 'float', 'bool'):
|
|
97
|
+
cls = globals()[class_name]
|
|
98
|
+
instance = cls()
|
|
99
|
+
setattr(self, key, instance)
|
|
100
|
+
else:
|
|
101
|
+
setattr(self, key, '')
|
|
102
|
+
|
|
103
|
+
def get_DIs(self):
|
|
104
|
+
return self.DIs
|
|
105
|
+
|
|
106
|
+
def get_cBarra(self):
|
|
107
|
+
return self.cBarra
|
|
108
|
+
|
|
109
|
+
def get_cBarraTrib(self):
|
|
110
|
+
return self.cBarraTrib
|
|
111
|
+
|
|
112
|
+
def get_cEAN(self):
|
|
113
|
+
return self.cEAN
|
|
114
|
+
|
|
115
|
+
def get_cEANTrib(self):
|
|
116
|
+
return self.cEANTrib
|
|
117
|
+
|
|
118
|
+
def get_cest(self):
|
|
119
|
+
return self.cest
|
|
120
|
+
|
|
121
|
+
def get_cfop(self):
|
|
122
|
+
return self.cfop
|
|
123
|
+
|
|
124
|
+
def get_codBeneficioFiscal(self):
|
|
125
|
+
return self.codBeneficioFiscal
|
|
126
|
+
|
|
127
|
+
def get_codConta(self):
|
|
128
|
+
return self.codConta
|
|
129
|
+
|
|
130
|
+
def get_codFisJuridicaRef(self):
|
|
131
|
+
return self.codFisJuridicaRef
|
|
132
|
+
|
|
133
|
+
def get_codigoServLei116(self):
|
|
134
|
+
return self.codigoServLei116
|
|
135
|
+
|
|
136
|
+
def get_dadosCombustivel(self):
|
|
137
|
+
return self.dadosCombustivel
|
|
138
|
+
|
|
139
|
+
def get_dadosExportacao(self):
|
|
140
|
+
return self.dadosExportacao
|
|
141
|
+
|
|
142
|
+
def get_dadosObservacaoItem(self):
|
|
143
|
+
return self.dadosObservacaoItem
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
def get_exTIPI(self):
|
|
146
|
+
return self.exTIPI
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
def get_impostos(self):
|
|
149
|
+
return self.impostos
|
|
149
150
|
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
def get_impostosDevolvidos(self):
|
|
152
|
+
return self.impostosDevolvidos
|
|
152
153
|
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
def get_indFisJuridicaRef(self):
|
|
155
|
+
return self.indFisJuridicaRef
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
def get_indProduto(self):
|
|
158
|
+
return self.indProduto
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
def get_indTipoReferencia(self):
|
|
161
|
+
return self.indTipoReferencia
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
def get_item(self):
|
|
164
|
+
return self.item
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
def get_nbm(self):
|
|
167
|
+
return self.nbm
|
|
167
168
|
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
def get_ncm(self):
|
|
170
|
+
return self.ncm
|
|
170
171
|
|
|
171
|
-
|
|
172
|
-
|
|
172
|
+
def get_numItemRef(self):
|
|
173
|
+
return self.numItemRef
|
|
173
174
|
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
def get_numeroFCI(self):
|
|
176
|
+
return self.numeroFCI
|
|
176
177
|
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
def get_nve(self):
|
|
179
|
+
return self.nve
|
|
179
180
|
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
def get_pedidoExternoItem(self):
|
|
182
|
+
return self.pedidoExternoItem
|
|
182
183
|
|
|
183
|
-
|
|
184
|
-
|
|
184
|
+
def get_pedidoExternoNumero(self):
|
|
185
|
+
return self.pedidoExternoNumero
|
|
185
186
|
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
def get_percentualDevolvido(self):
|
|
188
|
+
return self.percentualDevolvido
|
|
188
189
|
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
def get_produtoCodigo(self):
|
|
191
|
+
return self.produtoCodigo
|
|
191
192
|
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
def get_produtoInfo(self):
|
|
194
|
+
return self.produtoInfo
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
def get_produtoNome(self):
|
|
197
|
+
return self.produtoNome
|
|
197
198
|
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
def get_qtdDevolucaoRef(self):
|
|
200
|
+
return self.qtdDevolucaoRef
|
|
200
201
|
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
def get_quantidade(self):
|
|
203
|
+
return self.quantidade
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
def get_quantidadeTrib(self):
|
|
206
|
+
return self.quantidadeTrib
|
|
206
207
|
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
def get_unidadeMedida(self):
|
|
209
|
+
return self.unidadeMedida
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
211
|
+
def get_unidadeMedidaTrib(self):
|
|
212
|
+
return self.unidadeMedidaTrib
|
|
212
213
|
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
def get_valorDesconto(self):
|
|
215
|
+
return self.valorDesconto
|
|
215
216
|
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
def get_valorDespAduaneira(self):
|
|
218
|
+
return self.valorDespAduaneira
|
|
218
219
|
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
def get_valorFrete(self):
|
|
221
|
+
return self.valorFrete
|
|
221
222
|
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
def get_valorIOF(self):
|
|
224
|
+
return self.valorIOF
|
|
224
225
|
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
def get_valorOutros(self):
|
|
227
|
+
return self.valorOutros
|
|
227
228
|
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
def get_valorSeguro(self):
|
|
230
|
+
return self.valorSeguro
|
|
230
231
|
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
def get_valorTotal(self):
|
|
233
|
+
return self.valorTotal
|
|
233
234
|
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
def get_valorTotalTrib(self):
|
|
236
|
+
return self.valorTotalTrib
|
|
236
237
|
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
def get_valorUnitario(self):
|
|
239
|
+
return self.valorUnitario
|
|
239
240
|
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
def get_valorUnitarioTrib(self):
|
|
242
|
+
return self.valorUnitarioTrib
|
|
242
243
|
|
|
243
|
-
|
|
244
|
-
|
|
244
|
+
def get_descricaoLei116(self):
|
|
245
|
+
return self.descricaoLei116
|
|
245
246
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
if value is not None:
|
|
249
|
-
child = ET.SubElement(element, tag)
|
|
250
|
-
child.text = str(value)
|
|
247
|
+
def to_xml(self, template):
|
|
248
|
+
element = ET.Element(template.get('root', 'DET_NITEM'))
|
|
251
249
|
|
|
252
|
-
|
|
250
|
+
for attr, tag in template.get('fields', {}).items():
|
|
251
|
+
value = getattr(self, attr, None)
|
|
252
|
+
if value is not None:
|
|
253
|
+
child = ET.SubElement(element, tag)
|
|
254
|
+
child.text = str(value)
|
|
255
|
+
|
|
256
|
+
return element
|
{ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipiranga-inovai-project-lib
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4
|
|
4
4
|
Summary: Projeto criado para importação genérica de entidades
|
|
5
5
|
Home-page: https://gitlab.ipirangacloud.com/clayton.monteiro.ext/ipiranga-inovai-project-lib
|
|
6
6
|
Author: Clayton Sandes Monteiro
|
{ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/RECORD
RENAMED
|
@@ -17,7 +17,7 @@ inovai/models/NFeFatura.py,sha256=GxEkiYj_sMjETk9euzlHw388sEnSgHTk6tYZiPug6s0,18
|
|
|
17
17
|
inovai/models/NFeImposto.py,sha256=Qpi3S-iR5pvM0kXkIq2dQs4VxTv7gDG0qQ9h2XRDKCg,5769
|
|
18
18
|
inovai/models/NFeImpostoRetido.py,sha256=emr_dpFOZY4abLTvVEdw4hFFX5XkVsAnViGT2tboiic,3707
|
|
19
19
|
inovai/models/NFeIntermediadorTransacao.py,sha256=92BCto4uKg17v5EzhT9g1eNBKYYS-trZ7zmpKna2Jzo,1645
|
|
20
|
-
inovai/models/NFeItem.py,sha256=
|
|
20
|
+
inovai/models/NFeItem.py,sha256=1dp37_61Lz6zfXkGF13iMWOGQdNTKmlSKUiyZBPrwVo,7300
|
|
21
21
|
inovai/models/NFeItemDadosCombustivel.py,sha256=2qenlgSiGhiWLsL_8YHUix1MfB7vbBWWQtJWGmvaLB8,2244
|
|
22
22
|
inovai/models/NFeItemExportacao.py,sha256=Fc7oSc_OuXtsan-oaMvN79v88zJvjZzKQur_zRoS2T4,2526
|
|
23
23
|
inovai/models/NFeItemOrigemCombustivel.py,sha256=_FD3H6LMxY60T9DAwB-xGcS5xdtV-WnMtbvkOrkx_fA,1809
|
|
@@ -32,8 +32,8 @@ inovai/models/NFeVolume.py,sha256=_cayb-rrz1mSxQ3wFFnB4KCi524jtAsdTTcS4WQTBOc,19
|
|
|
32
32
|
inovai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
inovai/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
inovai/utils/util.py,sha256=tEFFoYhtyZk2pxor2vb23NWr3otPzPXTiTIf-VrGik4,366
|
|
35
|
-
ipiranga_inovai_project_lib-1.
|
|
36
|
-
ipiranga_inovai_project_lib-1.
|
|
37
|
-
ipiranga_inovai_project_lib-1.
|
|
38
|
-
ipiranga_inovai_project_lib-1.
|
|
39
|
-
ipiranga_inovai_project_lib-1.
|
|
35
|
+
ipiranga_inovai_project_lib-1.4.dist-info/LICENSE,sha256=UJ3ql8eZec9Y1kER7QSHAuvdgFPuL47asePHYmdzG_o,198
|
|
36
|
+
ipiranga_inovai_project_lib-1.4.dist-info/METADATA,sha256=6-TYBtvQ1yinz4tr-XvADPLM59qKFORDoX_lhwelLQ4,518
|
|
37
|
+
ipiranga_inovai_project_lib-1.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
38
|
+
ipiranga_inovai_project_lib-1.4.dist-info/top_level.txt,sha256=BD-APH5oIEb_KDXwrfnZiu9QDsD9ttTEkYc32r9thqg,7
|
|
39
|
+
ipiranga_inovai_project_lib-1.4.dist-info/RECORD,,
|
{ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/LICENSE
RENAMED
|
File without changes
|
{ipiranga_inovai_project_lib-1.3.dist-info → ipiranga_inovai_project_lib-1.4.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|