errores menores arreglados
This commit is contained in:
+3
-3
@@ -179,7 +179,7 @@ namespace compabetov2
|
|||||||
decimal precioProducto = producto.precio;
|
decimal precioProducto = producto.precio;
|
||||||
|
|
||||||
// Restar al ticket existente si ya se agregó
|
// Restar al ticket existente si ya se agregó
|
||||||
carrito[indexCarrito].cantidad = int.Parse(contador.Text);
|
carrito[indexCarrito].cantidad -= 1;
|
||||||
if (carrito[indexCarrito].cantidad == 0)
|
if (carrito[indexCarrito].cantidad == 0)
|
||||||
{
|
{
|
||||||
carrito.RemoveAt(indexCarrito);
|
carrito.RemoveAt(indexCarrito);
|
||||||
@@ -223,11 +223,11 @@ namespace compabetov2
|
|||||||
int indexCarrito = estaEnCarrito(producto.nombre);
|
int indexCarrito = estaEnCarrito(producto.nombre);
|
||||||
if (indexCarrito != -1)
|
if (indexCarrito != -1)
|
||||||
{
|
{
|
||||||
carrito[indexCarrito].cantidad = int.Parse(contador.Text);
|
carrito[indexCarrito].cantidad += 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
carrito.Add(new DetalleVentaModel(int.Parse(contador.Text), producto));
|
carrito.Add(new DetalleVentaModel(1, producto));
|
||||||
}
|
}
|
||||||
GenerarTicket(idProducto, producto.nombre, producto.precio, int.Parse(contador.Text), total,
|
GenerarTicket(idProducto, producto.nombre, producto.precio, int.Parse(contador.Text), total,
|
||||||
Path.Combine(Application.StartupPath, "Resources", producto.img));
|
Path.Combine(Application.StartupPath, "Resources", producto.img));
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user