Pendientes BDH, mejoras servicion E141, mwjoras carga PS entradas/salidas,cambios en modalidad contable, favicon signals gps
This commit is contained in:
@@ -18072,6 +18072,11 @@ Partial Class Compras_Compras
|
||||
Dim CveProyecto = If(DdlProyecto.SelectedValue.ToEntero > 0, DdlProyecto.SelectedValue.ToEntero, -1)
|
||||
DdlSubProyecto.Items.Clear()
|
||||
|
||||
'SI NO SE VE EL PROYECTO NO FILTRAR POR PROYECTO
|
||||
If Not DdlProyecto.Visible Then
|
||||
CveProyecto = -1
|
||||
End If
|
||||
|
||||
DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, CveProyecto, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(CveProyecto, -1, UsuarioActual.CveEmpresa, 1))
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
@@ -13,7 +13,8 @@ Imports Stimulsoft.Report
|
||||
Imports Stimulsoft.Report.Components
|
||||
Imports Stimulsoft.Report.Dictionary
|
||||
Imports Stimulsoft.Report.Web
|
||||
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
Partial Class PopUpVerFactura
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -495,8 +496,17 @@ Partial Class PopUpVerFactura
|
||||
|
||||
'PDF AJUSTE
|
||||
If UrlParametros("OP").ToString = "AJUSTE" Then
|
||||
'SI YA ESTA GUARDADO
|
||||
If UrlParametros("CVEGARANTIADETALLE") IsNot Nothing Then
|
||||
ImprimirPDFAjuste(UrlParametros("CVEGARANTIADETALLE").ToString.ToEntero)
|
||||
ImprimirPDFAjuste(UrlParametros("CVEGARANTIADETALLE").ToString.ToEntero)
|
||||
Else
|
||||
ImprimirPDFAjuste(CvePSAjuste:=UrlParametros("CVEPSAJUSTE").ToString.ToEntero(), CveCliente:=UrlParametros("CVECLIENTE").ToString.ToEntero(),
|
||||
CveClienteDistribuidor:=UrlParametros("CVECLIENTEDISTRIBUIDOR").ToString.ToEntero(), Consec:=UrlParametros("CONSEC").ToString,
|
||||
FolioGarantia:=UrlParametros("FOLIOGARANTIA").ToString, FechaAjuste:=UrlParametros("FECHAAJUSTE").ToString.ToDateTime(), FechaReclamacion:=UrlParametros("FECHARECLAMACION").ToString.ToDateTime(),
|
||||
TipoDefecto:=UrlParametros("TIPODEFECTO").ToString, CveTipoUso:=UrlParametros("CVETIPOUSO").ToString.ToEntero(), CodigoEnsamble:=UrlParametros("CODIGOENSAMBLE").ToString,
|
||||
CodigoLinea:=UrlParametros("CODIGOLINEA").ToString, CodigoInspeccion:=UrlParametros("CODIGOINSPECCION").ToString, PorcentajeAjuste:=UrlParametros("PORCENTAJEAJUSTE").ToString,
|
||||
BCIAjuste:=UrlParametros("BCIAJUSTE").ToString, Etiqueta:=UrlParametros("ETIQUETA").ToString, Año:=UrlParametros("AÑO").ToString, Comprobante:=UrlParametros("COMPROBANTE").ToString,
|
||||
ModeloAuto:=UrlParametros("MODELOAUTO").ToString, MarcaAuto:=UrlParametros("MARCAAUTO").ToString, CodigoTD:=UrlParametros("CODIGOTD").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -4638,6 +4648,134 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Consec", Consec))
|
||||
params.Add(New ReportParameter("FolioAcuse", FolioGarantia))
|
||||
|
||||
'Informacion de Garantia o ajuste
|
||||
params.Add(New ReportParameter("FechaInst", FechaAjuste.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Fecha", FechaReclamacion.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Defecto", TipoDefecto))
|
||||
params.Add(New ReportParameter("MesesUso", MesesUso))
|
||||
params.Add(New ReportParameter("PorcentajeAjuste", PorcentajeAjuste))
|
||||
|
||||
'Informacion Acumulador
|
||||
params.Add(New ReportParameter("CodEnsamble", CodigoEnsamble))
|
||||
params.Add(New ReportParameter("CodLinea", CodigoLinea))
|
||||
params.Add(New ReportParameter("CodInspeccion", CodigoInspeccion))
|
||||
params.Add(New ReportParameter("Tipo", BCIAjuste))
|
||||
params.Add(New ReportParameter("Marca", MarcaPS))
|
||||
params.Add(New ReportParameter("Etiqueta", Etiqueta))
|
||||
|
||||
'Informacion Vehiculo
|
||||
params.Add(New ReportParameter("MarcaAuto", MarcaAuto))
|
||||
params.Add(New ReportParameter("TipoAuto", ModeloAuto))
|
||||
|
||||
'Informacion Consumidor
|
||||
If (CveCliente > 0) Then
|
||||
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", CveCliente))
|
||||
|
||||
Dim Nombre As String = ""
|
||||
Dim Ciudad As String = ""
|
||||
Dim Estado As String = ""
|
||||
Dim Direccion As String = ""
|
||||
Dim Telefono As String = ""
|
||||
|
||||
If DatosClienteSeleccionado IsNot Nothing Then
|
||||
Nombre = DatosClienteSeleccionado("Nombre").ToString
|
||||
Ciudad = DatosClienteSeleccionado("Ciudad").ToString
|
||||
Estado = DatosClienteSeleccionado("Estado").ToString
|
||||
Direccion = DatosClienteSeleccionado("Direccion").ToString
|
||||
Telefono = DatosClienteSeleccionado("Telefono").ToString
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("NombreCliente", Nombre))
|
||||
params.Add(New ReportParameter("Direccion", Direccion))
|
||||
params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad, Estado)))
|
||||
params.Add(New ReportParameter("TelConsumidor", Telefono))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Anio", Año))
|
||||
params.Add(New ReportParameter("Comprobante", Comprobante))
|
||||
params.Add(New ReportParameter("CodigoTD", CodigoTD))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF", Content_Disposition:="inline")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirPDFAjuste(CvePSAjuste As Integer, CveCliente As Integer, CveClienteDistribuidor As Integer, Consec As String, FolioGarantia As String, FechaAjuste As DateTime, FechaReclamacion As DateTime,
|
||||
TipoDefecto As String, CveTipoUso As Integer, CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String, PorcentajeAjuste As String,
|
||||
BCIAjuste As String, Etiqueta As String, Año As String, Comprobante As String, ModeloAuto As String, MarcaAuto As String, CodigoTD As String)
|
||||
|
||||
Dim MesesUso As String = "0"
|
||||
|
||||
Dim MarcaPS As String = ""
|
||||
Dim CveMarca As Integer = -1
|
||||
|
||||
Dim FechaI As Date = FechaAjuste.AddDays(1)
|
||||
Dim FechaF As Date = FechaReclamacion
|
||||
|
||||
Dim Dia As Integer = FechaI.Day
|
||||
Try
|
||||
'validación adicional, para saber si el mes tiene 31 días y el actua es menor.
|
||||
If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day
|
||||
Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
|
||||
|
||||
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo
|
||||
|
||||
If FechaT > FechaF Then
|
||||
'todavía está en el mes actual.
|
||||
MesesTrascurridos = MesesTrascurridos
|
||||
Else
|
||||
MesesTrascurridos = MesesTrascurridos + 1
|
||||
End If
|
||||
|
||||
MesesUso = MesesTrascurridos.ToString
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al calcular los meses de uso", ex)
|
||||
End Try
|
||||
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPS(CvePSAjuste, -1, UsuarioActual.CveEmpresa) Then
|
||||
MarcaPS = ObjPS.DtResultados.FiltroPrimeroValor("Marca", String.Format("CvePS = {0}", CvePSAjuste))
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim DtDatos As New DataTable
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
|
||||
'Informacion Distribuidor
|
||||
If (CveClienteDistribuidor > 0) Then
|
||||
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", CveClienteDistribuidor))
|
||||
Dim CiudadEstado As String = ""
|
||||
Dim Telefono As String = ""
|
||||
Dim Nombre As String = ""
|
||||
|
||||
If DatosClienteSeleccionado IsNot Nothing Then
|
||||
CiudadEstado = String.Format("{0}, {1}", DatosClienteSeleccionado("Ciudad"), DatosClienteSeleccionado("Estado"))
|
||||
Telefono = DatosClienteSeleccionado("Telefono").ToString
|
||||
Nombre = DatosClienteSeleccionado("Nombre").ToString
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("NombreDistribuidor", Nombre))
|
||||
params.Add(New ReportParameter("CiudadEstado", CiudadEstado))
|
||||
params.Add(New ReportParameter("TelCliente", Telefono))
|
||||
End If
|
||||
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Consec", Consec))
|
||||
params.Add(New ReportParameter("FolioAcuse", FolioGarantia))
|
||||
|
||||
Reference in New Issue
Block a user