BDH, Liga para cancelacion de remisión
This commit is contained in:
@@ -116,7 +116,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Case "sendMailLPM"
|
||||
context.Response.Write(sendMailLPM(context))
|
||||
Case "getSATColomias"
|
||||
getSatColonias(context)
|
||||
getSATColonias(context)
|
||||
|
||||
Case "cancelarRemision"
|
||||
cancelarRemision(context)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
@@ -1422,4 +1425,47 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Get SAT Colonmias"
|
||||
Private Function cancelarRemision(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
Dim CveVenta As Integer = IfNull(context.Request("CveVenta"), "-1").ToString().ToEntero()
|
||||
|
||||
If CveVenta > 0 Then
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
If usuario IsNot Nothing AndAlso usuario.CveEmpresa > 0 Then
|
||||
Dim CveAlmacenDevolucion As Integer = 0
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetInv_Mov(CveVenta, usuario.CveEmpresa) Then
|
||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
CveAlmacenDevolucion = ObjInv.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveConcepto IN (3,40)").ToEntero()
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Dim ObjFacturaCancelacion As New Modelos.Factura(usuario, CveVenta, usuario.CveEmpresa, EsCancelacion:=True)
|
||||
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
|
||||
If ObjFacturaCancelacion.TipoDocto = "Rem" Then
|
||||
Dim respuesta = ObjFacturaCancelacion.CancelarFactura(True, New List(Of Integer))
|
||||
If respuesta IsNot Nothing Then
|
||||
retorno = JsonConvert.SerializeObject(respuesta)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(retorno) Then
|
||||
context.Response.Write(retorno)
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
Reference in New Issue
Block a user