Regresar productos en orden al refacturar
This commit is contained in:
commit
3a5fbc609b
|
@ -6809,7 +6809,7 @@ class FacturasDetalle(BaseModel):
|
||||||
def reinvoice(cls, id):
|
def reinvoice(cls, id):
|
||||||
data = []
|
data = []
|
||||||
products = FacturasDetalle.select().where(FacturasDetalle.factura==id)
|
products = FacturasDetalle.select().where(FacturasDetalle.factura==id)
|
||||||
for p in reversed(products):
|
for p in products:
|
||||||
row = {'delete': '-', 'id_product': p.producto.id}
|
row = {'delete': '-', 'id_product': p.producto.id}
|
||||||
row['clave'] = p.clave
|
row['clave'] = p.clave
|
||||||
row['clave_sat'] = p.clave_sat
|
row['clave_sat'] = p.clave_sat
|
||||||
|
@ -6830,7 +6830,7 @@ class FacturasDetalle(BaseModel):
|
||||||
def get_detalle(cls, id):
|
def get_detalle(cls, id):
|
||||||
data = []
|
data = []
|
||||||
products = FacturasDetalle.select().where(FacturasDetalle.factura==id)
|
products = FacturasDetalle.select().where(FacturasDetalle.factura==id)
|
||||||
for p in reversed(products):
|
for p in products:
|
||||||
row = {'id_product': p.producto.id}
|
row = {'id_product': p.producto.id}
|
||||||
row['clave'] = p.clave
|
row['clave'] = p.clave
|
||||||
row['clave_sat'] = p.clave_sat
|
row['clave_sat'] = p.clave_sat
|
||||||
|
@ -6899,7 +6899,7 @@ class PreFacturasDetalle(BaseModel):
|
||||||
productos = PreFacturasDetalle.select().where(
|
productos = PreFacturasDetalle.select().where(
|
||||||
PreFacturasDetalle.factura==id)
|
PreFacturasDetalle.factura==id)
|
||||||
|
|
||||||
for p in reversed(productos):
|
for p in productos:
|
||||||
row = {'id_product': p.producto.id}
|
row = {'id_product': p.producto.id}
|
||||||
row['clave'] = p.producto.clave
|
row['clave'] = p.producto.clave
|
||||||
row['descripcion'] = p.descripcion
|
row['descripcion'] = p.descripcion
|
||||||
|
@ -6935,7 +6935,7 @@ class PreFacturasDetalle(BaseModel):
|
||||||
productos = PreFacturasDetalle.select().where(
|
productos = PreFacturasDetalle.select().where(
|
||||||
PreFacturasDetalle.factura==id)
|
PreFacturasDetalle.factura==id)
|
||||||
|
|
||||||
for p in reversed(productos):
|
for p in productos:
|
||||||
producto = {}
|
producto = {}
|
||||||
producto['noidentificacion'] = '{}\n(SAT {})'.format(
|
producto['noidentificacion'] = '{}\n(SAT {})'.format(
|
||||||
p.producto.clave, p.producto.clave_sat)
|
p.producto.clave, p.producto.clave_sat)
|
||||||
|
|
Loading…
Reference in New Issue