worker-automate-hub 0.5.618__py3-none-any.whl → 0.5.620__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.
@@ -207,7 +207,14 @@ async def entrada_de_notas_16(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
207
207
  )
208
208
  combo_box_natureza_operacao.click()
209
209
  await worker_sleep(4)
210
- set_combobox("||List", "1403 - COMPRA DE MERCADORIAS- 1.403")
210
+ try:
211
+ set_combobox("||List", "1403 - COMPRA DE MERCADORIAS- 1.403")
212
+ except:
213
+ select_1403 = main_window.child_window(
214
+ class_name="TDBIComboBox", found_index=0
215
+ )
216
+ select_1403.select("1403-COMPRA DE MERCADORIAS- 1.403")
217
+ send_keys('{ENTER}')
211
218
  await worker_sleep(3)
212
219
  elif nota.get("cfop") == "6910":
213
220
  combo_box_natureza_operacao = main_window.child_window(
@@ -6,10 +6,11 @@ import time
6
6
  import uuid
7
7
  import win32clipboard
8
8
  import difflib
9
-
9
+ import re
10
10
  import pyautogui
11
11
  import pytesseract
12
12
  from PIL import Image, ImageEnhance
13
+ from datetime import datetime
13
14
  from pywinauto.application import Application
14
15
  from pywinauto_recorder.player import set_combobox
15
16
  from pywinauto.keyboard import send_keys
@@ -434,6 +435,8 @@ async def entrada_de_notas_7139(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
434
435
  status=RpaHistoricoStatusEnum.Falha,
435
436
  tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
436
437
  )
438
+
439
+ window.child_window(title="Manter Natureza de Operação selecionada", control_type="CheckBox").click()
437
440
 
438
441
  await worker_sleep(2)
439
442
  console.print("Clicando em OK... \n")
@@ -631,9 +631,9 @@ async def entrada_de_notas_9(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
631
631
  if i >= max_attempts:
632
632
  return RpaRetornoProcessoDTO(
633
633
  sucesso=False,
634
- retorno=f"Erro ao trabalhar nas alterações dos item de tanque, tela de Distribui item tanque não foi encontrada",
634
+ retorno=f"Erro ao trabalhar nas alterações dos item de tanque, tela, de distribuir item tanque, não foi encontrada",
635
635
  status=RpaHistoricoStatusEnum.Falha,
636
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
636
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
637
637
  )
638
638
 
639
639
  try:
@@ -649,9 +649,9 @@ async def entrada_de_notas_9000(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
649
649
  if i >= max_attempts:
650
650
  return RpaRetornoProcessoDTO(
651
651
  sucesso=False,
652
- retorno=f"Erro ao trabalhar nas alterações dos item de tanque, tela de Distribui item tanque não foi encontrada",
652
+ retorno=f"Erro ao trabalhar nas alterações dos item de tanque, tela, de distribuir item tanque, não foi encontrada",
653
653
  status=RpaHistoricoStatusEnum.Falha,
654
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
654
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
655
655
  )
656
656
 
657
657
  try:
@@ -134,7 +134,7 @@ class EMSys:
134
134
  index_item_atual = 0
135
135
  index_ultimo_item = await self.get_ultimo_item()
136
136
  console.print(f"Index ultimo item: {index_ultimo_item}")
137
-
137
+
138
138
  try:
139
139
  while index_item_atual < index_ultimo_item:
140
140
  send_keys("^({HOME})")
@@ -159,6 +159,7 @@ class EMSys:
159
159
  edit = main_window.child_window(
160
160
  class_name="TDBIEditCode", found_index=0
161
161
  )
162
+
162
163
  #seta IPI 0%
163
164
  ipi_combobox = main_window.child_window(
164
165
  class_name="TDBIComboBox", found_index=4
@@ -182,8 +183,32 @@ class EMSys:
182
183
  try:
183
184
  console.print(f"Trabalhando com os itens, alterando o código de tributação dos ISQUEIROS/ACENDEDORES para manual \n")
184
185
  console.print("Item encontrado: ISQUEIRO/ACENDEDORES. Processando...\n")
185
-
186
- await self.alterar_item()
186
+
187
+ tipos_unidade = ["UNIDADE", "UN"]
188
+ for tipo in tipos_unidade:
189
+ try:
190
+ await worker_sleep(4)
191
+ # Selecionar natureza da operação 9 - outros
192
+ select_other = main_window.child_window(
193
+ class_name="TDBIComboBox", found_index=1
194
+ ).click()
195
+ select_other.select(tipo)
196
+ # Check Alterar Trib. Manual
197
+ pyautogui.click(1177, 740)
198
+ # pyautogui.moveTo(1177, 740)
199
+
200
+ # Click Alterar
201
+ await worker_sleep(1)
202
+ pyautogui.click(1180, 776)
203
+ await worker_sleep(1)
204
+
205
+ await worker_sleep(1)
206
+ await self.verify_warning_and_error("Confirm")
207
+ await worker_sleep(1)
208
+ except Exception as e:
209
+ print(f"Não foi possível selecionar '{tipo}': {e}")
210
+
211
+ # await self.alterar_item()
187
212
  await worker_sleep(3)
188
213
  await self.click_itens_da_nota()
189
214
  except Exception as error:
@@ -250,12 +275,23 @@ class EMSys:
250
275
  send_keys("{DOWN " + ("2") + "}")
251
276
 
252
277
  await worker_sleep(2)
253
- pyautogui.click(893, 549)
278
+ # pyautogui.click(893, 549)
254
279
  await worker_sleep(5)
255
- try:
256
- set_combobox("||List", "BANCO DO BRASIL BOLETO")
257
- except:
258
- set_combobox("||List", "BOLETO")
280
+ tipos_cobranca = ["BANCO DO BRASIL BOLETO", "BOLETO"]
281
+ for tipo in tipos_cobranca:
282
+ try:
283
+ await worker_sleep(4)
284
+ # Selecionar natureza da operação 9 - outros
285
+ select_other = main_window.child_window(
286
+ class_name="TDBIComboBox", found_index=0
287
+ ).click()
288
+ select_other.select(tipo)
289
+ except Exception as e:
290
+ print(f"Não foi possível selecionar '{tipo}': {e}")
291
+ # try:
292
+ # set_combobox("||List", "BANCO DO BRASIL BOLETO")
293
+ # except:
294
+ # set_combobox("||List", "BOLETO")
259
295
 
260
296
  async def inserir_vencimento_e_valor(self, nome_fornecedor, data_emissao, data_vencimento, valor):
261
297
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.618
3
+ Version: 0.5.620
4
4
  Summary: Worker Automate HUB é uma aplicação para automatizar rotinas de RPA nos ambientes Argenta.
5
5
  Author: Joel Paim
6
6
  Requires-Python: >=3.12,<4.0
@@ -53,7 +53,7 @@ worker_automate_hub/tasks/jobs/ecac_federal.py,sha256=VFOrbMuMHL3ac1sJ-z-N1p1WYt
53
53
  worker_automate_hub/tasks/jobs/entrada_cte_1353.py,sha256=knwPbjZZsnvHKurs7O7gv7bFpQIAmv4qPB1rZa3zBsY,12102
54
54
  worker_automate_hub/tasks/jobs/entrada_cte_333.py,sha256=FvpU_bsdPB2ANQ_i63Jlkdo5yZM4zJdr2mm41KTrJtE,13285
55
55
  worker_automate_hub/tasks/jobs/entrada_de_notas_15.py,sha256=BYmdPLJFZEHD_lVSpuaTDLZrx33ox8Re7QDzXjXDiB8,29524
56
- worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=-0AmpCXT45ptyZEeNkQ_6Mt--44N6pQjW2f6oLrOQvk,35710
56
+ worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=_61V5AtpWQNXfJRTva_9NV8V28f52E2dvzs3hJXhLtE,36014
57
57
  worker_automate_hub/tasks/jobs/entrada_de_notas_207.py,sha256=A5HM2Eh2bGZueVefnQL9KiCWW95j8zX1v2MslgbDcUE,36871
58
58
  worker_automate_hub/tasks/jobs/entrada_de_notas_32.py,sha256=lku233FqwOknXF14HHC6fZ75WubE69Jp32bAUhKPtGQ,34575
59
59
  worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=MO5hjy2NS__6FXvzd3R24hGEf4u_bOvqD5lJx70Awu0,33590
@@ -63,9 +63,9 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=89WgjhzhQXKoMmbRPil
63
63
  worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=WBsCRbH7ANiCjEn0aEDc5AqGf6grEFhxyBoAIh3zJ40,44160
64
64
  worker_automate_hub/tasks/jobs/entrada_de_notas_503.py,sha256=FIF8HCyEAdecDw6dB9WC3hcLoLAC3FMQyTujPgfQFaI,46560
65
65
  worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=xXeNipdXTSll8yAtAmN7v0sjN3oMlWU4THu30mKDddc,30339
66
- worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=aSgHterguK9XGtq0Bf__YlXo5pewb9P-BRZTLnrH1D8,29020
67
- worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=VJ-2g7tuqbAICOarJpAhljjJJ5wbb5hphTboBWoxj7M,64639
68
- worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py,sha256=paUghcOOCWRA2qVmU89YmThRTm8fMWb2QkE6tM-_MC0,65504
66
+ worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=zpGcsMpmtfVK6TUE8JVBaAcdgAXialbqunWxeymsYh0,29183
67
+ worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=ZYE2YmQJ9954Uuc9fiSykGi0ws_NPXs8ex244y20P44,64642
68
+ worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py,sha256=cDMzDGcylhg9pwtCPmZ82YItPS05PWcPtfeeC2WGrpA,65507
69
69
  worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=nV0iLoip2FH2-FhLmhX3nPqsfl_MPufZ3E5Q5krJvdc,3544
70
70
  worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py,sha256=jSoDGT6SU_5PKItpLQJyJIGrFAwYFNawO9vVNhjovIw,19557
71
71
  worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py,sha256=ueYevtUf0Tdr60VdXQiBmqbrQRmixQ3ze0GVYJmzFEg,21418
@@ -94,9 +94,9 @@ worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1
94
94
  worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
95
95
  worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
96
96
  worker_automate_hub/utils/util.py,sha256=_pgZOFWgXoov6WPbqyRTDVXJCRFfucYB3gb9swzU7bo,198281
97
- worker_automate_hub/utils/utils_nfe_entrada.py,sha256=wmnpuOesmPSryZszmapa37b9YNC0E2MkeDYnbwr-0rU,33315
97
+ worker_automate_hub/utils/utils_nfe_entrada.py,sha256=bcnsdADBNZn-ltEebKBs7SxstoZOagyaLWftM5-1BCA,35178
98
98
  worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
99
- worker_automate_hub-0.5.618.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
100
- worker_automate_hub-0.5.618.dist-info/METADATA,sha256=RqW9qTsSSQlA1Obs0jkh1ys0YZnzgxungbmyedd2Riw,3049
101
- worker_automate_hub-0.5.618.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
102
- worker_automate_hub-0.5.618.dist-info/RECORD,,
99
+ worker_automate_hub-0.5.620.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
100
+ worker_automate_hub-0.5.620.dist-info/METADATA,sha256=7fDImq-v45y66DC9rnqoPXGsuIEFmRtp4JFDbefyeLw,3049
101
+ worker_automate_hub-0.5.620.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
102
+ worker_automate_hub-0.5.620.dist-info/RECORD,,