worker-automate-hub 0.5.662__py3-none-any.whl → 0.5.664__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.
Potentially problematic release.
This version of worker-automate-hub might be problematic. Click here for more details.
- worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +91 -14
- worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py +150 -132
- worker_automate_hub/utils/util.py +20 -4
- {worker_automate_hub-0.5.662.dist-info → worker_automate_hub-0.5.664.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.662.dist-info → worker_automate_hub-0.5.664.dist-info}/RECORD +7 -7
- {worker_automate_hub-0.5.662.dist-info → worker_automate_hub-0.5.664.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.662.dist-info → worker_automate_hub-0.5.664.dist-info}/entry_points.txt +0 -0
|
@@ -122,14 +122,6 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
|
122
122
|
# Fecha a instancia do emsys - caso esteja aberta
|
|
123
123
|
await kill_all_emsys()
|
|
124
124
|
|
|
125
|
-
# #Validar se é o ultimo dia
|
|
126
|
-
# if await e_ultimo_dia_util():
|
|
127
|
-
# return RpaRetornoProcessoDTO(
|
|
128
|
-
# sucesso=False,
|
|
129
|
-
# retorno="Não será possivel processar devido a regra - 'Não deve ser processado nenhuma devolução no último dia útil do mês vigente'",
|
|
130
|
-
# status=RpaHistoricoStatusEnum.Falha,
|
|
131
|
-
# tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
|
132
|
-
# )
|
|
133
125
|
|
|
134
126
|
#Realizando o login
|
|
135
127
|
app = Application(backend="win32").start("C:\\Rezende\\EMSys3\\EMSys3.exe")
|
|
@@ -155,8 +147,9 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
|
155
147
|
|
|
156
148
|
await worker_sleep(2)
|
|
157
149
|
console.print("Verificando se o cliente esta ativo como Cliente e como Fornecedor... \n")
|
|
158
|
-
ativar_cliente_fornecedor = await pessoas_ativa_cliente_fornecedor(cod_cliente_incorreto, True, True)
|
|
150
|
+
ativar_cliente_fornecedor, uf_cliente = await pessoas_ativa_cliente_fornecedor(cod_cliente_incorreto, True, True)
|
|
159
151
|
if ativar_cliente_fornecedor.sucesso == True:
|
|
152
|
+
print(f"UF: {uf_cliente}")
|
|
160
153
|
steps += ' ETAPA 00 - CLIENTE E FORNECEDOR - ATIVADOS COM SUCESSO'
|
|
161
154
|
console.log(ativar_cliente_fornecedor.retorno, style="bold green")
|
|
162
155
|
else:
|
|
@@ -167,6 +160,47 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
|
167
160
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
|
168
161
|
)
|
|
169
162
|
|
|
163
|
+
uf_posto = False
|
|
164
|
+
if cod_cliente_incorreto != "140552":
|
|
165
|
+
uf_posto = True
|
|
166
|
+
# Verificar se UF são iguais
|
|
167
|
+
type_text_into_field("Pessoas", app["TFrmMenuPrincipal"]["Edit"], True, "50")
|
|
168
|
+
|
|
169
|
+
pyautogui.press("enter")
|
|
170
|
+
send_keys("{DOWN " + ("2") + "}")
|
|
171
|
+
pyautogui.press("enter")
|
|
172
|
+
|
|
173
|
+
await worker_sleep(5)
|
|
174
|
+
|
|
175
|
+
app = Application().connect(class_name="TFrmCadastroPessoaNew", timeout=60)
|
|
176
|
+
main_window = app["TFrmCadastroPessoaNew"]
|
|
177
|
+
main_window.set_focus()
|
|
178
|
+
panel_Capa = main_window.child_window(class_name="TGroupBox", found_index=1)
|
|
179
|
+
cod_pessoa = panel_Capa.child_window(class_name="TDBIEditNumber", found_index=1)
|
|
180
|
+
cod_pessoa.click()
|
|
181
|
+
for _ in range(3):
|
|
182
|
+
pyautogui.press("del")
|
|
183
|
+
pyautogui.press("backspace")
|
|
184
|
+
|
|
185
|
+
cod_pessoa.set_edit_text(cod_empresa)
|
|
186
|
+
cod_pessoa.click()
|
|
187
|
+
pyautogui.press("enter")
|
|
188
|
+
|
|
189
|
+
await worker_sleep(5)
|
|
190
|
+
|
|
191
|
+
try:
|
|
192
|
+
campo_uf_posto = main_window.child_window(class_name="TDBIEditString", found_index=9)
|
|
193
|
+
uf_posto = campo_uf_posto.window_text().strip()
|
|
194
|
+
except Exception as e:
|
|
195
|
+
texto_campo = ""
|
|
196
|
+
|
|
197
|
+
if uf_cliente == uf_posto:
|
|
198
|
+
console.print("Os estados são iguais")
|
|
199
|
+
else:
|
|
200
|
+
console.print("Os estados são diferentes")
|
|
201
|
+
|
|
202
|
+
main_window.close()
|
|
203
|
+
|
|
170
204
|
#REALIZAR PROCESSO DE NOTA FISCAL DE SAIDA
|
|
171
205
|
type_text_into_field("Nota Fiscal de Saida", app["TFrmMenuPrincipal"]["Edit"], True, "50")
|
|
172
206
|
pyautogui.press("enter")
|
|
@@ -241,7 +275,7 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
|
241
275
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
|
242
276
|
)
|
|
243
277
|
|
|
244
|
-
#Para liquidar o cupom
|
|
278
|
+
# Para liquidar o cupom
|
|
245
279
|
type_text_into_field("Titulos a receber", app["TFrmMenuPrincipal"]["Edit"], True, "50")
|
|
246
280
|
pyautogui.press("enter")
|
|
247
281
|
await worker_sleep(2)
|
|
@@ -262,7 +296,7 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
|
262
296
|
tags=[RpaTagDTO(descricao=descricao_tag.descricao)]
|
|
263
297
|
)
|
|
264
298
|
|
|
265
|
-
|
|
299
|
+
await worker_sleep(2)
|
|
266
300
|
#ETAPA 14 A 18
|
|
267
301
|
#STEP 2 - EMISSAO DA NOTA
|
|
268
302
|
type_text_into_field("Nota Fiscal de Entrada", app["TFrmMenuPrincipal"]["Edit"], True, "50")
|
|
@@ -352,9 +386,20 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
|
352
386
|
break
|
|
353
387
|
else:
|
|
354
388
|
for item in itens_to_select:
|
|
355
|
-
if
|
|
356
|
-
|
|
357
|
-
|
|
389
|
+
if uf_posto:
|
|
390
|
+
if uf_posto != uf_cliente:
|
|
391
|
+
if '2662' in item and (('c/fi' in item.lower() or 'c /fi' in item.lower())):
|
|
392
|
+
nop_to_be_select = item
|
|
393
|
+
break
|
|
394
|
+
else:
|
|
395
|
+
if '1662' in item and (('c/fi' in item.lower() or 'c /fi' in item.lower())):
|
|
396
|
+
nop_to_be_select = item
|
|
397
|
+
break
|
|
398
|
+
else:
|
|
399
|
+
if '1662' in item and (('c/fi' in item.lower() or 'c /fi' in item.lower())):
|
|
400
|
+
nop_to_be_select = item
|
|
401
|
+
break
|
|
402
|
+
|
|
358
403
|
|
|
359
404
|
if nop_to_be_select != '':
|
|
360
405
|
console.print(f"Nop a ser considerada: {nop_to_be_select}...\n")
|
|
@@ -415,6 +460,38 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
|
415
460
|
await worker_sleep(1)
|
|
416
461
|
pyautogui.press('tab')
|
|
417
462
|
await worker_sleep(3)
|
|
463
|
+
main_window.set_focus()
|
|
464
|
+
try:
|
|
465
|
+
# Conecta à janela
|
|
466
|
+
app = Application(backend="win32").connect(class_name="TFrmPesquisarVendaDevolucao", found_index=0)
|
|
467
|
+
main_window = app["TFrmPesquisarVendaDevolucao"]
|
|
468
|
+
data_ano = datetime.now().year
|
|
469
|
+
data_inicial = f"01/01/{data_ano}"
|
|
470
|
+
|
|
471
|
+
# Acessa o campo desejado
|
|
472
|
+
data_inicial_input = main_window.child_window(class_name="TDBIEditDate", found_index=1)
|
|
473
|
+
data_inicial_input.click_input()
|
|
474
|
+
data_inicial_input.set_edit_text(data_inicial)
|
|
475
|
+
|
|
476
|
+
await worker_sleep(2)
|
|
477
|
+
|
|
478
|
+
# Data final
|
|
479
|
+
data_final = datetime.now().strftime("%d/%m/%Y")
|
|
480
|
+
print(data_final)
|
|
481
|
+
data_final_input = main_window.child_window(class_name="TDBIEditDate", found_index=0)
|
|
482
|
+
data_final_input.click_input()
|
|
483
|
+
data_final_input.set_edit_text(data_final)
|
|
484
|
+
|
|
485
|
+
await worker_sleep(5)
|
|
486
|
+
|
|
487
|
+
except Exception as e:
|
|
488
|
+
retorno = f"Não foi possivel clicar em selecionar todos os itens na tela de Pesquisar Vendas para Devolução, erro: {e} \nEtapas Executadas:\n{steps}"
|
|
489
|
+
return RpaRetornoProcessoDTO(
|
|
490
|
+
sucesso=False,
|
|
491
|
+
retorno=retorno,
|
|
492
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
493
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
|
494
|
+
)
|
|
418
495
|
|
|
419
496
|
try:
|
|
420
497
|
pesquisar_icon = pyautogui.locateOnScreen(ASSETS_PATH + "\\notas_saida\\icon_pesquisa_nota_saida.png", confidence=0.8)
|
|
@@ -149,131 +149,148 @@ async def lancamento_pis_cofins(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
|
149
149
|
)
|
|
150
150
|
periodo_field.set_edit_text(periodo_dt)
|
|
151
151
|
|
|
152
|
-
console.print("Selecionando Replicar para empresas...\n")
|
|
153
|
-
replicar_para_empresas_check = main_window.child_window(
|
|
154
|
-
|
|
155
|
-
)
|
|
156
|
-
replicar_para_empresas_check.click_input()
|
|
157
|
-
console.print(
|
|
158
|
-
|
|
159
|
-
)
|
|
152
|
+
# console.print("Selecionando Replicar para empresas...\n")
|
|
153
|
+
# replicar_para_empresas_check = main_window.child_window(
|
|
154
|
+
# class_name="TcxCheckBox", found_index=0
|
|
155
|
+
# )
|
|
156
|
+
# replicar_para_empresas_check.click_input()
|
|
157
|
+
# console.print(
|
|
158
|
+
# "A opção 'Aplicar Rateio aos Itens Selecionados' selecionado com sucesso... \n"
|
|
159
|
+
# )
|
|
160
|
+
try:
|
|
161
|
+
await worker_sleep(5)
|
|
162
|
+
console.print("Confirmando Pop-up - ...Pode causar lentidão no sistema...\n")
|
|
163
|
+
console.print(f"Verificando a presença de Confirm...")
|
|
164
|
+
confirm_pop_up = await is_window_open_by_class("TMessageForm", "TMessageForm")
|
|
165
|
+
if confirm_pop_up["IsOpened"] == True:
|
|
166
|
+
app = Application().connect(class_name="TMessageForm")
|
|
167
|
+
main_window = app["TMessageForm"]
|
|
168
|
+
main_window.set_focus()
|
|
169
|
+
main_window.child_window(title="&Yes").click()
|
|
170
|
+
console.print(f"Yes clicado com sucesso...")
|
|
160
171
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
await worker_sleep(5)
|
|
173
|
+
console.print(
|
|
174
|
+
f"Verificando se foi aberto a tela de Seleção de Empresas clicado com sucesso..."
|
|
175
|
+
)
|
|
176
|
+
selecao_empresas_screen = await is_window_open_by_class(
|
|
177
|
+
"TFrmSelecionaEmpresas", "TFrmSelecionaEmpresas"
|
|
178
|
+
)
|
|
179
|
+
if selecao_empresas_screen["IsOpened"] == True:
|
|
180
|
+
console.print(f"Janela de Seleção de Empresas foi aberta com sucesso...")
|
|
181
|
+
app = Application().connect(class_name="TFrmSelecionaEmpresas", timeout=120)
|
|
182
|
+
main_window = app["TFrmSelecionaEmpresas"]
|
|
183
|
+
main_window.set_focus()
|
|
184
|
+
console.print(f"Clicando em seleciona todas...")
|
|
185
|
+
try:
|
|
186
|
+
selecionar_todos_itens = (
|
|
187
|
+
ASSETS_PATH + "\\lancamento_pis_cofins\\btn_selecionar_todas.png"
|
|
188
|
+
)
|
|
189
|
+
# Tenta localizar a imagem na tela
|
|
190
|
+
localizacao = pyautogui.locateOnScreen(
|
|
191
|
+
selecionar_todos_itens, confidence=0.9
|
|
192
|
+
)
|
|
193
|
+
await worker_sleep(3)
|
|
194
|
+
if localizacao:
|
|
195
|
+
centro = pyautogui.center(localizacao)
|
|
196
|
+
pyautogui.moveTo(centro)
|
|
197
|
+
pyautogui.click()
|
|
198
|
+
console.print("Clique realizado com sucesso!")
|
|
199
|
+
else:
|
|
200
|
+
console.print("Imagem não encontrada na tela.")
|
|
201
|
+
except Exception as e:
|
|
202
|
+
retorno = f"Não foi possivel clicar em selecionar todos os itens na Seleção de Empresas, erro: {e} "
|
|
203
|
+
pass
|
|
204
|
+
try:
|
|
205
|
+
console.print(f"Clicando em OK - para andamento do processo...")
|
|
206
|
+
app = Application().connect(class_name="TFrmSelecionaEmpresas", timeout=120)
|
|
207
|
+
main_window = app["TFrmSelecionaEmpresas"]
|
|
208
|
+
main_window.set_focus()
|
|
171
209
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
)
|
|
179
|
-
if selecao_empresas_screen["IsOpened"] == True:
|
|
180
|
-
console.print(f"Janela de Seleção de Empresas foi aberta com sucesso...")
|
|
181
|
-
app = Application().connect(class_name="TFrmSelecionaEmpresas", timeout=120)
|
|
182
|
-
main_window = app["TFrmSelecionaEmpresas"]
|
|
183
|
-
main_window.set_focus()
|
|
184
|
-
console.print(f"Clicando em seleciona todas...")
|
|
185
|
-
try:
|
|
186
|
-
selecionar_todos_itens = (
|
|
187
|
-
ASSETS_PATH + "\\lancamento_pis_cofins\\btn_selecionar_todas.png"
|
|
188
|
-
)
|
|
189
|
-
# Tenta localizar a imagem na tela
|
|
190
|
-
localizacao = pyautogui.locateOnScreen(
|
|
191
|
-
selecionar_todos_itens, confidence=0.9
|
|
192
|
-
)
|
|
193
|
-
await worker_sleep(3)
|
|
194
|
-
if localizacao:
|
|
195
|
-
centro = pyautogui.center(localizacao)
|
|
196
|
-
pyautogui.moveTo(centro)
|
|
197
|
-
pyautogui.click()
|
|
198
|
-
console.print("Clique realizado com sucesso!")
|
|
199
|
-
else:
|
|
200
|
-
console.print("Imagem não encontrada na tela.")
|
|
201
|
-
except Exception as e:
|
|
202
|
-
retorno = f"Não foi possivel clicar em selecionar todos os itens na Seleção de Empresas, erro: {e} "
|
|
203
|
-
return RpaRetornoProcessoDTO(
|
|
204
|
-
sucesso=False,
|
|
205
|
-
retorno=retorno,
|
|
206
|
-
status=RpaHistoricoStatusEnum.Falha,
|
|
207
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
208
|
-
)
|
|
210
|
+
try:
|
|
211
|
+
btn_ok = main_window.child_window(title="OK")
|
|
212
|
+
btn_ok.click()
|
|
213
|
+
except:
|
|
214
|
+
btn_ok = main_window.child_window(title="&OK")
|
|
215
|
+
btn_ok.click()
|
|
209
216
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
217
|
+
await worker_sleep(3)
|
|
218
|
+
except:
|
|
219
|
+
pass
|
|
220
|
+
except:
|
|
221
|
+
pass
|
|
222
|
+
|
|
223
|
+
try:
|
|
224
|
+
selecionar_todos_itens = (
|
|
225
|
+
ASSETS_PATH + "\\lancamento_pis_cofins\\botao_incluir.png"
|
|
226
|
+
)
|
|
227
|
+
# Tenta localizar a imagem na tela
|
|
228
|
+
localizacao = pyautogui.locateOnScreen(
|
|
229
|
+
selecionar_todos_itens, confidence=0.9
|
|
230
|
+
)
|
|
231
|
+
await worker_sleep(3)
|
|
232
|
+
if localizacao:
|
|
233
|
+
centro = pyautogui.center(localizacao)
|
|
234
|
+
pyautogui.moveTo(centro)
|
|
235
|
+
pyautogui.click()
|
|
236
|
+
console.print("Clique realizado com sucesso!")
|
|
237
|
+
else:
|
|
238
|
+
console.print("Imagem não encontrada na tela.")
|
|
239
|
+
except Exception as e:
|
|
240
|
+
pass
|
|
241
|
+
|
|
242
|
+
await worker_sleep(10)
|
|
243
|
+
|
|
244
|
+
try:
|
|
245
|
+
app = Application().connect(title="Aviso", timeout=10)
|
|
246
|
+
main_window = app["Aviso"]
|
|
213
247
|
main_window.set_focus()
|
|
214
248
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
except:
|
|
219
|
-
btn_ok = main_window.child_window(title="&OK")
|
|
220
|
-
btn_ok.click()
|
|
221
|
-
|
|
222
|
-
await worker_sleep(3)
|
|
249
|
+
# Pega o segundo Static usando child_window (não children)
|
|
250
|
+
aviso = main_window.child_window(class_name="Static", found_index=1)
|
|
251
|
+
texto_aviso = aviso.window_text()
|
|
223
252
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
ASSETS_PATH + "\\lancamento_pis_cofins\\botao_incluir.png"
|
|
227
|
-
)
|
|
228
|
-
# Tenta localizar a imagem na tela
|
|
229
|
-
localizacao = pyautogui.locateOnScreen(
|
|
230
|
-
selecionar_todos_itens, confidence=0.9
|
|
231
|
-
)
|
|
232
|
-
await worker_sleep(3)
|
|
233
|
-
if localizacao:
|
|
234
|
-
centro = pyautogui.center(localizacao)
|
|
235
|
-
pyautogui.moveTo(centro)
|
|
236
|
-
pyautogui.click()
|
|
237
|
-
console.print("Clique realizado com sucesso!")
|
|
238
|
-
else:
|
|
239
|
-
console.print("Imagem não encontrada na tela.")
|
|
240
|
-
except Exception as e:
|
|
241
|
-
retorno = f"Não foi possivel clicar em selecionar todos os itens na Seleção de Empresas, erro: {e} "
|
|
253
|
+
if "livro fiscal com status diferente de Confirmado/Encerrado" in texto_aviso:
|
|
254
|
+
retorno = texto_aviso
|
|
242
255
|
return RpaRetornoProcessoDTO(
|
|
243
256
|
sucesso=False,
|
|
244
257
|
retorno=retorno,
|
|
245
258
|
status=RpaHistoricoStatusEnum.Falha,
|
|
246
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.
|
|
259
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
247
260
|
)
|
|
248
|
-
|
|
249
|
-
await worker_sleep(10)
|
|
250
261
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
262
|
+
except Exception as e:
|
|
263
|
+
print(f"Erro ao capturar o aviso: {e}")
|
|
264
|
+
|
|
265
|
+
await worker_sleep(2)
|
|
254
266
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
if localizacao:
|
|
259
|
-
break
|
|
260
|
-
await worker_sleep(2) # espera 2 segundos antes da próxima tentativa
|
|
267
|
+
# Verificar se já existe registro no mês apurado
|
|
268
|
+
try:
|
|
269
|
+
selecionar_todos_itens = ASSETS_PATH + "\\lancamento_pis_cofins\\ja_existe_periodo.png"
|
|
261
270
|
|
|
271
|
+
localizacao = None
|
|
272
|
+
for tentativa in range(10):
|
|
273
|
+
localizacao = pyautogui.locateOnScreen(selecionar_todos_itens, confidence=0.9)
|
|
262
274
|
if localizacao:
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
main_window.set_focus()
|
|
266
|
-
informacao = main_window.child_window(title="OK")
|
|
267
|
-
informacao.click()
|
|
268
|
-
console.print("Clique realizado com sucesso!")
|
|
269
|
-
else:
|
|
270
|
-
console.print("Imagem não encontrada na tela após 10 tentativas.")
|
|
275
|
+
break
|
|
276
|
+
await worker_sleep(2) # espera 2 segundos antes da próxima tentativa
|
|
271
277
|
|
|
272
|
-
|
|
273
|
-
|
|
278
|
+
if localizacao:
|
|
279
|
+
app = Application().connect(title="Informação", timeout=60)
|
|
280
|
+
main_window = app["Informação"]
|
|
281
|
+
main_window.set_focus()
|
|
282
|
+
informacao = main_window.child_window(title="OK")
|
|
283
|
+
informacao.click()
|
|
284
|
+
console.print("Clique realizado com sucesso!")
|
|
285
|
+
else:
|
|
286
|
+
console.print("Imagem não encontrada na tela após 10 tentativas.")
|
|
274
287
|
|
|
288
|
+
except Exception as e:
|
|
289
|
+
pass
|
|
275
290
|
|
|
276
|
-
|
|
291
|
+
|
|
292
|
+
await worker_sleep(5)
|
|
293
|
+
try:
|
|
277
294
|
console.print("Verificando se possui tela de Informação... \n")
|
|
278
295
|
information_pop_up = await is_window_open("Information")
|
|
279
296
|
if information_pop_up["IsOpened"] == True:
|
|
@@ -300,34 +317,35 @@ async def lancamento_pis_cofins(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
|
300
317
|
)
|
|
301
318
|
else:
|
|
302
319
|
console.print("Não possui tela de Informação... \n")
|
|
320
|
+
except:
|
|
321
|
+
pass
|
|
322
|
+
# PRECISO TESTAR ADICIONAR EXCESSÃO PARA A TELA DE AVISO
|
|
323
|
+
pop_up_aviso = []
|
|
324
|
+
console.print(f"Verificando se possui tela de Aviso...")
|
|
325
|
+
while True:
|
|
326
|
+
aviso_screen_opened = await is_window_open("Aviso")
|
|
327
|
+
if aviso_screen_opened["IsOpened"] == True:
|
|
328
|
+
msg_pop_up = await ocr_title("aviso_pop_up_cofins", "Aviso")
|
|
329
|
+
console.print(f"retorno:{msg_pop_up.sucesso}")
|
|
330
|
+
if msg_pop_up.sucesso == True:
|
|
331
|
+
msg_retorno = msg_pop_up.retorno
|
|
332
|
+
console.print(msg_retorno)
|
|
333
|
+
pop_up_aviso.append(msg_retorno)
|
|
303
334
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
while True:
|
|
308
|
-
aviso_screen_opened = await is_window_open("Aviso")
|
|
309
|
-
if aviso_screen_opened["IsOpened"] == True:
|
|
310
|
-
msg_pop_up = await ocr_title("aviso_pop_up_cofins", "Aviso")
|
|
311
|
-
console.print(f"retorno:{msg_pop_up.sucesso}")
|
|
312
|
-
if msg_pop_up.sucesso == True:
|
|
313
|
-
msg_retorno = msg_pop_up.retorno
|
|
314
|
-
console.print(msg_retorno)
|
|
315
|
-
pop_up_aviso.append(msg_retorno)
|
|
316
|
-
|
|
317
|
-
app = Application().connect(title="Aviso", timeout=120)
|
|
318
|
-
main_window = app["Aviso"]
|
|
319
|
-
main_window.set_focus()
|
|
335
|
+
app = Application().connect(title="Aviso", timeout=120)
|
|
336
|
+
main_window = app["Aviso"]
|
|
337
|
+
main_window.set_focus()
|
|
320
338
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
339
|
+
try:
|
|
340
|
+
btn_ok = main_window.child_window(title="OK")
|
|
341
|
+
btn_ok.click()
|
|
342
|
+
except:
|
|
343
|
+
btn_ok = main_window.child_window(title="&OK")
|
|
344
|
+
btn_ok.click()
|
|
327
345
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
346
|
+
await worker_sleep(5)
|
|
347
|
+
else:
|
|
348
|
+
break
|
|
331
349
|
|
|
332
350
|
if len(pop_up_aviso) > 0:
|
|
333
351
|
return RpaRetornoProcessoDTO(
|
|
@@ -4021,14 +4021,25 @@ async def nf_devolucao_liquidar_cupom(
|
|
|
4021
4021
|
)
|
|
4022
4022
|
n_titulo = panel_TTab_Sheet.child_window(
|
|
4023
4023
|
class_name="TDBIEditString", found_index=8
|
|
4024
|
-
)
|
|
4024
|
+
).click()
|
|
4025
|
+
|
|
4026
|
+
await worker_sleep(1)
|
|
4027
|
+
|
|
4025
4028
|
n_titulo.set_edit_text(num_nota_fiscal)
|
|
4029
|
+
|
|
4026
4030
|
await worker_sleep(2)
|
|
4031
|
+
|
|
4032
|
+
pyautogui.press("tab")
|
|
4033
|
+
|
|
4027
4034
|
console.print("Numero da nota fiscal inserido com sucesso...\n")
|
|
4028
|
-
|
|
4035
|
+
|
|
4036
|
+
main_window.set_focus()
|
|
4037
|
+
|
|
4038
|
+
await worker_sleep(2)
|
|
4039
|
+
|
|
4029
4040
|
try:
|
|
4030
4041
|
pesquisar_icon = pyautogui.locateOnScreen(
|
|
4031
|
-
|
|
4042
|
+
"assets\\emsys\\icon_pesquisa_nota_saida.png", confidence=0.8
|
|
4032
4043
|
)
|
|
4033
4044
|
pyautogui.click(pesquisar_icon)
|
|
4034
4045
|
await worker_sleep(5)
|
|
@@ -4092,6 +4103,8 @@ async def nf_devolucao_liquidar_cupom(
|
|
|
4092
4103
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
4093
4104
|
)
|
|
4094
4105
|
|
|
4106
|
+
await worker_sleep(2)
|
|
4107
|
+
|
|
4095
4108
|
console.print("Acessando a opção de Caixa")
|
|
4096
4109
|
panel_TPage = main_window.child_window(class_name="TcxTreeView")
|
|
4097
4110
|
panel_TTabSheet = panel_TPage.child_window(class_name="TcxCustomInnerTreeView")
|
|
@@ -4134,7 +4147,11 @@ async def nf_devolucao_liquidar_cupom(
|
|
|
4134
4147
|
)
|
|
4135
4148
|
db_edit_code.set_edit_text("13")
|
|
4136
4149
|
await worker_sleep(1)
|
|
4150
|
+
db_edit_code.click()
|
|
4151
|
+
await worker_sleep(1)
|
|
4137
4152
|
pyautogui.press("tab")
|
|
4153
|
+
await worker_sleep(1)
|
|
4154
|
+
|
|
4138
4155
|
|
|
4139
4156
|
# Clicar no botão Liquidar dentro de TabSheetLiquidacao
|
|
4140
4157
|
liquidar_button = panel_liquidacao.child_window(
|
|
@@ -4867,7 +4884,6 @@ async def pessoas_ativa_cliente_fornecedor(
|
|
|
4867
4884
|
), ""
|
|
4868
4885
|
|
|
4869
4886
|
|
|
4870
|
-
|
|
4871
4887
|
async def save_pdf_emsys(file_path):
|
|
4872
4888
|
try:
|
|
4873
4889
|
await worker_sleep(10)
|
|
@@ -44,7 +44,7 @@ worker_automate_hub/tasks/jobs/cte_xml.py,sha256=hvKWRF46Pcl_Mp-l2FjgXaqrQ5UgKVk
|
|
|
44
44
|
worker_automate_hub/tasks/jobs/descartes.py,sha256=E5kKef8j7e0PTm6NBeZAXkljUoAFEMjVWvHaJ8g2fv4,44451
|
|
45
45
|
worker_automate_hub/tasks/jobs/devolucao_ctf.py,sha256=zQcRXZ9TxJhyL4jHjBTS-iW5BcmRoSPv9FsBLy0-eWQ,250793
|
|
46
46
|
worker_automate_hub/tasks/jobs/devolucao_ctf_35.py,sha256=e9t5k2mtZcUcEGKPWysbWzsH_gqrK-6aBXjWe2jWfTg,253948
|
|
47
|
-
worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py,sha256=
|
|
47
|
+
worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py,sha256=Y3xY3eE1-H_NoKoLAte_UWiWd6gfmT2M_VDwq1tf6rk,278013
|
|
48
48
|
worker_automate_hub/tasks/jobs/ecac_estadual_go.py,sha256=dKkf22nH5gp3RErq5u0UzRsKyJ81fc6ZZ4vLtUuMwHA,21002
|
|
49
49
|
worker_automate_hub/tasks/jobs/ecac_estadual_main.py,sha256=8WmKe4-MRtzHobXz2S4YBDNN8alfawkC-BBlRY-mn1g,1726
|
|
50
50
|
worker_automate_hub/tasks/jobs/ecac_estadual_mt.py,sha256=C26zmpGQGUq6sP9lU9nanM3Fje-rkyx5tjwmRy4lyL8,25300
|
|
@@ -79,7 +79,7 @@ worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py,sha256=QzK2aG5d9pmFb
|
|
|
79
79
|
worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py,sha256=5-wn583Cm0_NJ3TcVpYcurBTRxgwW6MU8WqaYawLS2k,21345
|
|
80
80
|
worker_automate_hub/tasks/jobs/integracao_contabil.py,sha256=psoIU0tjtTJq2W8aGXjXrfkAOYlIpUtHZyNolI7dp-0,16263
|
|
81
81
|
worker_automate_hub/tasks/jobs/integracao_contabil_generica.py,sha256=qIuWvouE88GooP57tRHmwfFV-2PcboJaErQo1VLolf8,21520
|
|
82
|
-
worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py,sha256=
|
|
82
|
+
worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py,sha256=0mlu-oPwRd9qCocB-6tWsEI0-wd48mkBJn5juYqOAX8,40788
|
|
83
83
|
worker_automate_hub/tasks/jobs/lancamento_rateio.py,sha256=0cvbpuJiHl5mca5gpZudX7uQY5Rqe5xzwt6juQcMhjo,15875
|
|
84
84
|
worker_automate_hub/tasks/jobs/login_emsys.py,sha256=dO9S027qRTtjOfytF6IWO-m6hDld8kZqOVAsn91l1YA,5684
|
|
85
85
|
worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py,sha256=_6CFh79eaW9KdPGR6FMV01ASPjJzNzzBK1MvC_uiSOo,5625
|
|
@@ -95,10 +95,10 @@ worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1
|
|
|
95
95
|
worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
|
|
96
96
|
worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
|
|
97
97
|
worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
|
|
98
|
-
worker_automate_hub/utils/util.py,sha256=
|
|
98
|
+
worker_automate_hub/utils/util.py,sha256=kXGtm91s6XJBtD7m_KyCrOxQ7mCeIBqEOnhbfYs3Vf8,206355
|
|
99
99
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=L_z1Aps6BFWl-6_Ibm45vDid1S4kFDz5O78N2uO1Rq0,36458
|
|
100
100
|
worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
|
|
101
|
-
worker_automate_hub-0.5.
|
|
102
|
-
worker_automate_hub-0.5.
|
|
103
|
-
worker_automate_hub-0.5.
|
|
104
|
-
worker_automate_hub-0.5.
|
|
101
|
+
worker_automate_hub-0.5.664.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
|
102
|
+
worker_automate_hub-0.5.664.dist-info/METADATA,sha256=cWIVE9pcQDN0pDK3VJ6VAJ3454GhhIO__KGR6GRwkDM,3049
|
|
103
|
+
worker_automate_hub-0.5.664.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
104
|
+
worker_automate_hub-0.5.664.dist-info/RECORD,,
|
|
File without changes
|
{worker_automate_hub-0.5.662.dist-info → worker_automate_hub-0.5.664.dist-info}/entry_points.txt
RENAMED
|
File without changes
|