Skip to content

Commit

Permalink
agrego correos
Browse files Browse the repository at this point in the history
  • Loading branch information
satcfdi committed Apr 19, 2024
1 parent 2d9713f commit fd87695
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions satdigitalinvoice/facturacion.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from .localdb import LocalDB
from .log_tools import header_line, print_yaml, to_yaml
from .mycfdi import MyCFDI, LiquidatedState
from .prediales import process_predial
from .utils import random_string, to_date_period, load_certificate, to_int, cert_info, add_month, to_uuid, open_file, OS, first_duplicate

logging.getLogger("weasyprint").setLevel(logging.ERROR)
Expand Down Expand Up @@ -121,7 +122,7 @@ def __init__(self):

modifier_key = "Command" if OS.get_os() == OS.MACOS else "Control"

for t in ('facturas_table', 'clientes_table', 'emitidas_table', 'recibidas_table', 'correos_table', 'ajustes_table', 'depositos_table', 'solicitudes_table'):
for t in ('productos_table', 'facturas_table', 'clientes_table', 'emitidas_table', 'recibidas_table', 'correos_table', 'ajustes_table', 'depositos_table', 'solicitudes_table'):
self.window[t].bind(f'<{modifier_key}-a>', '+select_all')
self.window[t].bind('<BackSpace>', '+delete') # BackSpace
# self.window[t].bind('<Double-Button-1>', '_enter')
Expand Down Expand Up @@ -400,6 +401,15 @@ def progress_cancel(title):
def action_button(self, action_name, action_items, action_text):
try:
match action_name:
case 'productos':
folder = archivos_folder(DatePeriod(date.today().year))
folder = os.path.join(folder, "prediales")
os.makedirs(folder, exist_ok=True)

for p in self.progress_iterate(action_text, action_items):
predial = p['Concepto']['CuentaPredial']
process_predial(folder, predial)

case 'solicitudes':
for solicitud in self.progress_iterate(action_text, action_items):
rfc = solicitud["rfc"]
Expand Down Expand Up @@ -1042,7 +1052,7 @@ def action(self, event, values):
case 'correos_table+enter' | 'solicitudes_table+enter':
pass

case "facturas_table" | "clientes_table" | "correos_table" | "ajustes_table" | "depositos_table" | "emitidas_table" | "recibidas_table" | "solicitudes_table" | "depositos_table":
case "productos_table" | "facturas_table" | "clientes_table" | "correos_table" | "ajustes_table" | "depositos_table" | "emitidas_table" | "recibidas_table" | "solicitudes_table" | "depositos_table":
# noinspection PyUnresolvedReferences
s_items = self.window[event].selected_items()
if event == "emitidas_table":
Expand All @@ -1052,7 +1062,7 @@ def action(self, event, values):
else:
self.action_button_manager.set_items(event.split("_")[0], s_items)

case "facturas_table+select_all" | "clientes_table+select_all" | "correos_table+select_all" | \
case "productos_table+select_all" | "facturas_table+select_all" | "clientes_table+select_all" | "correos_table+select_all" | \
"ajustes_table+select_all" | "emitidas_table+select_all" | "recibidas_table" | 'solicitudes_table+select_all' | \
'depositos_table+select_all':
# noinspection PyUnresolvedReferences
Expand Down

0 comments on commit fd87695

Please sign in to comment.