Obtener datos de periodicidad para factura glbal
This commit is contained in:
parent
dbc3910297
commit
c6cf33c4c4
|
@ -3711,7 +3711,6 @@ class Sucursales(BaseModel):
|
||||||
def _create(cls, args):
|
def _create(cls, args):
|
||||||
try:
|
try:
|
||||||
values = utils.loads(args)
|
values = utils.loads(args)
|
||||||
print(values)
|
|
||||||
Sucursales.create(**values)
|
Sucursales.create(**values)
|
||||||
result = {'ok': True}
|
result = {'ok': True}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -5624,7 +5623,15 @@ class Facturas(BaseModel):
|
||||||
tax_decimals = Configuracion.get_bool('chk_config_tax_decimals')
|
tax_decimals = Configuracion.get_bool('chk_config_tax_decimals')
|
||||||
decimales_precios = Configuracion.get_bool('chk_config_decimales_precios')
|
decimales_precios = Configuracion.get_bool('chk_config_decimales_precios')
|
||||||
invoice_by_ticket = Configuracion.get_bool('chk_config_invoice_by_ticket')
|
invoice_by_ticket = Configuracion.get_bool('chk_config_invoice_by_ticket')
|
||||||
is_global = (invoice.cliente.rfc == RFCS['PUBLIC']) and invoice_by_ticket
|
# ~ is_global = (invoice.cliente.rfc == RFCS['PUBLIC']) and invoice_by_ticket
|
||||||
|
|
||||||
|
is_global = bool(invoice.periodicidad)
|
||||||
|
data_global = {}
|
||||||
|
if is_global:
|
||||||
|
now = utils.now()
|
||||||
|
data_global['Periodicidad'] = invoice.periodicidad
|
||||||
|
data_global['Meses'] = now.strftime('%m')
|
||||||
|
data_global['Año'] = now.strftime('%Y')
|
||||||
|
|
||||||
frm_vu = FORMAT
|
frm_vu = FORMAT
|
||||||
if decimales_precios:
|
if decimales_precios:
|
||||||
|
@ -5913,6 +5920,7 @@ class Facturas(BaseModel):
|
||||||
'donativo': donativo,
|
'donativo': donativo,
|
||||||
'edu': is_edu,
|
'edu': is_edu,
|
||||||
'complementos': complementos,
|
'complementos': complementos,
|
||||||
|
'global': data_global,
|
||||||
}
|
}
|
||||||
|
|
||||||
return utils.make_xml(data, certificado)
|
return utils.make_xml(data, certificado)
|
||||||
|
@ -10672,7 +10680,6 @@ def get_cp(cp):
|
||||||
'municipio': rows[0][1],
|
'municipio': rows[0][1],
|
||||||
'key_municipio': str(rows[0][3]).zfill(3),
|
'key_municipio': str(rows[0][3]).zfill(3),
|
||||||
}
|
}
|
||||||
print(data)
|
|
||||||
if len(rows) == 1:
|
if len(rows) == 1:
|
||||||
data['colonia'] = rows[0][0]
|
data['colonia'] = rows[0][0]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue