From 9026cc33e201555ea573f365d268df1477be2b14 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 28 Feb 2023 12:27:18 -0700 Subject: [PATCH] valida guardar ajuste --- Inventarios/RecepcionUsados.aspx.vb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 40bf87dc4..46d2c1d8c 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -3368,6 +3368,8 @@ Partial Class Inventarios_RecepcionUsados End Sub Protected Sub BtnAgregarProductoAjuste_Click(sender As Object, e As EventArgs) + Dim ErrorAjuste As Boolean = False + Dim CvePS As Integer = DdlPSAjuste.SelectedValue.ToEntero Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(CvePS, DdlFolioGarantia.SelectedValue.ToEntero()) @@ -3418,15 +3420,20 @@ Partial Class Inventarios_RecepcionUsados "", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño) End If Else + ErrorAjuste = True Alert("No se pudo cargar el producto", TipoMensaje.MsgError) End If Catch ex As Exception + ErrorAjuste = True OnError("Ocurrió un error al agregar el producto", ex) End Try ObjPS.Dispose() - GuardaAjuste() + If Not ErrorAjuste Then + GuardaAjuste() + End If + 'If TmpDTPolizaVirtual Is Nothing Then ' CreaDTmpDTPolizaVirtual()