ipiranga-inovai-project-lib 0.5__py3-none-any.whl → 0.7__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/entities.py CHANGED
@@ -14,7 +14,7 @@ class IntegrationDocument(Base):
14
14
  access_key = Column('cd_chave_doc_integr', String(44))
15
15
  json_content = Column('aq_json', JSON, nullable=False)
16
16
  document_movement_type = Column('cd_tipo_mov_doc_integr', String(1))
17
- document_type = Column('cd_tipo_doc_integr', String(4))
17
+ document_type = Column('cd_tipo_doc_integr', String(8))
18
18
  document_series = Column('cd_serie_doc_integr', String(3), nullable=False)
19
19
  document_number = Column('no_doc_integr', Numeric(precision=11, scale=0), nullable=False)
20
20
  document_model = Column('cd_modl_doc_integr', String(3), nullable=False)
@@ -45,10 +45,10 @@ class IntegrationDocument(Base):
45
45
  "cd_filial": self.branch_code,
46
46
  "cd_cnpj_dest": self.recipient_cnpj,
47
47
  "cd_cnpj_emit": self.issuer_cnpj,
48
- "dt_emis_doc_integr": self.issuance_date.strftime("%Y-%m-%d") if self.issuance_date is not None else None,
49
- "dt_fisc": self.fiscal_date.strftime("%Y-%m-%d") if self.fiscal_date is not None else None,
50
- "dt_hora_criacao": self.created_at.strftime("%Y-%m-%d %H:%M:%S") if self.created_at is not None else None,
51
- "dt_incl": self.updated_at.strftime("%Y-%m-%d %H:%M:%S") if self.updated_at is not None else None,
48
+ "dt_emis_doc_integr": self.issuance_date,
49
+ "dt_fisc": self.fiscal_date,
50
+ "dt_hora_criacao": self.created_at,
51
+ "dt_incl": self.updated_at,
52
52
  "request_id": self.request_id,
53
53
  "nm_sist_orig": self.origin,
54
54
  "id_cnpj_mov": self.responsible_movement
@@ -157,7 +157,7 @@ class ParamProcessingKit(Base):
157
157
  kit_id = Column('cd_kit', Integer, ForeignKey('fiscal.kit_obi.no_seq_kit'), nullable=False)
158
158
  process_code = Column('cd_proc_obi', String(30))
159
159
  status = Column('id_status_param', Boolean, nullable=False)
160
- document_type = Column('cd_tipo_doc_integr', String(4))
160
+ document_type = Column('cd_tipo_doc_integr', String(8))
161
161
  created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
162
162
 
163
163
  def __init__(self, param_processing_kit_id, kit_id, process_code, status, document_type):
@@ -259,3 +259,6 @@ class KitIntegrationDocumentStatus(Base):
259
259
  self.kit_id = kit_id
260
260
  self.integration_status = integration_status
261
261
  self.created_at = datetime.now()
262
+
263
+ def __str__(self):
264
+ return f'document_id: {self.document_id}, kit_id: {self.kit_id}, integration_status: {self.integration_status}'
inovai/enums.py CHANGED
@@ -14,3 +14,31 @@ class DocumentMovementType(Enum):
14
14
  class ResponsibleMovement(Enum):
15
15
  ISSUER = 'EMITENTE'
16
16
  RECIPIENT = 'DESTINATARIO'
17
+
18
+
19
+ class Origin(Enum):
20
+ JDE = "JDE"
21
+ ABADI = "ABADI"
22
+
23
+
24
+ class DocumentType(Enum):
25
+ SERVICE = 'SERV'
26
+ PRODUCT = 'PROD'
27
+ ISS_SERVICE = "SERV_ISS"
28
+
29
+
30
+ class TaxType:
31
+ PIS = "PIS"
32
+ IPI = "IPI"
33
+ ISS = "ISS"
34
+ INSS = "INSS"
35
+ COFINS = "COFINS"
36
+ ISSRET = "ISSRET"
37
+ ICMS = "ICMS"
38
+ ICMSST = "ICMSST"
39
+ ICMSFCP = "ICMSFCP"
40
+ ICMSFCPST = "ICMSFCPST"
41
+ ICMSMONORETEN = "ICMSMONORETEN"
42
+ ICMSMONOPROP = "ICMSMONOPROP"
43
+ ICMSMONODIFER = "ICMSMONODIFER"
44
+ ICMSMONORET = "ICMSMONORET"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipiranga-inovai-project-lib
3
- Version: 0.5
3
+ Version: 0.7
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
@@ -0,0 +1,8 @@
1
+ inovai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ inovai/entities.py,sha256=tsa9Fpm0kOmulP1mg2hLk6jeP4jrU5cnI01dT0QIAqY,12749
3
+ inovai/enums.py,sha256=d_p5zSC28HPfZ6zeXETnnKCXIqbwvtKhc1A8N-SI7IQ,847
4
+ ipiranga_inovai_project_lib-0.7.dist-info/LICENSE,sha256=UJ3ql8eZec9Y1kER7QSHAuvdgFPuL47asePHYmdzG_o,198
5
+ ipiranga_inovai_project_lib-0.7.dist-info/METADATA,sha256=bX8513LepncmWpHDlVeD0hW7PYQa4mlhn_QxiZiSANY,518
6
+ ipiranga_inovai_project_lib-0.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7
+ ipiranga_inovai_project_lib-0.7.dist-info/top_level.txt,sha256=BD-APH5oIEb_KDXwrfnZiu9QDsD9ttTEkYc32r9thqg,7
8
+ ipiranga_inovai_project_lib-0.7.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- inovai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- inovai/entities.py,sha256=TWaxvS8La6mNRZPsthoW1UVVmiWYDhOVjwWn7MmC3JA,12872
3
- inovai/enums.py,sha256=5NxAF59BwbXCi-pt6vHlBuoyykViXaCTIphFci__hYE,305
4
- ipiranga_inovai_project_lib-0.5.dist-info/LICENSE,sha256=UJ3ql8eZec9Y1kER7QSHAuvdgFPuL47asePHYmdzG_o,198
5
- ipiranga_inovai_project_lib-0.5.dist-info/METADATA,sha256=yBnZAL03b5_SzWVw6lfQ370-lk6r6H9UgmN8Zqz6Pos,518
6
- ipiranga_inovai_project_lib-0.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7
- ipiranga_inovai_project_lib-0.5.dist-info/top_level.txt,sha256=BD-APH5oIEb_KDXwrfnZiu9QDsD9ttTEkYc32r9thqg,7
8
- ipiranga_inovai_project_lib-0.5.dist-info/RECORD,,