ipiranga-inovai-project-lib 0.4__tar.gz → 0.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipiranga-inovai-project-lib
3
- Version: 0.4
3
+ Version: 0.6
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
@@ -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,14 +157,16 @@ 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
161
  created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
161
162
 
162
- def __init__(self, param_processing_kit_id, kit_id, process_code, status):
163
+ def __init__(self, param_processing_kit_id, kit_id, process_code, status, document_type):
163
164
  super().__init__()
164
165
  self.param_processing_kit_id = param_processing_kit_id
165
166
  self.kit_id = kit_id
166
167
  self.process_code = process_code
167
168
  self.status = status
169
+ self.document_type = document_type
168
170
  self.created_at = datetime.now()
169
171
 
170
172
 
@@ -257,3 +259,6 @@ class KitIntegrationDocumentStatus(Base):
257
259
  self.kit_id = kit_id
258
260
  self.integration_status = integration_status
259
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}'
@@ -14,3 +14,8 @@ 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"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipiranga-inovai-project-lib
3
- Version: 0.4
3
+ Version: 0.6
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="0.4",
5
+ version="0.6",
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(),