--Clase motivo devolucion

This commit is contained in:
2024-07-16 19:47:09 -07:00
parent 7a86e4df36
commit 7fbba457ad
2 changed files with 82 additions and 1 deletions

View File

@@ -10776,7 +10776,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/FacturacionGlobal.aspx".ToUpper(), 546)
PaginaDict.Add("/Ventas/RepComisionesSMS.aspx".ToUpper(), 1347)
PaginaDict.Add("/Ventas/RepVencimientosCredito.aspx".ToUpper(), 146)
PaginaDict.Add("/Ventas/CatMotivosDevoluciones.aspx".ToUpper(), 786)
#End Region

View File

@@ -2757,6 +2757,87 @@ Public Class ClsVentas
#End Region
#Region " M O T I V O S -- D E V O L U C I O N"
Public Function AddMotivoDevolucion(Motivo As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasMotivosDevolucionAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al tratar de agregar el motivo de devolucion. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function UpdateMotivoDevolucion(CveMotivoDevolución As Integer, Motivo As String, Estatus As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasMotivosDevolucionUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMotivoDevolución", SqlDbType.Int).Value = CveMotivoDevolución
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al tratar de actualizar el motivo de devolución. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetMotivoDevolucion(CveMotivoDevolución As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasMotivosDevolucionGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMotivoDevolución", SqlDbType.Int).Value = CveMotivoDevolución
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al tratar de obtener el motivo de devolución. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function RemoveMotivoDevolucion(CveMotivoDevolución As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasMotivosDevolucionRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMotivoDevolución", SqlDbType.Int).Value = CveMotivoDevolución
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al tratar de obtener el motivo de devolución. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region
Public Function GetPrecios(CveClasificacion As Integer, CvePS As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean