Refacturacion sin aceptacion
This commit is contained in:
@@ -667,7 +667,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1) As Boolean
|
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_VentasCancelacion")
|
DataAdapter("PA_Vta_VentasCancelacion")
|
||||||
@@ -678,6 +678,7 @@ Public Class ClsVentas
|
|||||||
.Add("@SelloDigitalSAT", SqlDbType.VarChar).Value = SelloCancelacionSAT
|
.Add("@SelloDigitalSAT", SqlDbType.VarChar).Value = SelloCancelacionSAT
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC
|
.Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC
|
||||||
|
.Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -4297,7 +4297,7 @@ Namespace Modelos
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
If CveEstatus.Contiene(4, 5) Then
|
If CveEstatus.Contiene(4, 5) Then
|
||||||
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion) Then
|
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, CveEstatusRefacturacion) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||||
End If
|
End If
|
||||||
|
|||||||
74
Global.asax
74
Global.asax
@@ -603,9 +603,9 @@
|
|||||||
|
|
||||||
ObjGPS.Dispose()
|
ObjGPS.Dispose()
|
||||||
|
|
||||||
If EsProduccion = "1" Then
|
'If EsProduccion = "1" Then
|
||||||
RegisterNotification()
|
' RegisterNotification()
|
||||||
End If
|
'End If
|
||||||
'-----------------
|
'-----------------
|
||||||
AspMap.License.SetLicenseKey("ccfecfcegknepnhmjighpjjpmpmbajfejhnladegmeanci")
|
AspMap.License.SetLicenseKey("ccfecfcegknepnhmjighpjjpmpmbajfejhnladegmeanci")
|
||||||
|
|
||||||
@@ -668,44 +668,44 @@
|
|||||||
|
|
||||||
#Region "S Q L D E P E N D E N C Y"
|
#Region "S Q L D E P E N D E N C Y"
|
||||||
|
|
||||||
Public Sub RegisterNotification()
|
'Public Sub RegisterNotification()
|
||||||
Try
|
' Try
|
||||||
'Get the connection string from the Web.Config file. Make sure that the key exists and it is the connection string for the Notification Database and the NotificationList Table that we created
|
' 'Get the connection string from the Web.Config file. Make sure that the key exists and it is the connection string for the Notification Database and the NotificationList Table that we created
|
||||||
Dim connectionString As String = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
' Dim connectionString As String = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||||
'We have selected the entire table as the command, so SQL Server executes this script and sees if there is a change in the result, raise the event
|
' 'We have selected the entire table as the command, so SQL Server executes this script and sees if there is a change in the result, raise the event
|
||||||
Dim commandText As String = "SELECT [FechaNotificacion] FROM dbo.Sis_NotificacionesActualizaciones"
|
' Dim commandText As String = "SELECT [FechaNotificacion] FROM dbo.Sis_NotificacionesActualizaciones"
|
||||||
'Start the SQL Dependency
|
' 'Start the SQL Dependency
|
||||||
SqlDependency.Start(connectionString)
|
' SqlDependency.Start(connectionString)
|
||||||
Using connection As New SqlConnection(connectionString)
|
' Using connection As New SqlConnection(connectionString)
|
||||||
Using command As New SqlCommand(commandText, connection)
|
' Using command As New SqlCommand(commandText, connection)
|
||||||
connection.Open()
|
' connection.Open()
|
||||||
Dim sqlDependency = New SqlDependency(command)
|
' Dim sqlDependency = New SqlDependency(command)
|
||||||
AddHandler sqlDependency.OnChange, AddressOf sqlDependency_OnChange
|
' AddHandler sqlDependency.OnChange, AddressOf sqlDependency_OnChange
|
||||||
' NOTE: You have to execute the command, or the notification will never fire.
|
' ' NOTE: You have to execute the command, or the notification will never fire.
|
||||||
Using reader As SqlDataReader = command.ExecuteReader()
|
' Using reader As SqlDataReader = command.ExecuteReader()
|
||||||
End Using
|
' End Using
|
||||||
End Using
|
' End Using
|
||||||
End Using
|
' End Using
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub sqlDependency_OnChange(sender As Object, e As SqlNotificationEventArgs)
|
'Private Sub sqlDependency_OnChange(sender As Object, e As SqlNotificationEventArgs)
|
||||||
If e.Info = SqlNotificationInfo.Update Then
|
' If e.Info = SqlNotificationInfo.Update Then
|
||||||
Try
|
' Try
|
||||||
Dim ObjNotificaciones As New ClsSisNotificaciones
|
' Dim ObjNotificaciones As New ClsSisNotificaciones
|
||||||
ObjNotificaciones.ObtenerNotificaciones()
|
' ObjNotificaciones.ObtenerNotificaciones()
|
||||||
ObjNotificaciones.Dispose()
|
' ObjNotificaciones.Dispose()
|
||||||
'System.Threading.Thread.Sleep(5000)
|
' 'System.Threading.Thread.Sleep(5000)
|
||||||
RegisterNotification()
|
' RegisterNotification()
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
' End Try
|
||||||
End If
|
' End If
|
||||||
'Call the RegisterNotification method again
|
' 'Call the RegisterNotification method again
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
ObjVentas.Dispose();
|
ObjVentas.Dispose();
|
||||||
GvDatos.DataSource = DtVentas.FiltraParametros("CveEstatusFactura = 20 AND CveEstatusRefacturacion = 0");
|
GvDatos.DataSource = DtVentas.FiltraParametros("CveEstatusFactura = 20 AND CveEstatusRefacturacion = 0");
|
||||||
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion = 1");
|
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3)");
|
||||||
if (DtRefacturar.Rows.Count > 0)
|
if (DtRefacturar.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DivRefacturar.Visible = true;
|
DivRefacturar.Visible = true;
|
||||||
|
|||||||
@@ -15529,7 +15529,7 @@ Partial Class Ventas
|
|||||||
CancelarDocumento(True)
|
CancelarDocumento(True)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnRefacturacionConfirmarAceptacion_Click(sender As Object, e As System.EventArgs) Handles BtnRefacturacionConfirmarAceptacion.Click
|
Private Sub BtnRefacturacionConfirmarAceptacion_Click(sender As Object, e As System.EventArgs) Handles BtnRefacturacionConfirmarAceptacion.Click
|
||||||
Response.Redirect(String.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta))
|
CancelarDocumento(True)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnContabilizar_Click(sender As Object, e As System.EventArgs) Handles BtnContabilizar.Click
|
Private Sub BtnContabilizar_Click(sender As Object, e As System.EventArgs) Handles BtnContabilizar.Click
|
||||||
'Dim ObjMov As New ClsContabilidad
|
'Dim ObjMov As New ClsContabilidad
|
||||||
|
|||||||
Reference in New Issue
Block a user