diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb index 58abbdf3b..b9d3ff484 100644 --- a/App_Code/CalendarEvent.vb +++ b/App_Code/CalendarEvent.vb @@ -23,5 +23,7 @@ Public Class CalendarEvent Public Property CveTipoEvento As Integer Public Property Importe As Double Public Property EmpresaCRM As String + Public Property SubProyecto As String + Public Property CveSubProyecto As Integer End Class diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 7553f2d76..4b90021f3 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -613,7 +613,7 @@ Public Class ClsMovimientos 'CveAplicaNC Public Function GetCxPProveedor(CveProveedor As Integer, FechaI As String, FechaF As String, CveUsuarioProgramo As Integer, CveUsuarioRegistro As Integer, CveUsuarioResponsable As Integer, CveClasificacionProveedor As Integer, CveMoneda As Integer, CveEstatus As Integer, CveProveedorSucursal As Integer, CveAplicaNC As Integer, - Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1") As Boolean + Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedorCxP") With SqlAdapter.SelectCommand.Parameters @@ -631,6 +631,7 @@ Public Class ClsMovimientos .Add("@FechaVI", SqlDbType.VarChar).Value = FechaVI .Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF .Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion + .Add("@CveSubProyecto", SqlDbType.SmallInt).Value = CveSubProyecto End With diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 41770f405..05ec2309d 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -1853,7 +1853,7 @@ Public Class ClsOIEventos Return Retorno End Function - Public Function FinalizaEvento(FechaFin As DateTime, CveEventoEstatus As Integer, Geom As String, CveEvento As Integer) As Boolean + Public Function FinalizaEvento(FechaFin As DateTime, CveEventoEstatus As Integer, Geom As String, CveEvento As Integer, Optional CveOS As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OI_EventoFinalizar") @@ -1863,6 +1863,8 @@ Public Class ClsOIEventos .Add("@Geom", SqlDbType.VarChar).Value = Geom .Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin .Add("@CveEvento", SqlDbType.Int).Value = CveEvento + .Add("@CveOS", SqlDbType.Int).Value = CveOS + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario End With Try @@ -2432,12 +2434,13 @@ Public Class ClsOIEventos Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveEventoPadre As Integer = -1, Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1, Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1, - Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1) As Boolean + Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1, + Optional CveSubProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, -1, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CvePersonal, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe, - CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM) + CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto) Return Retorno End Function diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index e5eae18e0..a82d80cbb 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5195,6 +5195,7 @@ Public Class ClsPaginas PaginaDict.Add("/OS/PopUpOS_PS_Especificaciones.aspx".ToUpper(), 135) PaginaDict.Add("/OS/PopUpMateriales.aspx".ToUpper(), 135) PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125) + PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), 1330) #End Region 'OC #Region "OC" @@ -5641,7 +5642,7 @@ Public Class ClsPaginas PaginaDict.Add("/Contabilidad2/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1) - PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), -1) + @@ -7044,9 +7045,54 @@ Public Class ClsPaginas Vta.SelloCFDi = "Sin Timbrar" Vta.SelloSAT = "Sin Timbrar" + +#Region "COMERCIO EXTERIOR VARIABLES Y TABLAS" + Dim CETipoOperacion = "", CEClavePedimento As String = "", CEIncoterm As String = "", CEId As String = "", CEMotivoTraslado As String = "", CETipoCambio As String = "" Dim RCETipoOperacion As String = "", RCEClavePedimento As String = "", RCEIncoterm As String = "", RCEMotivoTraslado As String = "" + + Dim CE_DT_Cabecera As New DataTable + + + CE_DT_Cabecera.Columns.Add("Version") + CE_DT_Cabecera.Columns.Add("MotivoTraslado") + CE_DT_Cabecera.Columns.Add("TipoOperacion") + CE_DT_Cabecera.Columns.Add("ClaveDePedimento") + CE_DT_Cabecera.Columns.Add("CertificadoOrigen") + CE_DT_Cabecera.Columns.Add("Incoterm") + CE_DT_Cabecera.Columns.Add("Subdivision") + CE_DT_Cabecera.Columns.Add("TipoCambioUSD", GetType(Decimal)) + CE_DT_Cabecera.Columns.Add("TotalUSD", GetType(Decimal)) + + + Dim CE_DT_Emisor As New DataTable + CE_DT_Emisor.Columns.Add("Calle") + CE_DT_Emisor.Columns.Add("NumeroExterior") + CE_DT_Emisor.Columns.Add("Colonia") + CE_DT_Emisor.Columns.Add("Municipio") + CE_DT_Emisor.Columns.Add("Estado") + CE_DT_Emisor.Columns.Add("Pais") + CE_DT_Emisor.Columns.Add("CodigoPostal") + CE_DT_Emisor.Columns.Add("Tipo", GetType(Integer)) + + Dim CE_DT_Receptor As New DataTable + Dim CE_DT_Destinatario As New DataTable + + CE_DT_Receptor = CE_DT_Emisor.Copy + CE_DT_Destinatario = CE_DT_Emisor.Copy + + + Dim CE_DT_Mercancias As New DataTable + CE_DT_Mercancias.Columns.Add("NoIdentificacion") + CE_DT_Mercancias.Columns.Add("FraccionArancelaria") + CE_DT_Mercancias.Columns.Add("CantidadAduana") + CE_DT_Mercancias.Columns.Add("UnidadAduana") + CE_DT_Mercancias.Columns.Add("ValorUnitarioAduana", GetType(Decimal)) + CE_DT_Mercancias.Columns.Add("ValorDolares", GetType(Decimal)) +#End Region + + 'SI ESTA TIMBRADA - CON XML If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales Dim XmlDoc As New System.Xml.XmlDocument @@ -7084,14 +7130,44 @@ Public Class ClsPaginas Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText End If + +#Region "COMERCIO EXTERIOR LECTURA DATOS XML" If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "cce11:ComercioExterior" Then + Dim nRowCECabecera As DataRow = CE_DT_Cabecera.NewRow + CETipoOperacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText CEClavePedimento = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText CEIncoterm = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText + nRowCECabecera("Version") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Version").InnerText + nRowCECabecera("MotivoTraslado") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText + nRowCECabecera("TipoOperacion") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText + nRowCECabecera("ClaveDePedimento") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText + nRowCECabecera("CertificadoOrigen") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("CertificadoOrigen").InnerText + nRowCECabecera("Incoterm") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText + nRowCECabecera("Subdivision") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Subdivision").InnerText + nRowCECabecera("TipoCambioUSD") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText.ToDecimal + nRowCECabecera("TotalUSD") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TotalUSD").InnerText.ToDecimal + + CE_DT_Cabecera.Rows.Add(nRowCECabecera) + + Dim nodo As XmlNode = XmlDoc.DocumentElement + Dim VersionCFDI As String = ValorXML(nodo, "version") + + Dim cfdVer As String = "" + If VersionCFDI = "3.2" Then + cfdVer = "http://www.sat.gob.mx/cfd/2" + ElseIf VersionCFDI = "3.3" Then + cfdVer = "http://www.sat.gob.mx/cfd/3" + Else ' se considera que es la version 4.0 + cfdVer = "http://www.sat.gob.mx/cfd/4" + End If + Dim namespaces As XmlNamespaceManager = New XmlNamespaceManager(XmlDoc.NameTable) + + namespaces.AddNamespace("cfdi", cfdVer) namespaces.AddNamespace("cce11", "http://www.sat.gob.mx/ComercioExterior11") CEId = "" @@ -7106,14 +7182,76 @@ Public Class ClsPaginas CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText - - RCETipoOperacion = GlobalDTTipoOperacion.FiltroPrimeroValor("Descripcion", $"ClaveSATTipoOperacion = '{CETipoOperacion}'") RCEClavePedimento = GlobalDTClavePedimento.FiltroPrimeroValor("Descripcion", $"ClaveSATPedimento = '{CEClavePedimento}'") RCEIncoterm = GlobalDTIncoterm.FiltroPrimeroValor("Descripcion", $"ClaveSATIncoterm = '{CEIncoterm}'") RCEMotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("MotivoTraslado", $"ClaveSATMotivoTraslado = '{CEMotivoTraslado}'") - 'RCETipoCambio = {RCETipoCambio + + + Dim CENodosEmisor As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Emisor", namespaces) 'XmlDoc.SelectNodes("cfdi:Complemento/{0}:Traslados", "") + Dim CENodosReceptor As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Receptor", namespaces) + Dim CEnodosDestinatario As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Destinatario", namespaces) + Dim CEnodosMercancias As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Mercancias", namespaces) + + + For Each node As XmlNode In CENodosEmisor + Dim nRowEmisor As DataRow = CE_DT_Emisor.NewRow + nRowEmisor("Calle") = ValorNodoXML(node.FirstChild, "Calle") + nRowEmisor("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior") + nRowEmisor("Colonia") = ValorXML(node.FirstChild, "Colonia") + nRowEmisor("Municipio") = ValorXML(node.FirstChild, "Municipio") + nRowEmisor("Estado") = ValorXML(node.FirstChild, "Estado") + nRowEmisor("Pais") = ValorXML(node.FirstChild, "Pais") + nRowEmisor("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal") + nRowEmisor("Tipo") = 1 + CE_DT_Emisor.Rows.Add(nRowEmisor) + Exit For + Next + + For Each node As XmlNode In CENodosReceptor + Dim nRowReceptor As DataRow = CE_DT_Receptor.NewRow + nRowReceptor("Calle") = ValorXML(node.FirstChild, "Calle") + nRowReceptor("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior") + nRowReceptor("Colonia") = ValorXML(node.FirstChild, "Colonia") + nRowReceptor("Municipio") = ValorXML(node.FirstChild, "Municipio") + nRowReceptor("Estado") = ValorXML(node.FirstChild, "Estado") + nRowReceptor("Pais") = ValorXML(node.FirstChild, "Pais") + nRowReceptor("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal") + nRowReceptor("Tipo") = 2 + CE_DT_Receptor.Rows.Add(nRowReceptor) + Exit For + Next + + For Each node As XmlNode In CEnodosDestinatario + Dim nRowDestinatario As DataRow = CE_DT_Destinatario.NewRow + nRowDestinatario("Calle") = ValorXML(node.FirstChild, "Calle") + nRowDestinatario("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior") + nRowDestinatario("Colonia") = ValorXML(node.FirstChild, "Colonia") + nRowDestinatario("Municipio") = ValorXML(node.FirstChild, "Municipio") + nRowDestinatario("Estado") = ValorXML(node.FirstChild, "Estado") + nRowDestinatario("Pais") = ValorXML(node.FirstChild, "Pais") + nRowDestinatario("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal") + nRowDestinatario("Tipo") = 3 + CE_DT_Destinatario.Rows.Add(nRowDestinatario) + Exit For + Next + + For Each node As XmlNode In CEnodosMercancias + Dim nRowMercancias As DataRow = CE_DT_Mercancias.NewRow + nRowMercancias("NoIdentificacion") = ValorXML(node.FirstChild, "NoIdentificacion") + nRowMercancias("FraccionArancelaria") = ValorXML(node.FirstChild, "FraccionArancelaria") + nRowMercancias("CantidadAduana") = ValorXML(node.FirstChild, "CantidadAduana") + nRowMercancias("UnidadAduana") = ValorXML(node.FirstChild, "UnidadAduana") + nRowMercancias("ValorUnitarioAduana") = ValorXML(node.FirstChild, "ValorUnitarioAduana").ToDecimal + nRowMercancias("ValorDolares") = ValorXML(node.FirstChild, "ValorDolares").ToDecimal + CE_DT_Mercancias.Rows.Add(nRowMercancias) + Next + Dim asddd As String = "" + End If +#End Region + + Next @@ -7825,6 +7963,26 @@ Public Class ClsPaginas Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte lrds.Add(rds5) + + If RCETipoOperacion.Trim.Length > 0 Then + Dim rds6 As New ReportDataSource With {.Name = "CE_DT_Emisor", .Value = CE_DT_Emisor} + lrds.Add(rds6) + + Dim rds7 As New ReportDataSource With {.Name = "CE_DT_Receptor", .Value = CE_DT_Receptor} + lrds.Add(rds7) + + Dim rds8 As New ReportDataSource With {.Name = "CE_DT_Destinatario", .Value = CE_DT_Destinatario} + lrds.Add(rds8) + + Dim rds9 As New ReportDataSource With {.Name = "CE_DT_Mercancias", .Value = CE_DT_Mercancias} + lrds.Add(rds9) + + Dim rds10 As New ReportDataSource With {.Name = "CE_DT_Cabecera", .Value = CE_DT_Cabecera} + lrds.Add(rds10) + + End If + + If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString)) End If diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index d8aa2d0f5..2fc71f5d3 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1741,7 +1741,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer, CveTipoPeriodo As Integer, CveMetodoPago As Integer, CveTipoContrato As Integer, CveMotivoBaja As Integer, CveProyecto As Integer, FechaIFinContrato As String, FechaFFinContrato As String, FechaIIngreso As String, FechaFIngreso As String, SqlStr As String, NCaracteristicas As Integer, - CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean + CveEmpresa As Integer, Optional TopSelect As Integer = 10000, Optional EsReserva As Integer = -1) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_Personal2Get") @@ -1777,6 +1777,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@NCaracteristicas", SqlDbType.Int).Value = NCaracteristicas .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@TopSelect", SqlDbType.Int).Value = TopSelect + .Add("@EsReserva", SqlDbType.Int).Value = EsReserva End With Try diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 9aee1fca2..3f820e8d0 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1471,7 +1471,7 @@ Public Class ClsVentas CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, - Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1) As Boolean + Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRep") @@ -1501,6 +1501,7 @@ Public Class ClsVentas .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable .Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion + .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio End With Try @@ -1607,7 +1608,7 @@ Public Class ClsVentas CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, - Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1) As Boolean + Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRepDetalle") @@ -1642,6 +1643,7 @@ Public Class ClsVentas .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable .Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion + .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio End With Try @@ -1662,7 +1664,8 @@ Public Class ClsVentas Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, - Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1) As Boolean + Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1, + Optional ServicioDomicilio As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPS") @@ -1697,6 +1700,7 @@ Public Class ClsVentas .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 + .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio End With @@ -1717,7 +1721,7 @@ Public Class ClsVentas Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, Optional EsGarantia As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, - Optional CveClasificacion2 As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean + Optional CveClasificacion2 As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional ServicioDomicilio As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPSDetalle") @@ -1757,6 +1761,7 @@ Public Class ClsVentas .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio End With diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 9c23b4c77..b25e72291 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -117,6 +117,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.Prospecto = dr("Prospecto").ToString cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero cevent.EmpresaCRM = dr("EmpresaCRM").ToString + cevent.SubProyecto = dr("SubProyecto").ToString + cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero '11/05/2018 - Evento Gasto Recurrente cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 3d6b20314..810c4c6c6 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -203,6 +203,21 @@ Partial Class Bancos_ProveedoresAbonar End Set End Property + + Private Property CveSubProyectoFiltro As Integer + Get + If ViewState("CveSubProyectoFiltro") Is Nothing Then + ViewState("CveSubProyectoFiltro") = -1 + End If + Return ViewState("CveSubProyectoFiltro").ToString.ToEntero + + End Get + Set(value As Integer) + ViewState("CveSubProyectoFiltro") = value + End Set + End Property + + Private Property DtDatos As DataTable Get Return DirectCast(ViewState("DtDatos"), DataTable) @@ -278,6 +293,7 @@ Partial Class Bancos_ProveedoresAbonar CveAplicaNC = IfNull(Request("CveAplicaNC"), "-1").ToString.ToEntero CveProveedorSucursal = IfNull(Request("CveProveedorSucursal"), "-1").ToString.ToEntero CodigoProgramacion = IfNull(Request("CodigoProgramacion"), "-1").ToString + CveSubProyectoFiltro = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0)) @@ -382,7 +398,7 @@ Partial Class Bancos_ProveedoresAbonar TxtImporte.Text = "" TxtTotal.Text = "" - If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion) Then + If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then DtDatos = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") GvCxP.DataSource = DtDatos DtDatos.Columns.Add("Movimiento") diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb index c8562b697..15c8ea45c 100644 --- a/Bancos/RepProveedoresPagos.aspx.vb +++ b/Bancos/RepProveedoresPagos.aspx.vb @@ -162,7 +162,8 @@ Partial Class Bancos_RepProveedoresPagos CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero End If - e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue) + e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue) + End If End Sub @@ -227,8 +228,9 @@ Partial Class Bancos_RepProveedoresPagos End Sub Private Sub GenerarPDFpp(Optional Formato As String = "PDF", Optional AgrupadoPorSubProyecto As Boolean = False) + 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) + 'OBTENEMOS LOS DATOS Dim ObjMovtos As New ClsMovimientos() @@ -309,7 +311,7 @@ Partial Class Bancos_RepProveedoresPagos params.Add(New ReportParameter("Programadas", If(ChkProgramadas.Checked, 1, 0))) If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index a35a9eb35..b4e9fa82b 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -562,6 +562,10 @@ Partial Class PopUpVerFactura If Not IsNothing(Request("cvePersonal")) Then cvePersonal = Request("cvePersonal").ToString.ToEntero() End If + If Not IsNothing(Request("cveSubProyecto")) Then + cveSubProyecto = Request("cveSubProyecto").ToString.ToEntero() + End If + Dim params As New List(Of ReportParameter) Dim lrds As New List(Of ReportDataSource) Using objnom As New ClsNominas diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index 8ef12f947..d5a7a5c53 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -2808,8 +2808,8 @@
diff --git a/Empresas/1/Formatos/Factura.rdlc b/Empresas/1/Formatos/Factura.rdlc index 4ad240d0e..a31ef96d2 100644 --- a/Empresas/1/Formatos/Factura.rdlc +++ b/Empresas/1/Formatos/Factura.rdlc @@ -3175,34 +3175,3308 @@