Mostrar serie y producto con una entrada previa
This commit is contained in:
@@ -1346,24 +1346,22 @@ Public Class ClsInventarios
|
||||
Retorno = True
|
||||
End If
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
If Ex1.Message.Contains("50019") Then
|
||||
Me.OnError(" El producto no tiene existencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
ElseIf Ex1.Message.Contains("CK_Inv_MovimientosDetalle_MetodoInventario") Then
|
||||
|
||||
Me.OnError("El movimiento debe de tener una Serie.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
Else
|
||||
If Ex1.Message.Contains("50021") Then
|
||||
Me.OnError(" El producto ingresado previamente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
If Ex1.Message.Contains("50021;") Then
|
||||
If String.IsNullOrEmpty(Serie) Then
|
||||
Me.OnError("El producto ya fue ingresado previamente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Else
|
||||
OnError(String.Format("El producto '{0}' con la serie: '{1}' ya fue ingresado previamente.", Ex1.Message.GetTagValue("codigops"), Serie), Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar los detalles del movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
OnError("Ocurrió un error al guardar los detalles del movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
|
||||
@@ -150,6 +150,17 @@ Namespace Extensiones
|
||||
|
||||
|
||||
#Region "Log"
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function GetTagValue(Obj As String, tag As String) As String
|
||||
Try
|
||||
Dim Regex = New Regex($"<{tag}>(.*)</{tag}>")
|
||||
Dim match = Regex.Match(Obj)
|
||||
Return match.Groups(1).ToString()
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Sub GuardaLog(Str As String)
|
||||
|
||||
@@ -3869,7 +3869,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
If ObjContaContPAQ IsNot Nothing Then ObjContaContPAQ.RollBack()
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Alert($"Ocurrió un error al guardar el movimiento de almacén. Por favor vuelva a intentar. <br><br> {MensajeError}", TipoMensaje.MsgError)
|
||||
|
||||
If Not String.IsNullOrEmpty(MensajeError) Then
|
||||
Alert($"Ocurrió un error al guardar el movimiento de almacén. Por favor vuelva a intentar. <br><br> {MensajeError}", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjInventario.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user