Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
satcfdi committed Feb 27, 2024
1 parent 43b5882 commit 8c48655
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions satdigitalinvoice/gui_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .exceptions import ConsoleErrors
from .formatting_functions.common import fecha_mes, get_month_name
from .log_tools import to_yaml
from .utils import add_month, find_best_match, months_between, open_file
from .utils import add_month, find_best_match, months_between, open_file, code_str
from .sat_functions import isr_mensual, sat_retenciones

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -563,7 +563,7 @@ def mf_pago_fmt(cfdi):
i = cfdi
if i['TipoDeComprobante'] == "I":
return i['TipoDeComprobante'].code + ' ' + i['MetodoPago'].code + ' ' + i['FormaPago'].code
return i['TipoDeComprobante'].code + ' '
return code_str(i['TipoDeComprobante']) + ' '


def preview_cfdis(cfdis):
Expand Down
2 changes: 1 addition & 1 deletion satdigitalinvoice/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ def get_os():


def code_str(value):
return value.code if value is Code else value
return value.code if type(value) is Code else value

0 comments on commit 8c48655

Please sign in to comment.