ahora verifica que tenga detalles

This commit is contained in:
fedpo
2024-08-06 19:23:25 +01:00
committed by fede
parent 04268f23e5
commit 078320dcea

View File

@@ -14,6 +14,9 @@ namespace Controladora
if (t.Cliente == null || t.Cliente.Cuit == 0) return "Debe seleccionar un cliente antes de agregar la factura"; if (t.Cliente == null || t.Cliente.Cuit == 0) return "Debe seleccionar un cliente antes de agregar la factura";
string checkstock = ""; 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()) foreach (var detalle in t.MostrarDetalles())
{ {
if (detalle.Cantidad > ControladoraLotes.Instance.MostrarStockDeProducto(detalle.Producto)) if (detalle.Cantidad > ControladoraLotes.Instance.MostrarStockDeProducto(detalle.Producto))