removemovimiento de almacen
This commit is contained in:
@@ -118,12 +118,14 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
context.Response.Write(sendMailLPM(context))
|
context.Response.Write(sendMailLPM(context))
|
||||||
Case "getSATColomias"
|
Case "getSATColomias"
|
||||||
getSatColonias(context)
|
getSatColonias(context)
|
||||||
Case "GetFilesDirectory"
|
Case "GetFilesDirectory"
|
||||||
GetFilesDirectory(context)
|
GetFilesDirectory(context)
|
||||||
Case "Getetiquetas"
|
Case "Getetiquetas"
|
||||||
Getetiquetas(context)
|
Getetiquetas(context)
|
||||||
Case "cancelarRemision"
|
Case "cancelarRemision"
|
||||||
cancelarRemision(context)
|
cancelarRemision(context)
|
||||||
|
Case "RemoveMovimiento"
|
||||||
|
RemoveMovimiento(context)
|
||||||
End Select
|
End Select
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ex.GuardaLog(ex.Message)
|
ex.GuardaLog(ex.Message)
|
||||||
@@ -1644,4 +1646,66 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
Private Function RemoveMovimiento(ByVal context As HttpContext) As String
|
||||||
|
Dim retorno As String = ""
|
||||||
|
|
||||||
|
Dim Borrar As Boolean = False
|
||||||
|
Dim Inv As New ClsInventarios
|
||||||
|
Dim Conta As New ClsContabilidad(Inv.IniciaTransacSQL())
|
||||||
|
Dim ObjGral As New ClsGenerales(Inv.IniciaTransacSQL())
|
||||||
|
|
||||||
|
Dim CveMovimiento As Integer = IfNull(context.Request("CveMovimiento"), "-1").ToString().ToEntero()
|
||||||
|
Dim CveEmpresa As Integer = IfNull(context.Request("CveEmpresa"), "-1").ToString().ToEntero()
|
||||||
|
|
||||||
|
Dim TieneError = False
|
||||||
|
|
||||||
|
CveMovimiento.ToString.GuardaLog
|
||||||
|
|
||||||
|
'Dim ObjConta As ClsContPAQi = Nothing
|
||||||
|
'If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||||
|
' ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
' ObjConta.IniciaTransacSQL()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, String.Format("{0}, Informacion = {1}", TxtDescripcion.Text, DescripcionDetalladaEliminar), "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||||
|
' TieneError = True
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If Not Inv.MovimientoRemove(CveMovimiento, CveEmpresa) Then
|
||||||
|
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If Not TieneError Then
|
||||||
|
' If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||||
|
' TieneError = True
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
'If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||||
|
Inv.Commit()
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
Inv.RollBack()
|
||||||
|
|
||||||
|
Alert("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
CveMovimiento = 0
|
||||||
|
|
||||||
|
Inv.Dispose()
|
||||||
|
ObjGral.Dispose()
|
||||||
|
Conta.Dispose()
|
||||||
|
If Not String.IsNullOrEmpty(retorno) Then
|
||||||
|
context.Response.Write(retorno)
|
||||||
|
Else
|
||||||
|
context.Response.Write("[]")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user