worker-automate-hub 0.5.32__py3-none-any.whl → 0.5.34__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.
@@ -540,18 +540,10 @@ async def entrada_de_notas_36(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
540
540
  console.print("Erro ao lançar nota", style="bold red")
541
541
  return RpaRetornoProcessoDTO(
542
542
  sucesso=False,
543
- retorno=f"Pop-up nota incluida encontrada, porém nota não encontrada no EMSys - Reprocessar",
543
+ retorno=f"Erro ao lançar nota, erro: {nf_imported.retorno}",
544
544
  status=RpaHistoricoStatusEnum.Falha,
545
545
  tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
546
546
  )
547
- else:
548
- console.print("Erro ao lançar nota", style="bold red")
549
- return RpaRetornoProcessoDTO(
550
- sucesso=False,
551
- retorno=f"Erro ao lançar nota, erro: {nf_imported.retorno}",
552
- status=RpaHistoricoStatusEnum.Falha,
553
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
554
- )
555
547
 
556
548
  except Exception as ex:
557
549
  observacao = f"Erro Processo Entrada de Notas: {str(ex)}"
@@ -611,13 +611,6 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
611
611
  retorno="Nota Lançada com sucesso!",
612
612
  status=RpaHistoricoStatusEnum.Sucesso,
613
613
  )
614
- else:
615
- return RpaRetornoProcessoDTO(
616
- sucesso=False,
617
- retorno=f"Erro ao lançar nota",
618
- status=RpaHistoricoStatusEnum.Falha,
619
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
620
- )
621
614
  except Exception as e:
622
615
  select_box_nop_select.click()
623
616
  return RpaRetornoProcessoDTO(
@@ -654,13 +654,6 @@ async def entrada_de_notas_500(task: RpaProcessoEntradaDTO) -> RpaRetornoProcess
654
654
  retorno="Nota Lançada com sucesso!",
655
655
  status=RpaHistoricoStatusEnum.Sucesso,
656
656
  )
657
- else:
658
- return RpaRetornoProcessoDTO(
659
- sucesso=False,
660
- retorno=f"Erro ao lançar nota",
661
- status=RpaHistoricoStatusEnum.Falha,
662
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
663
- )
664
657
  except Exception as e:
665
658
  select_box_nop_select.click()
666
659
  return RpaRetornoProcessoDTO(
@@ -687,58 +687,63 @@ class EMSys:
687
687
  console.print("\nVerifica se a nota ja foi lançada...")
688
688
  nf_chave_acesso = int(chave_acesso)
689
689
  status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
690
- if status_nf_emsys.get("status") != "Lançada":
690
+ if status_nf_emsys.get("status") == "Lançada":
691
+ return RpaRetornoProcessoDTO(
692
+ sucesso=True,
693
+ retorno="Nota lançada com sucesso!",
694
+ status=RpaHistoricoStatusEnum.Sucesso,
695
+ )
691
696
 
692
- try:
693
- if self.apenas_isqueiros:
694
- nop_value = "1102 - COMPRA DE MERCADORIA ADQ. TERCEIROS - 1.102"
695
- console.print(f"Inserindo a informação da NOP para apenas isqueiros: {nop_value} ...\n")
697
+ try:
698
+ if self.apenas_isqueiros:
699
+ nop_value = "1102 - COMPRA DE MERCADORIA ADQ. TERCEIROS - 1.102"
700
+ console.print(f"Inserindo a informação da NOP para apenas isqueiros: {nop_value} ...\n")
701
+ await worker_sleep(5)
702
+ set_combobox("||List", nop_value)
703
+ await worker_sleep(2)
704
+ pyautogui.hotkey("enter")
705
+ await worker_sleep(6)
706
+ await self.incluir_registro()
707
+ else:
708
+ if cfop:
709
+ console.print(f"Inserindo a informação da NOP, caso se aplique {cfop} ...\n")
710
+ if cfop not in ["5910", "6910"]:
696
711
  await worker_sleep(5)
697
- set_combobox("||List", nop_value)
712
+ set_combobox("||List", "1403 - COMPRA DE MERCADORIA - 1.403")
698
713
  await worker_sleep(2)
699
714
  pyautogui.hotkey("enter")
700
715
  await worker_sleep(6)
701
716
  await self.incluir_registro()
702
- else:
703
- if cfop:
704
- console.print(f"Inserindo a informação da NOP, caso se aplique {cfop} ...\n")
705
- if cfop not in ["5910", "6910"]:
706
- await worker_sleep(5)
707
- set_combobox("||List", "1403 - COMPRA DE MERCADORIA - 1.403")
708
- await worker_sleep(2)
709
- pyautogui.hotkey("enter")
710
- await worker_sleep(6)
711
- await self.incluir_registro()
712
- await worker_sleep(15)
717
+ await worker_sleep(15)
718
+
719
+ if chave_acesso is not None:
720
+ console.print("\nVerifica se a nota ja foi lançada...")
721
+ nf_chave_acesso = int(chave_acesso)
722
+ status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
723
+ if status_nf_emsys.get("status") != "Lançada":
724
+ raise ValueError("A nota não possui itens com o mesmo CFOP de capa. Necessário que ao menos um item possua este CFOP")
713
725
 
714
- if chave_acesso is not None:
715
- console.print("\nVerifica se a nota ja foi lançada...")
716
- nf_chave_acesso = int(chave_acesso)
717
- status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
718
- if status_nf_emsys.get("status") != "Lançada":
719
- raise ValueError("A nota não possui itens com o mesmo CFOP de capa. Necessário que ao menos um item possua este CFOP")
720
-
721
- else:
722
- pyautogui.hotkey("esc")
723
- observacao = f"Nota bonificada do tipo ({cfop}), está retornando diferença de itens sem o mesmo CFOP de capa. Por favor verifique a nota."
724
- return RpaRetornoProcessoDTO(
725
- sucesso=False,
726
- retorno=observacao,
727
- status=RpaHistoricoStatusEnum.Falha,
728
- tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
729
- )
730
- except ValueError as e:
731
- console.print(f"Erro de validação ao alterar o NOP: {e}", style="bold red")
732
- raise
733
- except Exception as e:
734
- console.print(f"Erro inesperado ao alterar o NOP: {e}", style="bold red")
735
- raise
736
-
737
- return RpaRetornoProcessoDTO(
738
- sucesso=True,
739
- retorno="Nota lançada com sucesso!",
740
- status=RpaHistoricoStatusEnum.Sucesso,
741
- )
726
+ else:
727
+ pyautogui.hotkey("esc")
728
+ observacao = f"Nota bonificada do tipo ({cfop}), está retornando diferença de itens sem o mesmo CFOP de capa. Por favor verifique a nota."
729
+ return RpaRetornoProcessoDTO(
730
+ sucesso=False,
731
+ retorno=observacao,
732
+ status=RpaHistoricoStatusEnum.Falha,
733
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
734
+ )
735
+ except ValueError as e:
736
+ console.print(f"Erro de validação ao alterar o NOP: {e}", style="bold red")
737
+ raise
738
+ except Exception as e:
739
+ console.print(f"Erro inesperado ao alterar o NOP: {e}", style="bold red")
740
+ raise
741
+
742
+ return RpaRetornoProcessoDTO(
743
+ sucesso=True,
744
+ retorno="Nota lançada com sucesso!",
745
+ status=RpaHistoricoStatusEnum.Sucesso,
746
+ )
742
747
 
743
748
  async def verify_nf_incuded(self) -> bool:
744
749
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.32
3
+ Version: 0.5.34
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
@@ -49,9 +49,9 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_207.py,sha256=JJ1jtExQRXsI2Uvxkl
49
49
  worker_automate_hub/tasks/jobs/entrada_de_notas_32.py,sha256=yqPkgD7Mu2GnYUvLsfwznTP2W-3HS0QZDH-HDPXjlMU,33992
50
50
  worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=x7UuPt0qFwleqm48A5x5H8EKA-yQuu-8suWL1rg9IxQ,32844
51
51
  worker_automate_hub/tasks/jobs/entrada_de_notas_34.py,sha256=XPNNjFfYxn1YOtfVfU0nQ3BXOqU1Ri0Bpuhzehpm8lg,32551
52
- worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=eoWaIlg0BUWQEQY5L5qoK7Ye7zeeazjuTxUbmM-37O0,23485
53
- worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=Ih3bHpq14YkGhw0oYnz0FW2RozyHPVc3gOPLcWJk4k0,36246
54
- worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=wuw2t0R4frdoA7ASuYDYe55zNnof-UYA0KVey_jHV5Y,34265
52
+ worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=O4SZQRPeaAVFpcA5ByinTeS4Qqy6uY7CSwH4ZWmhxJ4,23080
53
+ worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=2AGX-T_68D54k1YOCzVuEbUpF3PRkqsoL7sdn7H2Yko,35917
54
+ worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=mL3gdnBMkhAWItP66mDmLCfPOTi7Uqy6qBOFpPkZZkM,33924
55
55
  worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=ieROuyLMQ3bUrAuriuUYcFqsEJYn08_lesEhh-o3g3U,15160
56
56
  worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=MEgy5XE7B9L3r7K44fGX4Eq8Xw0x9MKZM-1VRv-Nba0,15861
57
57
  worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=6jI7iCmHqCiIV-2LviVRo_pJcp2Nys8dTZNMGMHXlnA,52823
@@ -73,9 +73,9 @@ worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1
73
73
  worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
74
74
  worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
75
75
  worker_automate_hub/utils/util.py,sha256=edMz-FlsMhzubxZuI1rp6C29TWQmYdyUoAzEJWgI_R8,129994
76
- worker_automate_hub/utils/utils_nfe_entrada.py,sha256=Ee-VbzfMwmkYJGEcyBl3h1jCbBe5gXzCH6ogSa_d8P4,31654
76
+ worker_automate_hub/utils/utils_nfe_entrada.py,sha256=UfzkgCDjZD-DGkViizpciCkFI2NfWuwRXQsfmt7x6dU,31502
77
77
  worker_automate_hub/worker.py,sha256=CT-poyP1ZYvubArYsnnNd9oJ53SPaDwgr6p6keS3nI4,6248
78
- worker_automate_hub-0.5.32.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
79
- worker_automate_hub-0.5.32.dist-info/METADATA,sha256=9ozZFF-0DIlGmW8y9al19X95xQzKdPnpYOWotMwuFpo,2894
80
- worker_automate_hub-0.5.32.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
81
- worker_automate_hub-0.5.32.dist-info/RECORD,,
78
+ worker_automate_hub-0.5.34.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
79
+ worker_automate_hub-0.5.34.dist-info/METADATA,sha256=mkIOYJb9pmXkdv5XVmET1DyJBkchh97hIVch5P9QRlI,2894
80
+ worker_automate_hub-0.5.34.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
81
+ worker_automate_hub-0.5.34.dist-info/RECORD,,