diff --git a/bin/Debug/compabetov2.exe b/bin/Debug/compabetov2.exe index 4fb06ec..da3ce85 100644 Binary files a/bin/Debug/compabetov2.exe and b/bin/Debug/compabetov2.exe differ diff --git a/bin/Debug/compabetov2.pdb b/bin/Debug/compabetov2.pdb index 3f34717..a8c2949 100644 Binary files a/bin/Debug/compabetov2.pdb and b/bin/Debug/compabetov2.pdb differ diff --git a/bin/Debug/data.db b/bin/Debug/data.db index f1e2f4b..9e77377 100644 Binary files a/bin/Debug/data.db and b/bin/Debug/data.db differ diff --git a/database/DAO.cs b/database/DAO.cs index c6a0a2b..8eacccd 100644 --- a/database/DAO.cs +++ b/database/DAO.cs @@ -1327,7 +1327,7 @@ namespace compabetov2.database try { string sqlEnvio = "INSERT INTO envios (fecha, direccion, telefono,responzable,total,cliente) VALUES(@fecha,@direccion , @telefono, @responzable, @total,@cliente);"; - string sqlDetalle = "INSERT INTO detalle_envios (fk_envios, fk_variante, cantidad) VALUES(@fk_envios, @fk_variante, @cantidad);"; + string sqlDetalle = "INSERT INTO detalle_envios (fk_envios, fk_variante, cantidad,precioVenta,precioCompra) VALUES(@fk_envios, @fk_variante, @cantidad, @precioVenta,@precioCompra);"; string sqlIdCuenta = "SELECT idEnvios FROM envios ORDER BY idEnvios DESC LIMIT 1"; string sqlImporte = "INSERT INTO detalle_importe_envio (fk_importe, cantidad, precio, fk_envio) VALUES(@fk_importe, @cantidad, @precio, @fk_envio);"; @@ -1355,6 +1355,8 @@ namespace compabetov2.database commandDetalle.Parameters.AddWithValue("@fk_envios", idEnvio); commandDetalle.Parameters.AddWithValue("@fk_variante", detalleEnvio.producto.idVariante); commandDetalle.Parameters.AddWithValue("@cantidad", detalleEnvio.cantidad); + commandDetalle.Parameters.AddWithValue("@precioVenta", detalleEnvio.producto.precio); + commandDetalle.Parameters.AddWithValue("@precioCompra", detalleEnvio.producto.precioCompra); commandDetalle.ExecuteNonQuery(); } diff --git a/obj/Debug/compabetov2.exe b/obj/Debug/compabetov2.exe index 4fb06ec..da3ce85 100644 Binary files a/obj/Debug/compabetov2.exe and b/obj/Debug/compabetov2.exe differ diff --git a/obj/Debug/compabetov2.pdb b/obj/Debug/compabetov2.pdb index 3f34717..a8c2949 100644 Binary files a/obj/Debug/compabetov2.pdb and b/obj/Debug/compabetov2.pdb differ