Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -513,7 +513,7 @@ Partial Class Clientes
|
||||
Set(value As Integer)
|
||||
ViewState("CveLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property FechaIngLineaAdicional As DateTime
|
||||
Get
|
||||
If ViewState("FechaIngLineaAdicional") Is Nothing Then
|
||||
@@ -526,13 +526,13 @@ Partial Class Clientes
|
||||
Set(value As DateTime)
|
||||
ViewState("FechaIngLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Documentacion"
|
||||
Private Property DTDocumentacion As DataTable
|
||||
Get
|
||||
@@ -2958,14 +2958,14 @@ Partial Class Clientes
|
||||
#Region "G R I D V I E W S"
|
||||
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim HLSendMail As HtmlAnchor = DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor)
|
||||
'Dim HLRemision As HtmlAnchor = DirectCast(e.Row.FindControl("HLRemision"), HtmlAnchor)
|
||||
|
||||
Dim HLSendMail As HtmlAnchor = DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor)
|
||||
'Dim HLRemision As HtmlAnchor = DirectCast(e.Row.FindControl("HLRemision"), HtmlAnchor)
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
HLSendMail.Visible = False
|
||||
'HLRemision.Visible = False
|
||||
End If
|
||||
End If
|
||||
Dim Liga As String = String.Format("< a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
|
||||
HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();void(0);}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto"))
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("Folio"))
|
||||
@@ -2986,8 +2986,8 @@ Partial Class Clientes
|
||||
e.Row.Cells(7).Width = Unit.Pixel(90)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(9).Width = Unit.Pixel(70)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(6).ForeColor = Drawing.Color.Red
|
||||
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
|
||||
If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
|
||||
@@ -4238,23 +4238,23 @@ Partial Class Clientes
|
||||
Try
|
||||
Dim File As Byte()
|
||||
If Archivo.Exists Then
|
||||
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
||||
If ArchivoSti.Exists Then
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = "Datos"
|
||||
rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha")
|
||||
lrds.Add(rds)
|
||||
|
||||
File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato)
|
||||
Else
|
||||
File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
||||
End If
|
||||
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
||||
If ArchivoSti.Exists Then
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = "Datos"
|
||||
rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha")
|
||||
lrds.Add(rds)
|
||||
|
||||
File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato)
|
||||
Else
|
||||
File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
||||
End If
|
||||
Else
|
||||
File = ImprimirPDFCrystal(RutaReporteGrales.FullName, DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4299,8 +4299,8 @@ Partial Class Clientes
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4352,8 +4352,8 @@ Partial Class Clientes
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4361,56 +4361,6 @@ Partial Class Clientes
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(RutaReporteGrales.FullName, DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub ImprimirExcelStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = RDSName
|
||||
rds.Value = DtDatos
|
||||
lrds.Add(rds)
|
||||
|
||||
ImprimirbytesExcel(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:="EXCEL"), NombreArchivo, "EXCEL", Content_Disposition:=Content_Disposition)
|
||||
End Sub
|
||||
Public Sub ImprimirbytesExcel(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment")
|
||||
'limpio ReportViwer
|
||||
Dim mimeType As String = Nothing
|
||||
Dim extension As String = Nothing
|
||||
|
||||
'If Descarga Then
|
||||
' Try
|
||||
' bytes = bytes
|
||||
' File.WriteAllBytes(String.Format("{0}PDF/whatever.gif", UsuarioActual.Empresa.Ruta), img)
|
||||
' Catch ex As Exception
|
||||
' If UsuarioActual.CveRol = 1 Then
|
||||
' Alert(ex.Message, TipoMensaje.MsgAdvertencia)
|
||||
' Else
|
||||
' Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
' End Try
|
||||
'End If
|
||||
|
||||
Try
|
||||
bytes = bytes
|
||||
Response.Buffer = True
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/vnd.ms-excel"
|
||||
Response.ClearHeaders()
|
||||
Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xlsx")))
|
||||
Response.BinaryWrite(bytes) ' create the file
|
||||
Response.Flush() ' send it to the client to download
|
||||
bytes = Nothing
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
'HttpContext.Current.Response.End()
|
||||
Catch ex As Exception
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
Alert($"Error: {ex.Message} | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))}", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod:'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub MandaCorreoEstadoCuenta(CveUsuario As Integer, CveEmpresa As Integer, CveCliente As Integer, File As Byte(), Para As String, Asunto As String, Body As String, Optional GuardarBitacora As Boolean = False)
|
||||
|
||||
@@ -7123,10 +7073,9 @@ Partial Class Clientes
|
||||
DdlIncoterm.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlIncoterm.DataBind()
|
||||
|
||||
DdlClavePedimento.Items.Clear()
|
||||
DdlClavePedimento.DataSource = GlobalDTClavePedimento()
|
||||
DdlClavePedimento.Items.Clear()
|
||||
DdlClavePedimento.DataSource = GlobalDTClavePedimento()
|
||||
DdlClavePedimento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClavePedimento.DataBind()
|
||||
|
||||
DdlMotivoTraslado.Items.Clear()
|
||||
DdlMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado()
|
||||
@@ -9963,7 +9912,7 @@ Partial Class Clientes
|
||||
Alert("Puntuación Inicializada")
|
||||
End If
|
||||
Acum.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
@@ -10490,11 +10439,16 @@ Partial Class Clientes
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If DdlTipoLineaAdicionalModal.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar el tipo de linea adicional", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If CveLineaAdicional > 0 Then
|
||||
|
||||
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
||||
If CveLineaAdicional > 0 Then
|
||||
|
||||
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
||||
@@ -10504,9 +10458,9 @@ Partial Class Clientes
|
||||
Else
|
||||
Alert("Linea Adicional Actualizada Correctamente")
|
||||
End If
|
||||
Else
|
||||
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
||||
Else
|
||||
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
||||
@@ -10535,7 +10489,7 @@ Partial Class Clientes
|
||||
|
||||
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||
|
||||
FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime()
|
||||
FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime()
|
||||
TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional")
|
||||
DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor")
|
||||
DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor")
|
||||
@@ -10580,7 +10534,7 @@ Partial Class Clientes
|
||||
Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False)
|
||||
DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True)
|
||||
DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True)
|
||||
UpLineaAdicionalmodal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user