From 078320dcea4cbabe6fcef528f25a03d9aefb831a Mon Sep 17 00:00:00 2001 From: fedpo Date: Tue, 6 Aug 2024 19:23:25 +0100 Subject: [PATCH] ahora verifica que tenga detalles --- Controladora/ControladoraFacturas.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Controladora/ControladoraFacturas.cs b/Controladora/ControladoraFacturas.cs index 722a1b2..a2520d8 100644 --- a/Controladora/ControladoraFacturas.cs +++ b/Controladora/ControladoraFacturas.cs @@ -14,6 +14,9 @@ namespace Controladora if (t.Cliente == null || t.Cliente.Cuit == 0) return "Debe seleccionar un cliente antes de agregar la factura"; string checkstock = ""; + + if (t.MostrarDetalles().Count <= 0) return "Se debe Cargar un detalle en la factura antes de agregarla"; + foreach (var detalle in t.MostrarDetalles()) { if (detalle.Cantidad > ControladoraLotes.Instance.MostrarStockDeProducto(detalle.Producto))