-- correción
This commit is contained in:
@@ -7371,8 +7371,8 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
'VERIFICAR RESTRICCIONES DEL CLIENTE
|
'VERIFICAR RESTRICCIONES DEL CLIENTE
|
||||||
If UsuarioActual.Empresa.Funcionalidad(702) = "" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then
|
||||||
If Not (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2") Then
|
If (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2") Then
|
||||||
Dim Vta As New ClsVentas
|
Dim Vta As New ClsVentas
|
||||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||||
@@ -16179,12 +16179,11 @@ Partial Class Ventas
|
|||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant", "Egs") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant", "Egs") Then
|
||||||
'If Not ImprimeAlert Then
|
'If Not ImprimeAlert Then
|
||||||
|
|
||||||
Dim ArchivoIngPyMe As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
|
||||||
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoIngPyMe.Exists Or ArchivoEgs.Exists Then
|
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoEgs.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", CveVenta)))
|
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", CveVenta)))
|
||||||
Else
|
Else
|
||||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||||
@@ -32985,45 +32984,8 @@ Partial Class Ventas
|
|||||||
TFuenteRecaudacion.Visible = False
|
TFuenteRecaudacion.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If UsuarioActual.CveRol = 1 Then
|
|
||||||
' If ChkEmitirComercioExterior.Checked Then
|
|
||||||
' TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate.AddDays(-1)).ToString()
|
|
||||||
' Else
|
|
||||||
' TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' UpPS.Update()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
'Protected Sub LnkDescargarFacturaPrueba_Click(sender As Object, e As EventArgs)
|
|
||||||
' 'Dim Hilo As New System.Threading.Thread(Sub() DescargarFactura(Me.CveVenta, UsuarioActual.CveEmpresa))
|
|
||||||
' 'Hilo.Start()
|
|
||||||
' Dim facBytes = DescargarFactura(Me.CveVenta, UsuarioActual.CveEmpresa)
|
|
||||||
' ImprimirbytesPDF(facBytes, "Factura")
|
|
||||||
'End Sub
|
|
||||||
'Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer) As Byte()
|
|
||||||
' Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "https://sig.adssistemas.mx/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
|
||||||
' Dim File As Byte() = Nothing
|
|
||||||
' Try
|
|
||||||
' Using httpClient = New HttpClient()
|
|
||||||
' httpClient.Timeout = New TimeSpan(0, 15, 0)
|
|
||||||
' Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
|
||||||
' request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
|
||||||
' Dim response = httpClient.SendAsync(request).Result
|
|
||||||
' If response.StatusCode = Net.HttpStatusCode.OK Then
|
|
||||||
' File = response.Content.ReadAsByteArrayAsync().Result
|
|
||||||
' End If
|
|
||||||
' End Using
|
|
||||||
' End Using
|
|
||||||
' Catch ex As Exception
|
|
||||||
' File = Nothing
|
|
||||||
' OnError("Ocurrió un error al descargar la factura", ex)
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' Return File
|
|
||||||
'End Function
|
|
||||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer, Optional GetBytes As Boolean = True, Optional Regenerar As Boolean = False, Optional strURLHOST As String = "") As Byte()
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer, Optional GetBytes As Boolean = True, Optional Regenerar As Boolean = False, Optional strURLHOST As String = "") As Byte()
|
||||||
|
|
||||||
If String.IsNullOrEmpty(strURLHOST) Then
|
If String.IsNullOrEmpty(strURLHOST) Then
|
||||||
@@ -33054,26 +33016,6 @@ Partial Class Ventas
|
|||||||
Response.Redirect($"~/OC/OC.aspx?CveCotizacion={Me.CveVenta}&Tipo=OC")
|
Response.Redirect($"~/OC/OC.aspx?CveCotizacion={Me.CveVenta}&Tipo=OC")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
|
||||||
' Dim ObjVentas As New ClsVentas
|
|
||||||
' ObjVentas.IniciaTransacSQL()
|
|
||||||
|
|
||||||
' Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
|
||||||
' Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
|
|
||||||
' Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
|
||||||
' Dim ObjAC As ClsContPAQi = Nothing
|
|
||||||
|
|
||||||
' If Not RegeneracionPolizas(ObjVentas, ObjAC, ObjConta, ObjBancos) Then
|
|
||||||
' ObjVentas.Commit()
|
|
||||||
' If ObjAC IsNot Nothing Then ObjAC.Commit()
|
|
||||||
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();")
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ObjVentas.Dispose()
|
|
||||||
' ObjConta.Dispose()
|
|
||||||
' ObjBancos.Dispose()
|
|
||||||
' If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
|
||||||
'End Sub
|
|
||||||
Protected Sub btnupEventoBitacora_Click(sender As Object, e As EventArgs)
|
Protected Sub btnupEventoBitacora_Click(sender As Object, e As EventArgs)
|
||||||
CargaEventoBitacora()
|
CargaEventoBitacora()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user