forked from elmau/empresa-libre
Permitir cambiar descrición al facturar en lote
This commit is contained in:
parent
c42bc817b7
commit
1dddbac0f2
|
@ -1,3 +1,8 @@
|
|||
v 1.22.0 [25-oct-2018]
|
||||
----------------------
|
||||
- Mejora: Permitir cambiar descripción al facturar en lote
|
||||
|
||||
|
||||
v 1.21.2 [23-oct-2018]
|
||||
----------------------
|
||||
- Error unicode
|
||||
|
|
|
@ -6,6 +6,10 @@ siempre actualizado.** Solo se da soporte sobre la ultima versión de **Empresa
|
|||
Libre**.
|
||||
|
||||
|
||||
### 1.22.0 [25-oct-2018]
|
||||
- Mejora: Permitir cambiar descripción al facturar en lote
|
||||
|
||||
|
||||
### 1.21.2 [23-oct-2018]
|
||||
- Error unicode
|
||||
|
||||
|
|
|
@ -159,8 +159,12 @@ def import_invoice():
|
|||
return {'ok': False, 'msg': msg}
|
||||
|
||||
products = []
|
||||
for row in rows:
|
||||
for i, row in enumerate(rows):
|
||||
try:
|
||||
if not isinstance(row[0], str):
|
||||
msg = 'Fila: {} - La clave debe ser TEXTO'.format(i+1)
|
||||
return {'ok': False, 'msg': msg}
|
||||
|
||||
obj = Productos.get(Productos.clave==row[0])
|
||||
vu = round(row[2], 2)
|
||||
|
||||
|
@ -170,13 +174,14 @@ def import_invoice():
|
|||
|
||||
descuento = round(row[3], 2)
|
||||
cant = round(row[4], 2)
|
||||
description = row[1].strip()
|
||||
pedimento = row[5].strip()
|
||||
pf = vu - descuento
|
||||
p = {
|
||||
'id_product': obj.id,
|
||||
'delete': '-',
|
||||
'clave': obj.clave,
|
||||
'descripcion': obj.descripcion,
|
||||
'descripcion': description,
|
||||
'pedimento': pedimento,
|
||||
'unidad': obj.unidad.id,
|
||||
'cantidad': cant,
|
||||
|
|
|
@ -47,7 +47,7 @@ except ImportError:
|
|||
|
||||
|
||||
DEBUG = DEBUG
|
||||
VERSION = '1.21.2'
|
||||
VERSION = '1.22.0'
|
||||
EMAIL_SUPPORT = ('soporte@empresalibre.net',)
|
||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||
|
||||
|
|
Loading…
Reference in New Issue