worker-automate-hub 0.5.830__py3-none-any.whl → 0.5.832__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/devolucao_produtos.py +37 -18
- {worker_automate_hub-0.5.830.dist-info → worker_automate_hub-0.5.832.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.830.dist-info → worker_automate_hub-0.5.832.dist-info}/RECORD +5 -5
- {worker_automate_hub-0.5.830.dist-info → worker_automate_hub-0.5.832.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.830.dist-info → worker_automate_hub-0.5.832.dist-info}/entry_points.txt +0 -0
|
@@ -148,6 +148,7 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
148
148
|
descricao_fornecedor = nota.get("descricaoFornecedor", "")
|
|
149
149
|
historico_id = task.historico_id
|
|
150
150
|
cod_fornecedor = descricao_fornecedor.split(" - ")[0]
|
|
151
|
+
fornecedor = descricao_fornecedor.split(" - ")[1]
|
|
151
152
|
identificador = nota.get("identificador", "")
|
|
152
153
|
url_retorno = nota.get("urlRetorno", "")
|
|
153
154
|
multiplicador_timeout = int(float(task.sistemas[0].timeout))
|
|
@@ -330,7 +331,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
330
331
|
await worker_sleep(1)
|
|
331
332
|
|
|
332
333
|
# Abrir guia de itens (por imagem)
|
|
333
|
-
imagem_item = r"C:\Users\automatehub\Desktop\img_leo\itens.png"
|
|
334
|
+
# imagem_item = r"C:\Users\automatehub\Desktop\img_leo\itens.png"
|
|
335
|
+
imagem_item = "assets\\devolucao_produtos\\itens.png"
|
|
334
336
|
for _ in range(10):
|
|
335
337
|
pos = pyautogui.locateCenterOnScreen(imagem_item, confidence=0.9)
|
|
336
338
|
if pos:
|
|
@@ -470,7 +472,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
470
472
|
had_saldo = True
|
|
471
473
|
try:
|
|
472
474
|
console.print("Verificar mensagem de saldo menor....")
|
|
473
|
-
img_saldo = r"C:\Users\automatehub\Documents\GitHub\worker-assets\emsys\saldo_menor.png"
|
|
475
|
+
# img_saldo = r"C:\Users\automatehub\Documents\GitHub\worker-assets\emsys\saldo_menor.png"
|
|
476
|
+
img_saldo = "assets\\devolucao_produtos\\saldo_menor.png"
|
|
474
477
|
img_saldo_bool = False
|
|
475
478
|
|
|
476
479
|
for _ in range(10):
|
|
@@ -567,7 +570,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
567
570
|
|
|
568
571
|
# Clicar em recebimentos
|
|
569
572
|
console.print("Clicar em recebimentos...")
|
|
570
|
-
imagem_item = r"C:\Users\automatehub\Desktop\img_leo\btn_recebimentos.png"
|
|
573
|
+
# imagem_item = r"C:\Users\automatehub\Desktop\img_leo\btn_recebimentos.png"
|
|
574
|
+
imagem_item = "assets\\devolucao_produtos\\btn_recebimentos.png"
|
|
571
575
|
for _ in range(10):
|
|
572
576
|
pos = pyautogui.locateCenterOnScreen(imagem_item, confidence=0.9)
|
|
573
577
|
if pos:
|
|
@@ -581,7 +585,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
581
585
|
|
|
582
586
|
# Clicar em Parcelamento
|
|
583
587
|
console.print("Clicar em parcelamento...")
|
|
584
|
-
imagem_parc = r"C:\Users\automatehub\Desktop\img_leo\btn_parcelamento.png"
|
|
588
|
+
# imagem_parc = r"C:\Users\automatehub\Desktop\img_leo\btn_parcelamento.png"
|
|
589
|
+
imagem_parc = "assets\\devolucao_produtos\\btn_parcelamento.png"
|
|
585
590
|
for _ in range(10):
|
|
586
591
|
pos = pyautogui.locateCenterOnScreen(imagem_parc, confidence=0.8)
|
|
587
592
|
if pos:
|
|
@@ -617,7 +622,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
617
622
|
|
|
618
623
|
# Clicar em Incluir
|
|
619
624
|
console.print("Incluir registro...")
|
|
620
|
-
imagem_incluir = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\entrada_notas\IncluirRegistro.png"
|
|
625
|
+
# imagem_incluir = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\entrada_notas\IncluirRegistro.png"
|
|
626
|
+
imagem_incluir = "assets\\devolucao_produtos\\IncluirRegistro.png"
|
|
621
627
|
for _ in range(10):
|
|
622
628
|
pos = pyautogui.locateCenterOnScreen(imagem_incluir, confidence=0.8)
|
|
623
629
|
if pos:
|
|
@@ -759,9 +765,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
759
765
|
|
|
760
766
|
# Notas referenciadas
|
|
761
767
|
console.print("CLicar em notas referenciadas...")
|
|
762
|
-
imagem_notas_ref =
|
|
763
|
-
|
|
764
|
-
)
|
|
768
|
+
# imagem_notas_ref = r"C:\Users\automatehub\Desktop\img_leo\notas_referenciadas.png"
|
|
769
|
+
imagem_notas_ref = "assets\\devolucao_produtos\\notas_referenciadas.png"
|
|
765
770
|
for _ in range(20):
|
|
766
771
|
pos = pyautogui.locateCenterOnScreen(imagem_notas_ref, confidence=0.8)
|
|
767
772
|
if pos:
|
|
@@ -854,7 +859,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
854
859
|
|
|
855
860
|
# Aba mensagens
|
|
856
861
|
console.print("Clicar em mensagens...")
|
|
857
|
-
imagem_notas_ref = r"C:\Users\automatehub\Desktop\img_leo\aba_mensagem.png"
|
|
862
|
+
# imagem_notas_ref = r"C:\Users\automatehub\Desktop\img_leo\aba_mensagem.png"
|
|
863
|
+
imagem_notas_ref = "assets\\devolucao_produtos\\aba_mensagem.png"
|
|
858
864
|
for _ in range(10):
|
|
859
865
|
pos = pyautogui.locateCenterOnScreen(imagem_notas_ref, confidence=0.9)
|
|
860
866
|
if pos:
|
|
@@ -866,7 +872,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
866
872
|
await worker_sleep(5)
|
|
867
873
|
|
|
868
874
|
# Mensagem interna
|
|
869
|
-
imagem_notas_ref = r"C:\Users\automatehub\Desktop\img_leo\mensagem_interna.png"
|
|
875
|
+
# imagem_notas_ref = r"C:\Users\automatehub\Desktop\img_leo\mensagem_interna.png"
|
|
876
|
+
imagem_notas_ref = "assets\\devolucao_produtos\\mensagem_interna.png"
|
|
870
877
|
for _ in range(10):
|
|
871
878
|
pos = pyautogui.locateCenterOnScreen(imagem_notas_ref, confidence=0.8)
|
|
872
879
|
if pos:
|
|
@@ -879,7 +886,6 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
879
886
|
|
|
880
887
|
# Inserir mensagem padrão
|
|
881
888
|
console.print("Inserir mensagem...")
|
|
882
|
-
fornecedor = "Disbal"
|
|
883
889
|
lista_fornecedores = ["Disbal", "Pepsico", "Punta Balena"]
|
|
884
890
|
mensagem = (
|
|
885
891
|
"PRODUTOS VENCIDOS"
|
|
@@ -890,7 +896,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
890
896
|
input_mensagem.type_keys(mensagem, with_spaces=True, set_foreground=True)
|
|
891
897
|
|
|
892
898
|
# Aba itens
|
|
893
|
-
imagem_itens = r"C:\Users\automatehub\Desktop\img_leo\aba_itens.png"
|
|
899
|
+
# imagem_itens = r"C:\Users\automatehub\Desktop\img_leo\aba_itens.png"
|
|
900
|
+
imagem_itens = "assets\\devolucao_produtos\\aba_itens.png"
|
|
894
901
|
for _ in range(10):
|
|
895
902
|
pos = pyautogui.locateCenterOnScreen(imagem_itens, confidence=0.9)
|
|
896
903
|
if pos:
|
|
@@ -904,7 +911,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
904
911
|
|
|
905
912
|
# Corrige tributação
|
|
906
913
|
console.print("Corrigir tributação...")
|
|
907
|
-
imagem_itens = r"C:\Users\automatehub\Desktop\img_leo\corrige_tributacao.png"
|
|
914
|
+
# imagem_itens = r"C:\Users\automatehub\Desktop\img_leo\corrige_tributacao.png"
|
|
915
|
+
imagem_itens = "assets\\devolucao_produtos\\corrige_tributacao.png"
|
|
908
916
|
for _ in range(10):
|
|
909
917
|
pos = pyautogui.locateCenterOnScreen(imagem_itens, confidence=0.9)
|
|
910
918
|
if pos:
|
|
@@ -921,24 +929,34 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
921
929
|
app = Application().connect(class_name="TFrmDadosTributacaoProdutoPreVenda")
|
|
922
930
|
trib = app["TFrmDadosTributacaoProdutoPreVenda"]
|
|
923
931
|
|
|
924
|
-
if estado == "RS":
|
|
932
|
+
if estado == "RS" and "pepsico" in fornecedor.lower():
|
|
933
|
+
select_trib = trib.child_window(class_name="TDBIComboBox", found_index=4)
|
|
934
|
+
select_trib.select("051 - 051 - ICMS 17% RED BC 29,4118% - TRIBUT.CORRETA")
|
|
935
|
+
print("Selecionado: 051 - 051 - ICMS 17% RED BC 29,4118% - TRIBUT.CORRETA")
|
|
936
|
+
|
|
937
|
+
elif estado == "RS":
|
|
925
938
|
select_trib = trib.child_window(class_name="TDBIComboBox", found_index=4)
|
|
926
939
|
select_trib.select("051 - 051 - ICMS 17% RED BC 29,4118% - TRIBUT.CORRETA")
|
|
927
940
|
print("Selecionado: 051 - 051 - ICMS 17% RED BC 29,4118% - TRIBUT.CORRETA")
|
|
941
|
+
|
|
928
942
|
elif estado == "SC":
|
|
929
943
|
select_trib = trib.child_window(class_name="TDBIComboBox", found_index=4)
|
|
930
944
|
select_trib.select("000 - 000 - ICMS - 12%")
|
|
931
945
|
print("Selecionado: 000 - 000 - ICMS - 12%")
|
|
946
|
+
|
|
932
947
|
else:
|
|
933
948
|
print("Estado diferente dos mapeados")
|
|
934
949
|
|
|
935
|
-
if
|
|
950
|
+
if "disbal" in fornecedor.lower():
|
|
936
951
|
select_trib.select("020 - 020 - ICMS 12% RED. BASE 41,667")
|
|
937
|
-
|
|
952
|
+
|
|
953
|
+
elif "punta balena" in fornecedor.lower():
|
|
938
954
|
select_trib.select("000 - 000 - ICMS - 12%")
|
|
939
|
-
|
|
955
|
+
|
|
956
|
+
elif "vitrola" in fornecedor.lower():
|
|
940
957
|
select_trib.select("041 - 041 - ICMS - NAO INCIDENTE ")
|
|
941
958
|
|
|
959
|
+
|
|
942
960
|
await worker_sleep(2)
|
|
943
961
|
|
|
944
962
|
trib.child_window(title="&OK", class_name="TBitBtn").click_input()
|
|
@@ -946,7 +964,8 @@ async def devolucao_produtos(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
|
946
964
|
await worker_sleep(1)
|
|
947
965
|
|
|
948
966
|
# Aba principal
|
|
949
|
-
imagem_principal = r"C:\Users\automatehub\Desktop\img_leo\aba_principal.png"
|
|
967
|
+
# imagem_principal = r"C:\Users\automatehub\Desktop\img_leo\aba_principal.png"
|
|
968
|
+
imagem_principal = "assets\\devolucao_produtos\\aba_principal.png"
|
|
950
969
|
for _ in range(10):
|
|
951
970
|
pos = pyautogui.locateCenterOnScreen(imagem_principal, confidence=0.9)
|
|
952
971
|
if pos:
|
|
@@ -45,7 +45,7 @@ worker_automate_hub/tasks/jobs/descartes.py,sha256=wIi8n4vZrNE-03C5_lr4FmxuKoWSY
|
|
|
45
45
|
worker_automate_hub/tasks/jobs/devolucao_ctf.py,sha256=7tdUihaDqjIf7POjM79EqKG0w-qqXbhC6jq6hteavkw,250822
|
|
46
46
|
worker_automate_hub/tasks/jobs/devolucao_ctf_35.py,sha256=e9t5k2mtZcUcEGKPWysbWzsH_gqrK-6aBXjWe2jWfTg,253948
|
|
47
47
|
worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py,sha256=kzPJazDRbz2CLn8tKja2Lg1N4UzTRF1V4Nc1elIqTGY,272145
|
|
48
|
-
worker_automate_hub/tasks/jobs/devolucao_produtos.py,sha256=
|
|
48
|
+
worker_automate_hub/tasks/jobs/devolucao_produtos.py,sha256=gUx0miB2XZ3vhQMT-CSP7nWfK8yYcvcd84FEhG9USzQ,43761
|
|
49
49
|
worker_automate_hub/tasks/jobs/ecac_estadual_go.py,sha256=dKkf22nH5gp3RErq5u0UzRsKyJ81fc6ZZ4vLtUuMwHA,21002
|
|
50
50
|
worker_automate_hub/tasks/jobs/ecac_estadual_main.py,sha256=8WmKe4-MRtzHobXz2S4YBDNN8alfawkC-BBlRY-mn1g,1726
|
|
51
51
|
worker_automate_hub/tasks/jobs/ecac_estadual_mt.py,sha256=C26zmpGQGUq6sP9lU9nanM3Fje-rkyx5tjwmRy4lyL8,25300
|
|
@@ -105,7 +105,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
|
|
|
105
105
|
worker_automate_hub/utils/util.py,sha256=rDp5h36I_kMfaCDD9xgcxibRXe5AYaImlXKhGbQ7DHE,211273
|
|
106
106
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=F7jk95LpDwl5WfaQXahCA5yDdnySnWdctDqczHXwGqE,38195
|
|
107
107
|
worker_automate_hub/worker.py,sha256=zEnYUrm5kY2cHbbee15QJkwkx4euD2SB2zRvUIbjS90,6850
|
|
108
|
-
worker_automate_hub-0.5.
|
|
109
|
-
worker_automate_hub-0.5.
|
|
110
|
-
worker_automate_hub-0.5.
|
|
111
|
-
worker_automate_hub-0.5.
|
|
108
|
+
worker_automate_hub-0.5.832.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
|
109
|
+
worker_automate_hub-0.5.832.dist-info/METADATA,sha256=o7c3meCBfbiTklS6ae6PE0d79XpKLJ6LhARyObycFJQ,3142
|
|
110
|
+
worker_automate_hub-0.5.832.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
111
|
+
worker_automate_hub-0.5.832.dist-info/RECORD,,
|
|
File without changes
|
{worker_automate_hub-0.5.830.dist-info → worker_automate_hub-0.5.832.dist-info}/entry_points.txt
RENAMED
|
File without changes
|