ipiranga-inovai-project-lib 1.2__tar.gz → 1.4__tar.gz
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.
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/PKG-INFO +1 -1
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeImposto.py +0 -4
- ipiranga-inovai-project-lib-1.4/inovai/models/NFeItem.py +256 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/ipiranga_inovai_project_lib.egg-info/PKG-INFO +1 -1
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/setup.py +1 -1
- ipiranga-inovai-project-lib-1.2/inovai/models/NFeItem.py +0 -252
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/LICENSE +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/README.md +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/__init__.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/entities.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/enums.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/Endereco.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFe.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeBoleto.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeCartao.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeDetalhePagamento.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeDocImportacao.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeDocImportacaoAdicao.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeDocRef.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeDuplicata.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeEnvioXML.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeEnvolvido.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeExportacao.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeFatura.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeImpostoRetido.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeIntermediadorTransacao.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeItemDadosCombustivel.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeItemExportacao.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeItemOrigemCombustivel.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeObservacao.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeObservacaoItem.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeOrigem.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFePagamento.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeProcReferenciado.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeTransporte.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeVeiculo.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeVolume.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/__init__.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/utils/__init__.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/utils/util.py +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/ipiranga_inovai_project_lib.egg-info/SOURCES.txt +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/ipiranga_inovai_project_lib.egg-info/dependency_links.txt +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/ipiranga_inovai_project_lib.egg-info/top_level.txt +0 -0
- {ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/setup.cfg +0 -0
|
@@ -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.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeImposto.py
RENAMED
|
@@ -90,10 +90,6 @@ class NFeImposto:
|
|
|
90
90
|
else:
|
|
91
91
|
setattr(self, key, '')
|
|
92
92
|
|
|
93
|
-
def __init__(self, **kwargs):
|
|
94
|
-
for key, value in kwargs.items():
|
|
95
|
-
setattr(self, key, value)
|
|
96
|
-
|
|
97
93
|
def __repr__(self):
|
|
98
94
|
return f'NFe({", ".join(f"{key}={value}" for key, value in self.__dict__.items())})'
|
|
99
95
|
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
from inovai.models.NFeDocImportacao import NFeDocImportacao
|
|
2
|
+
from inovai.models.NFeImposto import NFeImposto
|
|
3
|
+
from inovai.models.NFeItemDadosCombustivel import NFeItemDadosCombustivel
|
|
4
|
+
from inovai.models.NFeItemExportacao import NFeItemExportacao
|
|
5
|
+
from inovai.models.NFeObservacaoItem import NFeObservacaoItem
|
|
6
|
+
import xml.etree.ElementTree as ET
|
|
7
|
+
|
|
8
|
+
class NFeItem:
|
|
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
|
|
144
|
+
|
|
145
|
+
def get_exTIPI(self):
|
|
146
|
+
return self.exTIPI
|
|
147
|
+
|
|
148
|
+
def get_impostos(self):
|
|
149
|
+
return self.impostos
|
|
150
|
+
|
|
151
|
+
def get_impostosDevolvidos(self):
|
|
152
|
+
return self.impostosDevolvidos
|
|
153
|
+
|
|
154
|
+
def get_indFisJuridicaRef(self):
|
|
155
|
+
return self.indFisJuridicaRef
|
|
156
|
+
|
|
157
|
+
def get_indProduto(self):
|
|
158
|
+
return self.indProduto
|
|
159
|
+
|
|
160
|
+
def get_indTipoReferencia(self):
|
|
161
|
+
return self.indTipoReferencia
|
|
162
|
+
|
|
163
|
+
def get_item(self):
|
|
164
|
+
return self.item
|
|
165
|
+
|
|
166
|
+
def get_nbm(self):
|
|
167
|
+
return self.nbm
|
|
168
|
+
|
|
169
|
+
def get_ncm(self):
|
|
170
|
+
return self.ncm
|
|
171
|
+
|
|
172
|
+
def get_numItemRef(self):
|
|
173
|
+
return self.numItemRef
|
|
174
|
+
|
|
175
|
+
def get_numeroFCI(self):
|
|
176
|
+
return self.numeroFCI
|
|
177
|
+
|
|
178
|
+
def get_nve(self):
|
|
179
|
+
return self.nve
|
|
180
|
+
|
|
181
|
+
def get_pedidoExternoItem(self):
|
|
182
|
+
return self.pedidoExternoItem
|
|
183
|
+
|
|
184
|
+
def get_pedidoExternoNumero(self):
|
|
185
|
+
return self.pedidoExternoNumero
|
|
186
|
+
|
|
187
|
+
def get_percentualDevolvido(self):
|
|
188
|
+
return self.percentualDevolvido
|
|
189
|
+
|
|
190
|
+
def get_produtoCodigo(self):
|
|
191
|
+
return self.produtoCodigo
|
|
192
|
+
|
|
193
|
+
def get_produtoInfo(self):
|
|
194
|
+
return self.produtoInfo
|
|
195
|
+
|
|
196
|
+
def get_produtoNome(self):
|
|
197
|
+
return self.produtoNome
|
|
198
|
+
|
|
199
|
+
def get_qtdDevolucaoRef(self):
|
|
200
|
+
return self.qtdDevolucaoRef
|
|
201
|
+
|
|
202
|
+
def get_quantidade(self):
|
|
203
|
+
return self.quantidade
|
|
204
|
+
|
|
205
|
+
def get_quantidadeTrib(self):
|
|
206
|
+
return self.quantidadeTrib
|
|
207
|
+
|
|
208
|
+
def get_unidadeMedida(self):
|
|
209
|
+
return self.unidadeMedida
|
|
210
|
+
|
|
211
|
+
def get_unidadeMedidaTrib(self):
|
|
212
|
+
return self.unidadeMedidaTrib
|
|
213
|
+
|
|
214
|
+
def get_valorDesconto(self):
|
|
215
|
+
return self.valorDesconto
|
|
216
|
+
|
|
217
|
+
def get_valorDespAduaneira(self):
|
|
218
|
+
return self.valorDespAduaneira
|
|
219
|
+
|
|
220
|
+
def get_valorFrete(self):
|
|
221
|
+
return self.valorFrete
|
|
222
|
+
|
|
223
|
+
def get_valorIOF(self):
|
|
224
|
+
return self.valorIOF
|
|
225
|
+
|
|
226
|
+
def get_valorOutros(self):
|
|
227
|
+
return self.valorOutros
|
|
228
|
+
|
|
229
|
+
def get_valorSeguro(self):
|
|
230
|
+
return self.valorSeguro
|
|
231
|
+
|
|
232
|
+
def get_valorTotal(self):
|
|
233
|
+
return self.valorTotal
|
|
234
|
+
|
|
235
|
+
def get_valorTotalTrib(self):
|
|
236
|
+
return self.valorTotalTrib
|
|
237
|
+
|
|
238
|
+
def get_valorUnitario(self):
|
|
239
|
+
return self.valorUnitario
|
|
240
|
+
|
|
241
|
+
def get_valorUnitarioTrib(self):
|
|
242
|
+
return self.valorUnitarioTrib
|
|
243
|
+
|
|
244
|
+
def get_descricaoLei116(self):
|
|
245
|
+
return self.descricaoLei116
|
|
246
|
+
|
|
247
|
+
def to_xml(self, template):
|
|
248
|
+
element = ET.Element(template.get('root', 'DET_NITEM'))
|
|
249
|
+
|
|
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
|
|
@@ -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
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="ipiranga-inovai-project-lib",
|
|
5
|
-
version="1.
|
|
5
|
+
version="1.4",
|
|
6
6
|
packages=find_packages(),
|
|
7
7
|
description="Projeto criado para importação genérica de entidades",
|
|
8
8
|
long_description=open('README.md').read(),
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
from inovai.models.NFeDocImportacao import NFeDocImportacao
|
|
2
|
-
from inovai.models.NFeImposto import NFeImposto
|
|
3
|
-
from inovai.models.NFeItemDadosCombustivel import NFeItemDadosCombustivel
|
|
4
|
-
from inovai.models.NFeItemExportacao import NFeItemExportacao
|
|
5
|
-
from inovai.models.NFeObservacaoItem import NFeObservacaoItem
|
|
6
|
-
import xml.etree.ElementTree as ET
|
|
7
|
-
|
|
8
|
-
class NFeItem:
|
|
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
|
-
dadosCombustivel: NFeItemDadosCombustivel
|
|
21
|
-
dadosExportacao: [NFeItemExportacao]
|
|
22
|
-
dadosObservacaoItem: [NFeObservacaoItem]
|
|
23
|
-
exTIPI: str
|
|
24
|
-
impostos: [NFeImposto]
|
|
25
|
-
impostosDevolvidos: [NFeImposto]
|
|
26
|
-
indFisJuridicaRef: int
|
|
27
|
-
indProduto: str
|
|
28
|
-
indTipoReferencia: str
|
|
29
|
-
item: int
|
|
30
|
-
nbm: str
|
|
31
|
-
ncm: str
|
|
32
|
-
numItemRef: int
|
|
33
|
-
numeroFCI: str
|
|
34
|
-
nve: str
|
|
35
|
-
pedidoExternoItem: int
|
|
36
|
-
pedidoExternoNumero: str
|
|
37
|
-
percentualDevolvido: float
|
|
38
|
-
produtoCodigo: str
|
|
39
|
-
produtoInfo: str
|
|
40
|
-
produtoNome: str
|
|
41
|
-
qtdDevolucaoRef: float
|
|
42
|
-
quantidade: float
|
|
43
|
-
quantidadeTrib: float
|
|
44
|
-
unidadeMedida: str
|
|
45
|
-
unidadeMedidaTrib: str
|
|
46
|
-
valorDesconto: float
|
|
47
|
-
valorDespAduaneira: float
|
|
48
|
-
valorFrete: float
|
|
49
|
-
valorIOF: float
|
|
50
|
-
valorOutros: float
|
|
51
|
-
valorSeguro: float
|
|
52
|
-
valorTotal: float
|
|
53
|
-
valorTotalTrib: float
|
|
54
|
-
valorUnitario: float
|
|
55
|
-
valorUnitarioTrib: float
|
|
56
|
-
|
|
57
|
-
def __init__(self, **json):
|
|
58
|
-
if json:
|
|
59
|
-
for key, typeProp in self.__class__.__dict__['__annotations__'].items():
|
|
60
|
-
# str, float, bool, int
|
|
61
|
-
class_name = str(typeProp).split("'")[1].split(".")[-1]
|
|
62
|
-
|
|
63
|
-
if key in json:
|
|
64
|
-
if isinstance(typeProp, list):
|
|
65
|
-
cls = globals()[class_name]
|
|
66
|
-
items = []
|
|
67
|
-
for item_data in json[key]:
|
|
68
|
-
item = cls(**item_data)
|
|
69
|
-
items.append(item)
|
|
70
|
-
setattr(self, key, items)
|
|
71
|
-
elif class_name not in ('str', 'int', 'float', 'bool'):
|
|
72
|
-
cls = globals()[class_name]
|
|
73
|
-
instance = cls(**json[key])
|
|
74
|
-
setattr(self, key, instance)
|
|
75
|
-
else:
|
|
76
|
-
setattr(self, key, str(json[key]))
|
|
77
|
-
else:
|
|
78
|
-
if isinstance(typeProp, list):
|
|
79
|
-
# cls = globals()[class_name]
|
|
80
|
-
items = []
|
|
81
|
-
setattr(self, key, items)
|
|
82
|
-
elif class_name not in ('str', 'int', 'float', 'bool'):
|
|
83
|
-
cls = globals()[class_name]
|
|
84
|
-
instance = cls()
|
|
85
|
-
setattr(self, key, instance)
|
|
86
|
-
else:
|
|
87
|
-
setattr(self, key, '')
|
|
88
|
-
else:
|
|
89
|
-
for key, typeProp in self.__class__.__dict__['__annotations__'].items():
|
|
90
|
-
class_name = str(typeProp).split("'")[1].split(".")[-1]
|
|
91
|
-
if isinstance(typeProp, list):
|
|
92
|
-
# cls = globals()[class_name]
|
|
93
|
-
items = []
|
|
94
|
-
setattr(self, key, items)
|
|
95
|
-
elif class_name not in ('str', 'int', 'float', 'bool'):
|
|
96
|
-
cls = globals()[class_name]
|
|
97
|
-
instance = cls()
|
|
98
|
-
setattr(self, key, instance)
|
|
99
|
-
else:
|
|
100
|
-
setattr(self, key, '')
|
|
101
|
-
|
|
102
|
-
def get_DIs(self):
|
|
103
|
-
return self.DIs
|
|
104
|
-
|
|
105
|
-
def get_cBarra(self):
|
|
106
|
-
return self.cBarra
|
|
107
|
-
|
|
108
|
-
def get_cBarraTrib(self):
|
|
109
|
-
return self.cBarraTrib
|
|
110
|
-
|
|
111
|
-
def get_cEAN(self):
|
|
112
|
-
return self.cEAN
|
|
113
|
-
|
|
114
|
-
def get_cEANTrib(self):
|
|
115
|
-
return self.cEANTrib
|
|
116
|
-
|
|
117
|
-
def get_cest(self):
|
|
118
|
-
return self.cest
|
|
119
|
-
|
|
120
|
-
def get_cfop(self):
|
|
121
|
-
return self.cfop
|
|
122
|
-
|
|
123
|
-
def get_codBeneficioFiscal(self):
|
|
124
|
-
return self.codBeneficioFiscal
|
|
125
|
-
|
|
126
|
-
def get_codConta(self):
|
|
127
|
-
return self.codConta
|
|
128
|
-
|
|
129
|
-
def get_codFisJuridicaRef(self):
|
|
130
|
-
return self.codFisJuridicaRef
|
|
131
|
-
|
|
132
|
-
def get_codigoServLei116(self):
|
|
133
|
-
return self.codigoServLei116
|
|
134
|
-
|
|
135
|
-
def get_dadosCombustivel(self):
|
|
136
|
-
return self.dadosCombustivel
|
|
137
|
-
|
|
138
|
-
def get_dadosExportacao(self):
|
|
139
|
-
return self.dadosExportacao
|
|
140
|
-
|
|
141
|
-
def get_dadosObservacaoItem(self):
|
|
142
|
-
return self.dadosObservacaoItem
|
|
143
|
-
|
|
144
|
-
def get_exTIPI(self):
|
|
145
|
-
return self.exTIPI
|
|
146
|
-
|
|
147
|
-
def get_impostos(self):
|
|
148
|
-
return self.impostos
|
|
149
|
-
|
|
150
|
-
def get_impostosDevolvidos(self):
|
|
151
|
-
return self.impostosDevolvidos
|
|
152
|
-
|
|
153
|
-
def get_indFisJuridicaRef(self):
|
|
154
|
-
return self.indFisJuridicaRef
|
|
155
|
-
|
|
156
|
-
def get_indProduto(self):
|
|
157
|
-
return self.indProduto
|
|
158
|
-
|
|
159
|
-
def get_indTipoReferencia(self):
|
|
160
|
-
return self.indTipoReferencia
|
|
161
|
-
|
|
162
|
-
def get_item(self):
|
|
163
|
-
return self.item
|
|
164
|
-
|
|
165
|
-
def get_nbm(self):
|
|
166
|
-
return self.nbm
|
|
167
|
-
|
|
168
|
-
def get_ncm(self):
|
|
169
|
-
return self.ncm
|
|
170
|
-
|
|
171
|
-
def get_numItemRef(self):
|
|
172
|
-
return self.numItemRef
|
|
173
|
-
|
|
174
|
-
def get_numeroFCI(self):
|
|
175
|
-
return self.numeroFCI
|
|
176
|
-
|
|
177
|
-
def get_nve(self):
|
|
178
|
-
return self.nve
|
|
179
|
-
|
|
180
|
-
def get_pedidoExternoItem(self):
|
|
181
|
-
return self.pedidoExternoItem
|
|
182
|
-
|
|
183
|
-
def get_pedidoExternoNumero(self):
|
|
184
|
-
return self.pedidoExternoNumero
|
|
185
|
-
|
|
186
|
-
def get_percentualDevolvido(self):
|
|
187
|
-
return self.percentualDevolvido
|
|
188
|
-
|
|
189
|
-
def get_produtoCodigo(self):
|
|
190
|
-
return self.produtoCodigo
|
|
191
|
-
|
|
192
|
-
def get_produtoInfo(self):
|
|
193
|
-
return self.produtoInfo
|
|
194
|
-
|
|
195
|
-
def get_produtoNome(self):
|
|
196
|
-
return self.produtoNome
|
|
197
|
-
|
|
198
|
-
def get_qtdDevolucaoRef(self):
|
|
199
|
-
return self.qtdDevolucaoRef
|
|
200
|
-
|
|
201
|
-
def get_quantidade(self):
|
|
202
|
-
return self.quantidade
|
|
203
|
-
|
|
204
|
-
def get_quantidadeTrib(self):
|
|
205
|
-
return self.quantidadeTrib
|
|
206
|
-
|
|
207
|
-
def get_unidadeMedida(self):
|
|
208
|
-
return self.unidadeMedida
|
|
209
|
-
|
|
210
|
-
def get_unidadeMedidaTrib(self):
|
|
211
|
-
return self.unidadeMedidaTrib
|
|
212
|
-
|
|
213
|
-
def get_valorDesconto(self):
|
|
214
|
-
return self.valorDesconto
|
|
215
|
-
|
|
216
|
-
def get_valorDespAduaneira(self):
|
|
217
|
-
return self.valorDespAduaneira
|
|
218
|
-
|
|
219
|
-
def get_valorFrete(self):
|
|
220
|
-
return self.valorFrete
|
|
221
|
-
|
|
222
|
-
def get_valorIOF(self):
|
|
223
|
-
return self.valorIOF
|
|
224
|
-
|
|
225
|
-
def get_valorOutros(self):
|
|
226
|
-
return self.valorOutros
|
|
227
|
-
|
|
228
|
-
def get_valorSeguro(self):
|
|
229
|
-
return self.valorSeguro
|
|
230
|
-
|
|
231
|
-
def get_valorTotal(self):
|
|
232
|
-
return self.valorTotal
|
|
233
|
-
|
|
234
|
-
def get_valorTotalTrib(self):
|
|
235
|
-
return self.valorTotalTrib
|
|
236
|
-
|
|
237
|
-
def get_valorUnitario(self):
|
|
238
|
-
return self.valorUnitario
|
|
239
|
-
|
|
240
|
-
def get_valorUnitarioTrib(self):
|
|
241
|
-
return self.valorUnitarioTrib
|
|
242
|
-
|
|
243
|
-
def to_xml(self, template):
|
|
244
|
-
element = ET.Element(template.get('root', 'DET_NITEM'))
|
|
245
|
-
|
|
246
|
-
for attr, tag in template.get('fields', {}).items():
|
|
247
|
-
value = getattr(self, attr, None)
|
|
248
|
-
if value is not None:
|
|
249
|
-
child = ET.SubElement(element, tag)
|
|
250
|
-
child.text = str(value)
|
|
251
|
-
|
|
252
|
-
return element
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/Endereco.py
RENAMED
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeBoleto.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeCartao.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeDocRef.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeDuplicata.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeEnvioXML.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeEnvolvido.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeExportacao.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeFatura.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeObservacao.py
RENAMED
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeOrigem.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFePagamento.py
RENAMED
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeTransporte.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeVeiculo.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/NFeVolume.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/models/__init__.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.2 → ipiranga-inovai-project-lib-1.4}/inovai/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|