worker-automate-hub 0.5.709__tar.gz → 0.5.710__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.
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/PKG-INFO +1 -1
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/pyproject.toml +1 -1
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/utils_nfe_entrada.py +101 -66
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/README.md +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/datalake_service.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/rdp_service.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/rpa_fila_service.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/webhook_service.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dao/rpa_fila.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dao/rpa_robo.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dto/rpa_sap_dto.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/abertura_livros_fiscais.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/cte_manual.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/cte_xml.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/devolucao_ctf.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/devolucao_ctf_35.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_cte_1353.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_cte_333.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_503.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/integracao_contabil.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/integracao_contabil_generica.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/lancamento_rateio.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/notas_faturamento_sap.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/worker.py +0 -0
@@ -73,7 +73,7 @@ class EMSys:
|
|
73
73
|
sucesso=False,
|
74
74
|
retorno="Não foi possivel acessar a aba de 'Itens da nota'",
|
75
75
|
status=RpaHistoricoStatusEnum.Falha,
|
76
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
76
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
77
77
|
)
|
78
78
|
else:
|
79
79
|
return True
|
@@ -127,7 +127,6 @@ class EMSys:
|
|
127
127
|
async def percorrer_grid(self, cnpj=None):
|
128
128
|
self.apenas_isqueiros = True
|
129
129
|
await self.click_itens_da_nota()
|
130
|
-
|
131
130
|
|
132
131
|
console.print("Acessando os itens indivualmente... \n")
|
133
132
|
send_keys("{TAB 2}", pause=0.1)
|
@@ -135,10 +134,10 @@ class EMSys:
|
|
135
134
|
index_item_atual = 0
|
136
135
|
index_ultimo_item = await self.get_ultimo_item()
|
137
136
|
console.print(f"Index ultimo item: {index_ultimo_item}")
|
138
|
-
|
137
|
+
|
139
138
|
try:
|
140
139
|
while index_item_atual < index_ultimo_item:
|
141
|
-
|
140
|
+
|
142
141
|
send_keys("^({HOME})")
|
143
142
|
await worker_sleep(1)
|
144
143
|
|
@@ -150,9 +149,9 @@ class EMSys:
|
|
150
149
|
send_keys("{DOWN 2}")
|
151
150
|
await worker_sleep(1)
|
152
151
|
send_keys("{ENTER}")
|
153
|
-
|
152
|
+
|
154
153
|
await worker_sleep(2)
|
155
|
-
|
154
|
+
|
156
155
|
app = Application().connect(title="Alteração de Item")
|
157
156
|
main_window = app["Alteração de Item"]
|
158
157
|
|
@@ -161,26 +160,30 @@ class EMSys:
|
|
161
160
|
edit = main_window.child_window(
|
162
161
|
class_name="TDBIEditCode", found_index=0
|
163
162
|
)
|
164
|
-
|
163
|
+
# Caminho da imagem
|
165
164
|
caminho_imagem = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\entrada_de_notas_16\ipi_0.png"
|
166
165
|
# Verifica se o arquivo existe
|
167
166
|
if os.path.exists(caminho_imagem):
|
168
167
|
print("Imagem já existe. Clicando em 'Cancelar'...")
|
169
|
-
|
170
|
-
# Conectando à janela do app
|
171
|
-
app = Application().connect(
|
168
|
+
|
169
|
+
# Conectando à janela do app
|
170
|
+
app = Application().connect(
|
171
|
+
class_name="TFrmAlteraItemNFE", timeout=60
|
172
|
+
)
|
172
173
|
janela_cancelar = app["TFrmAlteraItemNFE"]
|
173
174
|
|
174
175
|
# Encontra o botão pelo texto
|
175
176
|
try:
|
176
|
-
cancelar_btn = janela_cancelar.child_window(
|
177
|
+
cancelar_btn = janela_cancelar.child_window(
|
178
|
+
class_name="TDBIBitBtn", found_index=2
|
179
|
+
)
|
177
180
|
cancelar_btn.click_input()
|
178
181
|
print("Clicou em 'Cancelar'.")
|
179
182
|
index_item_atual += 1
|
180
183
|
continue
|
181
184
|
except:
|
182
185
|
pass
|
183
|
-
#seta IPI 0%
|
186
|
+
# seta IPI 0%
|
184
187
|
ipi_combobox = main_window.child_window(
|
185
188
|
class_name="TDBIComboBox", found_index=4
|
186
189
|
)
|
@@ -199,15 +202,22 @@ class EMSys:
|
|
199
202
|
console.log(f"item name: {item_value}")
|
200
203
|
|
201
204
|
# Verifica se o item é 'isqueiro'
|
202
|
-
if (
|
205
|
+
if (
|
206
|
+
"isqueiro" in item_value.lower()
|
207
|
+
or "acendedor" in item_value.lower()
|
208
|
+
) and cnpj != "36359969000109":
|
203
209
|
|
204
210
|
try:
|
205
|
-
console.print(
|
206
|
-
|
207
|
-
|
211
|
+
console.print(
|
212
|
+
f"Trabalhando com os itens, alterando o código de tributação dos ISQUEIROS/ACENDEDORES para manual \n"
|
213
|
+
)
|
214
|
+
console.print(
|
215
|
+
"Item encontrado: ISQUEIRO/ACENDEDORES. Processando...\n"
|
216
|
+
)
|
217
|
+
|
208
218
|
tipos_unidade = ["UNIDADE", "UN"]
|
209
219
|
for tipo in tipos_unidade:
|
210
|
-
try:
|
220
|
+
try:
|
211
221
|
await worker_sleep(4)
|
212
222
|
# Selecionar natureza da operação 9 - outros
|
213
223
|
select_other = main_window.child_window(
|
@@ -217,7 +227,7 @@ class EMSys:
|
|
217
227
|
# Check Alterar Trib. Manual
|
218
228
|
pyautogui.click(1177, 740)
|
219
229
|
# pyautogui.moveTo(1177, 740)
|
220
|
-
|
230
|
+
|
221
231
|
# Click Alterar
|
222
232
|
await worker_sleep(1)
|
223
233
|
pyautogui.click(1180, 776)
|
@@ -245,20 +255,24 @@ class EMSys:
|
|
245
255
|
# Verifica se o arquivo existe
|
246
256
|
if os.path.exists(caminho_imagem):
|
247
257
|
print("Imagem já existe. Clicando em 'Cancelar'...")
|
248
|
-
|
249
|
-
# Conectando à janela do app
|
250
|
-
app = Application().connect(
|
258
|
+
|
259
|
+
# Conectando à janela do app
|
260
|
+
app = Application().connect(
|
261
|
+
class_name="TFrmAlteraItemNFE", timeout=60
|
262
|
+
)
|
251
263
|
janela_cancelar = app["TFrmAlteraItemNFE"]
|
252
264
|
|
253
265
|
# Encontra o botão pelo texto
|
254
266
|
try:
|
255
|
-
cancelar_btn = janela_cancelar.child_window(
|
267
|
+
cancelar_btn = janela_cancelar.child_window(
|
268
|
+
class_name="TDBIBitBtn", found_index=2
|
269
|
+
)
|
256
270
|
cancelar_btn.click_input()
|
257
271
|
print("Clicou em 'Cancelar'.")
|
258
272
|
except Exception as e:
|
259
273
|
print(f"Erro ao clicar no botão: {e}")
|
260
|
-
else:
|
261
|
-
#Seleciona o IPI 0%
|
274
|
+
else:
|
275
|
+
# Seleciona o IPI 0%
|
262
276
|
ipi_combobox = main_window.child_window(
|
263
277
|
class_name="TDBIComboBox", found_index=4
|
264
278
|
)
|
@@ -283,7 +297,6 @@ class EMSys:
|
|
283
297
|
await worker_sleep(1)
|
284
298
|
pyautogui.click(1083, 682)
|
285
299
|
|
286
|
-
|
287
300
|
except Exception as e:
|
288
301
|
return {
|
289
302
|
"sucesso": False,
|
@@ -297,7 +310,7 @@ class EMSys:
|
|
297
310
|
async def select_tipo_cobranca(self):
|
298
311
|
await worker_sleep(3)
|
299
312
|
# pyautogui.click(632, 384)
|
300
|
-
|
313
|
+
|
301
314
|
console.print("Navegando pela Janela de Nota Fiscal de Entrada...\n")
|
302
315
|
app = Application().connect(class_name="TFrmNotaFiscalEntrada")
|
303
316
|
main_window = app["TFrmNotaFiscalEntrada"]
|
@@ -312,7 +325,7 @@ class EMSys:
|
|
312
325
|
await worker_sleep(2)
|
313
326
|
panel_TTabSheet.click()
|
314
327
|
send_keys("{DOWN " + ("2") + "}")
|
315
|
-
|
328
|
+
|
316
329
|
await worker_sleep(2)
|
317
330
|
# pyautogui.click(893, 549)
|
318
331
|
await worker_sleep(5)
|
@@ -322,9 +335,9 @@ class EMSys:
|
|
322
335
|
localizacao = pyautogui.locateOnScreen(caminho_imagem, confidence=0.9)
|
323
336
|
if localizacao:
|
324
337
|
pass
|
325
|
-
|
338
|
+
|
326
339
|
except:
|
327
|
-
try:
|
340
|
+
try:
|
328
341
|
# Selecionar natureza da operação 9 - outros
|
329
342
|
select_other = main_window.child_window(
|
330
343
|
class_name="TDBIComboBox", found_index=0
|
@@ -337,29 +350,31 @@ class EMSys:
|
|
337
350
|
# except:
|
338
351
|
# set_combobox("||List", "BOLETO")
|
339
352
|
|
340
|
-
async def inserir_vencimento_e_valor(
|
353
|
+
async def inserir_vencimento_e_valor(
|
354
|
+
self, nome_fornecedor, data_emissao, data_vencimento, valor
|
355
|
+
):
|
341
356
|
|
342
357
|
if float(valor) <= 0:
|
343
358
|
return RpaRetornoProcessoDTO(
|
344
359
|
sucesso=False,
|
345
360
|
retorno=f"O valor da nota não pode ser {valor}",
|
346
361
|
status=RpaHistoricoStatusEnum.Falha,
|
347
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
362
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
348
363
|
)
|
349
364
|
|
350
|
-
emission_date = datetime.strptime(data_emissao,
|
351
|
-
due_date = datetime.strptime(data_vencimento,
|
352
|
-
min_due_date = emission_date + timedelta(days=
|
365
|
+
emission_date = datetime.strptime(data_emissao, "%d/%m/%Y")
|
366
|
+
due_date = datetime.strptime(data_vencimento, "%d/%m/%Y")
|
367
|
+
min_due_date = emission_date + timedelta(days=7)
|
353
368
|
|
354
369
|
pyautogui.click(1030, 648)
|
355
|
-
send_keys(
|
370
|
+
send_keys("^c")
|
356
371
|
await worker_sleep(1)
|
357
372
|
current_content = pyperclip.paste().strip()
|
358
|
-
date_match = re.search(r
|
373
|
+
date_match = re.search(r"\d{2}/\d{2}/\d{4}", current_content)
|
359
374
|
|
360
|
-
if
|
375
|
+
if "SOUZA CRUZ" in nome_fornecedor.upper():
|
361
376
|
if due_date < min_due_date and date_match is not None:
|
362
|
-
new_due_date_str = min_due_date.strftime(
|
377
|
+
new_due_date_str = min_due_date.strftime("%d/%m/%Y")
|
363
378
|
pyautogui.click(891, 596)
|
364
379
|
await worker_sleep(1)
|
365
380
|
pyautogui.write(new_due_date_str)
|
@@ -371,7 +386,7 @@ class EMSys:
|
|
371
386
|
pyautogui.write(valor)
|
372
387
|
await worker_sleep(1)
|
373
388
|
elif date_match is None:
|
374
|
-
new_due_date_str = min_due_date.strftime(
|
389
|
+
new_due_date_str = min_due_date.strftime("%d/%m/%Y")
|
375
390
|
pyautogui.click(891, 596)
|
376
391
|
await worker_sleep(1)
|
377
392
|
pyautogui.write(new_due_date_str)
|
@@ -399,7 +414,9 @@ class EMSys:
|
|
399
414
|
|
400
415
|
await worker_sleep(5)
|
401
416
|
try:
|
402
|
-
console.print(
|
417
|
+
console.print(
|
418
|
+
"Verificando a existencia de warning acusando que a soma de pagamentos não bate com o valor da nota\n"
|
419
|
+
)
|
403
420
|
app = Application().connect(title="Warning")
|
404
421
|
main_window = app["Warning"]
|
405
422
|
main_window.set_focus()
|
@@ -416,7 +433,9 @@ class EMSys:
|
|
416
433
|
}
|
417
434
|
|
418
435
|
except:
|
419
|
-
console.print(
|
436
|
+
console.print(
|
437
|
+
"Não há warnings durante a inserção de vencimento e valor...\n"
|
438
|
+
)
|
420
439
|
|
421
440
|
async def incluir_registro(self, chave_nfe=None, chave_cte=None):
|
422
441
|
max_attempts = 3
|
@@ -428,11 +447,13 @@ class EMSys:
|
|
428
447
|
pyautogui.click(593, 297)
|
429
448
|
await worker_sleep(1)
|
430
449
|
except Exception as err:
|
431
|
-
console.print(
|
432
|
-
|
450
|
+
console.print(
|
451
|
+
f"Não foi possível incluir o registro: {err}", style="bold red"
|
452
|
+
)
|
453
|
+
|
433
454
|
await worker_sleep(3)
|
434
455
|
i += 1
|
435
|
-
|
456
|
+
|
436
457
|
if chave_nfe is not None:
|
437
458
|
await worker_sleep(20)
|
438
459
|
console.print("\nVerifica se a nota ja foi lançada...")
|
@@ -444,7 +465,7 @@ class EMSys:
|
|
444
465
|
retorno="Nota lançada com sucesso!",
|
445
466
|
status=RpaHistoricoStatusEnum.Sucesso,
|
446
467
|
)
|
447
|
-
|
468
|
+
|
448
469
|
if chave_cte is not None:
|
449
470
|
await worker_sleep(20)
|
450
471
|
console.print("\nVerifica se o CTE ja foi lançada...")
|
@@ -456,7 +477,6 @@ class EMSys:
|
|
456
477
|
retorno="CTE lançado com sucesso!",
|
457
478
|
status=RpaHistoricoStatusEnum.Sucesso,
|
458
479
|
)
|
459
|
-
|
460
480
|
|
461
481
|
async def get_ultimo_item(self):
|
462
482
|
send_keys("^({END})")
|
@@ -540,7 +560,9 @@ class EMSys:
|
|
540
560
|
for item in data_list:
|
541
561
|
variacao_custo = 20
|
542
562
|
if not (
|
543
|
-
item["custo_min"] - variacao_custo
|
563
|
+
item["custo_min"] - variacao_custo
|
564
|
+
<= item["curto"]
|
565
|
+
<= item["custo_max"] + variacao_custo
|
544
566
|
):
|
545
567
|
itens_invalidos.append(item["codigo"])
|
546
568
|
|
@@ -556,7 +578,7 @@ class EMSys:
|
|
556
578
|
sucesso=False,
|
557
579
|
retorno=observacao,
|
558
580
|
status=RpaHistoricoStatusEnum.Falha,
|
559
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
581
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
560
582
|
)
|
561
583
|
else:
|
562
584
|
console.print(
|
@@ -586,9 +608,9 @@ class EMSys:
|
|
586
608
|
sucesso=False,
|
587
609
|
retorno=observacao,
|
588
610
|
status=RpaHistoricoStatusEnum.Falha,
|
589
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
611
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
590
612
|
)
|
591
|
-
|
613
|
+
|
592
614
|
return RpaRetornoProcessoDTO(
|
593
615
|
sucesso=True,
|
594
616
|
retorno=observacao,
|
@@ -652,7 +674,11 @@ class EMSys:
|
|
652
674
|
return final_list
|
653
675
|
|
654
676
|
async def download_xml(
|
655
|
-
self,
|
677
|
+
self,
|
678
|
+
google_drive_folder_id: str,
|
679
|
+
get_gcp_token: RpaConfiguracao,
|
680
|
+
get_gcp_credentials: RpaConfiguracao,
|
681
|
+
chave_nota: str,
|
656
682
|
) -> dict:
|
657
683
|
|
658
684
|
try:
|
@@ -671,7 +697,7 @@ class EMSys:
|
|
671
697
|
sucesso=False,
|
672
698
|
retorno=error_msg,
|
673
699
|
status=RpaHistoricoStatusEnum.Falha,
|
674
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
700
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
675
701
|
)
|
676
702
|
|
677
703
|
# Inicializando o serviço do Google Drive
|
@@ -701,9 +727,8 @@ class EMSys:
|
|
701
727
|
sucesso=False,
|
702
728
|
retorno=error_msg,
|
703
729
|
status=RpaHistoricoStatusEnum.Falha,
|
704
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
730
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
705
731
|
)
|
706
|
-
|
707
732
|
|
708
733
|
# Pegando o primeiro arquivo encontrado
|
709
734
|
file_id = items[0]["id"]
|
@@ -737,7 +762,7 @@ class EMSys:
|
|
737
762
|
sucesso=False,
|
738
763
|
retorno=error_msg,
|
739
764
|
status=RpaHistoricoStatusEnum.Falha,
|
740
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
765
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
741
766
|
)
|
742
767
|
|
743
768
|
async def get_xml(self, xml_file):
|
@@ -755,7 +780,8 @@ class EMSys:
|
|
755
780
|
return RpaRetornoProcessoDTO(
|
756
781
|
sucesso=False,
|
757
782
|
retorno=f"O xml {xml_name} não foi encontrado em {path_to_xml}",
|
758
|
-
status=RpaHistoricoStatusEnum.Falha,
|
783
|
+
status=RpaHistoricoStatusEnum.Falha,
|
784
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
759
785
|
)
|
760
786
|
|
761
787
|
async def delete_xml(self, nfe_key: str) -> None:
|
@@ -798,12 +824,14 @@ class EMSys:
|
|
798
824
|
f"Erro ao deletar o arquivo {xml_filename}: {str(e)}"
|
799
825
|
) from e
|
800
826
|
|
801
|
-
async def alterar_nop(
|
827
|
+
async def alterar_nop(
|
828
|
+
self, cfop: str, chave_acesso=None
|
829
|
+
) -> RpaRetornoProcessoDTO | None:
|
802
830
|
await self.click_principal()
|
803
831
|
console.print("Alterando a NOP...\n")
|
804
832
|
pyautogui.click(945, 543)
|
805
833
|
await worker_sleep(2)
|
806
|
-
|
834
|
+
|
807
835
|
if chave_acesso is not None:
|
808
836
|
console.print("\nVerifica se a nota ja foi lançada...")
|
809
837
|
nf_chave_acesso = int(chave_acesso)
|
@@ -818,7 +846,9 @@ class EMSys:
|
|
818
846
|
try:
|
819
847
|
if self.apenas_isqueiros:
|
820
848
|
nop_value = "1102 - COMPRA DE MERCADORIA ADQ. TERCEIROS - 1.102"
|
821
|
-
console.print(
|
849
|
+
console.print(
|
850
|
+
f"Inserindo a informação da NOP para apenas isqueiros: {nop_value} ...\n"
|
851
|
+
)
|
822
852
|
await worker_sleep(5)
|
823
853
|
set_combobox("||List", nop_value)
|
824
854
|
await worker_sleep(2)
|
@@ -827,7 +857,9 @@ class EMSys:
|
|
827
857
|
await self.incluir_registro()
|
828
858
|
else:
|
829
859
|
if cfop:
|
830
|
-
console.print(
|
860
|
+
console.print(
|
861
|
+
f"Inserindo a informação da NOP, caso se aplique {cfop} ...\n"
|
862
|
+
)
|
831
863
|
if cfop not in ["5910", "6910"]:
|
832
864
|
await worker_sleep(5)
|
833
865
|
set_combobox("||List", "1403 - COMPRA DE MERCADORIA - 1.403")
|
@@ -836,14 +868,16 @@ class EMSys:
|
|
836
868
|
await worker_sleep(6)
|
837
869
|
await self.incluir_registro()
|
838
870
|
await worker_sleep(15)
|
839
|
-
|
871
|
+
|
840
872
|
if chave_acesso is not None:
|
841
873
|
console.print("\nVerifica se a nota ja foi lançada...")
|
842
874
|
nf_chave_acesso = int(chave_acesso)
|
843
875
|
status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
|
844
876
|
if status_nf_emsys.get("status") != "Lançada":
|
845
|
-
raise ValueError(
|
846
|
-
|
877
|
+
raise ValueError(
|
878
|
+
"A nota não possui itens com o mesmo CFOP de capa. Necessário que ao menos um item possua este CFOP"
|
879
|
+
)
|
880
|
+
|
847
881
|
else:
|
848
882
|
pyautogui.hotkey("esc")
|
849
883
|
observacao = f"Nota bonificada do tipo ({cfop}), está retornando diferença de itens sem o mesmo CFOP de capa. Por favor verifique a nota."
|
@@ -851,7 +885,7 @@ class EMSys:
|
|
851
885
|
sucesso=False,
|
852
886
|
retorno=observacao,
|
853
887
|
status=RpaHistoricoStatusEnum.Falha,
|
854
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
888
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
855
889
|
)
|
856
890
|
except ValueError as e:
|
857
891
|
console.print(f"Erro de validação ao alterar o NOP: {e}", style="bold red")
|
@@ -869,7 +903,8 @@ class EMSys:
|
|
869
903
|
async def verify_nf_incuded(self) -> bool:
|
870
904
|
try:
|
871
905
|
nota_incluida = pyautogui.locateOnScreen(
|
872
|
-
ASSETS_PATH + "\\entrada_notas\\nota_fiscal_incluida.png",
|
906
|
+
ASSETS_PATH + "\\entrada_notas\\nota_fiscal_incluida.png",
|
907
|
+
confidence=0.7,
|
873
908
|
)
|
874
909
|
if nota_incluida:
|
875
910
|
return True
|
@@ -877,4 +912,4 @@ class EMSys:
|
|
877
912
|
return False
|
878
913
|
except Exception as e:
|
879
914
|
console.print(f"Error: {e}")
|
880
|
-
return False
|
915
|
+
return False
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/ahead_service.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/api/rdp_service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/config/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/config/settings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/repeat.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/retry.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/decorators/timeit.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/models/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/tasks/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/env.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/logger.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/toast.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/updater.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.709 → worker_automate_hub-0.5.710}/worker_automate_hub/utils/util.py
RENAMED
File without changes
|
File without changes
|