Skip to content

Commit

Permalink
agrego correos
Browse files Browse the repository at this point in the history
  • Loading branch information
satcfdi committed Mar 26, 2024
1 parent a273b6f commit aaf1bd8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion satdigitalinvoice/mycfdi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
from satcfdi import render
from satcfdi.accounting import complement_invoices_data, SatCFDI
from satcfdi.accounting.models import EstadoComprobante
from satcfdi.create.cfd.catalogos import TipoDeComprobante, MetodoPago
from satcfdi.create.cfd.catalogos import TipoDeComprobante, MetodoPago, TipoRelacion
from satcfdi.pacs import sat
from satcfdi.utils import iterate

from .utils import to_uuid, code_str, estado_to_estatus

Expand Down Expand Up @@ -77,6 +78,12 @@ def rename_invoices(cls, search_path="*.xml"):
for file in glob.iglob(os.path.join(cls.base_dir, search_path), recursive=True):
cls.rename_invoice(file)

def cfdi_relacionados(self, tipo_relacion: TipoRelacion = None):
for cfdi_rel in iterate(self.get("CfdiRelacionados")):
if cfdi_rel["TipoRelacion"] == tipo_relacion:
for uuid in cfdi_rel["CfdiRelacionado"]:
yield UUID(uuid)

@classmethod
def get_all_invoices(cls, invoices: MutableMapping, search_path="*.xml") -> bool:
# Check that all names are correct
Expand Down

0 comments on commit aaf1bd8

Please sign in to comment.