worker-automate-hub 0.5.85__py3-none-any.whl → 0.5.86__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.
- worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +41 -2
- {worker_automate_hub-0.5.85.dist-info → worker_automate_hub-0.5.86.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.85.dist-info → worker_automate_hub-0.5.86.dist-info}/RECORD +5 -5
- {worker_automate_hub-0.5.85.dist-info → worker_automate_hub-0.5.86.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.85.dist-info → worker_automate_hub-0.5.86.dist-info}/entry_points.txt +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
import asyncio
|
1
2
|
import getpass
|
2
3
|
import os
|
3
4
|
import warnings
|
@@ -7,6 +8,7 @@ import pytesseract
|
|
7
8
|
from PIL import Image, ImageEnhance
|
8
9
|
from pywinauto.application import Application
|
9
10
|
from pywinauto_recorder.player import set_combobox
|
11
|
+
from pywinauto.keyboard import send_keys
|
10
12
|
from rich.console import Console
|
11
13
|
from worker_automate_hub.api.ahead_service import save_xml_to_downloads
|
12
14
|
from worker_automate_hub.api.client import (
|
@@ -316,7 +318,6 @@ async def entrada_de_notas_7139(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
316
318
|
|
317
319
|
await worker_sleep(6)
|
318
320
|
|
319
|
-
|
320
321
|
max_attempts = 7
|
321
322
|
i = 0
|
322
323
|
while i < max_attempts:
|
@@ -343,6 +344,44 @@ async def entrada_de_notas_7139(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
343
344
|
"sucesso": False,
|
344
345
|
"retorno": f"Número máximo de tentativas atingido. A tela para Aguarde não foi encerrada.",
|
345
346
|
}
|
347
|
+
|
348
|
+
await worker_sleep(2)
|
349
|
+
console.print("Navegando pela Janela de Nota Fiscal de Entrada...\n")
|
350
|
+
app = Application().connect(class_name="TFrmNotaFiscalEntrada")
|
351
|
+
main_window = app["TFrmNotaFiscalEntrada"]
|
352
|
+
|
353
|
+
main_window.set_focus()
|
354
|
+
console.print("Acessando a aba de Pagamentos... \n")
|
355
|
+
panel_TPage = main_window.child_window(class_name="TPage", title="Formulario")
|
356
|
+
panel_TTabSheet = panel_TPage.child_window(class_name="TcxCustomInnerTreeView")
|
357
|
+
panel_TTabSheet.wait("visible")
|
358
|
+
panel_TTabSheet.click()
|
359
|
+
send_keys("{DOWN " + ("7") + "}")
|
360
|
+
|
361
|
+
panel_TPage = main_window.child_window(class_name="TPage", title="Formulario")
|
362
|
+
panel_TTabSheet = panel_TPage.child_window(class_name="TPageControl")
|
363
|
+
|
364
|
+
panel_TabPagamento = panel_TTabSheet.child_window(class_name="TTabSheet")
|
365
|
+
|
366
|
+
panel_TabParcelamento = panel_TTabSheet.child_window(title="Parcelamento")
|
367
|
+
|
368
|
+
tipo_cobranca = panel_TabParcelamento.child_window(
|
369
|
+
class_name="TDBIComboBox", found_index=0
|
370
|
+
)
|
371
|
+
|
372
|
+
console.print("Verificando o tipo de cobrança selecionado... \n")
|
373
|
+
tipo_selecionado = tipo_cobranca.window_text()
|
374
|
+
if "boleto" in tipo_selecionado.lower() or 'carteira' in tipo_selecionado.lower():
|
375
|
+
console.print(f"Tipo de cobrança corretamente selecionado {tipo_selecionado}... \n")
|
376
|
+
else:
|
377
|
+
console.print(f"Tipo de cobrança não foi selecionado corretamente, interagindo com o campo para selecionar o campo corretamente... \n")
|
378
|
+
tipo_cobranca.click()
|
379
|
+
try:
|
380
|
+
set_combobox("||List", "BANCO DO BRASIL BOLETO")
|
381
|
+
except:
|
382
|
+
set_combobox("||List", "CARTEIRA")
|
383
|
+
|
384
|
+
await worker_sleep(2)
|
346
385
|
|
347
386
|
# Inclui registro
|
348
387
|
console.print(f"Incluindo registro...\n")
|
@@ -399,4 +438,4 @@ async def entrada_de_notas_7139(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
399
438
|
|
400
439
|
finally:
|
401
440
|
# Deleta o xml
|
402
|
-
await delete_xml(nota.get("nfe"))
|
441
|
+
await delete_xml(nota.get("nfe"))
|
@@ -54,7 +54,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=sFe3aYh6MrpK18aJddd
|
|
54
54
|
worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=KDCOYx--J-6CFN3Af6sQbMLRGGjsuGHn_yB1ydEfDRE,35945
|
55
55
|
worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=JRHdejuNpQxaDCHcJ0eo_Sf2gngYdzannDpmPyj7zdc,34006
|
56
56
|
worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=7VR9udGS7NCBE9WEJA9_vpL5sTM7TFEMcCjEumBdokQ,15681
|
57
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=
|
57
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=ZUaowPxGxydx_US5VBcrGV7oMr7Br4Vil9EwovsRitU,17855
|
58
58
|
worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=vUj25yHxkCNhpyOU5Vk81gsYcTTH1TJ3yn-b8N00JfQ,52857
|
59
59
|
worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=nV0iLoip2FH2-FhLmhX3nPqsfl_MPufZ3E5Q5krJvdc,3544
|
60
60
|
worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py,sha256=8GVImU7EnncCSxbbuEC4-EBE8oGTk6CJ-HFNqJ5OiMs,5564
|
@@ -76,7 +76,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
|
|
76
76
|
worker_automate_hub/utils/util.py,sha256=ZMbWjvZ6vbDgkosFAt2xUJGoAJOIZhxNfJyYplvyN3Q,162310
|
77
77
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=iYpOs7fb7C3bY61QHySr00xlDNzrrCP0zaexOpBPuaQ,31930
|
78
78
|
worker_automate_hub/worker.py,sha256=CT-poyP1ZYvubArYsnnNd9oJ53SPaDwgr6p6keS3nI4,6248
|
79
|
-
worker_automate_hub-0.5.
|
80
|
-
worker_automate_hub-0.5.
|
81
|
-
worker_automate_hub-0.5.
|
82
|
-
worker_automate_hub-0.5.
|
79
|
+
worker_automate_hub-0.5.86.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
80
|
+
worker_automate_hub-0.5.86.dist-info/METADATA,sha256=ff80QPuHY_Z6CKunpDdTO0xwhZpbDm0wZu_vOTS50VI,2894
|
81
|
+
worker_automate_hub-0.5.86.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
82
|
+
worker_automate_hub-0.5.86.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.5.85.dist-info → worker_automate_hub-0.5.86.dist-info}/entry_points.txt
RENAMED
File without changes
|