ahora verifica que tenga detalles
This commit is contained in:
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user