--FIX autorizaciones con ixc
This commit is contained in:
@@ -978,12 +978,10 @@ Partial Class Ventas_PVCobranza
|
||||
Dim Actualizo As Boolean = False
|
||||
If Tipo.Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf Tipo.Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
@@ -2130,6 +2128,7 @@ Partial Class Ventas_PVCobranza
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
Dim Folio As String = gvr.DataKey("Folio")
|
||||
Dim Importe As Decimal = gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal
|
||||
Dim Saldo As Decimal = gvr.DataKey("Saldo").ToDecimal()
|
||||
Dim dtt As DataTable = Nothing
|
||||
|
||||
Dim ObjProceso As New ClsSisProcesos
|
||||
@@ -2156,22 +2155,17 @@ Partial Class Ventas_PVCobranza
|
||||
Arr.Add(NombreCliente)
|
||||
Arr.Add(Folio)
|
||||
Arr.Add($"$ {Importe}")
|
||||
|
||||
EnvioMsg = EnviarNotificacionWhatsAppPlantilla(NumeroTelefono, "solicitud_autorizacion_anticipo", Arr, $"https://grupodiaz.adssistemas.mx.com/Clientes/Clientes.aspx?CveCliente={CveCliente}")
|
||||
'EnvioMsg = ModExtensiones.EnviarNotificacionWhatsApp2(NumeroTelefono, "", $"Solicitud de activación de anticipo.\\nFolio: {Folio}.\\nCliente: {NombreCliente}.")
|
||||
ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||
|
||||
Next
|
||||
If EnvioMsg Then
|
||||
Alert("Se envió una solicitud de autorización", TipoMensaje.ToastInformacion)
|
||||
'Else
|
||||
' Alert("No se envió la solicitud de autorización", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
||||
|
||||
Dim ObjVta As New ClsVentas
|
||||
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Importe, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
||||
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
||||
Dim msgAlert = "La autorización se agregó correctamente."
|
||||
If EnvioMsg Then
|
||||
msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
|
||||
@@ -2181,7 +2175,7 @@ Partial Class Ventas_PVCobranza
|
||||
ObjVta.Dispose()
|
||||
|
||||
|
||||
UpAnticipos.Update()
|
||||
CargaAnticipos(CveVenta)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user