ipiranga-inovai-project-lib 3.9__py3-none-any.whl → 4.1__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/NFe.py CHANGED
@@ -117,6 +117,7 @@ class NFe:
117
117
  valorRetPrev: float
118
118
  valorSeguro: float
119
119
  valorTotalTrib: float
120
+ categoriaEstab: str
120
121
 
121
122
  def __init__(self, **json):
122
123
  if json:
@@ -468,3 +469,5 @@ class NFe:
468
469
  def get_valorTotalTrib(self):
469
470
  return self.valorTotalTrib
470
471
 
472
+ def get_categoriaEstab(self):
473
+ return self.categoriaEstab
inovai/utils/util.py CHANGED
@@ -1,13 +1,13 @@
1
1
  import logging
2
+ from datetime import datetime
2
3
 
3
- from dateutil import parser
4
4
 
5
-
6
- def format_date(date_str, formatter: str = '%d/%m/%Y') -> str:
5
+ def format_date(date_str, date_str_format: str = '%d/%m/%Y', new_format: str = None) -> str:
7
6
  try:
8
- date_obj = parser.parse(date_str)
9
- date_formatted = date_obj.strftime(formatter)
10
- return date_formatted
11
- except ValueError:
12
- logging.error(f"Formato de data invalido. Data {date_str}")
7
+ date_obj = datetime.strptime(date_str, date_str_format)
8
+ if new_format:
9
+ return date_obj.strftime(new_format)
10
+ return date_obj.strftime(date_str_format)
11
+ except Exception as e:
12
+ logging.error(f"Formato de data invalido. Data {date_str}, formato esperado: {date_str_format}", e)
13
13
  return ''
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipiranga-inovai-project-lib
3
- Version: 3.9
3
+ Version: 4.1
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
@@ -3,7 +3,7 @@ inovai/dtos.py,sha256=qaWZB7n5SHcC58RP351IQ1HLjv7fx3VAdILj-GugVWs,1587
3
3
  inovai/entities.py,sha256=-ANFEKFUI-j020CXo7NQnwI9jgFlbuqR1Takkwiq91E,20766
4
4
  inovai/enums.py,sha256=hj6KZRzV_LZIEnpycCl1yrP2aQdm75pm8WN8CM3TBfI,2367
5
5
  inovai/models/Endereco.py,sha256=Vft20vMwYwTXtEuh5NH7O5FxXVahnLmgaXMDOVdBxY4,3519
6
- inovai/models/NFe.py,sha256=3PiMvK6AODaagZU7KEpnjYfulz8PvcQYGChIa-QCvg0,13023
6
+ inovai/models/NFe.py,sha256=Gcf2Z2Vm3q8tWfmYussb8UVp-5V4DjbMG_4o7P1nEeU,13119
7
7
  inovai/models/NFeBoleto.py,sha256=tLWqsOlszA6UiJdxesJKQkgwNk_4DuI3NRBCYZh7RKc,5006
8
8
  inovai/models/NFeCartao.py,sha256=3JTl_i9V6cu6gOkbWM1Mj10BALmHezlRVR-xGx6m5GI,1876
9
9
  inovai/models/NFeDadosAtivos.py,sha256=Iivtw5Z--q82NxrUXWwGvqhMjKKtoqGUQO0WZTMpbFQ,3079
@@ -33,9 +33,9 @@ inovai/models/NFeVeiculo.py,sha256=iwnD0uZjHU2l4J_QP7JW9EQpJZWDYCEIhRxpWrvxtns,1
33
33
  inovai/models/NFeVolume.py,sha256=_cayb-rrz1mSxQ3wFFnB4KCi524jtAsdTTcS4WQTBOc,1970
34
34
  inovai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  inovai/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- inovai/utils/util.py,sha256=tEFFoYhtyZk2pxor2vb23NWr3otPzPXTiTIf-VrGik4,366
37
- ipiranga_inovai_project_lib-3.9.dist-info/LICENSE,sha256=UJ3ql8eZec9Y1kER7QSHAuvdgFPuL47asePHYmdzG_o,198
38
- ipiranga_inovai_project_lib-3.9.dist-info/METADATA,sha256=vzncadXPPF3P-4g6Jn5a87F_UzumVGjmy-XniwJxSPE,518
39
- ipiranga_inovai_project_lib-3.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
40
- ipiranga_inovai_project_lib-3.9.dist-info/top_level.txt,sha256=BD-APH5oIEb_KDXwrfnZiu9QDsD9ttTEkYc32r9thqg,7
41
- ipiranga_inovai_project_lib-3.9.dist-info/RECORD,,
36
+ inovai/utils/util.py,sha256=eRDwHv5h6h6sjiryY0GTr545Dp9WY9YDkMF7ovU5j28,501
37
+ ipiranga_inovai_project_lib-4.1.dist-info/LICENSE,sha256=UJ3ql8eZec9Y1kER7QSHAuvdgFPuL47asePHYmdzG_o,198
38
+ ipiranga_inovai_project_lib-4.1.dist-info/METADATA,sha256=4RvYcauDywbfyPfvirbxYEFlUmJFhvGlXn3RFpMEihE,518
39
+ ipiranga_inovai_project_lib-4.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
40
+ ipiranga_inovai_project_lib-4.1.dist-info/top_level.txt,sha256=BD-APH5oIEb_KDXwrfnZiu9QDsD9ttTEkYc32r9thqg,7
41
+ ipiranga_inovai_project_lib-4.1.dist-info/RECORD,,