venta envio lista y bug del stcok en vender arreglado

This commit is contained in:
carlos
2024-02-14 20:05:42 -06:00
parent 93d7aef100
commit c2008264f2
12 changed files with 66 additions and 68 deletions
+5 -5
View File
@@ -352,11 +352,11 @@ namespace compabetov2.database
while (reader.Read())
{
int idProducto = (int)reader.GetInt64(0);
int idVariante = (int)reader.GetInt64(0);
DetalleEnvioModel detalleEnvio = new DetalleEnvioModel(
idEnvio,
new Producto(idProducto, reader["nombre"].ToString()),
(int)reader.GetInt64(2)
new Variante(idVariante, reader["nombre"].ToString(),0,(int)reader.GetInt64(2),"", (int)reader.GetInt64(3)),//fkproducto
(int)reader.GetInt64(4)//cantidad
);
detallesEnvio.Add(detalleEnvio);
}
@@ -370,9 +370,9 @@ namespace compabetov2.database
}
public static bool cancelarEnvio(int idEnvio)
public static bool cancelarEnvio(Envio envio, List<DetalleEnvioModel> detalles)
{
return DAO.cancelarEnvioDAO(idEnvio);
return DAO.cancelarEnvioDAO(envio, detalles);
}
public static bool concluirEnvio(Envio envio, List<DetalleEnvioModel> detallesEnvio)