Cambios CRM
This commit is contained in:
@@ -1886,6 +1886,18 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveAcercamiento As Integer
|
||||
Get
|
||||
If ViewState("CveAcercamiento") Is Nothing Then
|
||||
ViewState("CveAcercamiento") = -1
|
||||
End If
|
||||
Return ViewState("CveAcercamiento").ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAcercamiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveEmpresaCRM As Integer
|
||||
Get
|
||||
Return ViewState("CveEmpresaCRM").ToString().ToEntero()
|
||||
@@ -1895,6 +1907,7 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveAcercamientoCRM As Integer
|
||||
Get
|
||||
Return ViewState("CveAcercamientoCRM").ToString().ToEntero()
|
||||
@@ -10072,6 +10085,18 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||
|
||||
Dim ArchivoCotRdlc As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoCotMrt As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.mrt", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
If ArchivoCotRdlc.Exists Or ArchivoCotMrt.Exists Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
||||
Else
|
||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||
End If
|
||||
End If
|
||||
|
||||
'ERROR DE NO TIMBRADO
|
||||
If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
||||
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
||||
@@ -10100,6 +10125,10 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir")
|
||||
End If
|
||||
|
||||
'DESCARGAR PDF DE CICOVISA
|
||||
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
|
||||
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
@@ -10108,6 +10137,7 @@ Partial Class Ventas
|
||||
'End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
|
||||
If Not CveEmpresaCRM > 0 Then
|
||||
|
||||
'EN EMPRESA DE ACUMULADORES NO DESCARGAR EL PDF
|
||||
@@ -10194,7 +10224,18 @@ Partial Class Ventas
|
||||
Liga2 = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
||||
End If
|
||||
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||
Liga = $"document.location.href=""/CRM/Acercamiento.aspx?CveAcercamiento={CveAcercamientoCRM}&OPTAB=COT"";"
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Aceptar", TextoSegundoBoton:=Nothing, JSBtn2:=Nothing, ShowCloseButton:=False)
|
||||
Else
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MensajeAlert.Clear()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user