From c46098d25c2a5b8485025897bf1b7f3262bf7bac Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Feb 2024 13:41:26 -0700 Subject: [PATCH] =?UTF-8?q?-=20validaci=C3=B3n=20de=20cantidad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/RepRecolecciones.aspx.vb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Acumuladores/RepRecolecciones.aspx.vb b/Acumuladores/RepRecolecciones.aspx.vb index 44e8fccab..2cc61fdc3 100644 --- a/Acumuladores/RepRecolecciones.aspx.vb +++ b/Acumuladores/RepRecolecciones.aspx.vb @@ -209,6 +209,18 @@ Partial Class Acumuladores_RepRecolecciones End Sub Private Sub BtnModalRecoleccionGuardar_Click(sender As Object, e As EventArgs) Handles BtnModalRecoleccionGuardar.Click + + + Dim Cantidad As Decimal = HdnCantidadRecoleccion.Value.ToDecimal + Dim CantidadDefinido As Decimal = 0 + For Each gvr As GridViewRow In GvModalPSRecoleccion.Rows + CantidadDefinido += gvr.DataKey("Cantidad").ToDecimal + Next + If CantidadDefinido <> Cantidad Then + Alert("La cantidad definida no es la correcta", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Dim ObjInventario As New ClsInventarios Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL) Dim ErrorMovInv As Boolean = False