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 1e743cf35..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" @@ -5606,7 +5607,7 @@ Public Class ClsPaginas PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1) PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326) - + PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328) @@ -5643,6 +5644,9 @@ Public Class ClsPaginas + + + 'ECOMMERCE PaginaDict.Add("/Ecommerce/Insignias.aspx".ToUpper(), 7002) @@ -7041,6 +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 @@ -7077,6 +7129,130 @@ Public Class ClsPaginas Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText 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 = "" + Try + CEId = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).SelectSingleNode("//cce11:Destinatario", namespaces).Attributes("NumRegIdTrib").InnerText 'XmlDoc.SelectNodes("//cfdi:Complemento/tfd:TimbreFiscalDigital/cce11:Destinatario") + Catch ex As Exception + + End Try + + + CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText + 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}'") + + + 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 End If @@ -7191,6 +7367,17 @@ Public Class ClsPaginas Dim params As New List(Of ReportParameter) + + If RCETipoOperacion.Trim.Length > 0 Then + params.Add(New ReportParameter("CETipoOperacion", RCETipoOperacion)) + params.Add(New ReportParameter("CEClavePedimento", RCEClavePedimento)) + params.Add(New ReportParameter("CEIncoterm", RCEIncoterm)) + params.Add(New ReportParameter("CEId", CEId)) + params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado)) + params.Add(New ReportParameter("CETipoCamvio", CETipoCambio)) + End If + + If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then params.Add(New ReportParameter("CFDIVersion", Vta.Version)) If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then @@ -7776,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 @@ -7915,7 +8122,7 @@ Public Class ClsPaginas Dim payload As New JObject( New JProperty("formato", Formato), New JProperty("ruta", RutaReporte), - New JProperty("UsarFormatoCompilado", false), + New JProperty("UsarFormatoCompilado", False), New JProperty("parametros", paramsArray), New JProperty("dataSource", dataSourceArray) ) @@ -9363,8 +9570,7 @@ Public Class ClsPaginas #Region "P A G O D E C O M P R A S " - - Public Function AplicaPrePolizaPago(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean + Public Function AplicaPrePolizaPagoCompra(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean Dim ErrorMovtos As Boolean = False Dim PorcentajePago As Decimal = Pago.ImportePago / CompraActual.Total Dim ImporteMovimiento As Decimal = 0 @@ -9513,15 +9719,17 @@ Public Class ClsPaginas If Not ErrorMovtos AndAlso ImporteMovimiento <> 0 Then Dim tOtCveCon As Integer = 211 Dim tOtTipoMovto As Boolean = False + Dim IdCta As Integer = If(UsuarioActual.Empresa.TipoContabilidad = 2, UsuarioActual.Empresa.Funcionalidad(266).ToEntero(), 0) If ImporteMovimiento < 0 Then tOtTipoMovto = True : tOtCveCon = 78 ImporteMovimiento = Math.Abs(ImporteMovimiento) + IdCta = If(UsuarioActual.Empresa.TipoContabilidad = 2, UsuarioActual.Empresa.IdCuentaOtrosIngresos, 0) End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tOtTipoMovto, ImporteMovimiento, ImporteMovimiento, tOtCveCon, CompraActual.SerieFolio, Concepto, 0, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveSubProyecto:=CompraActual.CveSubProyecto, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tOtTipoMovto, ImporteMovimiento, ImporteMovimiento, tOtCveCon, CompraActual.SerieFolio, Concepto, IdCta, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveSubProyecto:=CompraActual.CveSubProyecto, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If - If Not ErrorMovtos AndAlso CompraActual.TC <> Pago.TCPago Then + If Not ErrorMovtos AndAlso TCValuacion <> Pago.TCPago Then Dim ConceptoContable, IdCtaContable As Integer Dim TipoMovimiento As Boolean Dim Diferencia As Decimal = 0 @@ -9647,11 +9855,11 @@ Public Class ClsPaginas Ret.CveConceptoAcreditable = 249 Ret.CveConceptoxAcreditar = 248 ElseIf CveConceptoRetIVA = 5 Then - Funcionalidad = 578 + Funcionalidad = 578 : FuncionalidadxAcred = 578 Ret.CveConceptoAcreditable = 286 Ret.CveConceptoxAcreditar = 285 ElseIf CveConceptoRetIVA = 6 Then - Funcionalidad = 578 + Funcionalidad = 578 : FuncionalidadxAcred = 578 Ret.CveConceptoAcreditable = 333 Ret.CveConceptoxAcreditar = 334 End If @@ -9761,7 +9969,7 @@ Public Class ClsPaginas Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2 If VentaActual.CveMoneda <> 1 Then - If Pago.TipoPago = "NC" Then Pago.CveConceptoPago = 301 : Pago.CveConceptoPago = 292 + If Pago.TipoPago = "NC" Then Pago.CveConceptoPago = 301 Else Pago.CveConceptoPago = 292 End If Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio) @@ -9792,12 +10000,12 @@ Public Class ClsPaginas If VentaActual.CveMoneda > 1 Then ImporteME = Pago.ImportePagoVenta 'movimiento de pago cliente - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacion, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True 'movimiento de pago cliente Complementaria If Not ErrorMovtos AndAlso VentaActual.CveMoneda > 1 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacion - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacion, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacion - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If @@ -9942,13 +10150,13 @@ Public Class ClsPaginas End If - If Not ErrorMovtos AndAlso VentaActual.TC <> Pago.TCPago Then + If Not ErrorMovtos AndAlso TCValuacionVenta <> TCValuacionPago Then Dim ConceptoContable, IdCtaContable As Integer Dim TipoMovimiento As Boolean Dim Diferencia As Decimal = 0 If tImporteVenta <> tImportePago Then - If tImporteVenta > tImportePago Then + If tImporteVenta < tImportePago Then ConceptoContable = 64 : IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria TipoMovimiento = True Else 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/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index dfd23df1c..9dc3d44bd 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -4832,7 +4832,7 @@ Public Class Timbrado If ObjCFDITimbre.Conceptos IsNot Nothing AndAlso ObjCFDITimbre.Conceptos.Count > 0 Then For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos - cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####").ToDouble(), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####").ToDouble(), concep.Importe, concep.Descuento, concep.ObjetoImpuesto) + cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####"), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####"), concep.Importe, concep.Descuento, concep.ObjetoImpuesto) For Each imp As CFDIConceptosImpuestos In concep.Impuestos If imp.TrasladooRetencion = "T" Then cfdi.ConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe) diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index f74549f7e..b25e72291 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -22,22 +22,60 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Dim FI As Date Dim FF As Date - If context.Request("U").ToEntero > 0 Then - CveUsuario = context.Request("U").ToEntero - CveEmpresa = context.Request("E").ToEntero - FI = context.Request("start").ToDate + If context.Request("METODO") IsNot Nothing Then - FF = context.Request("end").ToDate - If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then - 'Convierte el objeto de Eventos en JSON - 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer - Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + Select Case context.Request("METODO") + Case "servicio_domicilio" + + If context.Request("U").ToEntero > 0 Then + + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + FI = context.Request("start").ToDate + FF = context.Request("end").ToDate + + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If + + End If + + + Exit Select + Case Else + Exit Select + End Select + + + + Else + If context.Request("U").ToEntero > 0 Then + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + FI = context.Request("start").ToDate + + FF = context.Request("end").ToDate + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If - context.Response.Write(sJSON) End If - End If + + + + + + End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable @@ -47,14 +85,15 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End Property - Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date) As Boolean + Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1) As Boolean Dim ObjEventos As New ClsOIEventos Dim ErrorEventos = False Dim CveEmpresaCRM As Integer = 0 - If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then + If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then If ObjEventos.DtResultados.Rows.Count > 0 Then events = New List(Of CalendarEvent) + Try For Each dr As DataRow In ObjEventos.DtResultados.Rows Dim cevent As CalendarEvent = New CalendarEvent() @@ -78,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 c139578d4..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") @@ -855,7 +871,7 @@ Partial Class Bancos_ProveedoresAbonar Pago.OtroGastoIngreso = 0 End If - If AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjMov) Then + If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" End If 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/Compras.aspx b/Compras/Compras.aspx index f0da08cbc..a55268f82 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -6246,7 +6246,9 @@ }); $('input[name*=HdnOC1IVA]').each(function () { - SumaIVA += ToDouble($(this).val()); + + let tmpiva = (ToDouble($(this).val())).toFixed(2) + SumaIVA += ToDouble(tmpiva); }); $('input[name*=HdnOC1RetIVA]').each(function () { diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 48467fe5e..a6f617e3a 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5965,7 +5965,7 @@ Partial Class Compras_Compras Pago.CveCompraAmortizacion = -1 Pago.CveCreditoDetalle = CveCreditoDetalle - ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If @@ -6036,7 +6036,7 @@ Partial Class Compras_Compras Pago.CveCompraAmortizacion = -1 'Pago.CveConceptoPago = CveConceptoPago - ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If Case 14 'IVA X Acreditar @@ -6091,14 +6091,6 @@ Partial Class Compras_Compras End If End If - 'Case 224 'Otros impuestos - ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then - ' importeMovimiento = OtrosImpuestos - ' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - ' IdCtaContable = If(UsuarioActual.CveEmpresa = 119, 1171, -1) - ' End If - Case 15 'RetIVA X Acreditar Honorarios/Serv. Prof. If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero() > 0 Then @@ -7044,7 +7036,6 @@ Partial Class Compras_Compras End If End If End If - End If Next @@ -7093,7 +7084,7 @@ Partial Class Compras_Compras Pago.CveIE = -1 Pago.CvePersonal = CvePersonal - ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If @@ -7247,7 +7238,7 @@ Partial Class Compras_Compras Pago.CveIE = Ant.CveIE Pago.CveMonedaPago = 1 - ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If @@ -7290,7 +7281,7 @@ Partial Class Compras_Compras Pago.TCPago = Ant.TCCompra Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1) - ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If @@ -7402,9 +7393,6 @@ Partial Class Compras_Compras End If End If - - - '' A N T I C I P O S If UsuarioActual.Empresa.UsaAC Then If ArrAnticipos.Count > 0 Then @@ -7472,7 +7460,6 @@ Partial Class Compras_Compras End If End If - '' F U N C I O N A R I O S Y E M P L E A D O S If RBLContado.SelectedValue = "2" AndAlso DdlFuncionarioEmpleado.SelectedValue.ToEntero > 0 Then TxtDocumentoImporte.Text = TxtDocumentoImporteFE.Text @@ -7486,25 +7473,20 @@ Partial Class Compras_Compras 'se agrego un movimiento de pago If CveIE > 0 Then - If ImporteCompra <> 0 Then 'inserto los movimientos de la conta para abonar al saldo Dim Pago As New CompraPago Pago.ImportePago = ImporteCompra Pago.CveIE = CveIE Pago.CveMonedaPago = 1 - - ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If - Else ErrorMovtosIE = True End If - End If - 'movimiento de compra '[IPP] PARCHE PROVISIONAL DE CLASIFICACION Y SUBPROYECTO [CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero] [CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero] If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, TxtSubTotal2.Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero, CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtSubTotal2.Text.ToDecimal) Then @@ -7619,7 +7601,7 @@ Partial Class Compras_Compras Pago.CveCompraAmortizacion = CveCompraNC Pago.CveConceptoPago = CveConceptoPago - ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) Else ErrorMovtosCxP = True @@ -7727,7 +7709,7 @@ Partial Class Compras_Compras Pago.CveIE = CveIE Pago.CveMonedaPago = 1 - ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta) + ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) Else ErrorMovtosCxP = True 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/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 3db91de51..103f9c9a0 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -113,6 +113,7 @@ Partial Class Compras_ReembolsosComprobaciones CveCuentaBancaria = -1 ViewState("CveMoneda") = 1 CveMonedaPago = 1 + TipoCambioPago = 1 Folio = "" 'Cargar Filtros @@ -547,7 +548,7 @@ Partial Class Compras_ReembolsosComprobaciones End If Else If drp IsNot Nothing Then - If drp("IdPoliza").ToString.ToEntero > 0 Then + If drp("FolioPoliza").ToString.ToEntero > 0 Then CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) IdPoliza = drp("IdPoliza").ToString.ToEntero Else @@ -749,7 +750,7 @@ Partial Class Compras_ReembolsosComprobaciones End If End If - If AplicaPrePolizaPago(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then + If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then MsgError = "Detalle" End If End If @@ -798,6 +799,7 @@ Partial Class Compras_ReembolsosComprobaciones CveIEPago = 0 Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) + TipoCambioPago = 1 End If End If @@ -811,7 +813,7 @@ Partial Class Compras_ReembolsosComprobaciones MsgError = "no se pudo insertar el detalle de la poliza" End If - If Not AplicaPrePolizaPago(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then + If Not AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then MsgError = "Detalle" End If diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index cd96ee540..2b6a245a2 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -434,6 +434,10 @@ Partial Class ContabilidadC_RegPrePolizaS ' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva") CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString + If UsuarioActual.CveRol = 1 Then + TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString + End If + If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then 'DivAgregarConceptos.Visible = True LnkAddConcepto.Visible = True diff --git a/Contabilidad2/RepSituacionFinanciera.aspx b/Contabilidad2/RepSituacionFinanciera.aspx index f44b3bb98..448192f6a 100644 --- a/Contabilidad2/RepSituacionFinanciera.aspx +++ b/Contabilidad2/RepSituacionFinanciera.aspx @@ -20,7 +20,7 @@ <%-- --%>
  • - Cerrar Ejercicio + Cerrar Ejercicio
  • @@ -603,8 +603,8 @@ -
    - +
    +
    diff --git a/Contabilidad2/RepSituacionFinanciera.aspx.vb b/Contabilidad2/RepSituacionFinanciera.aspx.vb index fb092acf1..ebb573ad5 100644 --- a/Contabilidad2/RepSituacionFinanciera.aspx.vb +++ b/Contabilidad2/RepSituacionFinanciera.aspx.vb @@ -173,6 +173,7 @@ Partial Class AC2_SituacionFinanciera DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) DdlSubproyecto.DataBind() + If UsuarioActual.TienePermisoProceso(346) Then LnkCerrar.Visible = True 'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) DdlPeriodo.SelectedValue = Now.Month.ToString 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 677f609ca..a31ef96d2 100644 --- a/Empresas/1/Formatos/Factura.rdlc +++ b/Empresas/1/Formatos/Factura.rdlc @@ -3173,8 +3173,3379 @@ + + + + + + + 2.5cm + + + 2.5cm + + + 3.82884cm + + + 3.01563cm + + + 2.64663cm + + + 2.65875cm + + + 2.5cm + + + + + 0.46771cm + + + + + true + true + + + + + Calle + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Numero Exterior + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Colonia + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Municipio + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Estado + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Pais + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CP + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!Calle.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumeroExterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Colonia.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Municipio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Estado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Pais.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CodigoPostal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + CE_DT_Emisor + 2.41413cm + 0.10658cm + 0.8825cm + 19.64985cm + + + + + + + + + 1.19894cm + + + 2.31479cm + + + 2.19123cm + + + 2.5cm + + + 2.79104cm + + + 2.5cm + + + 2.5cm + + + 2.25801cm + + + 2.19045cm + + + + + 0.49417cm + + + + + true + true + + + + + Version + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Motivo Traslado + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo Operacion + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clave De Pedimento + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Certificado Origen + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Incoterm + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sub Division + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo Cambio + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!Version.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MotivoTraslado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoOperacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ClaveDePedimento.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CertificadoOrigen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Incoterm.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Subdivision.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoCambioUSD.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalUSD.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + CE_DT_Cabecera + 0.75784cm + 0.07193cm + 0.90896cm + 20.44446cm + 1 + + + + + + + + + 2.5cm + + + 3.13031cm + + + 2.5cm + + + 2.5cm + + + 3.31794cm + + + 2.5cm + + + + + 0.41479cm + + + + + true + true + + + + + No Identificacion + + + + + + + Black + + + + Black + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fraccion Arancelaria + + + + + + + Black + + + + Black + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad Aduana + + + + + + + Black + + + + Black + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad Aduana + + + + + + + Black + + + + Black + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Valor Unitario Aduana + + + + + + + Black + + + + Black + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Valor Dolares + + + + + + + Black + + + + Black + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + =Fields!NoIdentificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FraccionArancelaria.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CantidadAduana.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UnidadAduana.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ValorUnitarioAduana.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ValorDolares.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + CE_DT_Mercancias + 6.856cm + 0.10658cm + 0.80313cm + 16.44825cm + 2 + + + + + + + + true + true + + + + + Dirección Emisor + + + + + + + Textbox16 + 0.46316cm + 19.64985cm + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + 1.90158cm + 0.10658cm + 0.46316cm + 19.64985cm + 3 + + + + + + + + + 2.5cm + + + 2.5cm + + + 3.82884cm + + + 3.01563cm + + + 2.64663cm + + + 2.65875cm + + + 2.5cm + + + + + 0.41479cm + + + + + true + true + + + + + Calle + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Numero Exterior + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Colonia + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Municipio + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Estado + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Pais + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CP + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!Calle.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumeroExterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Colonia.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Municipio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Estado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Pais.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CodigoPostal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + CE_DT_Receptor + 3.9195cm + 0.10658cm + 0.82958cm + 19.64985cm + 4 + + + + + + + + true + true + + + + + Dirección Receptor + + + + + + + Textbox16 + 0.46316cm + 19.64985cm + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + 3.40695cm + 0.10658cm + 0.46316cm + 19.64985cm + 5 + + + + + + + + + 2.5cm + + + 2.5cm + + + 3.82884cm + + + 3.01563cm + + + 2.64663cm + + + 2.65875cm + + + 2.5cm + + + + + 0.46771cm + + + + + true + true + + + + + Calle + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Numero Exterior + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Colonia + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Municipio + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Estado + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Pais + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CP + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!Calle.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumeroExterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Colonia.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Municipio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Estado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Pais.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CodigoPostal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + CE_DT_Destinatario + 5.36923cm + 0.10658cm + 0.8825cm + 19.64985cm + 6 + + + + + + + + true + true + + + + + Dirección Destinatario + + + + + + + Textbox16 + 0.46316cm + 19.64985cm + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + 4.85668cm + 0.10658cm + 0.46316cm + 19.64985cm + 7 + + + + + + true + true + + + + + Complemento Comercio Exterior + + + + + + + Textbox16 + 0.07193cm + 0.72256cm + 20.37753cm + 8 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Mercancia + + + + + + + Textbox16 + 6.39284cm + 0.10658cm + 0.46316cm + 16.44825cm + 9 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + 16.99253cm + 7.7575cm + 20.51639cm + 47 + + = IIF( LEN(Parameters!CETipoOperacion.Value) > 0, False, True) + + + + + - 16.79496cm + 24.75003cm + + + + + + Textbox22 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + @@ -1847,6 +1890,44 @@ + + + + true + true + + + + + =Fields!CodigoObjetoImpuesto.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -2049,7 +2130,7 @@ - 4.44265cm + 3.47821cm @@ -2195,7 +2276,7 @@ - 6.28682cm + 4.82589cm @@ -2337,6 +2418,44 @@ + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -2598,6 +2717,42 @@ + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -2683,6 +2838,7 @@ + @@ -2708,7 +2864,7 @@ 4.14415cm 0.11516cm 2.29418cm - 19.97108cm + 19.94648cm 11 + 4 + + + @@ -715,63 +725,6 @@ - - - - true - true - - - - - Método Pago - - - - - - - Textbox13 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - @@ -1056,8 +1009,12 @@ 2pt + 4 + + + @@ -1164,59 +1121,6 @@ - - - - true - true - - - - - =Fields!MetodoDePagoDR.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - @@ -1435,6 +1339,3745 @@ + + 0.39cm + + + + + true + true + + + + + Impuesto + + + + + + + Textbox108 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tipo + + + + + + + Textbox109 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Base + + + + + + + Textbox110 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tipo Factor + + + + + + + Textbox111 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tasa/Cuota + + + + + + + Textbox112 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + true + + + + + + true + true + + + + + Importe + + + + + + + Textbox113 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox61 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox59 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + es-MX + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + @@ -1447,6 +5090,8 @@ + + @@ -1456,13 +5101,23 @@ + + + + + + + + + + DataSet2 5.05cm - 1.09cm - 20.5314cm + 1.95625cm + 20.54984cm 1 - 16.1771cm + 18.91088cm - 20.57566cm + 20.54984cm 3.03264cm @@ -3870,7 +7525,7 @@ - 0.84667cm + 0.41981cm true true @@ -3894,7 +7549,6 @@ Textbox35 - 0.17639cm 17.56289cm 0.41981cm 2.94979cm @@ -3941,7 +7595,6 @@ Textbox29 - 0.21343cm 0.01844cm 0.41981cm 6.8491cm @@ -3990,7 +7643,6 @@ Textbox31 - 0.21343cm 9.17244cm 0.41981cm 6.02198cm @@ -4125,6 +7777,134 @@ TipoCambioDR System.String + + RetIVA + System.Float + + + RetISR + System.Float + + + Tra001ImpuestoDR + System.String + + + Tra001TipoFactorDR + System.String + + + Tra001TasaOCuotaDR + System.String + + + Tra001ImporteDR + System.Float + + + Tra002ImpuestoDR + System.String + + + Tra002TipoFactorDR + System.String + + + Tra002TasaOCuotaDR + System.String + + + Tra002ImporteDR + System.Float + + + Tra003ImpuestoDR + System.String + + + Tra003TipoFactorDR + System.String + + + Tra003TasaOCuotaDR + System.String + + + Tra003ImporteDR + System.Float + + + Ret001ImpuestoDR + System.String + + + Ret001TipoFactorDR + System.String + + + Ret001TasaOCuotaDR + System.String + + + Ret001ImporteDR + System.Float + + + Ret002ImpuestoDR + System.String + + + Ret002TipoFactorDR + System.String + + + Ret002TasaOCuotaDR + System.String + + + Ret002ImporteDR + System.Float + + + Ret003ImpuestoDR + System.String + + + Ret003TipoFactorDR + System.String + + + Ret003TasaOCuotaDR + System.String + + + Ret003ImporteDR + System.Float + + + Tra001BaseDR + System.Float + + + Tra002BaseDR + System.Float + + + Tra003BaseDR + System.Float + + + Ret001BaseDR + System.Float + + + Ret002BaseDR + System.Float + + + Ret003BaseDR + System.Float + DataSet @@ -4431,6 +8211,18 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/GPS/ReciboNom.rdlc b/GPS/ReciboNom.rdlc index 13eb33297..95b565d6b 100644 --- a/GPS/ReciboNom.rdlc +++ b/GPS/ReciboNom.rdlc @@ -50,16 +50,20 @@ System.String - FubProyecto + FechaFin System.String NetoPagar - System.String + System.Decimal Sindicato - System.String + System.Decimal + + + descuento + System.Decimal SalarioDia1 @@ -89,6 +93,258 @@ SalarioDia7 System.String + + sueldoD1 + System.Decimal + + + sueldoD2 + System.Decimal + + + sueldoD3 + System.Decimal + + + sueldoD4 + System.Decimal + + + sueldoD5 + System.Decimal + + + sueldoD6 + System.Decimal + + + sueldoD7 + System.Decimal + + + septimoDia1 + System.Decimal + + + septimoDia2 + System.Decimal + + + septimoDia3 + System.Decimal + + + septimoDia4 + System.Decimal + + + septimoDia5 + System.Decimal + + + septimoDia6 + System.Decimal + + + septimoDia7 + System.Decimal + + + propAguinaldo1 + System.Decimal + + + propAguinaldo2 + System.Decimal + + + propAguinaldo3 + System.Decimal + + + propAguinaldo4 + System.Decimal + + + propAguinaldo5 + System.Decimal + + + propAguinaldo6 + System.Decimal + + + propAguinaldo7 + System.Decimal + + + propUtilidades1 + System.Decimal + + + propUtilidades2 + System.Decimal + + + propUtilidades3 + System.Decimal + + + propUtilidades4 + System.Decimal + + + propUtilidades5 + System.Decimal + + + propUtilidades6 + System.Decimal + + + propUtilidades7 + System.Decimal + + + vacyPrima1 + System.Decimal + + + vacyPrima2 + System.Decimal + + + vacyPrima3 + System.Decimal + + + vacyPrima4 + System.Decimal + + + vacyPrima5 + System.Decimal + + + vacyPrima6 + System.Decimal + + + vacyPrima7 + System.Decimal + + + horaExDia1 + System.Decimal + + + horaExDia2 + System.Decimal + + + horaExDia3 + System.Decimal + + + horaExDia4 + System.Decimal + + + horaExDia5 + System.Decimal + + + horaExDia6 + System.Decimal + + + horaExDia7 + System.Decimal + + + bonorec1 + System.Decimal + + + bonorec2 + System.Decimal + + + bonorec3 + System.Decimal + + + bonorec4 + System.Decimal + + + bonorec5 + System.Decimal + + + bonorec6 + System.Decimal + + + bonorec7 + System.Decimal + + + otrasPercepciones1 + System.Decimal + + + otrasPercepciones2 + System.Decimal + + + otrasPercepciones3 + System.Decimal + + + otrasPercepciones4 + System.Decimal + + + otrasPercepciones5 + System.Decimal + + + otrasPercepciones6 + System.Decimal + + + otrasPercepciones7 + System.Decimal + + + percepcionDiaria1 + System.Decimal + + + percepcionDiaria2 + System.Decimal + + + percepcionDiaria3 + System.Decimal + + + percepcionDiaria4 + System.Decimal + + + percepcionDiaria5 + System.Decimal + + + percepcionDiaria6 + System.Decimal + + + percepcionDiaria7 + System.Decimal + DataSet @@ -359,7 +615,9 @@ HERMOSILLO, SONORA - NumeroPeriodo @@ -1138,7 +1396,9 @@ HERMOSILLO, SONORA - Dias @@ -1451,13 +1711,15 @@ HERMOSILLO, SONORA - + 0 - Textbox59 @@ -2517,16 +2779,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!sueldoD1.Value @@ -2535,7 +2798,7 @@ HERMOSILLO, SONORA - Textbox87 + sueldoD1 @@ -2550,16 +2813,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!sueldoD2.Value @@ -2568,7 +2832,7 @@ HERMOSILLO, SONORA - Textbox88 + sueldoD2 @@ -2583,16 +2847,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!sueldoD3.Value @@ -2601,7 +2866,7 @@ HERMOSILLO, SONORA - Textbox89 + sueldoD3 @@ -2616,16 +2881,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!sueldoD4.Value @@ -2634,7 +2900,7 @@ HERMOSILLO, SONORA - Textbox90 + sueldoD4 @@ -2649,16 +2915,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!sueldoD5.Value @@ -2667,7 +2934,7 @@ HERMOSILLO, SONORA - Textbox91 + sueldoD5 @@ -2682,16 +2949,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!sueldoD6.Value @@ -2700,7 +2968,7 @@ HERMOSILLO, SONORA - Textbox92 + sueldoD6 @@ -2715,16 +2983,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!sueldoD7.Value @@ -2733,7 +3002,7 @@ HERMOSILLO, SONORA - Textbox93 + sueldoD7 @@ -2853,16 +3122,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!septimoDia1.Value @@ -2871,7 +3141,7 @@ HERMOSILLO, SONORA - Textbox105 + septimoDia1 @@ -2886,16 +3156,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!septimoDia2.Value @@ -2904,7 +3175,7 @@ HERMOSILLO, SONORA - Textbox106 + septimoDia2 @@ -2919,16 +3190,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!septimoDia3.Value @@ -2937,7 +3209,7 @@ HERMOSILLO, SONORA - Textbox107 + septimoDia3 @@ -2952,16 +3224,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!septimoDia4.Value @@ -2970,7 +3243,7 @@ HERMOSILLO, SONORA - Textbox108 + septimoDia4 @@ -2985,16 +3258,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!septimoDia5.Value @@ -3003,7 +3277,7 @@ HERMOSILLO, SONORA - Textbox109 + septimoDia5 @@ -3018,16 +3292,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!septimoDia6.Value @@ -3036,7 +3311,7 @@ HERMOSILLO, SONORA - Textbox110 + septimoDia6 @@ -3051,16 +3326,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!septimoDia7.Value @@ -3069,7 +3345,7 @@ HERMOSILLO, SONORA - Textbox111 + septimoDia7 @@ -3188,16 +3464,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propAguinaldo1.Value @@ -3206,7 +3483,7 @@ HERMOSILLO, SONORA - Textbox96 + propAguinaldo1 @@ -3221,16 +3498,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propAguinaldo2.Value @@ -3239,7 +3517,7 @@ HERMOSILLO, SONORA - Textbox97 + propAguinaldo2 @@ -3254,16 +3532,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propAguinaldo3.Value @@ -3272,7 +3551,7 @@ HERMOSILLO, SONORA - Textbox98 + propAguinaldo3 @@ -3287,16 +3566,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propAguinaldo4.Value @@ -3305,7 +3585,7 @@ HERMOSILLO, SONORA - Textbox99 + propAguinaldo4 @@ -3320,16 +3600,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propAguinaldo5.Value @@ -3338,7 +3619,7 @@ HERMOSILLO, SONORA - Textbox100 + propAguinaldo5 @@ -3353,16 +3634,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propAguinaldo6.Value @@ -3371,7 +3653,7 @@ HERMOSILLO, SONORA - Textbox101 + propAguinaldo6 @@ -3386,16 +3668,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propAguinaldo7.Value @@ -3404,7 +3687,7 @@ HERMOSILLO, SONORA - Textbox102 + propAguinaldo7 @@ -3523,16 +3806,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propUtilidades1.Value @@ -3541,7 +3825,7 @@ HERMOSILLO, SONORA - Textbox114 + propUtilidades1 @@ -3556,16 +3840,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propUtilidades2.Value @@ -3574,7 +3859,7 @@ HERMOSILLO, SONORA - Textbox115 + propUtilidades2 @@ -3589,16 +3874,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propUtilidades3.Value @@ -3607,7 +3893,7 @@ HERMOSILLO, SONORA - Textbox116 + propUtilidades3 @@ -3622,16 +3908,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propUtilidades4.Value @@ -3640,7 +3927,7 @@ HERMOSILLO, SONORA - Textbox117 + propUtilidades4 @@ -3655,16 +3942,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propUtilidades5.Value @@ -3673,7 +3961,7 @@ HERMOSILLO, SONORA - Textbox118 + propUtilidades5 @@ -3688,16 +3976,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propUtilidades6.Value @@ -3706,7 +3995,7 @@ HERMOSILLO, SONORA - Textbox119 + propUtilidades6 @@ -3721,16 +4010,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!propUtilidades7.Value @@ -3739,7 +4029,7 @@ HERMOSILLO, SONORA - Textbox120 + propUtilidades7 @@ -3832,7 +4122,7 @@ HERMOSILLO, SONORA - Vac. v Prima Vac 50% + Vac. y Prima Vac 50% @@ -3858,16 +4148,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!vacyPrima1.Value @@ -3876,7 +4167,7 @@ HERMOSILLO, SONORA - Textbox123 + vacyPrima1 @@ -3891,16 +4182,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!vacyPrima2.Value @@ -3909,7 +4201,7 @@ HERMOSILLO, SONORA - Textbox124 + vacyPrima2 @@ -3924,16 +4216,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!vacyPrima3.Value @@ -3942,7 +4235,7 @@ HERMOSILLO, SONORA - Textbox125 + vacyPrima3 @@ -3957,16 +4250,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!vacyPrima4.Value @@ -3975,7 +4269,7 @@ HERMOSILLO, SONORA - Textbox126 + vacyPrima4 @@ -3990,16 +4284,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!vacyPrima5.Value @@ -4008,7 +4303,7 @@ HERMOSILLO, SONORA - Textbox127 + vacyPrima51 @@ -4023,16 +4318,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!vacyPrima6.Value @@ -4041,7 +4337,7 @@ HERMOSILLO, SONORA - Textbox128 + vacyPrima6 @@ -4056,16 +4352,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!vacyPrima7.Value @@ -4074,7 +4371,7 @@ HERMOSILLO, SONORA - Textbox129 + vacyPrima7 @@ -4193,16 +4490,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!horaExDia1.Value @@ -4211,7 +4509,7 @@ HERMOSILLO, SONORA - Textbox132 + horaExDia1 @@ -4226,16 +4524,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!horaExDia2.Value @@ -4244,7 +4543,7 @@ HERMOSILLO, SONORA - Textbox133 + horaExDia2 @@ -4259,16 +4558,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!horaExDia3.Value @@ -4277,7 +4577,7 @@ HERMOSILLO, SONORA - Textbox134 + horaExDia3 @@ -4292,16 +4592,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!horaExDia4.Value @@ -4310,7 +4611,7 @@ HERMOSILLO, SONORA - Textbox135 + horaExDia4 @@ -4325,16 +4626,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!horaExDia5.Value @@ -4343,7 +4645,7 @@ HERMOSILLO, SONORA - Textbox136 + horaExDia5 @@ -4358,16 +4660,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!horaExDia6.Value @@ -4376,7 +4679,7 @@ HERMOSILLO, SONORA - Textbox137 + horaExDia6 @@ -4391,16 +4694,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!horaExDia7.Value @@ -4409,7 +4713,7 @@ HERMOSILLO, SONORA - Textbox138 + horaExDia7 @@ -4457,16 +4761,17 @@ HERMOSILLO, SONORA - + true true - 0.00 + =Fields!descuento.Value @@ -4475,7 +4780,7 @@ HERMOSILLO, SONORA - Textbox249 + descuento @@ -4528,16 +4833,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!bonorec1.Value @@ -4546,7 +4852,7 @@ HERMOSILLO, SONORA - Textbox141 + bonorec1 @@ -4561,16 +4867,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!bonorec2.Value @@ -4579,7 +4886,7 @@ HERMOSILLO, SONORA - Textbox142 + bonorec2 @@ -4594,16 +4901,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!bonorec3.Value @@ -4612,7 +4920,7 @@ HERMOSILLO, SONORA - Textbox143 + bonorec3 @@ -4627,16 +4935,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!bonorec4.Value @@ -4645,7 +4954,7 @@ HERMOSILLO, SONORA - Textbox144 + bonorec4 @@ -4660,16 +4969,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!bonorec5.Value @@ -4678,7 +4988,7 @@ HERMOSILLO, SONORA - Textbox145 + bonorec5 @@ -4693,16 +5003,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!bonorec6.Value @@ -4711,7 +5022,7 @@ HERMOSILLO, SONORA - Textbox146 + bonorec6 @@ -4726,16 +5037,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!bonorec7.Value @@ -4744,7 +5056,7 @@ HERMOSILLO, SONORA - Textbox147 + bonorec7 @@ -4863,16 +5175,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!otrasPercepciones1.Value @@ -4881,7 +5194,7 @@ HERMOSILLO, SONORA - Textbox177 + otrasPercepciones1 @@ -4896,16 +5209,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!otrasPercepciones2.Value @@ -4914,7 +5228,7 @@ HERMOSILLO, SONORA - Textbox178 + otrasPercepciones2 @@ -4929,16 +5243,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!otrasPercepciones3.Value @@ -4947,7 +5262,7 @@ HERMOSILLO, SONORA - Textbox179 + otrasPercepciones3 @@ -4962,16 +5277,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!otrasPercepciones4.Value @@ -4980,7 +5296,7 @@ HERMOSILLO, SONORA - Textbox180 + otrasPercepciones4 @@ -4995,16 +5311,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!otrasPercepciones5.Value @@ -5013,7 +5330,7 @@ HERMOSILLO, SONORA - Textbox181 + otrasPercepciones5 @@ -5028,16 +5345,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!otrasPercepciones6.Value @@ -5046,7 +5364,7 @@ HERMOSILLO, SONORA - Textbox182 + otrasPercepciones6 @@ -5061,16 +5379,17 @@ HERMOSILLO, SONORA - + true true - + =Fields!otrasPercepciones7.Value @@ -5079,7 +5398,7 @@ HERMOSILLO, SONORA - Textbox183 + otrasPercepciones7 @@ -5134,7 +5453,7 @@ HERMOSILLO, SONORA - =Fields!Sindicato.Value + =Fields!Sindicato.Value +Fields!descuento.Value - SalarioDia1 + percepcionDiaria1 @@ -5634,14 +5953,14 @@ HERMOSILLO, SONORA - + true true - =Fields!SalarioDia2.Value + =Fields!percepcionDiaria2.Value - SalarioDia2 + percepcionDiaria2 @@ -5673,14 +5992,14 @@ HERMOSILLO, SONORA - + true true - =Fields!SalarioDia3.Value + =Fields!percepcionDiaria3.Value - SalarioDia3 + percepcionDiaria3 @@ -5712,14 +6031,14 @@ HERMOSILLO, SONORA - + true true - =Fields!SalarioDia4.Value + =Fields!percepcionDiaria4.Value - SalarioDia4 + percepcionDiaria4 @@ -5751,14 +6070,14 @@ HERMOSILLO, SONORA - + true true - =Fields!SalarioDia5.Value + =Fields!percepcionDiaria5.Value - SalarioDia5 + percepcionDiaria5 @@ -5790,14 +6109,14 @@ HERMOSILLO, SONORA - + true true - =Fields!SalarioDia6.Value + =Fields!percepcionDiaria6.Value - SalarioDia6 + percepcionDiaria6 @@ -5829,17 +6148,17 @@ HERMOSILLO, SONORA - + true true - =Fields!SalarioDia7.Value + =Fields!percepcionDiaria7.Value @@ -5848,7 +6167,7 @@ HERMOSILLO, SONORA - SalarioDia7 + percepcionDiaria7 @@ -6471,7 +6790,7 @@ Firma del Trabajador DataSet1 0.15557cm 0.10265cm - 12.66146cm + 12.66145cm 19.12116cm + + +
    + + + + + + + Reporte Servicios a Domicilio + + + + + + +
    +
    + +
    +
    +
    + + Servicios a Domicilio +
    +
    +
    + +
    +
    + + + + + + + + +
    +
    +
    +
    + + + + +
    + + + + + + + + diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb new file mode 100644 index 000000000..ac80205c3 --- /dev/null +++ b/OS/RepServicioDomicilio.aspx.vb @@ -0,0 +1,273 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Imports System.Data +Imports Microsoft.Reporting.WebForms +Imports System.Web.Services + +Partial Class OS_RepServicioDomicilio + Inherits ClsPaginas + +#Region "PROPIEDADES" + + + Private Property DtDatos As DataTable + Get + DtDatos = DirectCast(ViewState("DtDatos"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DtDatos") = value + End Set + End Property + + Private Property DtColor As DataTable + Get + Return DirectCast(ViewState("DtColor"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtColor") = value + End Set + End Property + Private Property Agrupador As String + Get + Return ViewState("Agrupador").ToString + End Get + + Set(value As String) + ViewState("Agrupador") = value + End Set + End Property + Private Property TCEspecifico As Double + Get + Return ViewState("TCEspecifico").ToString.ToDouble + End Get + + Set(value As Double) + ViewState("TCEspecifico") = value + End Set + End Property + Private Property TipoCambio As Integer + Get + Return ViewState("TipoCambio").ToString.ToEntero + End Get + + Set(value As Integer) + ViewState("TipoCambio") = value + End Set + End Property + + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoEtiqueta) + InicializaCalendar() + End If + End Sub + +#Region "CARGAS" + + Private Sub SetValues() + + + + End Sub + + + Private Sub CargaDatos() + + + End Sub + +#End Region + +#Region " FULL CALENDAR " + Private Sub InicializaCalendar() + RegistraScript("InitCalendar();") + + HdnU.Value = UsuarioActual.CveUsuario.ToString + HdnE.Value = UsuarioActual.CveEmpresa.ToString + + DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True + CargaTiposAgenda() + CheckRecurrencia.Attributes.Add("onclick", "CheckAdd(this);") + End Sub + Private Sub CargaTiposAgenda() + Dim ObjEventos As New ClsOIEventos + + If ObjEventos.GetAgendaTipo() Then + DdlAgedaTipo.DataSource = ObjEventos.DtResultados + DdlAgedaTipo.DataBind() + DdlAgedaTipo.Items.Insert(0, New ListItem("Seleccione", "-1")) + Else + Alert("Ocurrió un error al obtener los tipos de agenda. Por favor recargue la página", TipoMensaje.MsgError) + End If + + ObjEventos.Dispose() + End Sub + Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) + Dim ObjEventos As New ClsOIEventos + + Dim FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime() + Dim FechaFin = TxtFechaFinAgenda.Text.ToDateTime() + + RegistraScript("GetView();") + + Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1" + If CheckRecurrencia.Checked Then + RecurrenciaTipo = RBLRecurrencia.SelectedValue.ToEntero + Frecuencia = TxtFrecuencia.Text.ToEntero + + 'OBTENEMOS LOS DIAS SELECCIONADOS EN LA OPCION DE RECURRENCIA POR SEMANA + Select Case RecurrenciaTipo + Case 3 + Dim StringDias = "" + For Each item As ListItem In CheckDiasSemana.Items + If item.Selected Then + If StringDias.Length > 0 Then + StringDias += "," + End If + StringDias += item.Value + End If + Next + If StringDias.Length > 0 Then + DiasSemana = StringDias + End If + End Select + + + 'If RBSinFechaFinAdd.Checked Then + ' RecurrenciaFin = "-1" + 'Else + If RBNumeroOcurrencias.Checked Then + RecurrenciaFin = TxtNumeroOcurrencias.Text + ElseIf RBFechaFin.Checked Then + RecurrenciaFin = TxtFechaFinRecurrencia.Text + Else + RecurrenciaFin = "-1" + End If + Else + If HdnCveEvento.Value.ToEntero > 0 Then + Frecuencia = -2 : DiasSemana = "-2" : Dias = -2 : Mes = -2 : RecurrenciaFin = "-2" + End If + End If + + '11/05/2018 - GASTO RECURRENTE + Dim CveTipoEvento As Integer = IIf(ChkGastoRecurrente.Checked, 10, 2).ToString().ToEntero() + Dim Importe As Double = Convert.ToDouble(IIf(ChkGastoRecurrente.Checked, TxtImporteGastoRecurrente.Text, "-1")) + + If HdnCveEvento.Value.ToEntero > 0 Then + If ObjEventos.UpdateEvento(TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, DdlAgedaTipo.SelectedValue.ToEntero, -1, FechaInicio, FechaFin, -1, "-1", HdnCveEvento.Value.ToEntero, "-1", + RecurrenciaTipo, Frecuencia, DiasSemana, Dias, Mes, RecurrenciaFin, Importe:=Importe) Then + Alert("El Evento se actualizó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al actualizar el evento", TipoMensaje.MsgAdvertencia) + End If + Else + If ObjEventos.AddEventoAgenda(DdlAgedaTipo.SelectedValue.ToEntero, TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, FechaInicio, FechaFin, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, + RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=CveTipoEvento, Importe:=Importe) Then + + Alert("El Evento se guardó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al Guardar el evento", TipoMensaje.MsgAdvertencia) + End If + End If + + ObjEventos.Dispose() + RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234") + LimpiaModalAgenda() + + End Sub + Private Sub LimpiaModalAgenda() + TxtDescripcionAgenda.Text = "" + TxtAsuntoAgenda.Text = "" + DdlPrioridad.SelectedValue = "1" + TxtNumeroOcurrencias.Text = "" + TxtFechaFinRecurrencia.Text = "" + RBFechaFin.Checked = False + RBNumeroOcurrencias.Checked = False + RBLRecurrencia.SelectedValue = "1" + CheckDiasSemana.ClearSelection() + RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty) + TxtFrecuencia.Text = "1" + LblEmpresaCRM.Text = "" + End Sub + + Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) + + Dim ObjEventos As New ClsOIEventos + RegistraScript("GetView();") + + If ObjEventos.RemoveEvento(HdnCveEvento.Value.ToEntero, UsuarioActual.CveEmpresa) Then + RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234") + Alert("El evento se eliminó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al eliminar el evento, por favor intente de nuevo.", TipoMensaje.MsgError) + End If + + ObjEventos.Dispose() + End Sub + + + Public Shared Function EliminaEvento(CveEvento As Integer, CveEmpresa As Integer) As String + Dim ObjEventos As New ClsOIEventos + + ObjEventos.RemoveEvento(CveEvento, CveEmpresa) + + ObjEventos.Dispose() + Return CveEvento.ToString + End Function + + + Public Shared Function ActualizaEvento(ClsEvent As CalendarEvent) As String + Dim ObjEventos As New ClsOIEventos + + Dim FechaInicio = DateTimeOffset.Parse(ClsEvent.start).DateTime + Dim FechaFin = DateTimeOffset.Parse(ClsEvent.end).DateTime + + If ObjEventos.UpdateEvento("-1", "-1", -1, -1, -1, FechaInicio, FechaFin, -1, "-1", ClsEvent.id) Then + End If + + ObjEventos.Dispose() + Return "a" + End Function + Protected Sub RBLRecurrencia_SelectedIndexChanged(sender As Object, e As EventArgs) + Select Case RBLRecurrencia.SelectedValue.ToEntero + Case 1 + LblTextoFrecuencia.Text = "Hora(s)" + TrDiasSemanaAdd.Style("display") = "none" + Case 2 + LblTextoFrecuencia.Text = "Dia(s)" + TrDiasSemanaAdd.Style("display") = "none" + Case 3 + LblTextoFrecuencia.Text = "Semana(s)" + TrDiasSemanaAdd.Style("display") = "block" + + 'Chequea los dias seleccionados en la recurrencia + For Each item As ListItem In CheckDiasSemana.Items + If HdnDiasSemanaAgendar.Value.Contains(item.Value) Then + item.Selected = True + Else + item.Selected = False + End If + Next + Case 4 + LblTextoFrecuencia.Text = "Mes(es)" + TrDiasSemanaAdd.Style("display") = "none" + Case 5 + LblTextoFrecuencia.Text = "Año(s)" + TrDiasSemanaAdd.Style("display") = "none" + Case Else + End Select + UpRecurrencia.Update() + End Sub + Protected Sub BtnActualizaAdd_Click(sender As Object, e As EventArgs) + RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty) + End Sub +#End Region + + +End Class diff --git a/RH/ActualizacionMasiva.aspx.vb b/RH/ActualizacionMasiva.aspx.vb index ce9b819f9..a8af0db9f 100644 --- a/RH/ActualizacionMasiva.aspx.vb +++ b/RH/ActualizacionMasiva.aspx.vb @@ -102,11 +102,17 @@ Partial Class RH_ActualizacionMasiva End Sub Private Sub CargaSuperioresOrganigrama() + Using objbase As New ClsClaseBase + Dim strquery As String = String.Format("SELECT CvePersonal,NombreCompleto FROM RH_Personal WHERE CveEmpresa = {0} AND CvePersonal IN (SELECT CvePersonalPadre FROM RH_Organigrama )", UsuarioActual.CveEmpresa) + If (objbase.runQuerystr(strquery)) Then + DdlSupervisor.DataSource = objbase.DtResultados + + End If + End Using Dim ObjRH As New ClsRH If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then ViewState("dtSupervisores") = ObjRH.DtResultados - DdlSupervisor.DataSource = ObjRH.DtResultados Else DdlSupervisor.DataSource = Nothing Alert("Ocurrió un error al cargar el catálogo de Jefes Inmediatos") diff --git a/RH/Asistencias.aspx.vb b/RH/Asistencias.aspx.vb index 2a5122a82..363c8f057 100644 --- a/RH/Asistencias.aspx.vb +++ b/RH/Asistencias.aspx.vb @@ -25,15 +25,23 @@ Partial Class RH_Asistencias #Region " ORGANIGRAMA " Private Sub CargaSuperioresOrganigrama() - Dim ObjRH As New ClsRH + 'Dim ObjRH As New ClsRH - If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then - DdlSupervisorOrganigrama.DataSource = ObjRH.DtResultados - Else - DdlSupervisorOrganigrama.DataSource = Nothing - Alert("Ocurrió un error al cargar el catálogo de Jefes Inmediatos") - End If - ObjRH.Dispose() + 'If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then + ' DdlSupervisorOrganigrama.DataSource = ObjRH.DtResultados + 'Else + ' DdlSupervisorOrganigrama.DataSource = Nothing + ' Alert("Ocurrió un error al cargar el catálogo de Jefes Inmediatos") + 'End If + 'ObjRH.Dispose() + + Using objbase As New ClsClaseBase + Dim strquery As String = String.Format("SELECT CvePersonal,NombreCompleto FROM RH_Personal WHERE CveEmpresa = {0} AND CvePersonal IN (SELECT CvePersonalPadre FROM RH_Organigrama )", UsuarioActual.CveEmpresa) + If (objbase.runQuerystr(strquery)) Then + DdlSupervisorOrganigrama.DataSource = objbase.DtResultados + + End If + End Using If DdlSupervisorOrganigrama.DataSource IsNot Nothing Then DdlSupervisorOrganigrama.DataBind() diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 0edc84b8a..cc2f66c36 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -7297,6 +7297,7 @@ Partial Class RH_Personal TxtSRINCfolio.Text = "" TxtSRINCfechaInicio.Text = "" TxtSRINCdiasAutorizados.Text = "" + TxtDiasPagoEmpresa.Text = If(UsuarioActual.CveEmpresa = 141, "3", "") DdlSRINCcveTipodeIncidencia.SelectedValue = "-1" DdlSRINCcveRamoSeguro.SelectedValue = "-1" DdlSRINCcveTipoRiesgo.SelectedValue = "-1" diff --git a/RH/PopUpBuscarPersonal.aspx b/RH/PopUpBuscarPersonal.aspx index 06d8b2306..9bf6f2f1b 100644 --- a/RH/PopUpBuscarPersonal.aspx +++ b/RH/PopUpBuscarPersonal.aspx @@ -4,8 +4,8 @@ @@ -133,90 +133,104 @@ Estatus: - + + clasificación: + + + + + + + + + - - - - - - - - -
    - -
    -
    -
    -   -
    -
    - - -
    -
    -
    -
    -
    - - - + - - - - - - -
    - -
    -
    -
    - + + + + + + + +
    + +
    -
    - - -
    -
    -
    -
    -
    + +
    +   +
    +
    + + +
    + + + + + + - - - - - - -
    - -
    -
    -
    - + + + + + + +
    + +
    -
    - - + +
    + +
    +
    + + +
    + + + + + + + + + + + + +
    + +
    -
    -
    -
    -
    + +
    + +
    +
    + + +
    + + + + - +   @@ -226,7 +240,7 @@ - + diff --git a/RH/PopUpBuscarPersonal.aspx.vb b/RH/PopUpBuscarPersonal.aspx.vb index eec974cf1..3e59a99ec 100644 --- a/RH/PopUpBuscarPersonal.aspx.vb +++ b/RH/PopUpBuscarPersonal.aspx.vb @@ -166,7 +166,7 @@ Partial Class RH_PopUpBuscarPersonal If ObjPersonal.GetPersonal2(-1, Codigo, Nombre, NSS, RFC, DdlTurnos.SelectedValue.ToEntero, DdlPuestos.SelectedValue.ToEntero, DdlDepartamentos.SelectedValue.ToEntero, DdlRuta.SelectedValue.ToEntero, DdlEscolaridad.SelectedValue.ToEntero, DdlEstadoCivil.SelectedValue.ToEntero, DdlGenero.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClienteAsignado.SelectedValue.ToEntero, Horario, CveSupervisor, - -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", StrFiltroCaracteristica, 1, UsuarioActual.CveEmpresa) Then + -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", StrFiltroCaracteristica, 1, UsuarioActual.CveEmpresa, EsReserva:=ddlclasificacion.SelectedValue.ToEntero()) Then If ObjPersonal.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjPersonal.DtResultados.Rows.Count.ToString.FormatoNumero(0) GV.DataSource = ObjPersonal.DtResultados diff --git a/Ventas/RepProductosServicios.aspx b/Ventas/RepProductosServicios.aspx index 5ab297158..735b5b74a 100644 --- a/Ventas/RepProductosServicios.aspx +++ b/Ventas/RepProductosServicios.aspx @@ -355,7 +355,19 @@ - + + + Servicio Domicilio: +
    + + Todos + Si + No + +
    + + + diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index c78862811..de016ffb0 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -62,6 +62,13 @@ Partial Class Ventas_RepProductosServicios CargarMarcas() SetValues() + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + + LblServicioDomicilioFiltro.Visible = True + DVServicioDomicilio.Visible = True + + End If + End If @@ -309,7 +316,8 @@ Partial Class Ventas_RepProductosServicios UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, - CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then + CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, + ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else @@ -389,13 +397,13 @@ Partial Class Ventas_RepProductosServicios FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") - Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}&CveClasificacion2={38}", + Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}&CveClasificacion2={38}&ServicioDomicilio={39}", e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0), - e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClienteSucursal").ToString.ToEntero, e.Row.DBCampo("CveClasificacion2")) + e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClienteSucursal").ToString.ToEntero, e.Row.DBCampo("CveClasificacion2"), DdlServicioDomicilio.SelectedValue.ToEntero) e.Row.FCLiteral("LtlGrupo").Text = String.Format("{2}", Css, Liga, e.Row.DBCampo("Gpo")) diff --git a/Ventas/RepProductosServiciosDetalle.aspx b/Ventas/RepProductosServiciosDetalle.aspx index 2059dceab..102bf8ff3 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx +++ b/Ventas/RepProductosServiciosDetalle.aspx @@ -370,6 +370,18 @@ + + Servicio Domicilio: +
    + + Todos + Si + No + +
    + + + diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 5e2e43a84..ac8f1f55b 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -86,6 +86,13 @@ Partial Class Ventas_RepProductosServiciosDetalle SetValues() CargaParametrosDetalle() + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + + LblServicioDomicilioFiltro.Visible = True + DVServicioDomicilio.Visible = True + + End If + End If End Sub @@ -373,6 +380,9 @@ Partial Class Ventas_RepProductosServiciosDetalle DdlTipoCliente.SelectedValueExist(TipoCliente) + DdlServicioDomicilio.SelectedValue = If(Request("ServicioDomicilio") IsNot Nothing, Request("ServicioDomicilio").ToString, "-1").ToString + + If Fecha <> "-1" Then txtFechaI.Text = Fecha txtFechaF.Text = Fecha @@ -546,7 +556,8 @@ Partial Class Ventas_RepProductosServiciosDetalle TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, - EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then + EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, + ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados Else diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index 093dde449..ce304bba6 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -313,6 +313,17 @@ + + Servicio Domicilio: +
    + + Todos + Si + No + +
    + + diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb index 8b33a80a7..c811cee1b 100644 --- a/Ventas/RepVentaDetalle.aspx.vb +++ b/Ventas/RepVentaDetalle.aspx.vb @@ -120,6 +120,15 @@ Partial Class RepVentaDetalle InicializaValores() CargaDatos() CreaDataTableColor() + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + + LblServicioDomicilioFiltro.Visible = True + DVServicioDomicilio.Visible = True + + End If + + End If End Sub @@ -192,6 +201,10 @@ Partial Class RepVentaDetalle DdlClientes.SelectedValue = CveCliente DdlUsuario.SelectedValueExist(CveUsuario) DdlGrupo.SelectedValueExist(Grupo) + + + DdlServicioDomicilio.SelectedValue = If(Request("ServicioDomicilio") IsNot Nothing, Request("ServicioDomicilio").ToString, "-1").ToString + UPFiltros.Update() txtFechaI.Text = If(Anio <> "-1", String.Format("01/01/{0}", Anio), txtFechaI.Text) @@ -499,7 +512,8 @@ Partial Class RepVentaDetalle IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF, CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec, CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, - CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero()) Then + CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), + ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then DtVentas = AddRows(ObjVentas.DtResultados) ImgImprimir.Enabled = True GvDatos.DataSource = AddRows(ObjVentas.DtResultados) diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 28400d0ef..83ec7ed29 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -325,6 +325,17 @@ + + + Servicio Domicilio: +
    + + Todos + Si + No + +
    + diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index c551a0f98..9c12ca6f6 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -125,6 +125,14 @@ Partial Class Ventas_RepVentas LnkDescargaCartaPorte.Visible = True End If + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + + LblServicioDomicilioFiltro.Visible = True + DVServicioDomicilio.Visible = True + + End If + End If End Sub @@ -330,7 +338,7 @@ Partial Class Ventas_RepVentas If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, - EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero()) Then + EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else @@ -522,9 +530,9 @@ Partial Class Ventas_RepVentas 'LIGA A DETALLE - Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}" - - + Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}&ServicioDomicilio={DdlServicioDomicilio.SelectedValue}" + + e.Row.FCLiteral("LtlGrupo").Text = "" & e.Row.FCLiteral("LtlGrupo").Text & "" e.Row.FCLiteral("LtlCantidad").Text = "" & e.Row.FCLiteral("LtlCantidad").Text & "" diff --git a/asmx/WSApp.asmx b/asmx/WSApp.asmx index 12557d044..83e2f5311 100644 --- a/asmx/WSApp.asmx +++ b/asmx/WSApp.asmx @@ -1,5 +1,5 @@ -<%@ WebService Language="VB" Class="WSApp" %> - +<%@ WebService Language="VB" Class="WSApp" %> + Option Explicit On Imports System.Data @@ -22,26 +22,26 @@ Imports Newtonsoft.Json.Linq Public Class WSApp - Inherits System.Web.Services.WebService + Inherits System.Web.Services.WebService #Region "G L O B A L - D T" - + Public ReadOnly Property UrlSitio As String Get Return ConfigurationManager.AppSettings("UrlSitio").ToString End Get End Property - ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable - Get - Dim ObjPS As New ClsProductosServicios - - If ObjPS.GetPS(CvePS, -1, CveEmpresa, Codigo:=Codigo, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then - GlobalDTPS = ObjPS.DtResultados - Else - GlobalDTPS = Nothing - End If - - ObjPS.Dispose() - End Get + ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable + Get + Dim ObjPS As New ClsProductosServicios + + If ObjPS.GetPS(CvePS, -1, CveEmpresa, Codigo:=Codigo, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then + GlobalDTPS = ObjPS.DtResultados + Else + GlobalDTPS = Nothing + End If + + ObjPS.Dispose() + End Get End Property Property GlobalDTMonedas() As DataTable @@ -67,37 +67,37 @@ Public Class WSApp Set(value As DataTable) Application("GlobalDTVtaFormaPago") = value End Set - End Property - Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then - Dim P As New ClsSubProyectos - If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados - P.Dispose() - End If - - If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then - Dim StrSQL As New StringBuilder - If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto) - If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto) - If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus) - If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa) - - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) - GlobalDTSubProyectos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) - Application(AppNombre) = value - End Set + End Property + Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then + Dim P As New ClsSubProyectos + If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados + P.Dispose() + End If + + If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then + Dim StrSQL As New StringBuilder + If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto) + If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto) + If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus) + If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa) + + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) + GlobalDTSubProyectos = Dv.ToTable + Dv.Dispose() + + Else + GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable) + End If + + End Get + Set(ByVal value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) + Application(AppNombre) = value + End Set End Property Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable Get @@ -249,43 +249,43 @@ Public Class WSApp Application("GlobalTipoCambio") = value End Set - End Property - - Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - Get - - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then - - Dim ObjOC As New ClsOC - If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then - HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados - Else - HttpContext.Current.Application(AppNombre) = Nothing - End If - - ObjOC.Dispose() - - End If - - Dim filtro As New StringBuilder - filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - If CveUsuario > 0 Then - filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - End If - If Tipo <> "" Then - filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - End If - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - GlobalDTOCEstatusUsuarios = Dv.ToTable - Dv.Dispose() - - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set + End Property + + Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable + Get + + Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) + 'sino existe, recarga los datos + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + + Dim ObjOC As New ClsOC + If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then + HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados + Else + HttpContext.Current.Application(AppNombre) = Nothing + End If + + ObjOC.Dispose() + + End If + + Dim filtro As New StringBuilder + filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) + If CveUsuario > 0 Then + filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) + End If + If Tipo <> "" Then + filtro.AppendFormat(" AND Tipo='{0}'", Tipo) + End If + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) + GlobalDTOCEstatusUsuarios = Dv.ToTable + Dv.Dispose() + + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set End Property 'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable @@ -327,42 +327,42 @@ Public Class WSApp Application("GlobalDTCompProveedores") = value End Set End Property - Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa) - If CveEmpresa <> -1 Then - 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then - Dim ObjPS As New ClsProductosServicios - If ObjPS.GetPSSimplificado(CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados.AsEnumerable() - ObjPS.Dispose() - - End If - - - Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)) - - Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) - If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion)) - If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo)) - If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus)) - If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta)) - If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS)) - - Try - GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable - Catch ex As Exception - GlobalDTPSSimplificado = New DataTable - End Try - - Else - GlobalDTPSSimplificado = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End If - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa) - Application(AppNombre) = value - End Set + Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa) + If CveEmpresa <> -1 Then + 'sino existe, recarga los datos + If Application(AppNombre) Is Nothing Then + Dim ObjPS As New ClsProductosServicios + If ObjPS.GetPSSimplificado(CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados.AsEnumerable() + ObjPS.Dispose() + + End If + + + Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)) + + Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) + If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion)) + If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo)) + If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus)) + If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta)) + If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS)) + + Try + GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable + Catch ex As Exception + GlobalDTPSSimplificado = New DataTable + End Try + + Else + GlobalDTPSSimplificado = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable + End If + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa) + Application(AppNombre) = value + End Set End Property Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable Get @@ -471,34 +471,34 @@ Public Class WSApp Set(value As DataTable) Application("GlobalDTMotivosHorasExtras") = value End Set - End Property - - - Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then - Dim ObjUnidadesMedida As New ClsUnidadesMedida() - If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados - ObjUnidadesMedida.Dispose() - End If - - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) - GlobalDTUnidadesMedida = Dv.ToTable - Dv.Dispose() - Else - GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable) - End If - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) - Application(AppNombre) = value - End Set - End Property + End Property + + + Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then + Dim ObjUnidadesMedida As New ClsUnidadesMedida() + If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados + ObjUnidadesMedida.Dispose() + End If + + If CveEmpresa <> -1 Then + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) + GlobalDTUnidadesMedida = Dv.ToTable + Dv.Dispose() + Else + GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable) + End If + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) + Application(AppNombre) = value + End Set + End Property #End Region - + Public Property CveEmpresa As Integer = 143 Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario) @@ -519,7 +519,7 @@ Public Class WSApp Else End If ObjEmpresa.Dispose() - End Sub + End Sub #Region "M E T O D O S - S E R V I C I O" Public Function ValidaUsuario(CveUsuario As Integer) As Usuario Dim UsuarioActual As Usuario = Nothing @@ -535,7 +535,6 @@ Public Class WSApp ObjUsuarios.Dispose() Return UsuarioActual End Function - Public Function Login(Usuario As String, Contrasenia As String) As String Dim retorno As String = "" @@ -563,17 +562,17 @@ Public Class WSApp If ObjClientes.DtResultados.Rows.Count > 0 Then Salida.Cliente = ObjClientes.Nombre Salida.CvePrecioLista = ObjClientes.CvePrecioLista - Salida.CveEstatusCliente = If(ObjClientes.Estatus, 1, 0) + Salida.CveEstatusCliente = If(ObjClientes.Estatus, 1, 0) If ObjClientes.CveSubProyecto > 0 Then Salida.CveSubProyecto = ObjClientes.CveSubProyecto - End If + End If retorno = JsonConvert.SerializeObject(Salida) - End If - Else + End If + Else retorno = "{}" - End If - - + End If + + Else retorno = "{}" End If @@ -613,9 +612,6 @@ Public Class WSApp Salida.Cliente = ObjClientes.Nombre Salida.CvePrecioLista = ObjClientes.CvePrecioLista Salida.CveEstatusCliente = If(ObjClientes.Estatus, 1, 0) - If ObjClientes.CveSubProyecto > 0 Then - Salida.CveSubProyecto = ObjClientes.CveSubProyecto - End If End If End If @@ -661,15 +657,13 @@ Public Class WSApp Return If(TieneError, "{}", retorno.ToString()) End Function - Public Function GetListaPedidos(CveCliente As Integer, CveUsuario As Integer) As String + Public Function GetListaPedidos(CveCliente As Integer, CveUsuario As Integer,FechaI As String, FechaF As String) As String Dim retorno = "[]" Dim Serie As String = "-1" Dim Folio As Integer = -1 Dim Codigo As String = "-1" Dim Cliente As String = "-1" - Dim FechaI As String = "-1" - Dim FechaF As String = "-1" Dim FolioFiscal As String = "-1" Dim PeidoContrato As String = "-1" Dim OrdenCompra As String = "-1" @@ -731,40 +725,40 @@ Public Class WSApp End If If ListaPS IsNot Nothing Then Dim Continuar As Boolean = False - Dim ObjPS As New ClsProductosServicios - Try - For Each PS In ListaPS - Dim CveTipoPS As Integer = GlobalDTPSSimplificado(CveEmpresa, CvePS:=PS.CvePS).FiltroPrimeroValor("CveTipoPS").ToEntero() - If CveTipoPS > 0 Then - If CveTipoPS = 2 Then - If ObjPS.GetPSExistencias(PS.CvePS, -1, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then - If ObjPS.DtResultados.Rows.Count > 0 Then - Dim Existencia As Decimal = ObjPS.DtResultados.Rows(0)("Existencia").ToString().ToDecimal() - 'Dim CveTipoPS As Integer = ObjPS.DtResultados.Rows(0)("CveTipoPS").ToString().ToEntero() - - Continuar = Existencia > 0 - - If Not Continuar Then - Retorno.Mensajes.Add($"El producto/servicio {ObjPS.DtResultados.Rows(0)("PS")} no tiene existencia.") - Exit For - End If - Else - Continuar = False - Retorno.Mensajes.Add("No se pudo comprobar la existencia.") - Exit For - End If - End If - ElseIf CveTipoPS = 1 Then - Continuar = True - End If - Else - Continuar = False - Retorno.Mensajes.Add("No se pudo comprobar si es producto o servicio.") - End If - Next - Catch ex As Exception - OnError("Ocurrió un error al consultar la existencia", ex) - Continuar = False + Dim ObjPS As New ClsProductosServicios + Try + For Each PS In ListaPS + Dim CveTipoPS As Integer = GlobalDTPSSimplificado(CveEmpresa, CvePS:=PS.CvePS).FiltroPrimeroValor("CveTipoPS").ToEntero() + If CveTipoPS > 0 Then + If CveTipoPS = 2 Then + If ObjPS.GetPSExistencias(PS.CvePS, -1, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then + If ObjPS.DtResultados.Rows.Count > 0 Then + Dim Existencia As Decimal = ObjPS.DtResultados.Rows(0)("Existencia").ToString().ToDecimal() + 'Dim CveTipoPS As Integer = ObjPS.DtResultados.Rows(0)("CveTipoPS").ToString().ToEntero() + + Continuar = Existencia > 0 + + If Not Continuar Then + Retorno.Mensajes.Add($"El producto/servicio {ObjPS.DtResultados.Rows(0)("PS")} no tiene existencia.") + Exit For + End If + Else + Continuar = False + Retorno.Mensajes.Add("No se pudo comprobar la existencia.") + Exit For + End If + End If + ElseIf CveTipoPS = 1 Then + Continuar = True + End If + Else + Continuar = False + Retorno.Mensajes.Add("No se pudo comprobar si es producto o servicio.") + End If + Next + Catch ex As Exception + OnError("Ocurrió un error al consultar la existencia", ex) + Continuar = False End Try ObjPS.Dispose() @@ -780,15 +774,15 @@ Public Class WSApp Dim Correo As String = If(CveSubProyecto.Contiene(11714, 11761), "mezclas.pescadito@gmail.com", "pedidosaguas@gmail.com") 'Dim Correo As String = "japmx95@gmail.com" Dim SerieFolio As String = Factura.SerieFolio - Dim DireccionEnvio As String = "" - Using ObjClientes As New ClsClientes - If ObjClientes.DireccionEnvioGet(-1, CveCliente, -1) Then - If ObjClientes.DtResultados.Rows.Count > 0 Then - DireccionEnvio = ObjClientes.DtResultados.FiltroPrimeroValor("DireccionEnvioContacto") - End If - End If - End Using - Factura.Dispose() + Dim DireccionEnvio As String = "" + Using ObjClientes As New ClsClientes + If ObjClientes.DireccionEnvioGet(-1, CveCliente, -1) Then + If ObjClientes.DtResultados.Rows.Count > 0 Then + DireccionEnvio = ObjClientes.DtResultados.FiltroPrimeroValor("DireccionEnvioContacto") + End If + End If + End Using + Factura.Dispose() EnviarCorreo(Correo, Factura, Retorno, DireccionEnvio, UsuarioActual) Else Factura.Dispose() @@ -807,7 +801,7 @@ Public Class WSApp End Try Return JsonConvert.SerializeObject(Retorno) - End Function + End Function Private Sub EnviarCorreo(Correo As String, Factura As Modelos.Factura, Retorno As Modelos.Factura.MMensajeFactura, DireccionEnvio As String, UsuarioActual As Usuario) Try Dim Hilo As New System.Threading.Thread(Sub() EnviarCorreoFactura(Correo, Factura, Retorno, DireccionEnvio, UsuarioActual)) @@ -815,17 +809,17 @@ Public Class WSApp Catch ex As Exception OnError("Ocurrió error al mandar el correo de facturación", ex) End Try - End Sub - Private Sub EnviarCorreoFactura(Correo As String, Factura As Modelos.Factura, Retorno As Modelos.Factura.MMensajeFactura, DireccionEnvio As String, UsuarioActual As Usuario) - Dim Body = GeneraCorreoRemision(Retorno.CveVenta, Retorno.SerieFolio, Factura.Cliente.Nombre, Factura.Cliente.NombreComercial, DireccionEnvio, Factura.Observaciones, DateTime.Now) - Factura.Dispose() - Try - Dim Asunto As String = String.Format("SIG - Se ha realizado un pedido: {0}", Retorno.SerieFolio) - Dim Mail As New ClsSisMail() - Mail.SendMail(UsuarioActual.Empresa, Correo, Asunto, Body) - Catch ex As Exception - OnError("Ocurrió error al mandar MAIL por cambio de Estatus", ex) - End Try + End Sub + Private Sub EnviarCorreoFactura(Correo As String, Factura As Modelos.Factura, Retorno As Modelos.Factura.MMensajeFactura, DireccionEnvio As String, UsuarioActual As Usuario) + Dim Body = GeneraCorreoRemision(Retorno.CveVenta, Retorno.SerieFolio, Factura.Cliente.Nombre, Factura.Cliente.NombreComercial, DireccionEnvio, Factura.Observaciones, DateTime.Now) + Factura.Dispose() + Try + Dim Asunto As String = String.Format("SIG - Se ha realizado un pedido: {0}", Retorno.SerieFolio) + Dim Mail As New ClsSisMail() + Mail.SendMail(UsuarioActual.Empresa, Correo, Asunto, Body) + Catch ex As Exception + OnError("Ocurrió error al mandar MAIL por cambio de Estatus", ex) + End Try End Sub Public Function CancelarDocumento(CveVenta As Integer, CveUsuario As Integer) As String @@ -891,9 +885,9 @@ Public Class WSApp Retorno.Mensajes.Add("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.") End If ObjInv.Dispose() - End Sub + End Sub #End Region - + #Region "P E D I D O S" Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre Dim Timbre As New CFDITimbre @@ -1007,9 +1001,9 @@ Public Class WSApp i += 1 Next Return Timbre - End Function + End Function #End Region - + #Region "R E M I S I O N E S" Private Function CreaFactura(ByRef Retorno As Modelos.Factura.MMensajeFactura, CveCliente As Integer, CveAlmacen As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, Observaciones As String, ListaPS As List(Of MVentaProductos)) As Modelos.Factura If CveSubProyecto <= 0 Then @@ -1417,8 +1411,8 @@ Public Class WSApp Row("Total") = (PS.Cantidad.Value * PS.Precio) Row("TotalImporte") = Math.Round(PS.Cantidad.Value * PS.Precio, 2) - - Row("SATClaveProdServ") = DrPS("SATClavePS") + + Row("SATClaveProdServ") = DrPS("SATClavePS") Row("SATClaveUM") = DrPS("SATClaveUnidadMedida") Row("EntregaDirecta") = EntregaDirecta @@ -1536,10 +1530,10 @@ Public Class WSApp End Try ObjVentas.Dispose() Return strBody.ToString - End Function + End Function #End Region - - + + End Class Namespace WebServiceAppModels2 diff --git a/vwd.webinfo b/vwd.webinfo index bd3dbe60c..404a6a72c 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -546,6 +546,10 @@ + + + +