diff --git a/Ventas/RepPedidosSTF.aspx b/Ventas/RepPedidosSTF.aspx index 48ff40fa4..33ce5f120 100644 --- a/Ventas/RepPedidosSTF.aspx +++ b/Ventas/RepPedidosSTF.aspx @@ -120,23 +120,33 @@
+
- - + + + + + + + + + + + + - - - + - + + @@ -149,11 +159,18 @@ - + - + + - + + + + + + + diff --git a/Ventas/RepPedidosSTF.aspx.vb b/Ventas/RepPedidosSTF.aspx.vb index a7acaaf1e..d78cd04fd 100644 --- a/Ventas/RepPedidosSTF.aspx.vb +++ b/Ventas/RepPedidosSTF.aspx.vb @@ -160,9 +160,25 @@ Partial Class Ventas_RepPedidosSTF Dim PSNuevo As String = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlPS").SelectedItem.Text Dim PU As Decimal = DTProductosEdicion.FiltroPrimeroValor("Precio", $"CvePS = {CvePSNuevo}").ToDecimal + If Not CvePSNuevo > 0 Then + Alert("Producto no encontrado.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If Not Cantidad > 0 Then + Alert("Debe especificar la cantidad.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If Not PU > 0 Then + Alert("El precio del producto no puede ser 0.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + DatosGV.Rows(GvDatos.EditIndex)("Cantidad") = Cantidad DatosGV.Rows(GvDatos.EditIndex)("CvePS") = CvePSNuevo DatosGV.Rows(GvDatos.EditIndex)("CodigoPS") = PSNuevo + DatosGV.Rows(GvDatos.EditIndex)("PU") = PU DatosGV.AcceptChanges()