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