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