worker-automate-hub 0.5.672__py3-none-any.whl → 0.5.674__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/abertura_livros_fiscais.py +318 -121
- worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +74 -128
- {worker_automate_hub-0.5.672.dist-info → worker_automate_hub-0.5.674.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.672.dist-info → worker_automate_hub-0.5.674.dist-info}/RECORD +6 -6
- {worker_automate_hub-0.5.672.dist-info → worker_automate_hub-0.5.674.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.672.dist-info → worker_automate_hub-0.5.674.dist-info}/entry_points.txt +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import time
|
|
2
2
|
import pyautogui
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
import sys
|
|
5
|
+
import os
|
|
6
|
+
import sys
|
|
7
|
+
import os
|
|
8
|
+
from pywinauto.keyboard import send_keys
|
|
9
|
+
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
|
|
10
|
+
|
|
3
11
|
|
|
4
12
|
from worker_automate_hub.utils.logger import logger
|
|
5
13
|
from worker_automate_hub.models.dto.rpa_historico_request_dto import (
|
|
@@ -99,10 +107,79 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
99
107
|
)
|
|
100
108
|
return_login = await login_emsys_fiscal(config.conConfiguracao, app, task)
|
|
101
109
|
if return_login.sucesso:
|
|
102
|
-
|
|
110
|
+
try:
|
|
111
|
+
##### Janela Confirm #####
|
|
112
|
+
app = Application().connect(class_name="TMessageForm", timeout=5)
|
|
113
|
+
main_window = app["TMessageForm"]
|
|
114
|
+
main_window.set_focus()
|
|
115
|
+
|
|
116
|
+
# Clicar em Não
|
|
117
|
+
console.print("Navegando nos elementos...\n")
|
|
118
|
+
main_window.child_window(class_name="TButton", found_index=0).click()
|
|
119
|
+
await worker_sleep(2)
|
|
120
|
+
except:
|
|
121
|
+
pass
|
|
122
|
+
|
|
123
|
+
##### Janela Principal ####
|
|
124
|
+
console.print("Navegando para Livros Fiscais")
|
|
125
|
+
app = Application().connect(class_name="TFrmPrincipalFiscal", timeout=60)
|
|
126
|
+
main_window = app["TFrmPrincipalFiscal"]
|
|
127
|
+
main_window.set_focus()
|
|
128
|
+
input_livros = main_window.child_window(class_name="TEdit", found_index=0)
|
|
103
129
|
type_text_into_field(
|
|
104
|
-
"Livros Fiscais",
|
|
130
|
+
"Livros Fiscais", input_livros, True, "50"
|
|
131
|
+
)
|
|
132
|
+
await worker_sleep(5)
|
|
133
|
+
|
|
134
|
+
try:
|
|
135
|
+
##### Janela Confirm #####
|
|
136
|
+
app = Application().connect(class_name="TMessageForm", timeout=5)
|
|
137
|
+
main_window = app["TMessageForm"]
|
|
138
|
+
main_window.set_focus()
|
|
139
|
+
|
|
140
|
+
# Clicar em Não
|
|
141
|
+
console.print("Navegando nos elementos...\n")
|
|
142
|
+
main_window.child_window(class_name="TButton", found_index=0).click()
|
|
143
|
+
await worker_sleep(2)
|
|
144
|
+
except:
|
|
145
|
+
pass
|
|
146
|
+
|
|
147
|
+
# Clicar no input inicial
|
|
148
|
+
input_livros = main_window.child_window(class_name="TEdit", found_index=0).click_input()
|
|
149
|
+
pyautogui.press("enter")
|
|
150
|
+
await worker_sleep(2)
|
|
151
|
+
pyautogui.press("down")
|
|
152
|
+
await worker_sleep(2)
|
|
153
|
+
pyautogui.press("enter")
|
|
154
|
+
console.print(
|
|
155
|
+
"\nPesquisa: 'Livros Fiscais' realizada com sucesso.",
|
|
156
|
+
style="bold green",
|
|
105
157
|
)
|
|
158
|
+
|
|
159
|
+
await worker_sleep(10)
|
|
160
|
+
|
|
161
|
+
try:
|
|
162
|
+
##### Janela Confirm #####
|
|
163
|
+
app = Application().connect(class_name="TMessageForm", timeout=5)
|
|
164
|
+
main_window = app["TMessageForm"]
|
|
165
|
+
main_window.set_focus()
|
|
166
|
+
|
|
167
|
+
# Clicar em Não
|
|
168
|
+
console.print("Navegando nos elementos...\n")
|
|
169
|
+
main_window.child_window(class_name="TButton", found_index=0).click()
|
|
170
|
+
await worker_sleep(2)
|
|
171
|
+
except:
|
|
172
|
+
pass
|
|
173
|
+
|
|
174
|
+
await worker_sleep(2)
|
|
175
|
+
|
|
176
|
+
##### Janela Principal ####
|
|
177
|
+
app = Application().connect(class_name="TFrmPrincipalFiscal", timeout=60)
|
|
178
|
+
main_window = app["TFrmPrincipalFiscal"]
|
|
179
|
+
main_window.set_focus()
|
|
180
|
+
|
|
181
|
+
# Clicar no input inicial
|
|
182
|
+
input_livros = main_window.child_window(class_name="TEdit", found_index=0).click_input()
|
|
106
183
|
pyautogui.press("enter")
|
|
107
184
|
await worker_sleep(2)
|
|
108
185
|
pyautogui.press("down")
|
|
@@ -112,8 +189,19 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
112
189
|
"\nPesquisa: 'Livros Fiscais' realizada com sucesso.",
|
|
113
190
|
style="bold green",
|
|
114
191
|
)
|
|
192
|
+
|
|
115
193
|
await worker_sleep(10)
|
|
116
|
-
|
|
194
|
+
|
|
195
|
+
##### janela Movimento de Livro Fiscal #####
|
|
196
|
+
app = Application().connect(class_name="TFrmMovtoLivroFiscal", timeout=20)
|
|
197
|
+
main_window = app["TFrmMovtoLivroFiscal"]
|
|
198
|
+
main_window.set_focus()
|
|
199
|
+
data_input = main_window.child_window(class_name="TDBIEditDate", found_index=0)
|
|
200
|
+
competencia = task.configEntrada.get("periodo")
|
|
201
|
+
type_text_into_field(
|
|
202
|
+
competencia, data_input, True, "50"
|
|
203
|
+
)
|
|
204
|
+
|
|
117
205
|
# Preenchendo campo competencia
|
|
118
206
|
console.print("Preenchendo campo competencia...")
|
|
119
207
|
pyautogui.press("tab")
|
|
@@ -121,27 +209,20 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
121
209
|
pyautogui.write(competencia)
|
|
122
210
|
await worker_sleep(3)
|
|
123
211
|
|
|
124
|
-
# Resetando tabs
|
|
125
|
-
console.print("Levando cursor para campo competencia")
|
|
126
|
-
pyautogui.click(729, 321)
|
|
127
|
-
await worker_sleep(2)
|
|
128
|
-
|
|
129
212
|
# Marcando caixa Entrada
|
|
130
213
|
console.print("Marcando caixa entrada")
|
|
131
|
-
|
|
132
|
-
pyautogui.press("space")
|
|
133
|
-
await worker_sleep(2)
|
|
214
|
+
entrada = main_window.child_window(class_name="TcxCheckBox", found_index=9).click_input()
|
|
134
215
|
|
|
135
216
|
# Marcando caixa Saida
|
|
136
217
|
console.print("Marcando caixa saida")
|
|
137
|
-
|
|
138
|
-
|
|
218
|
+
saida = main_window.child_window(class_name="TcxCheckBox", found_index=8).click_input()
|
|
219
|
+
|
|
139
220
|
await worker_sleep(2)
|
|
140
221
|
|
|
141
222
|
# Clicando em incluir livro
|
|
142
223
|
try:
|
|
143
224
|
console.print("Clicando em incluir livro")
|
|
144
|
-
cords = (
|
|
225
|
+
cords = (695, 729)
|
|
145
226
|
pyautogui.click(x=cords[0], y=cords[1])
|
|
146
227
|
await worker_sleep(5)
|
|
147
228
|
except:
|
|
@@ -152,141 +233,257 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
152
233
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
153
234
|
)
|
|
154
235
|
|
|
155
|
-
|
|
156
|
-
console.print("Clicando em sim na janela de gerar registros após incluir")
|
|
157
|
-
cords = (942, 603)
|
|
158
|
-
pyautogui.click(x=cords[0], y=cords[1])
|
|
236
|
+
##### Janela Pergunta das Geração dos Livros Fiscais #####
|
|
159
237
|
await worker_sleep(5)
|
|
238
|
+
app = Application().connect(class_name="TPerguntasLivrosFiscaisForm", timeout=20)
|
|
239
|
+
main_window = app["TPerguntasLivrosFiscaisForm"]
|
|
240
|
+
main_window.set_focus()
|
|
241
|
+
console.print("Clicando sim em janela somar os valores de IPI Frete")
|
|
242
|
+
main_window.child_window(class_name="TDBIComboBoxValues", found_index=0).click_input()
|
|
243
|
+
|
|
244
|
+
await worker_sleep(1)
|
|
245
|
+
send_keys("Sim{ENTER}")
|
|
246
|
+
await worker_sleep(2)
|
|
247
|
+
|
|
248
|
+
console.print("Clicando sim em janela gerar Numero de Serie do SAT")
|
|
249
|
+
main_window.child_window(class_name="TDBIComboBoxValues", found_index=4).click_input()
|
|
250
|
+
|
|
251
|
+
await worker_sleep(1)
|
|
252
|
+
send_keys("Sim{ENTER}")
|
|
253
|
+
await worker_sleep(2)
|
|
254
|
+
|
|
255
|
+
console.print("Clicando sim em janela gerar Numero de Serie a partir da chave do documento")
|
|
256
|
+
main_window.child_window(class_name="TDBIComboBoxValues", found_index=1).click_input()
|
|
257
|
+
|
|
258
|
+
await worker_sleep(1)
|
|
259
|
+
send_keys("Sim{ENTER}")
|
|
260
|
+
await worker_sleep(2)
|
|
261
|
+
|
|
262
|
+
console.print("Clicando sim em janela gerar livro com observação da nota fiscal")
|
|
263
|
+
main_window.child_window(class_name="TDBIComboBoxValues", found_index=3).click_input()
|
|
264
|
+
|
|
265
|
+
await worker_sleep(1)
|
|
266
|
+
send_keys("Sim{ENTER}")
|
|
267
|
+
await worker_sleep(2)
|
|
268
|
+
|
|
269
|
+
console.print("Clicando sim em janela somar valores de ICMS...")
|
|
270
|
+
main_window.child_window(class_name="TDBIComboBoxValues", found_index=2).click_input()
|
|
271
|
+
|
|
272
|
+
await worker_sleep(1)
|
|
273
|
+
send_keys("Sim{ENTER}")
|
|
160
274
|
|
|
161
|
-
|
|
162
|
-
console.print("Clicando em nao na janela de calcular icms Outros.")
|
|
163
|
-
cords = (1000, 570)
|
|
164
|
-
pyautogui.click(x=cords[0], y=cords[1])
|
|
165
|
-
await worker_sleep(5)
|
|
275
|
+
await worker_sleep(2)
|
|
166
276
|
|
|
167
|
-
#
|
|
168
|
-
|
|
169
|
-
cords = (920, 560)
|
|
170
|
-
pyautogui.click(x=cords[0], y=cords[1])
|
|
171
|
-
await worker_sleep(5)
|
|
277
|
+
# Clicar em confirmar
|
|
278
|
+
main_window.child_window(class_name="TButton", found_index=1).click_input()
|
|
172
279
|
|
|
173
|
-
# Esperando janela aguarde
|
|
174
|
-
console.print("Aguardando tela de aguarde ser finalizada")
|
|
175
|
-
await wait_aguarde_window_closed(app)
|
|
176
280
|
await worker_sleep(5)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
281
|
+
##### Janela Gerar Registro ####
|
|
282
|
+
console.print("Confirmar Registro")
|
|
283
|
+
app = Application().connect(title="Gerar Registros", timeout=60)
|
|
284
|
+
main_window = app["Gerar Registros"]
|
|
285
|
+
main_window.set_focus()
|
|
286
|
+
|
|
287
|
+
# Clicar em Sim
|
|
288
|
+
main_window.child_window(class_name="Button", found_index=0).click_input()
|
|
289
|
+
|
|
290
|
+
# try:
|
|
291
|
+
# # Esperando janela aguarde
|
|
292
|
+
# console.print("Aguardando tela de aguarde ser finalizada")
|
|
293
|
+
# await wait_aguarde_window_closed(app)
|
|
294
|
+
# await worker_sleep(5)
|
|
295
|
+
# except:
|
|
296
|
+
# pass
|
|
297
|
+
|
|
182
298
|
await worker_sleep(5)
|
|
183
299
|
|
|
184
|
-
|
|
185
|
-
console.print("
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
300
|
+
##### Janela Pré-visualizando Relatório #####
|
|
301
|
+
console.print("Fechar Janela Pré-visualizando Relatório ")
|
|
302
|
+
app = Application().connect(class_name="TFrmPreviewRelatorio", timeout=60)
|
|
303
|
+
main_window = app["TFrmPreviewRelatorio"]
|
|
304
|
+
main_window.set_focus()
|
|
189
305
|
|
|
190
|
-
#
|
|
191
|
-
|
|
192
|
-
await wait_aguarde_window_closed(app)
|
|
193
|
-
await worker_sleep(5)
|
|
306
|
+
# Clicar em fechar
|
|
307
|
+
main_window.close()
|
|
194
308
|
|
|
195
|
-
|
|
196
|
-
await worker_sleep(5)
|
|
309
|
+
await worker_sleep(3)
|
|
197
310
|
|
|
198
|
-
|
|
199
|
-
console.print("
|
|
200
|
-
|
|
311
|
+
##### Janela Principal ####
|
|
312
|
+
console.print("Navegando para Livro de Apuração ICMS... ")
|
|
313
|
+
app = Application().connect(class_name="TFrmPrincipalFiscal", timeout=60)
|
|
314
|
+
input_principal = main_window = app["TFrmPrincipalFiscal"]
|
|
315
|
+
input_principal.set_focus()
|
|
316
|
+
input_livros = input_principal.child_window(class_name="TEdit", found_index=0)
|
|
317
|
+
type_text_into_field(
|
|
318
|
+
"Livro de Apuração ICMS", input_livros, True, "50"
|
|
319
|
+
)
|
|
201
320
|
await worker_sleep(5)
|
|
202
321
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
await worker_sleep(2)
|
|
217
|
-
if (
|
|
218
|
-
"saida" in conteudo
|
|
219
|
-
and "confirmado" in conteudo
|
|
220
|
-
and competencia in conteudo
|
|
221
|
-
):
|
|
222
|
-
console.print(f"Clicando em desconfirmar saida na tabela...")
|
|
223
|
-
click_desconfirmar()
|
|
224
|
-
await worker_sleep(2)
|
|
225
|
-
pyautogui.press("down")
|
|
226
|
-
await worker_sleep(5)
|
|
322
|
+
try:
|
|
323
|
+
##### Janela Confirm #####
|
|
324
|
+
app = Application().connect(class_name="TMessageForm", timeout=60)
|
|
325
|
+
main_window = app["TMessageForm"]
|
|
326
|
+
main_window.set_focus()
|
|
327
|
+
main_window.child_window(class_name="TButton", found_index=0).click_input()
|
|
328
|
+
except:
|
|
329
|
+
pass
|
|
330
|
+
console.print("Selecionar Livro de Apuração")
|
|
331
|
+
input_livros = input_principal.child_window(class_name="TEdit", found_index=0).click_input()
|
|
332
|
+
pyautogui.press("enter")
|
|
333
|
+
await worker_sleep(1)
|
|
334
|
+
pyautogui.press("enter")
|
|
227
335
|
|
|
228
|
-
# Fechando janela de livro fiscal
|
|
229
|
-
console.print("Fechando janela de livro fiscal")
|
|
230
|
-
livros_fiscais_window.close()
|
|
231
336
|
await worker_sleep(5)
|
|
232
337
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
)
|
|
338
|
+
##### Janela Movimentação de Apuração ICMS #####
|
|
339
|
+
app = Application().connect(class_name="TFrmMovtoApuraIcmsNew", timeout=60)
|
|
340
|
+
main_window = app["TFrmMovtoApuraIcmsNew"]
|
|
341
|
+
main_window.set_focus()
|
|
238
342
|
|
|
239
|
-
|
|
343
|
+
console.print("Clicando no último livro, primeira linha")
|
|
344
|
+
pyautogui.click(599,410)
|
|
345
|
+
|
|
346
|
+
await worker_sleep(1)
|
|
240
347
|
|
|
241
|
-
|
|
348
|
+
console.print("Clicando em Estornar Livro")
|
|
349
|
+
pyautogui.click(667,742)
|
|
242
350
|
|
|
243
|
-
await worker_sleep(
|
|
244
|
-
titulo_atual = app.top_window().window_text().lower()
|
|
245
|
-
if "apuração icms" not in titulo_atual:
|
|
246
|
-
return RpaRetornoProcessoDTO(
|
|
247
|
-
sucesso=False,
|
|
248
|
-
retorno=f"Erro, ocorreu um problema ao tentar interagir com a janela de apuração.",
|
|
249
|
-
status=RpaHistoricoStatusEnum.Falha,
|
|
250
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
251
|
-
)
|
|
351
|
+
await worker_sleep(3)
|
|
252
352
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
353
|
+
main_window.close()
|
|
354
|
+
|
|
355
|
+
await worker_sleep(2)
|
|
356
|
+
|
|
357
|
+
console.print("Selecionar Livro Saída aberto")
|
|
358
|
+
|
|
359
|
+
# Selecionar linha livro de saída aberto
|
|
360
|
+
imagem = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\abertura_livros\livro_saida_aberto.png"
|
|
361
|
+
|
|
362
|
+
# Tenta localizar a imagem na tela
|
|
363
|
+
localizacao = pyautogui.locateCenterOnScreen(imagem, confidence=0.9)
|
|
364
|
+
|
|
365
|
+
if localizacao:
|
|
366
|
+
print(f"Imagem livro de saída aberto encontrado em: {localizacao}")
|
|
367
|
+
pyautogui.moveTo(localizacao)
|
|
368
|
+
pyautogui.click()
|
|
369
|
+
else:
|
|
370
|
+
console.print("Imagem livro de saída aberto não encontrado na tela.")
|
|
371
|
+
|
|
372
|
+
# Clicar em alterar livro
|
|
373
|
+
imagem = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\abertura_livros\alterar_livro.png"
|
|
374
|
+
|
|
375
|
+
# Tenta localizar a imagem na tela
|
|
376
|
+
localizacao = pyautogui.locateCenterOnScreen(imagem, confidence=0.9) # você pode ajustar o confidence
|
|
377
|
+
|
|
378
|
+
if localizacao:
|
|
379
|
+
print(f"Imagem alterar livro encontrado em: {localizacao}")
|
|
380
|
+
pyautogui.moveTo(localizacao)
|
|
381
|
+
pyautogui.click()
|
|
382
|
+
else:
|
|
383
|
+
console.print("Imagem alterar livro não encontrada na tela.")
|
|
261
384
|
|
|
262
|
-
# Clicando no campo competencia antes de preencher
|
|
263
|
-
cords = (670, 329)
|
|
264
|
-
pyautogui.click(x=cords[0], y=cords[1])
|
|
265
385
|
await worker_sleep(4)
|
|
266
386
|
|
|
267
|
-
#
|
|
268
|
-
|
|
269
|
-
|
|
387
|
+
# Clicar em Livro fiscal
|
|
388
|
+
imagem = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\abertura_livros\livro_fiscal.png"
|
|
389
|
+
|
|
390
|
+
# Tenta localizar a imagem na tela
|
|
391
|
+
localizacao = pyautogui.locateCenterOnScreen(imagem, confidence=0.9) # você pode ajustar o confidence
|
|
270
392
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
393
|
+
if localizacao:
|
|
394
|
+
print(f"Imagem Livro fiscal encontrado em: {localizacao}")
|
|
395
|
+
pyautogui.moveTo(localizacao)
|
|
396
|
+
pyautogui.click()
|
|
397
|
+
else:
|
|
398
|
+
console.print("Imagem Livro fiscal não encontrada na tela.")
|
|
399
|
+
|
|
275
400
|
await worker_sleep(4)
|
|
401
|
+
|
|
402
|
+
# Clicar em Gerar Relatório
|
|
403
|
+
imagem = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\abertura_livros\gerar_registros.png"
|
|
404
|
+
|
|
405
|
+
# Tenta localizar a imagem na tela
|
|
406
|
+
localizacao = pyautogui.locateCenterOnScreen(imagem, confidence=0.9) # você pode ajustar o confidence
|
|
407
|
+
|
|
408
|
+
if localizacao:
|
|
409
|
+
print(f"Imagem gerar relatório encontrado em: {localizacao}")
|
|
410
|
+
pyautogui.moveTo(localizacao)
|
|
411
|
+
pyautogui.click()
|
|
412
|
+
else:
|
|
413
|
+
console.print("Imagem gerar relatório não encontrada na tela.")
|
|
414
|
+
|
|
415
|
+
##### Janela Gerar Registro ####
|
|
416
|
+
console.print("Confirmar Registro")
|
|
417
|
+
app = Application().connect(class_name="TMsgBox", timeout=60)
|
|
418
|
+
main_window = app["TMsgBox"]
|
|
419
|
+
main_window.set_focus()
|
|
420
|
+
|
|
421
|
+
# Clicar em Sim
|
|
422
|
+
main_window.child_window(class_name="TBitBtn", found_index=1).click_input()
|
|
276
423
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
424
|
+
await worker_sleep(4)
|
|
425
|
+
|
|
426
|
+
console.print("Clicar em confirmar")
|
|
427
|
+
app = Application().connect(class_name="TPerguntasLivrosFiscaisForm", timeout=60)
|
|
428
|
+
main_window = app["TPerguntasLivrosFiscaisForm"]
|
|
429
|
+
main_window.set_focus()
|
|
430
|
+
main_window.child_window(class_name="TButton", found_index=1).click_input()
|
|
431
|
+
|
|
432
|
+
# Caminho da imagem que deve desaparecer
|
|
433
|
+
imagem = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\abertura_livros\janela_carregada.png"
|
|
434
|
+
|
|
435
|
+
# Tempo máximo de espera (em segundos)
|
|
436
|
+
tempo_limite = 600 # 10 minutos
|
|
437
|
+
intervalo = 2 # segundos entre as verificações
|
|
438
|
+
|
|
439
|
+
inicio = time.time()
|
|
440
|
+
|
|
441
|
+
while True:
|
|
442
|
+
localizacao = pyautogui.locateOnScreen(imagem, confidence=0.9)
|
|
443
|
+
|
|
444
|
+
if not localizacao:
|
|
445
|
+
print("Imagem desapareceu da tela.")
|
|
446
|
+
break # A imagem sumiu, podemos seguir
|
|
447
|
+
|
|
448
|
+
if time.time() - inicio > tempo_limite:
|
|
449
|
+
print("Tempo esgotado. A imagem não desapareceu.")
|
|
450
|
+
break
|
|
451
|
+
|
|
452
|
+
print("Imagem ainda presente... aguardando")
|
|
453
|
+
time.sleep(intervalo)
|
|
454
|
+
|
|
455
|
+
##### Janela Principal ####
|
|
456
|
+
console.print("Navegando para Livro de Apuração ICMS... ")
|
|
457
|
+
app = Application().connect(class_name="TFrmPrincipalFiscal", timeout=60)
|
|
458
|
+
input_principal = main_window = app["TFrmPrincipalFiscal"]
|
|
459
|
+
input_principal.set_focus()
|
|
460
|
+
input_livros = input_principal.child_window(class_name="TEdit", found_index=0)
|
|
461
|
+
type_text_into_field(
|
|
462
|
+
"Livro de Apuração ICMS", input_livros, True, "50"
|
|
282
463
|
)
|
|
464
|
+
await worker_sleep(5)
|
|
283
465
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
466
|
+
app = Application().connect(class_name="TFrmMovtoApuraIcmsNew", timeout=60)
|
|
467
|
+
main_window = app["TFrmMovtoApuraIcmsNew"]
|
|
468
|
+
main_window.set_focus()
|
|
469
|
+
data_input = main_window.child_window(class_name="TDBIEditDate", found_index=0)
|
|
470
|
+
competencia = competencia #task.configEntrada.get("periodo")
|
|
471
|
+
type_text_into_field(
|
|
472
|
+
competencia, data_input, True, "50"
|
|
288
473
|
)
|
|
289
|
-
|
|
474
|
+
|
|
475
|
+
# Clicar em incluir apuração
|
|
476
|
+
imagem = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\assets\abertura_livros\btn_incluir_apuracao.png"
|
|
477
|
+
|
|
478
|
+
# Tenta localizar a imagem na tela
|
|
479
|
+
localizacao = pyautogui.locateCenterOnScreen(imagem, confidence=0.9) # você pode ajustar o confidence
|
|
480
|
+
|
|
481
|
+
if localizacao:
|
|
482
|
+
print(f"Imagem incluir apuração encontrado em: {localizacao}")
|
|
483
|
+
pyautogui.moveTo(localizacao)
|
|
484
|
+
pyautogui.click()
|
|
485
|
+
else:
|
|
486
|
+
console.print("Imagem incluir apuração não encontrada na tela.")
|
|
290
487
|
|
|
291
488
|
except Exception as erro:
|
|
292
489
|
console.print(f"Erro ao executar abertura de livros fiscais, erro : {erro}")
|
|
@@ -7,18 +7,19 @@ import time
|
|
|
7
7
|
import uuid
|
|
8
8
|
import asyncio
|
|
9
9
|
import pyautogui
|
|
10
|
-
from datetime import datetime
|
|
11
10
|
import pytesseract
|
|
12
11
|
import win32clipboard
|
|
12
|
+
from datetime import datetime
|
|
13
13
|
from PIL import Image, ImageEnhance
|
|
14
|
-
from pyscreeze import ImageNotFoundException
|
|
15
14
|
from pywinauto.application import Application
|
|
16
15
|
from pywinauto.keyboard import send_keys
|
|
17
16
|
from pywinauto.timings import wait_until
|
|
18
17
|
from pywinauto_recorder.player import set_combobox
|
|
19
18
|
from rich.console import Console
|
|
20
|
-
import sys
|
|
21
|
-
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")))
|
|
19
|
+
# import sys
|
|
20
|
+
# sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")))
|
|
21
|
+
|
|
22
|
+
|
|
22
23
|
from worker_automate_hub.api.ahead_service import save_xml_to_downloads
|
|
23
24
|
from worker_automate_hub.api.client import (
|
|
24
25
|
get_config_by_name,
|
|
@@ -143,7 +144,7 @@ async def entrada_de_notas_33(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
|
143
144
|
await worker_sleep(5)
|
|
144
145
|
|
|
145
146
|
await get_xml(nota.get("nfe"))
|
|
146
|
-
await worker_sleep(
|
|
147
|
+
await worker_sleep(3)
|
|
147
148
|
|
|
148
149
|
# VERIFICANDO A EXISTENCIA DE WARNINGS
|
|
149
150
|
warning_pop_up = await is_window_open("Warning")
|
|
@@ -200,20 +201,31 @@ async def entrada_de_notas_33(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
|
200
201
|
await worker_sleep(3)
|
|
201
202
|
|
|
202
203
|
if str(cfop).startswith("6"):
|
|
203
|
-
|
|
204
|
+
texto_alvo = "2556-COMPRA DE MERCADORIAS SEM ESTOQUE- 2.556"
|
|
204
205
|
elif str(cfop).startswith("5"):
|
|
205
|
-
|
|
206
|
+
texto_alvo = "1556-COMPRA DE MERCADORIAS SEM ESTOQUE- 1.556"
|
|
206
207
|
else:
|
|
207
|
-
console.print(
|
|
208
|
-
"Erro mapeado, CFOP diferente de inicio com 540 ou 510, necessario ação manual ou ajuste no robo...\n"
|
|
209
|
-
)
|
|
208
|
+
console.print("CFOP não suportada...\n")
|
|
210
209
|
return RpaRetornoProcessoDTO(
|
|
211
210
|
sucesso=False,
|
|
212
|
-
retorno=
|
|
211
|
+
retorno="CFOP não suportada.",
|
|
213
212
|
status=RpaHistoricoStatusEnum.Falha,
|
|
214
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
|
213
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
215
214
|
)
|
|
216
|
-
|
|
215
|
+
|
|
216
|
+
# Percorre com seta para baixo até encontrar o texto alvo
|
|
217
|
+
for _ in range(500): # tenta até 15 opções
|
|
218
|
+
texto_atual = combo_box_natureza_operacao.window_text().strip()
|
|
219
|
+
|
|
220
|
+
if texto_alvo.lower() in texto_atual.lower():
|
|
221
|
+
combo_box_natureza_operacao.type_keys("{ENTER}")
|
|
222
|
+
break
|
|
223
|
+
else:
|
|
224
|
+
combo_box_natureza_operacao.type_keys("{DOWN}")
|
|
225
|
+
await worker_sleep(0.5)
|
|
226
|
+
|
|
227
|
+
# Sai do campo (opcional)
|
|
228
|
+
combo_box_natureza_operacao.type_keys("{TAB}")
|
|
217
229
|
await worker_sleep(3)
|
|
218
230
|
|
|
219
231
|
# INTERAGINDO COM O CAMPO ALMOXARIFADO
|
|
@@ -307,7 +319,7 @@ async def entrada_de_notas_33(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
|
307
319
|
"A opção 'Manter Natureza de Operação selecionada' selecionado com sucesso... \n"
|
|
308
320
|
)
|
|
309
321
|
|
|
310
|
-
await worker_sleep(
|
|
322
|
+
await worker_sleep(2)
|
|
311
323
|
console.print("Clicando em OK... \n")
|
|
312
324
|
|
|
313
325
|
max_attempts = 3
|
|
@@ -324,89 +336,8 @@ async def entrada_de_notas_33(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
|
324
336
|
except:
|
|
325
337
|
console.print("Não foi possivel clicar no Botão OK... \n")
|
|
326
338
|
|
|
327
|
-
await worker_sleep(
|
|
328
|
-
|
|
329
|
-
# Aguarda a tela de aguarde
|
|
330
|
-
# imagem_alvo = "assets\\entrada_notas\\aguarde.png"
|
|
331
|
-
imagem_alvo =r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\worker_automate_hub\assets\entrada_notas\aguarde.png"
|
|
332
|
-
timeout = 300 # 5 minutos
|
|
333
|
-
start_time = time.time()
|
|
334
|
-
|
|
335
|
-
try:
|
|
336
|
-
console.print("Aguardando a imagem desaparecer da tela (até 5 minutos)...")
|
|
337
|
-
|
|
338
|
-
while True:
|
|
339
|
-
localizacao = pyautogui.locateOnScreen(imagem_alvo, confidence=0.9)
|
|
340
|
-
|
|
341
|
-
if not localizacao:
|
|
342
|
-
console.print("Imagem não está mais na tela.")
|
|
343
|
-
break
|
|
344
|
-
|
|
345
|
-
if time.time() - start_time > timeout:
|
|
346
|
-
console.print("Tempo limite atingido. A imagem ainda está na tela.")
|
|
347
|
-
break
|
|
348
|
-
|
|
349
|
-
time.sleep(5) # Espera 5 segundos antes de verificar novamente
|
|
350
|
-
|
|
351
|
-
except:
|
|
352
|
-
pass
|
|
353
|
-
|
|
354
|
-
await worker_sleep(7)
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
try:
|
|
358
|
-
app = Application().connect(class_name="TMessageForm", timeout=10)
|
|
359
|
-
main_window = app["TMessageForm"]
|
|
360
|
-
main_window.set_focus()
|
|
361
|
-
click_yes = main_window.child_window(class_name='TButton', found_index=1).click()
|
|
362
|
-
except:
|
|
363
|
-
pass
|
|
364
|
-
|
|
365
|
-
try:
|
|
366
|
-
# Verifica erro ncm nao encontrado
|
|
367
|
-
imagem_alvo = "assets\\entrada_notas\\nao_encontrado_ncm.png"
|
|
368
|
-
imagem_alvo = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\worker_automate_hub\assets\entrada_notas\nao_encontrado_ncm.png"
|
|
369
|
-
localizacao = pyautogui.locateOnScreen(imagem_alvo, confidence=0.9)
|
|
370
|
-
|
|
371
|
-
if localizacao:
|
|
372
|
-
console.print("Não encontrado o NCM cadastrado no sistema")
|
|
373
|
-
return RpaRetornoProcessoDTO(
|
|
374
|
-
sucesso=False,
|
|
375
|
-
retorno="Não encontrado o NCM cadastrado no sistema",
|
|
376
|
-
status=RpaHistoricoStatusEnum.Falha,
|
|
377
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
|
378
|
-
)
|
|
379
|
-
|
|
380
|
-
except ImageNotFoundException:
|
|
381
|
-
console.print(
|
|
382
|
-
"Imagem não encontrada continuando"
|
|
383
|
-
)
|
|
384
|
-
|
|
385
|
-
# Aguarda a tela de aguarde
|
|
386
|
-
# imagem_alvo = "assets\\entrada_notas\\aguarde.png"
|
|
387
|
-
imagem_alvo =r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\worker_automate_hub\assets\entrada_notas\aguarde.png"
|
|
388
|
-
timeout = 300 # 5 minutos
|
|
389
|
-
start_time = time.time()
|
|
390
|
-
|
|
391
|
-
try:
|
|
392
|
-
console.print("Aguardando a imagem desaparecer da tela (até 5 minutos)...")
|
|
393
|
-
|
|
394
|
-
while True:
|
|
395
|
-
localizacao = pyautogui.locateOnScreen(imagem_alvo, confidence=0.9)
|
|
396
|
-
|
|
397
|
-
if not localizacao:
|
|
398
|
-
console.print("Imagem não está mais na tela.")
|
|
399
|
-
break
|
|
400
|
-
|
|
401
|
-
if time.time() - start_time > timeout:
|
|
402
|
-
console.print("Tempo limite atingido. A imagem ainda está na tela.")
|
|
403
|
-
break
|
|
404
|
-
|
|
405
|
-
time.sleep(2) # Espera 2 segundos antes de verificar novamente
|
|
339
|
+
await worker_sleep(3)
|
|
406
340
|
|
|
407
|
-
except Exception as e:
|
|
408
|
-
console.print(f"Ocorreu um erro: {e}")
|
|
409
|
-
|
|
410
341
|
console.print(
|
|
411
342
|
"Verificando a existencia da tela Informações para importação da Nota Fiscal Eletrônica...\n"
|
|
412
343
|
)
|
|
@@ -689,22 +620,59 @@ async def entrada_de_notas_33(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
|
689
620
|
class_name="TDBIComboBox", found_index=0
|
|
690
621
|
)
|
|
691
622
|
tipo_cobranca.click()
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
623
|
+
|
|
624
|
+
# Selecionando tipo de boleto
|
|
625
|
+
texto_alvo = "BANCO DO BRASIL BOLETO"
|
|
626
|
+
alternativo = "BOLETO"
|
|
627
|
+
# Tenta encontrar o texto preferencial
|
|
628
|
+
encontrado = False
|
|
629
|
+
for _ in range(50): # ajustável
|
|
630
|
+
texto_atual = tipo_cobranca.window_text().strip()
|
|
631
|
+
if texto_alvo.lower() in texto_atual.lower():
|
|
632
|
+
tipo_cobranca.type_keys("{ENTER}")
|
|
633
|
+
encontrado = True
|
|
634
|
+
break
|
|
635
|
+
else:
|
|
636
|
+
tipo_cobranca.type_keys("{DOWN}")
|
|
637
|
+
await worker_sleep(0.5)
|
|
638
|
+
|
|
639
|
+
# Se não encontrou o valor desejado, tenta o alternativo
|
|
640
|
+
if not encontrado:
|
|
641
|
+
console.print(f"[yellow]'{texto_alvo}' não encontrado. Tentando '{alternativo}'...[/yellow]")
|
|
642
|
+
|
|
643
|
+
# Reposiciona no início digitando parte do alternativo
|
|
644
|
+
tipo_cobranca.type_keys(alternativo[:4], with_spaces=True)
|
|
645
|
+
await worker_sleep(1)
|
|
646
|
+
|
|
647
|
+
for _ in range(50):
|
|
648
|
+
texto_atual = tipo_cobranca.window_text().strip()
|
|
649
|
+
if alternativo.lower() in texto_atual.lower():
|
|
650
|
+
tipo_cobranca.type_keys("{ENTER}")
|
|
651
|
+
encontrado = True
|
|
652
|
+
break
|
|
653
|
+
else:
|
|
654
|
+
tipo_cobranca.type_keys("{DOWN}")
|
|
655
|
+
await worker_sleep(0.5)
|
|
656
|
+
|
|
657
|
+
# Verifica se selecionou algo corretamente
|
|
658
|
+
texto_final = tipo_cobranca.window_text().strip()
|
|
659
|
+
|
|
660
|
+
if not encontrado or all(x.lower() not in texto_final.lower() for x in [texto_alvo, alternativo]):
|
|
661
|
+
console.print(f"[red]Erro: valor da conta de recebimento não foi selecionado corretamente. Último texto: '{texto_final}'[/red]")
|
|
662
|
+
return RpaRetornoProcessoDTO(
|
|
663
|
+
sucesso=False,
|
|
664
|
+
retorno="Conta de recebimento incorreta ou não encontrada.",
|
|
665
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
666
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
667
|
+
)
|
|
696
668
|
|
|
697
669
|
await worker_sleep(3)
|
|
698
670
|
console.print(f"Incluindo registro...\n")
|
|
699
671
|
try:
|
|
700
|
-
|
|
701
|
-
ASSETS_PATH = r"C:\Users\automatehub\Documents\GitHub\worker-automate-hub\worker_automate_hub\assets\entrada_notas\IncluirRegistro.png"
|
|
672
|
+
ASSETS_PATH = "assets"
|
|
702
673
|
inserir_registro = pyautogui.locateOnScreen(
|
|
703
|
-
ASSETS_PATH, confidence=0.8
|
|
674
|
+
ASSETS_PATH + "\\entrada_notas\\IncluirRegistro.png", confidence=0.8
|
|
704
675
|
)
|
|
705
|
-
# inserir_registro = pyautogui.locateOnScreen(
|
|
706
|
-
# ASSETS_PATH + "\\entrada_notas\\IncluirRegistro.png", confidence=0.8
|
|
707
|
-
# )
|
|
708
676
|
pyautogui.click(inserir_registro)
|
|
709
677
|
except Exception as e:
|
|
710
678
|
console.print(
|
|
@@ -894,25 +862,3 @@ async def entrada_de_notas_33(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
|
894
862
|
finally:
|
|
895
863
|
# Deleta o xml
|
|
896
864
|
await delete_xml(nota.get("nfe"))
|
|
897
|
-
|
|
898
|
-
if __name__ == "__main__":
|
|
899
|
-
|
|
900
|
-
task = RpaProcessoEntradaDTO(
|
|
901
|
-
datEntradaFila= datetime.now(),
|
|
902
|
-
configEntrada= {"nfe":"43250703746938001387550040005122881902295895","cfop":"5102","itens":[{"qtd":"2.00","ocst":"000","ncmsh":"39232990","valorIpi":"0.00","valorIcms":"3.63","valorTotal":"21.34","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"21.34","codigoProduto":"030338","unidadeMedida":"UN","valorUnitario":"10.67","descricaoProduto":"Saco Plastico para Moedas Transparente 0,10m PCT 100UN"},{"qtd":"1.00","ocst":"000","ncmsh":"48211000","valorIpi":"0.00","valorIcms":"5.39","valorTotal":"31.72","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"31.72","codigoProduto":"044867","unidadeMedida":"ROL","valorUnitario":"31.72","descricaoProduto":"Etiqueta Adesiva 100X50mm Amarelo 101C RL 200UN"},{"qtd":"1.00","ocst":"000","ncmsh":"49111090","valorIpi":"0.00","valorIcms":"14.43","valorTotal":"84.90","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"84.90","codigoProduto":"041749","unidadeMedida":"PAC","valorUnitario":"84.90","descricaoProduto":"Bloco de Abastecimento 1 via 8 x 6,5cm PCT 50BL de 100fls"},{"qtd":"12.00","ocst":"000","ncmsh":"96081000","valorIpi":"0.00","valorIcms":"1.24","valorTotal":"7.32","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"7.32","codigoProduto":"029618","unidadeMedida":"UN","valorUnitario":"0.61","descricaoProduto":"Caneta Esferografica Compactor Economic 1.0mm Azul"},{"qtd":"20.00","ocst":"000","ncmsh":"96081000","valorIpi":"0.00","valorIcms":"2.07","valorTotal":"12.20","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"12.20","codigoProduto":"029618","unidadeMedida":"UN","valorUnitario":"0.61","descricaoProduto":"Caneta Esferografica Compactor Economic 1.0mm Azul"},{"qtd":"1.00","ocst":"100","ncmsh":"39191010","valorIpi":"0.83","valorIcms":"1.08","valorTotal":"5.50","aliquotaIpi":"15.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"6.33","codigoProduto":"050894","unidadeMedida":"UN","valorUnitario":"5.50","descricaoProduto":"Fita Adesiva Hot Melt Sooper PRO 45mmX45m Transparente"},{"qtd":"2.00","ocst":"000","ncmsh":"48119019","valorIpi":"6.78","valorIcms":"36.63","valorTotal":"208.66","aliquotaIpi":"3.25","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"215.44","codigoProduto":"041690","unidadeMedida":"UN","valorUnitario":"104.33","descricaoProduto":"Bobina Termica Rede Sim 80mmx80m 44g CX 16UN"},{"qtd":"1.00","ocst":"020","ncmsh":"17019900","valorIpi":"0.00","valorIcms":"1.57","valorTotal":"22.41","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"9.23","codigoProduto":"050962","unidadeMedida":"UN","valorUnitario":"22.41","descricaoProduto":"Acucar Refinado Alto Alegre Sache CX 400x5g"},{"qtd":"2.00","ocst":"000","ncmsh":"48232099","valorIpi":"0.00","valorIcms":"1.42","valorTotal":"8.38","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"8.38","codigoProduto":"009014","unidadeMedida":"UN","valorUnitario":"4.19","descricaoProduto":"Filtro de Papel Melitta No103 30UN"},{"qtd":"1.00","ocst":"200","ncmsh":"40151900","valorIpi":"0.00","valorIcms":"7.72","valorTotal":"45.41","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"45.41","codigoProduto":"020964","unidadeMedida":"CX","valorUnitario":"45.41","descricaoProduto":"Luva Latex Volk Cleanline Descartavel com Po G CX 100UN"},{"qtd":"2.00","ocst":"000","ncmsh":"68053090","valorIpi":"0.00","valorIcms":"0.33","valorTotal":"1.96","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"1.96","codigoProduto":"050637","unidadeMedida":"UN","valorUnitario":"0.98","descricaoProduto":"Esponja Esfrelux Lava Loucas Anti Bacteria"},{"qtd":"2.00","ocst":"200","ncmsh":"62160000","valorIpi":"0.00","valorIcms":"1.53","valorTotal":"9.00","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"9.00","codigoProduto":"025306","unidadeMedida":"PAR","valorUnitario":"4.50","descricaoProduto":"Luva Poliamida Volk Tatil PU Palma e Dedos Preta M"},{"qtd":"1.00","ocst":"000","ncmsh":"21039011","valorIpi":"0.00","valorIcms":"4.55","valorTotal":"26.78","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"26.78","codigoProduto":"100011581","unidadeMedida":"CX","valorUnitario":"26.78","descricaoProduto":"Maionese Sache Junior 7g CX 160UN"},{"qtd":"1.00","ocst":"100","ncmsh":"39235000","valorIpi":"3.45","valorIcms":"12.33","valorTotal":"69.05","aliquotaIpi":"5.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"72.50","codigoProduto":"053593","unidadeMedida":"CX","valorUnitario":"69.05","descricaoProduto":"Tampa Versaline PP Preta Copo de Papel PD 210ml CX 500UN"},{"qtd":"1.00","ocst":"000","ncmsh":"48211000","valorIpi":"0.00","valorIcms":"2.63","valorTotal":"15.46","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"15.46","codigoProduto":"053356","unidadeMedida":"ROL","valorUnitario":"15.46","descricaoProduto":"Etiqueta Validade Rede Sim 40x24mm RL 1000UN"},{"qtd":"12.00","ocst":"000","ncmsh":"39241000","valorIpi":"0.00","valorIcms":"9.28","valorTotal":"54.60","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"54.60","codigoProduto":"011523","unidadeMedida":"UN","valorUnitario":"4.55","descricaoProduto":"Copo Descartavel PS Branco 180ml PCT 100UN"},{"qtd":"1.00","ocst":"000","ncmsh":"21032010","valorIpi":"0.00","valorIcms":"4.53","valorTotal":"26.62","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"26.62","codigoProduto":"053435","unidadeMedida":"UN","valorUnitario":"26.62","descricaoProduto":"Ketchup Sache Junior 7g CX 168UN"},{"qtd":"1.00","ocst":"000","ncmsh":"39173229","valorIpi":"0.00","valorIcms":"0.83","valorTotal":"4.91","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"4.91","codigoProduto":"041209","unidadeMedida":"UN","valorUnitario":"4.91","descricaoProduto":"Canudo Oxi Biodegrad Strawplast Embalado Indiv 100UN"},{"qtd":"3.00","ocst":"000","ncmsh":"38089919","valorIpi":"0.00","valorIcms":"3.48","valorTotal":"20.49","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"20.49","codigoProduto":"054500","unidadeMedida":"UN","valorUnitario":"6.83","descricaoProduto":"Alcool Liquido 70o Super Vale 1L"},{"qtd":"2.00","ocst":"000","ncmsh":"48182000","valorIpi":"0.00","valorIcms":"13.49","valorTotal":"79.38","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"79.38","codigoProduto":"100010494","unidadeMedida":"CX","valorUnitario":"39.69","descricaoProduto":"Papel Higienico Rolo 300m Softpaper Eco FS 17g CX 8UN"},{"qtd":"2.00","ocst":"000","ncmsh":"39232190","valorIpi":"0.00","valorIcms":"2.15","valorTotal":"12.64","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"12.64","codigoProduto":"038796","unidadeMedida":"UN","valorUnitario":"6.32","descricaoProduto":"Saco para Lixo Basic Up Bag Azul 30L 50UN"},{"qtd":"2.00","ocst":"500","ncmsh":"48182000","valorIpi":"0.00","valorIcms":"29.07","valorTotal":"171.00","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"171.00","codigoProduto":"020684","unidadeMedida":"CX","valorUnitario":"85.50","descricaoProduto":"Papel Toalha Bobina 200m Softpaper Basic FS 24g CX 6UN"},{"qtd":"2.00","ocst":"020","ncmsh":"09012100","valorIpi":"0.00","valorIcms":"5.03","valorTotal":"71.78","aliquotaIpi":"0.00","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"29.56","codigoProduto":"047037","unidadeMedida":"UN","valorUnitario":"35.89","descricaoProduto":"Cafe em Po 1707 Tradicional Vacuo 500g"},{"qtd":"2.00","ocst":"100","ncmsh":"48236900","valorIpi":"37.59","valorIcms":"71.93","valorTotal":"385.54","aliquotaIpi":"9.75","cfopProduto":"5102","aliquotaIcms":"17.00","bCalculoIcms":"423.13","codigoProduto":"053592","unidadeMedida":"CX","valorUnitario":"192.77","descricaoProduto":"Copo Papel SIM PD 210ml FSCMisto70% CU-COC-855709 CX500UN"}],"natureza":"33","alocacoes":[],"valorNota":"1445.70","nomeFilial":"PF Praça Itália\t","numeroNota":"512288","dataEmissao":"14/07/2025","observacoes":"Vcto: 06/10/2025","existeDespesa":"Não","cnpjFornecedor":"03746938001387","dataVencimento":"06/10/2025","nomeFornecedor":"BRS SUPRIMENTOS CORPORATIVOS S/A","recebimentoFisico":"17/07/2025 14:52","filialEmpresaOrigem":"109"},
|
|
903
|
-
uuidProcesso='def194c2-ffa0-4b9e-b95c-920fb4ad4150',
|
|
904
|
-
nomProcesso='extracao_fechamento_emsys',
|
|
905
|
-
uuidFila="",
|
|
906
|
-
sistemas=[
|
|
907
|
-
{
|
|
908
|
-
"sistema": "EMSys",
|
|
909
|
-
"timeout": "1.0"
|
|
910
|
-
},
|
|
911
|
-
{
|
|
912
|
-
"sistema": "AutoSystem",
|
|
913
|
-
"timeout": "1.0"
|
|
914
|
-
}
|
|
915
|
-
],
|
|
916
|
-
historico_id='2c4429c8-26ae-4ec6-b775-21583992e82f'
|
|
917
|
-
)
|
|
918
|
-
asyncio.run(entrada_de_notas_33(task))
|
|
@@ -36,7 +36,7 @@ worker_automate_hub/models/dto/rpa_sap_dto.py,sha256=eovdvKCtVIhRct3PL98KjsdlngL
|
|
|
36
36
|
worker_automate_hub/models/dto/rpa_sistema_dto.py,sha256=sLkmJei8x6sl-1-IXUKDmYQuKx0sotYQREPyhQqPmRg,161
|
|
37
37
|
worker_automate_hub/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
worker_automate_hub/tasks/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
-
worker_automate_hub/tasks/jobs/abertura_livros_fiscais.py,sha256=
|
|
39
|
+
worker_automate_hub/tasks/jobs/abertura_livros_fiscais.py,sha256=zsKgOA4nFcEaOy4oZFQ7hBGE5nl6xZUQC0K4m8j91Q0,20061
|
|
40
40
|
worker_automate_hub/tasks/jobs/coleta_dje_process.py,sha256=UkLWTC5Ub2qBb0yY-8IZ0DLLOVJOfNTq_z9krx_t25Q,29476
|
|
41
41
|
worker_automate_hub/tasks/jobs/conexao_rdp.py,sha256=S6QC4xhuo0pB5FjaUJZNMm1LIgEjpjifReCTBDqxH-U,11719
|
|
42
42
|
worker_automate_hub/tasks/jobs/cte_manual.py,sha256=JucHpRMjMiy-QEJ0wtFnytLpN53tKXgCDI05nGLGclU,603
|
|
@@ -57,7 +57,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_15.py,sha256=BYmdPLJFZEHD_lVSpua
|
|
|
57
57
|
worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=xVz5bhbAYt1IeXbkYYXG6JvFWZ8Z0-mHOi218evI1So,36829
|
|
58
58
|
worker_automate_hub/tasks/jobs/entrada_de_notas_207.py,sha256=A5HM2Eh2bGZueVefnQL9KiCWW95j8zX1v2MslgbDcUE,36871
|
|
59
59
|
worker_automate_hub/tasks/jobs/entrada_de_notas_32.py,sha256=lku233FqwOknXF14HHC6fZ75WubE69Jp32bAUhKPtGQ,34575
|
|
60
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=
|
|
60
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=ODp82BkWaiF40t6uZLJYxG2nGGnvDyeQBHhkkh9ZgPI,35994
|
|
61
61
|
worker_automate_hub/tasks/jobs/entrada_de_notas_34.py,sha256=AXUL8DakrDeTxWW8dn36W830XfIuO47MFUusbUkrnUc,33586
|
|
62
62
|
worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=z494n0SUyxorjhvpbat2ELnj7lbhtWPb9JOIsattwA8,35216
|
|
63
63
|
worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=whsK_TfNZSmzt0PNHnVi0q4OIxzfKiR5nGuB9WfEYeI,47071
|
|
@@ -98,7 +98,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
|
|
|
98
98
|
worker_automate_hub/utils/util.py,sha256=xA13nQqZglwkvfAKH18Unv4UoZUyvL58CacSrzUpYTw,206352
|
|
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.674.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
|
102
|
+
worker_automate_hub-0.5.674.dist-info/METADATA,sha256=7Lhzd0RrzW9uFkmlvT2PLTe-gcKhn5T3HP0ae_7kVbQ,3049
|
|
103
|
+
worker_automate_hub-0.5.674.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
104
|
+
worker_automate_hub-0.5.674.dist-info/RECORD,,
|
|
File without changes
|
{worker_automate_hub-0.5.672.dist-info → worker_automate_hub-0.5.674.dist-info}/entry_points.txt
RENAMED
|
File without changes
|