Fix: al obtener la clave del sat al facturar en lote
This commit is contained in:
commit
c5d0e97212
|
@ -1,3 +1,8 @@
|
||||||
|
v 2.0.2 [01-Abr-2023]
|
||||||
|
---------------------
|
||||||
|
- Fix: Obtener la clave del sat al facturar por lote.
|
||||||
|
|
||||||
|
|
||||||
v 2.0.1 [29-Mar-2023]
|
v 2.0.1 [29-Mar-2023]
|
||||||
---------------------
|
---------------------
|
||||||
- Fix ticket #97
|
- Fix ticket #97
|
||||||
|
|
|
@ -227,6 +227,7 @@ def import_invoice():
|
||||||
return {'ok': False, 'msg': msg}
|
return {'ok': False, 'msg': msg}
|
||||||
|
|
||||||
obj = Productos.get(Productos.clave==row[0])
|
obj = Productos.get(Productos.clave==row[0])
|
||||||
|
|
||||||
if isinstance(row[2], str):
|
if isinstance(row[2], str):
|
||||||
msg = 'El Precio Unitario debe ser un número, debe ser 0.00, si no quieres cambiarlo'
|
msg = 'El Precio Unitario debe ser un número, debe ser 0.00, si no quieres cambiarlo'
|
||||||
return {'ok': False, 'msg': msg}
|
return {'ok': False, 'msg': msg}
|
||||||
|
@ -248,6 +249,7 @@ def import_invoice():
|
||||||
'id_product': obj.id,
|
'id_product': obj.id,
|
||||||
'delete': '-',
|
'delete': '-',
|
||||||
'clave': obj.clave,
|
'clave': obj.clave,
|
||||||
|
'clave_sat': obj.clave_sat,
|
||||||
'descripcion': description or obj.descripcion,
|
'descripcion': description or obj.descripcion,
|
||||||
'pedimento': pedimento,
|
'pedimento': pedimento,
|
||||||
'unidad': obj.unidad.id,
|
'unidad': obj.unidad.id,
|
||||||
|
@ -2966,6 +2968,16 @@ class Socios(BaseModel):
|
||||||
fields.pop('accounts', '')
|
fields.pop('accounts', '')
|
||||||
regimenes = fields.pop('regimenes', ())
|
regimenes = fields.pop('regimenes', ())
|
||||||
|
|
||||||
|
w = (
|
||||||
|
(Socios.rfc==fields['rfc']) &
|
||||||
|
(Socios.slug==fields['slug']) &
|
||||||
|
(Socios.id!=id)
|
||||||
|
)
|
||||||
|
if Socios.select().where(w).exists():
|
||||||
|
msg = 'Ya existe otro emisor con este RFC y Razón Social'
|
||||||
|
data = {'ok': False, 'row': {}, 'new': True, 'msg': msg}
|
||||||
|
return data
|
||||||
|
|
||||||
try:
|
try:
|
||||||
q = Socios.update(**fields).where(Socios.id==id)
|
q = Socios.update(**fields).where(Socios.id==id)
|
||||||
q.execute()
|
q.execute()
|
||||||
|
|
|
@ -42,7 +42,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '2.0.1'
|
VERSION = '2.0.2'
|
||||||
|
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
Loading…
Reference in New Issue