--merge WSApp.asmx

This commit is contained in:
2022-09-07 21:01:36 -07:00
51 changed files with 10297 additions and 840 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 () {

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -20,7 +20,7 @@
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />&nbsp;--%>
</li>
<li>
<asp:LinkButton ID="LnkCerrar" runat="server"><i class="fa fa-print"></i> Cerrar Ejercicio</asp:LinkButton>
<asp:LinkButton ID="LnkCerrar" runat="server" visible="false"><i class="fa-solid fa-shield" ></i> Cerrar Ejercicio</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
@@ -603,8 +603,8 @@
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
<div class="col-md-2" style="width: 125px;">
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100px">
<div class="col-md-5">
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100%">
</asp:DropDownList>
</div>
</div>

View File

@@ -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

View File

@@ -2808,8 +2808,8 @@
</div>
<div class="form-group form-md-line-input input-iconright">
<ADS:Dropdownlost runat="server" ID="DdlProductows" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
<label for="<%= DdlProductows.ClientID.ToString()%>">Producto:</label>
<ADS:Dropdownlost runat="server" ID="DdlProductows" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -172,6 +172,10 @@
<DataField>SATClaveUM</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CodigoObjetoImpuesto">
<DataField>CodigoObjetoImpuesto</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DsOC</rd:DataSetName>
@@ -1411,16 +1415,19 @@
<Width>2.0584cm</Width>
</TablixColumn>
<TablixColumn>
<Width>4.44265cm</Width>
<Width>3.47821cm</Width>
</TablixColumn>
<TablixColumn>
<Width>6.28682cm</Width>
<Width>4.82589cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.6882cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.43574cm</Width>
<Width>2.33651cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
@@ -1605,6 +1612,42 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox22">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Obj. Imp.</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName>
<Style>
<Border>
<Color>#c4d79b</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#c4d79b</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox84">
@@ -1847,6 +1890,44 @@
</CellContents>
</TablixCell>
<TablixCell />
<TablixCell>
<CellContents>
<Textbox Name="CodigoObjetoImpuesto">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!CodigoObjetoImpuesto.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>CodigoObjetoImpuesto</rd:DefaultName>
<Style>
<Border>
<Color>#c4d79b</Color>
<Style>Solid</Style>
</Border>
<TopBorder>
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Style>None</Style>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="PU1">
@@ -2049,7 +2130,7 @@
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>4.44265cm</Width>
<Width>3.47821cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
@@ -2195,7 +2276,7 @@
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>6.28682cm</Width>
<Width>4.82589cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
@@ -2337,6 +2418,44 @@
</Tablix>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox29">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<Color>#c4d79b</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox29</rd:DefaultName>
<Style>
<Border>
<Color>#c4d79b</Color>
<Style>Solid</Style>
</Border>
<TopBorder>
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Style>None</Style>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox15">
@@ -2598,6 +2717,42 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox30">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox30</rd:DefaultName>
<Style>
<Border>
<Color>#c4d79b</Color>
<Style>None</Style>
</Border>
<BottomBorder>
<Style>Solid</Style>
</BottomBorder>
<RightBorder>
<Style>Solid</Style>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox41">
@@ -2683,6 +2838,7 @@
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
@@ -2708,7 +2864,7 @@
<Top>4.14415cm</Top>
<Left>0.11516cm</Left>
<Height>2.29418cm</Height>
<Width>19.97108cm</Width>
<Width>19.94648cm</Width>
<ZIndex>11</ZIndex>
<Style>
<Border>
@@ -4235,7 +4391,11 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Version 3.3</Value>
<Value>Version </Value>
<Style />
</TextRun>
<TextRun>
<Value>=Parameters!CFDIVersion.Value</Value>
<Style />
</TextRun>
</TextRuns>
@@ -4246,7 +4406,7 @@
<Top>19.66102cm</Top>
<Left>0.07003cm</Left>
<Height>1.01627cm</Height>
<Width>5.45089cm</Width>
<Width>9.87342cm</Width>
<ZIndex>14</ZIndex>
<Style>
<Border>
@@ -4862,7 +5022,7 @@
<Height>23.58967cm</Height>
<Style />
</Body>
<Width>20.16633cm</Width>
<Width>20.16087cm</Width>
<Page>
<PageFooter>
<Height>0.74111cm</Height>
@@ -5514,6 +5674,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="RegimenFiscalCodigo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo2">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -518,7 +518,7 @@
<%--GV DATOS--%>
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
<HeaderStyle Height="30px" />
<Columns>
<asp:TemplateField>

View File

@@ -938,7 +938,6 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCTextBox("TbCantidadF").Text = "0"
End If
If TipoDocto = "DPe" Then
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
PSSerie = e.Row.DBCampo("PS").ToString()
@@ -976,15 +975,7 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
If DdlAlmacen.SelectedValue.ToEntero() > 0 Then
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero(), e.Row.DBCampo("CvePS").ToEntero(), UsuarioActual.CveEmpresa, True)
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), e.Row.DBCampo("CvePS").ToEntero())
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
'If dtt.Rows.Count > 1 Then
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
'End If
'dtt.Dispose()
End If
Else
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
End If
@@ -1027,19 +1018,27 @@ Partial Class Inventarios_EntregaAlmacen
'FUNCIONALIDAD PISTOLA DE CODIGOS
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
e.Row.FCTextBox("TbCantidadF").Text = "0"
If e.Row.DBCampo("CodigoBarras").Trim <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
'NO BLOQUEA PARA ROL AD
If UsuarioActual.CveRol = 1 Then
If AplicaSerie Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
e.Row.FCTextBox("TbCantidadF").Text = "0"
Else
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######")
End If
End If
If Not UsuarioActual.CveRol = 1 Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'acumuladoras
If e.Row.DBCampo("CveCategoria") <> "249" Then
e.Row.FCTextBox("TbCantidadF").Enabled = True
End If
Else
If Not UsuarioActual.CveRol = 1 Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
e.Row.FCTextBox("TbCantidadF").Text = "0"
End If
End If
End If
@@ -1048,7 +1047,6 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCCheckBox("cbInv").Enabled = False
End If
End If
End Sub

View File

@@ -553,12 +553,12 @@ Partial Class Inventarios_RecepcionAlmacen
BtnGuardar.Visible = False
TxtFecha.Text = Now.ToShortDateString
RVFecha.MaximumValue = MaxFecha.ToShortDateString
If UsuarioActual.CveEmpresa.Contiene(119) Then RVFecha.MinimumValue = Now.ToShortDateString : CEFecha.StartDate = Now Else RVFecha.MinimumValue = MinFecha.ToShortDateString
InicializaBitacoraTemporal()
DdlMonedaTC.Enabled = False
RVFecha.MaximumValue = Now.ToShortDateString
CEFecha.EndDate = Now
End Sub
''' <summary>
@@ -1537,14 +1537,14 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
e.Row.FCTextBox("TxtCaducidad").Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
e.Row.FCTextBox("TxtDividir").Visible = True
Else
e.Row.FCTextBox("TxtCaducidad").Visible = False
e.Row.FCLinkButton("LnkCaducidad").Visible = False
End If
e.Row.FCTextBox("TxtCaducidad").Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
e.Row.FCTextBox("TxtDividir").Visible = True
Else
e.Row.FCTextBox("TxtCaducidad").Visible = False
e.Row.FCLinkButton("LnkCaducidad").Visible = False
End If
If CBool(e.Row.DBCampo("AplicaLote")) Then
e.Row.FCTextBox("TxtLote").Visible = True
@@ -2315,7 +2315,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If
End If
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"))
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:= (TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm"))
If Existencia < ExistenciaActual Then
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
Continue For
@@ -3242,6 +3242,12 @@ Partial Class Inventarios_RecepcionAlmacen
End If
Else
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveTipoAlmacen").ToEntero()
If CveTipoAlmacen = 21 Then 'tipo: devs a proveedore
RealizarMovimientoVirtual = False
End If
If RealizarMovimientoVirtual Then
Dim DtPSVirtual As New DataTable("DtTamanios")

View File

@@ -365,7 +365,7 @@ Partial Class Inventarios_TraspasoAlmacen
Private Sub CargaMovimientoGarantia(CveFolioGarantia As Integer)
Using ObjAcum As New ClsAcumuladores
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia, CveEstatusConsecutivo:=1) Then
''carga
Dim dra As DataRow = ObjAcum.DtResultados(0)
DivMov.Visible = True
@@ -572,7 +572,7 @@ Partial Class Inventarios_TraspasoAlmacen
If TxtnSerie.Visible Then
Cantidad = 1
If String.IsNullOrEmpty(TxtnSerie.Text.Trim()) OrElse String.IsNullOrWhiteSpace(TxtnSerie.Text.Trim()) Then
Alert("Serie es necesario", TipoMensaje.MsgAdvertencia)
Alert("Serie es necesario.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
Exit Sub
End If
@@ -641,7 +641,7 @@ Partial Class Inventarios_TraspasoAlmacen
tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1")
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1")
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1").Trim
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, tSerie, tLote, tCaducidad)
@@ -738,7 +738,7 @@ Partial Class Inventarios_TraspasoAlmacen
registro.Item("CvePS") = CvePS
registro.Item("PS") = DrPS("PSCodigo")
registro.Item("Observaciones") = Observaciones
registro.Item("Serie") = Serie
registro.Item("Serie") = Serie.Trim
registro.Item("Lote") = Lote
If FechaCaducidad > MinFecha Then registro.Item("FechaCaducidad") = FechaCaducidad
registro.Item("CveClasificacion") = CveClasificacion
@@ -1486,7 +1486,7 @@ Partial Class Inventarios_TraspasoAlmacen
Private Sub CargaGvDatos()
EscondeColumnasGVM(DtMovimientos)
GvDatos.DataSource = DtMovimientos
GvDatos.DataSource = DtMovimientos.FiltraParametros("", "No desc")
GvDatos.DataBind()
UpDatos.Update()
End Sub
@@ -1798,13 +1798,6 @@ Partial Class Inventarios_TraspasoAlmacen
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenRecepcion.SelectedValue.ToEntero > 0 Then
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
'If dtt.Rows.Count > 1 Then
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
'End If
'dtt.Dispose()
End If
@@ -1821,9 +1814,12 @@ Partial Class Inventarios_TraspasoAlmacen
'FUNCIONALIDAD PISTOLA DE CODIGOS
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
e.Row.FCTextBox("TxtCantidad").Enabled = False
If e.Row.DBCampo("CveCategoria") <> "249" Then
e.Row.FCTextBox("TxtCantidad").Enabled = True
End If
End If
End If
End If
End Sub
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
@@ -2364,9 +2360,9 @@ Partial Class Inventarios_TraspasoAlmacen
TdSeriePS.Visible = False
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'")
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text.Trim}'")
If DrPS Is Nothing Then
Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
Alert($"No se ha encontrado un producto del Código: ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
TxtCodigoPS.Text = ""
Exit Sub
@@ -2392,7 +2388,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, -1, TxtSeriePS.Text.Trim, "-1", MinFecha)
If Valido Then
AgregarPS(1, CvePSSerie, CveUMSerie, Serie:=TxtSeriePS.Text.Trim)
AgregarPS(1, CvePSSerie, CveUMSerie, Serie:=TxtSeriePS.Text.Trim.ToUpper)
Else
TxtSeriePS.Text = ""
TxtSeriePS.Focus()
@@ -2444,7 +2440,7 @@ Partial Class Inventarios_TraspasoAlmacen
If Existe Then
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{PSTemp}</b>"" con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Else
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Alert($"No se ha encontrado un producto para surtir con el Código: ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
End If
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
@@ -2458,7 +2454,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If
For Each Gvr As GridViewRow In GvDatosRecepcion.Rows
If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("Serie") = TxtSeriePSRecepcion.Text.Trim Then
If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("Serie") = TxtSeriePSRecepcion.Text.Trim.ToUpper Then
Dim TxtCantidad = GvDatosRecepcion.Rows(Gvr.RowIndex).FCTextBox("TxtCantidad")
If Gvr.DataKey("Cantidad").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
@@ -2470,15 +2466,15 @@ Partial Class Inventarios_TraspasoAlmacen
Exit Sub
End If
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Código ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
End If
Next
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". Serie:{TxtSeriePSRecepcion.Text.Trim} ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
'Alert($"Ya se han cargado todos los productos o no se ha encontrado un producto de la Serie ""<b>{TxtSeriePSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus2,200);")
TxtSeriePSRecepcion.Text = ""
End Sub
#End Region

View File

@@ -2263,11 +2263,11 @@
<div id="ModalViewCorreo" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog " runat="server" ID="UpviewCorreos" UpdateMode="Conditional">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpviewCorreos" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">Registrode Correos</h4>
<h4 class="modal-title">Registro de correos</h4>
</div>
<div class="modal-body">
@@ -2284,14 +2284,9 @@
<asp:Label runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Periodo" Visible="false" ItemStyle-CssClass="text-left">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("PeriodoTexto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha" ItemStyle-CssClass="text-left">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("Fecha")%>'> </asp:Label>
<asp:Label runat="server" Text='<%# Eval("Fecha","{0:dd/MM/yyyy HH:MM}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Se envio a" ItemStyle-CssClass="text-left">

View File

@@ -1427,7 +1427,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
UsuarioActual = this.UsuarioActual;
}*/
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual);
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual,(UsuarioActual.CveUsuario==100?3:4));
if (Msg != null && Msg.Length > 0)
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
else
@@ -7350,6 +7350,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
TxtSRINCfolio.Text = "";
TxtSRINCfechaInicio.Text = "";
TxtSRINCdiasAutorizados.Text = "";
TxtDiasPagoEmpresa.Text = UsuarioActual.CveEmpresa ==141?"3":"";
DdlSRINCcveTipodeIncidencia.SelectedValue = "-1";
DdlSRINCcveRamoSeguro.SelectedValue = "-1";
DdlSRINCcveTipoRiesgo.SelectedValue = "-1";

View File

@@ -255,7 +255,7 @@
<%--linea 5--%>
<div class="row" style="padding-bottom: 0.6em;">
<b>
<asp:Label runat="server" ID="LblFechaEstimada" Text="Fecha Estimada:" class="col-md-2" /></b>
<asp:Label runat="server" ID="LblFechaEstimada" Text="F. Estimada:" class="col-md-2" /></b>
<div class="col-md-4" id="DivFechaEstimada" runat="server">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
<asp:TextBox ID="TxtFechaEstimadaEntrega" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -284,25 +284,19 @@
</div>
</div>
<%--linea 6--%>
<asp:UpdatePanel ID="UPProv" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UPProv" runat="server" UpdateMode="Conditional" RenderMode="Inline" style="class=Row">
<ContentTemplate>
<div id="PnlProveedor" runat="server" style="padding-bottom: 0.6em;">
<div class="row">
<label class="col-md-2">Proveedor:</label>
<div class="col-md-9">
<%--<asp:DropDownList ID="DdlProveedores" CssClass="select2me" AutoPostBack="True" Style="width: 100%;" runat="server" DataTextField="NombreCortoProveedor" DataValueField="CveProveedor">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
<ADS:Dropdownlost runat="server" ID="DdlProveedores" CssStyle="width: 100%;" CssClassDdl="select2me " DataTextField="NombreCortoProveedor" DataValueField="CveProveedor" />
<%--<asp:RangeValidator ID="RVProveedores" CssClass="form-control" runat="server" ControlToValidate="DdlProveedores" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOProveedores" runat="server" HighlightCssClass="vco" TargetControlID="RVProveedores" Width="300px"></ajax:ValidatorCalloutExtender>--%>
<asp:ImageButton ID="ImgCambiaProv" Visible="false" ImageUrl="/Imagenes/accept.png" runat="server" />
<ADS:Dropdownlost runat="server" ID="DdlProveedores" CssStyle="width: 100%;" CssClassDdl="select2me " DataTextField="NombreCortoProveedor" DataValueField="CveProveedor" />
</div>
<div class="col-md-1" style="padding-left: 0px;">
<asp:LinkButton runat="server" Visible="false" ID="ImgCambiaProv" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar proveedor?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Proveedor" />
<asp:Label ID="LblLeyendaProveedorIVA" runat="server" Width="100%" Text="" Font-Italic="True"></asp:Label>
</div>
</div>
</div>
@@ -326,10 +320,7 @@
</ContentTemplate>
</asp:UpdatePanel>
<div class="row">
<label class="col-md-2"><b>IVA A Facturar:</b> </label>
<div class="col-md-2">
<asp:UpdatePanel ID="UpDdlIVA" runat="server" UpdateMode="Conditional">
@@ -438,16 +429,11 @@
</tr>
<tr id="TrUsuarioAsignado" runat="server" visible="False">
<td colspan="2">
<asp:Label ID="LblUsuarioAsignado" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td></td>
<td>
<asp:HiddenField ID="hdnCveSuperior" runat="server" Value="-1" />
<asp:Label ID="LblUsuarioAsignado" runat="server" Text=""></asp:Label>
<asp:HiddenField ID="hdnCveSuperior" runat="server" Value="-1" />
</td>
</tr>
<tr>
</tr>
<tr id="trCfdi" style="display:none;" >
<td>
<div class="caption font-green">
<i class="icon-pin font-green"></i>

View File

@@ -2218,9 +2218,18 @@ Partial Class OC_OC
End If
End If
'Si es Proveedor Extranjero el IVA es 0%
If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then
IvaPS = 0
If DdlProveedores.SelectedValue.ToEntero > 0 Then
'Si es Proveedor Extranjero el IVA es 0%
Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
If drProv IsNot Nothing Then
If drProv("RFC").ToString = "XEXX010101000" Then
IvaPS = 0
End If
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
RetISR = 0.0125
End If
End If
End If
AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS,
@@ -4026,7 +4035,19 @@ Partial Class OC_OC
' IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
End If
If DdlProveedores.SelectedValue.ToEntero > 0 Then
'Si es Proveedor Extranjero el IVA es 0%
Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
If drProv IsNot Nothing Then
If drProv("RFC").ToString = "XEXX010101000" Then
IvaPS = 0
End If
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
RetISR = 0.0125
End If
End If
End If
CveSubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero
SubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedItem.Text
@@ -4038,8 +4059,6 @@ Partial Class OC_OC
Cuadro = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedItem.Text
End If
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
CveProyecto = -1
Proyecto = "Seleccione"
@@ -4082,9 +4101,6 @@ Partial Class OC_OC
End If
End If
'Agarra el nuevo AF si se modifico o deja el pasado
CveActivoFijo = If(gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero > 0, gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero, HdnEditCveActivoFijo.Value.ToEntero)
Codigo = If(gvr.FCHiddenField("HdnCodigoAF").Value <> "-1", gvr.FCHiddenField("HdnCodigoAF").Value, HdnEditCodigo.Value)
@@ -6959,7 +6975,7 @@ Partial Class OC_OC
#End Region
#Region " ACTUALIZA OC "
Protected Sub ImgCambiaProv_Click(sender As Object, e As ImageClickEventArgs) Handles ImgCambiaProv.Click
Private Sub ImgCambiaProv_Click(sender As Object, e As EventArgs) Handles ImgCambiaProv.Click
Dim OC As New ClsOC
If OC.UpdateProveedorOrdenCompra(DdlProveedores.SelectedValue.ToEntero, CveOrdenCompra, UsuarioActual.CveUsuario, CveEmpresaActual) Then
CargaHistorial()

View File

@@ -175,7 +175,7 @@
</div>
</div>
<div class="portlet-body">
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto"
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio"
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="">

View File

@@ -191,6 +191,9 @@ Partial Class OS_Asignaciones
Dim time As DateTime
Dim contadorOrdenesAsignadas As Integer = 0
ObjOS.IniciaTransacSQL()
For Each row As GridViewRow In GvNA.Rows
If row.RowType = DataControlRowType.DataRow Then
@@ -215,20 +218,45 @@ Partial Class OS_Asignaciones
If Not TieneError Then
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveEstatusOS.ToEntero, UsuarioActual.CveUsuario, row.DataKey("CveOS").ToEntero) Then
TieneError = True
End If
If Not TieneError Then
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1"
Dim Fecha As DateTime = time
Dim OIDescripcion As String = $"{DdlTecnico.SelectedItem.Text} <b><a href='/OS/OrdenesServicios.aspx?CveOS={row.DataKey("CveOS")}' target='_blank' class='Texto' >Orden de servicio {row.DataKey("Folio")} </a></b>"
Dim ObjEventos As New ClsOIEventos(ObjOS.IniciaTransacSQL())
If Not ObjEventos.AddEventoAgenda(2, DdlTecnico.SelectedItem.Text, OIDescripcion, 2, time, time.AddHours(1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=2,
Importe:=0, CveOS:=row.DataKey("CveOS").ToEntero, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero) Then
TieneError = True
End If
End If
End If
End If
End If
Next
If contadorOrdenesAsignadas > 0 Then
If Not TieneError Then
ObjOS.Commit()
Alert("Se asignaron las ordenes de servicio correctamente", TipoMensaje.MsgInformacion)
CargaOrdenesServiciosAsignadasXPersona()
CargaOrdenesServiciosNoAsignadas()
End If
Else
ObjOS.RollBack()
Alert("No se han seleccionado ordenes de servicio para asignar", TipoMensaje.MsgAdvertencia)
End If

View File

@@ -129,10 +129,10 @@
<asp:TextBox ID="TxtSolicito" runat="server" CssClass="form-control" Height="25px" />
</div>
<div class="col-md-3">
<div class="col-md-2">
<b>Centro de Costo:</b>
</div>
<div class="col-md-3" style="margin-top: 5px;">
<div class="col-md-3" style="margin-top: 5px;text-align:left">
<asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" AutoPostBack="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" Height="30px">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
@@ -146,10 +146,10 @@
<div class="col-md-4">
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine" CssClass="form-control" />
</div>
<div class="col-md-3">
<div class="col-md-2">
<b>Tipo de Orden:</b>
</div>
<div class="col-md-3" style="margin-top: 5px;">
<div class="col-md-3" style="margin-top: 5px;text-align:left">
<asp:DropDownList ID="DdlTipoOrdenOS" CssClass="form-control input-sm select2me" runat="server" DataTextField="OrdenServicioTipo" DataValueField="CveOrdenServicioTipo" Width="100%" Height="30px">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoOS" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoOrdenOS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
@@ -272,7 +272,9 @@
<th>#</th>
<th>Cant</th>
<th>Servicio</th>
<th>Cuenta y/o Equipo<br />
<th id="thCuentaEquipo" runat="server">
<asp:Label runat="server" ID="LblCuentaEquipoTH"> Cuenta y/o Equipo</asp:Label><br />
<asp:DropDownList ID="DdlCuentaEquipo" runat="server" AutoPostBack="true" DataTextField="CuentaEquipo" DataValueField="CveCuentaEquipo" CssClass="form-control input-sm select2me" Width="15%">
</asp:DropDownList>
</th>
@@ -283,7 +285,9 @@
</tr>
</table>
</asp:Panel>
<asp:GridView ID="GvPS" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,CveOSDetalle,ComentarioTecnico,Estatus,Cantidad,Observaciones,EspecificacionesMostrar,CuentaEquipoMostrar,CveCuentaEquipo,Consecutivo,CveUsuarioAtendio,SeFacturara,SeSuperviso,CveUsuarioRecibio" EmptyDataText="Sin Productos o Servicios agregados" ToolTip="Listado de Productos o Servicios a Facturar" CssClass="table mygvps table-striped table-hover Widthall mysmallbtn" GridLines="None">
<asp:GridView ID="GvPS" runat="server" AutoGenerateColumns="False"
DataKeyNames="CvePS,CveOSDetalle,ComentarioTecnico,Estatus,Cantidad,Observaciones,EspecificacionesMostrar,CuentaEquipoMostrar,CveCuentaEquipo,Consecutivo,CveUsuarioAtendio,SeFacturara,SeSuperviso,CveUsuarioRecibio"
EmptyDataText="Sin Productos o Servicios agregados" ToolTip="Listado de Productos o Servicios a Facturar" CssClass="table mygvps table-striped table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>

View File

@@ -359,6 +359,14 @@ Partial Class OS_OrdenesServicios
hdnEsThickbox.Value = "S"
hdnClientIDLink.Value = "NoDefinido"
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
LblCuentaEquipoTH.Visible = False
DdlCuentaEquipo.Visible = False
End If
End If
End Sub
@@ -1080,6 +1088,22 @@ Partial Class OS_OrdenesServicios
Next
'If Not Errores Then
' Dim TipoEstatusSeleccionado As Integer = EstatusOSDelUsuario.FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", DdlEstatusOS.SelectedValue), "Orden ASC").ToEntero
' If TipoEstatusSeleccionado = 3 Then
' Dim objEventos As New ClsOIEventos(ObjOrdenServicio.IniciaTransacSQL)
' If Not objEventos.FinalizaEvento(Now, 3, "", -1, CveOS) Then
' Errores = True
' End If
' End If
'End If
If Not Errores Then
ViewState("CveOS") = ObjOrdenServicio.CveOS
ViewState("Folio") = ObjOrdenServicio.Folio
@@ -1098,8 +1122,8 @@ Partial Class OS_OrdenesServicios
LimpiaDatos()
Else
ObjOrdenServicio.RollBack()
End If
Else
If CveTecnico = UsuarioActual.CveUsuario Then
If ObjOrdenServicio.UpdateOrdenesServicios(TxtSolicito.Text, TxtFechaRecibido.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, CveOS, UsuarioActual.CveUsuario, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
@@ -1185,6 +1209,24 @@ Partial Class OS_OrdenesServicios
Errores = True
End If
If Not Errores Then
Dim TipoEstatusSeleccionado As Integer = EstatusOSDelUsuario.FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", DdlEstatusOS.SelectedValue), "Orden ASC").ToEntero
If TipoEstatusSeleccionado = 4 Then
Dim objEventos As New ClsOIEventos(ObjOrdenServicio.IniciaTransacSQL)
If Not objEventos.FinalizaEvento(Now, 3, "", -1, CveOS, UsuarioActual.CveUsuario) Then
Errores = True
End If
End If
End If
If Not Errores Then
ObjOrdenServicio.Commit()
@@ -1335,6 +1377,8 @@ Partial Class OS_OrdenesServicios
AddPS(Consecutivo, -1, DdlPSDetalle.SelectedValue.ToEntero, DdlPSDetalle.SelectedItem.Text, TxtCantidad.Text.ToEntero, TxtObservacionesServicioDetalle.Text, HdnEspecificaciones.Value.ToString, LtlPSEspecificaciones.Text, "",
DdlIdentificador.SelectedValue.ToEntero, DdlIdentificador.SelectedItem.Text, "-1", -1, "-1", "-1", "-1", -1, "-1", ChkSeFacturara.Checked, ChkSeSuperviso.Checked, False, If(Filename <> "", Archivo.Name, "-1"), "", UsuarioActual.CveUsuario)
Else
Dim Consecutivo As Integer = TmpDT.Rows.Count - 1
@@ -1425,6 +1469,10 @@ Partial Class OS_OrdenesServicios
DivCuentaDetalle.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DivCuentaDetalle.Visible = False
End If
UpBodyGv.Update()
UpFooterGv.Update()
RegistraScript("showDivGv();")
@@ -1615,6 +1663,13 @@ Partial Class OS_OrdenesServicios
e.Row.FCLinkButton("LtlMateriales").Visible = False
End If
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
e.Row.FCLabel("LtlCuentaEquipoS").Visible = False
End If
End If
End Sub
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting

View File

@@ -0,0 +1,750 @@
<%@ Page Title="Reporte Servicio a Domicilio" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepServicioDomicilio.aspx.vb" Inherits="OS_RepServicioDomicilio" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style type="text/css">
.unoaunoold {
color: #999b9b;
font-size: 11px;
}
.Dia {
background-image: url(/Imagenes/FondoCal.jpg);
background-repeat: repeat-x;
height: 17px;
font-size: 10px;
text-align: right;
}
.Hora {
background-color: #E3EFFF;
height: 30px;
font-size: 10px;
border-right: solid 1px #5D8CC9;
border-bottom: solid 1px #5D8CC9;
}
.Mes {
background-image: url(/Imagenes/Caption.jpg);
height: 27px;
}
.Link {
color: #0000b9;
}
.calendariopanel {
z-index: 999;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
border: 0px;
background-color: transparent;
position: absolute;
}
.calendarioback {
background-color: #000;
z-index: -90;
top: 0px;
opacity: 0.3;
position: fixed;
width: 100%;
height: 100%;
}
.calendariobody {
width: 520px;
display: table;
background-color: #fff;
margin-top: 7%;
margin-left: 28%;
}
.calendariobody label {
font-size: 12px;
}
.tareasinicio tr td:nth-child(1) {
}
.portlet.light > .portlet-title > .caption > .caption-subject {
font-size: 16px;
}
.fix > div {
height: inherit !important;
width: inherit !important;
}
.fix > div > .ajax__html_editor_extender_texteditor {
height: 150px !important;
}
/*#overlay a:hover {
position: fixed;
display: none;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5);
z-index: 2;
cursor: pointer;
}*/
#moopio a {
display: block;
}
#moopio a:hover {
background-color: rgba(0,0,0,0.5);
transform: scale(1.2);
cursor: default;
}
.MultiLineTextBox {
resize: none;
}
.select2-container--open {
z-index: 1000 !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte Servicios a Domicilio
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="portlet light calendar ">
<div class="portlet-title ">
<div class="caption">
<i class="icon-calendar font-green-sharp"></i>
<span class="caption-subject font-green-sharp bold uppercase">Servicios a Domicilio</span>
</div>
</div>
<div class="portlet-body">
<div id="calendar">
</div>
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button Text="" runat="server" ID="BtnActualizaAdd" ClientIDMode="Static" Style="display: none;" OnClick="BtnActualizaAdd_Click" />
<asp:HiddenField runat="server" ID="HdnU" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HdnE" ClientIDMode="Static" />
</ContentTemplate>
</asp:UpdatePanel>
<div id="ModalAgenda" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAgenda" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"><span id="SpanTituloAgenda">Servicios a Domicilio</span></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12" style="text-align: center;">
<asp:Label ID="LblEmpresaCRM" runat="server" Text="" Style="font-size: 16px; display: none; text-align: center;"></asp:Label>
</div>
</div>
<div class="row" style="display:none!important">
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
<asp:DropDownList ID="DdlAgedaTipo" ClientIDMode="Static" Width="100%" Enabled="false" DataTextField="AgendaTipo" DataValueField="CveAgendaTipo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAgendaTipo" InitialValue="-1" runat="server" ControlToValidate="DdlAgedaTipo" CssClass="help-block errorimput" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de agenda''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
<label style="width: 90%;" for="<%=DdlAgedaTipo.ClientID.ToString()%>">Tipo de Asunto:</label>
</div>
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
<asp:DropDownList ID="DdlPrioridad" ClientIDMode="Static" Width="100%" runat="server" CssClass="form-control input-sm select2me" Enabled="false">
<asp:ListItem Selected="True" Text="Baja" Value="1"></asp:ListItem>
<asp:ListItem Text="Media" Value="2"></asp:ListItem>
<asp:ListItem Text="Alta" Value="3"></asp:ListItem>
</asp:DropDownList>
<label for="<%=DdlPrioridad.ClientID.ToString()%>">Prioridad:</label>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAsuntoAgenda" ClientIDMode="Static" MaxLength="100" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAsuntoAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsuntoAgenda" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Asunto''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
<label for="<%= TxtAsuntoAgenda.ClientID.ToString()%>">Asunto:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<div id="DivDescripcionUpdate" style="width: 400px; height: 75px; padding-top: 10px; font-size: 14px; display: none;"></div>
<asp:TextBox ID="TxtDescripcionAgenda" ClientIDMode="Static" MaxLength="5000" runat="server" TextMode="MultiLine" Rows="2" CausesValidation="true" Width="100%" CssClass="form-control MultiLineTextBox"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDescripcionAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcionAgenda" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Descripción''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
<label for="<%= TxtDescripcionAgenda.ClientID.ToString()%>" style="height: 60px;">Descripción:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ClientIDMode="Static" ID="LblSubProyecto" CssClass="form-control"></asp:Label>
<label for="<%= LblSubProyecto.ClientID.ToString()%>" style="height: 60px;"><asp:Label runat="server" ID="LblSubProyectoEtiqueta"></asp:Label>:</label>
</div>
<div class="row">
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;">
<asp:TextBox ID="TxtFechaInicioAgenda" Enabled="false" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm " CausesValidation="true" MaxLength="18"></asp:TextBox>
<label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtFechaInicioAgenda.ClientID.ToString()%>">Fecha de Inicio:</label>
</div>
<asp:RequiredFieldValidator ID="RFVFechaInicioAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtFechaInicioAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>:<br>El campo <b>''Fecha de Inicio''</b> es necesario." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
</div>
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;">
<asp:TextBox ID="TxtFechaFinAgenda" Enabled="false" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm " CausesValidation="true" MaxLength="18"></asp:TextBox>
<label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtFechaFinAgenda.ClientID.ToString()%>">Fecha de Fin:</label>
</div>
<asp:RequiredFieldValidator ID="RFVFechaFinAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtFechaFinAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Fecha de Fin''</b> es necesario." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
</div>
</div>
<div style="display:none">
<asp:CheckBox Text="Recurrencia" ClientIDMode="Static" runat="server" ID="CheckRecurrencia" />
</div>
<asp:UpdatePanel runat="server" ClientIDMode="Static" UpdateMode="Conditional" ID="UpRecurrencia">
<ContentTemplate>
<div style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;">
<hr style="margin-top: 0px; margin-bottom: 15px;" />
<div style="float: left; width: 20%; height: 130px;">
<asp:RadioButtonList runat="server" CssClass="tablenopadding" RepeatDirection="Vertical" ID="RBLRecurrencia" AutoPostBack="true" OnSelectedIndexChanged="RBLRecurrencia_SelectedIndexChanged">
<asp:ListItem Text="1- Hora" Value="1" Selected="True" />
<asp:ListItem Text="2- Diario" Value="2" />
<asp:ListItem Text="3- Semanal" Value="3" />
<asp:ListItem Text="4- Mensual" Value="4" />
<asp:ListItem Text="5- Anual" Value="5" />
</asp:RadioButtonList>
</div>
<div style="float: left; width: 80%; height: 130px;">
<div runat="server" id="DivRecurrencia" visible="true" style="width: 100%; height: 100%;">
<asp:HiddenField runat="server" ID="HdnDiasSemanaAgendar" ClientIDMode="Static" Value="" />
<div class="col-md-12"></div>
<div class="row">
<div class="col-md-2" style="padding-right: 0px; text-align: right;">Cada:</div>
<div class="form-group col-md-1 form-md-line-input input-iconright" style="padding-left: 0px !important; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; margin-top: -6px;">
<div class="input-group input-sm" style="padding-top: 0px;">
<asp:TextBox ID="TxtFrecuencia" ClientIDMode="Static" Text="1" runat="server" Style="padding-top: 0px; padding-bottom: 0px;" Width="20px" CssClass="form-control input-sm" CausesValidation="true" TextMode="Number"></asp:TextBox>
<label style="margin-top: -3px; margin-left: -5px; width: 20px;" for="<%= TxtFechaFinAgenda.ClientID.ToString()%>"></label>
</div>
</div>
<%--<td>
<asp:TextBox runat="server" ClientIDMode="Static" ID="TxtFrecuencia" Text="1" Width="20px" />
</td>--%>
<div class="col-md-2" style="padding-left: 0px;">
<asp:Label Text="Hora(s)" runat="server" ID="LblTextoFrecuencia" />
</div>
</div>
<div class="row" id="TrDiasSemanaAdd" runat="server" style="display: none;">
<div class="col-md-12">
<asp:CheckBoxList runat="server" ID="CheckDiasSemana" ClientIDMode="Static" RepeatColumns="5" RepeatDirection="Horizontal">
<asp:ListItem Text="Lunes" Value="2" />
<asp:ListItem Text="Martes" Value="3" />
<asp:ListItem Text="Miercoles" Value="4" />
<asp:ListItem Text="Jueves" Value="5" />
<asp:ListItem Text="Viernes" Value="6" />
<asp:ListItem Text="Sabado" Value="7" />
<asp:ListItem Text="Domingo" Value="1" />
</asp:CheckBoxList>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;display:none"">
<hr style="margin-top: 0px; margin-bottom: 15px;" />
<div class="col-md-6" style="padding-left: 0px !important;">
<div class="col-md-8" style="padding-left: 0px; padding-right: 0px;">
<asp:RadioButton Text="Terminar despues de:" ID="RBNumeroOcurrencias" ClientIDMode="Static" GroupName="GNFrecuenciaFinAdd" runat="server" />
</div>
<div class="form-group col-md-1 form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: -10px">
<div class="input-group input-sm" style="padding-top: 0px; padding-left: 0px; padding-right: 0px;">
<asp:TextBox runat="server" onclick="FechaFinSet('RBNumeroOcurrencias','TxtFechaFinRecurrencia');" ClientIDMode="Static" CssClass="form-control" TextMode="Number" ID="TxtNumeroOcurrencias" Width="20px" />
<label style="margin-top: 5px; margin-left: -15px; width: 20px;" for="<%= TxtNumeroOcurrencias.ClientID.ToString()%>"></label>
</div>
</div>
<div class="col-md-2" style="margin-top: 5px; padding-left: 5px;">Veces</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-5" style="padding-left: 0px !important;">
<asp:RadioButton Text="Terminar en:" ID="RBFechaFin" ClientIDMode="Static" GroupName="GNFrecuenciaFinAdd" runat="server" Width="85px" />
</div>
<div class="col-md-6" style="padding-left: 0px !important;">
<div class="form-group form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: -10px">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 108px!important; padding-top: 0px;">
<asp:TextBox ID="TxtFechaFinRecurrencia" ClientIDMode="Static" runat="server" CssClass="form-control" Height="28px" Width="80px" Font-Size="13px"></asp:TextBox>
<label style="margin-left: 10px; width: 85%;" for="<%= TxtFechaFinRecurrencia.ClientID.ToString()%>"></label>
<span class="input-group-btn " style="width: 28px">
<asp:LinkButton ID="imgFechaFinRecurrenciaAdd" class="btn default" runat="server" Style="padding-left: 8px; padding-top: 5px;" Height="28px" Width="28px"><i class="fa fa-calendar"></i></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaFinRecurrenciaAdd" runat="server" TargetControlID="TxtFechaFinRecurrencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarioFechaFinRecurrenciaAdd" TargetControlID="TxtFechaFinRecurrencia" PopupButtonID="ImgFechaFinRecurrenciaAdd" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:RequiredFieldValidator ID="RFVFechaFinRecurrenciaAdd" runat="server" ControlToValidate="TxtFechaFinRecurrencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFechaFinRecurrenciaAdd" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFinRecurrenciaAdd" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;display:none">
<hr style="margin-top: 5px; margin-bottom: 10px;" />
<div class="col-md-3" style="padding-left: 0px; padding-right: 0px;">
<asp:CheckBox Text="Gasto Recurrente:" ClientIDMode="Static" runat="server" ID="ChkGastoRecurrente" />
</div>
<div class="form-group col-md-4 form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: 0px">
<div class="input-group input-sm" style="padding-top: 0px; padding-left: 0px; padding-right: 0px;">
<asp:TextBox runat="server" ClientIDMode="Static" CssClass="form-control" ID="TxtImporteGastoRecurrente" Width="100px" onkeyup="FormatoMoneda(this)" />
<label style="margin-top: 5px; margin-left: -15px;" for="<%= TxtImporteGastoRecurrente.ClientID.ToString()%>"></label>
<%--<ajax:MaskedEditExtender ID="MEEgastoRecurrente" runat="server" TargetControlID="TxtImporteGastoRecurrente" Mask="999,999.99" MaskType="Number" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:HiddenField runat="server" ID="HdnCveEvento" ClientIDMode="Static" Value="-1" />
<%--<div style="display:none">
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VGGuardarAgenda" />
<asp:Button ID="BtnEliminar" runat="server" CssClass="btn btn-danger" OnClick="BtnEliminar_Click" Text="Eliminar" Style="display: none" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea continuar?" data-btn-ok-label="si" />
</div>--%>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function FechaFinSet(RB, TXT) {
RB = "#" + RB
TXT = "#" + TXT
$(RB).prop('checked', true);
$(TXT).val('');
}
function AyudaHora(txt) {
Hora = txt;
var opt = $get("HdnHora").value;
if (opt == "1") {
$("#TxtHoraInicioAdd").val(txt);
$("#TxtHoraFinAdd").val(txt);
} else if (opt == "2") {
$("#TxtHoraFinAdd").val(txt);
} else if (opt == "3") {
$("#TxtHoraInicioUpdate").val(txt);
$("#TxtHoraFinUpdate").val(txt);
} else if (opt == "4") {
$("#TxtHoraFinUpdate").val(txt);
}
$get('DivHora').style.display = 'none';
}
var currentUpdateEvent;
var addStartDate;
var addEndDate;
var globalAllDay;
function selectDate(start, end, allDay) {
$('#ModalAgenda').modal('show');
$("#SpanTituloAgenda").html("Agregar Evento");;
//$("#< %=BtnGuardar.ClientID%>").val('Guardar');
//$("#< %=BtnEliminar.ClientID%>").css("display", "none");
$("#HdnCveEvento").val(-1);
$("#DdlAgedaTipo").val("-1");
$("#DdlPrioridad").val("1");
$("#TxtAsuntoAgenda").val("");
$("#TxtDescripcionAgenda").val("");
$("#TxtFechaInicioAgenda").val("" + start.format("DD/MM/YYYY 08:00"));
$("#TxtFechaFinAgenda").val("" + start.format("DD/MM/YYYY 09:00"));
$("#UpRecurrencia").hide();
$("#CheckRecurrencia").prop('checked', false);
$get("HdnDiasSemanaAgendar").value = -1;
$('#<%=RBLRecurrencia.ClientID %>').find("input[value='1']").prop("checked", true);
$('#<%=TrDiasSemanaAdd.ClientID %>').css("display", "none");
$("#DivDescripcionUpdate").css("display", "none");
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "block");
$('#<%=LblTextoFrecuencia.ClientID%>').html("Hora(s)");
$("#TxtFrecuencia").val("1");
$("#TxtNumeroOcurrencias").val("");
$("#TxtFechaFinRecurrencia").val("");
$("#ChkGastoRecurrente").prop('checked', false);
$("#TxtImporteGastoRecurrente").val("");
}
function updateEvent(event, element) {
$('#ModalAgenda').modal('show');
//$("#SpanTituloAgenda").html("Actualizar Evento");;
//$("#< %=BtnGuardar.ClientID%>").val('Actualizar');
//$("#< %=BtnEliminar.ClientID%>").css("display", "");
$("#DivDescripcionUpdate").css("display", "block");
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "none");
$("#HdnCveEvento").val(event.id);
$("#TxtNumeroOcurrencias").val('');
$("#TxtFechaFinRecurrencia").val('');
$("#TxtFrecuencia").val('');
$("#TxtAsuntoAgenda").val(event.title);
//SE MUESTRA EL TEXTO HTML EN EL DIV DE LA DESCRIPCION SIN PERMITIR EDITAR,
//SE ASIGNA -1 EN EL TEXBOX PARA QUE NO REALICE CAMBIOS EN BD
$("#DivDescripcionUpdate").html(event.description);
$("#TxtDescripcionAgenda").val("-1");
$("#DdlAgedaTipo").val(event.cveagendatipo);
$("#DdlPrioridad").val(event.prioridad);
$('#LblSubProyecto').text(event.SubProyecto);
$("#TxtFechaInicioAgenda").val("" + event.start.format("DD/MM/YYYY HH:mm"));
$("#TxtFechaFinAgenda").val("" + event.end.format("DD/MM/YYYY HH:mm"));
//Identifica el tipo de Fecha Termino de la Recurrencia
if (event.recurrenciafin == 0) {
//$("#RBSinFechaFinUpdate").prop('checked', true);
$("#TxtFrecuencia").val('0');
} else if (!isNaN(event.recurrenciafin)) {
$("#RBNumeroOcurrencias").prop('checked', true);
$("#TxtNumeroOcurrencias").val(event.recurrenciafin);
} else {
$("#RBFechaFin").prop('checked', true);
$("#TxtFechaFinRecurrencia").val("" + event.recurrenciafin);
}
//GASTO RECURRENTE
//Si el evento es tipo 10 = Gasto Mes, activa gasto recurrente
if (event.CveTipoEvento == 10) {
$("#ChkGastoRecurrente").prop('checked', true);
$("#TxtImporteGastoRecurrente").val(event.Importe);
} else {
$("#ChkGastoRecurrente").prop('checked', false);
$("#TxtImporteGastoRecurrente").val('');
}
//Verifica que hay Recurrencia para activar los campos y poner sus valores respectivos
if (event.recurrenciatipo > 0) {
$("#CheckRecurrencia").prop('checked', true);
// CHECKEA EL TIPO DE RECURRENCIA QUE TENGA EL EVENTO
var text = event.recurrenciatipo;
var radio = $("[id*=RBLRecurrencia] label:contains('" + text + "')").closest("td").find("input");
radio.attr("checked", "checked");
// CHECKEA LOS DIAS SELECCIONADOS DE LA RECURRENCIA DE SEMANA
$get("HdnDiasSemanaAgendar").value = event.diassemana;
//LLENA TEXTO DE FRECUENCIA DE RECURRENCIA
$("#TxtFrecuencia").val("" + event.frecuencia);
} else {
$("#CheckRecurrencia").prop('checked', false);
}
//ESCONDE O MUESTRA EL DIV DE LAS OPCIONES DE RECURRENCIA
if ($get('CheckRecurrencia').checked) {
$("#UpRecurrencia").show();
} else {
$("#UpRecurrencia").hide();
}
//LLAMA EL INDEXCHANGED DEL RADIOBUTTONLIST DE LOS TIPOS DE RECURRENCIA
$("#BtnActualizaAdd").click();
//Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM
if (event.EmpresaCRM != "") {
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "")
$("#<%=LblEmpresaCRM.ClientID%>").text(event.EmpresaCRM);
} else {
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "none")
}
}
function RadionButtonSelectedValueSet(name, SelectdValue) {
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
}
function CheckUpdate(check) {
if (check.checked) {
$("#UpRecurrenciaUpdate").show("slow");
} else {
$("#UpRecurrenciaUpdate").hide("slow");
}
}
function CheckAdd(check) {
if (check.checked) {
$("#UpRecurrencia").show("slow");
} else {
$("#UpRecurrencia").hide("slow");
}
}
function deleteEvent() {
//var id = $get('HdnId').val;
//PageMethods.EliminaEvento(id, deleteSuccess);
}
function updateSuccess(updateResult) {
//alert(updateResult);
}
function deleteSuccess(deleteResult) {
//alert("eliminado exitosamente: " + deleteResult);
}
function addSuccess(addResult) {
// if addresult is -1, means event was not added
// alert("added key: " + addResult);
if (addResult != -1) {
$('#calendar').fullCalendar('renderEvent',
{
title: $("#addEventName").val(),
start: addStartDate,
end: addEndDate,
id: addResult,
description: $("#addEventDesc").val(),
allDay: globalAllDay
},
true // make the event "stick"
);
$('#calendar').fullCalendar('unselect');
}
}
function UpdateTimeSuccess(updateResult, userContext, methodName) {
//alert(userContext);
}
function updateEventOnDropResize(event, allDay) {
//alert("allday: " + allDay);
var eventToUpdate = {
id: event.id,
start: event.start
};
// FullCalendar 1.x
//if (allDay) {
// eventToUpdate.start.setHours(0, 0, 0);
//}
if (event.end === null) {
eventToUpdate.end = eventToUpdate.start;
}
else {
eventToUpdate.end = event.end;
}
// FullCalendar 2.x
var endDate;
if (!event.allDay) {
endDate = new Date(eventToUpdate.end + 60 * 60000);
endDate = endDate.toJSON();
}
else {
endDate = eventToUpdate.end.toJSON();
}
eventToUpdate.start = eventToUpdate.start.toJSON();
eventToUpdate.end = eventToUpdate.end.toJSON(); //endDate;
eventToUpdate.allDay = event.allDay;
PageMethods.ActualizaEvento(eventToUpdate, UpdateTimeSuccess);
}
function eventDropped(event, dayDelta, minuteDelta, allDay, revertFunc) {
if ($(this).data("qtip")) $(this).qtip("destroy");
updateEventOnDropResize(event);
}
function eventResized(event, dayDelta, minuteDelta, revertFunc) {
if ($(this).data("qtip")) $(this).qtip("destroy");
updateEventOnDropResize(event);
}
function checkForSpecialChars(stringToCheck) {
var pattern = /[^A-Za-z0-9 ]/;
return pattern.test(stringToCheck);
}
function isAllDay(startDate, endDate) {
var allDay;
if (startDate.format("HH:mm:ss") == "00:00:00" && endDate.format("HH:mm:ss") == "00:00:00") {
allDay = true;
globalAllDay = true;
}
else {
allDay = false;
globalAllDay = false;
}
return allDay;
}
var view = null;
var date = null;
function GetView() {
view = $('#calendar').fullCalendar('getView');
date = $('#calendar').fullCalendar('getDate');
}
function SetView() {
$('#calendar').fullCalendar('gotoDate', date.format());
$('#calendar').fullCalendar('changeView', view.name);
}
function Calendario() {
//$get('DivActualizarEvento').style.display = 'none';
//$get('DivAgregarEvento').style.display = 'none';
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var h = {};
if ($('#calendar').width() <= 400) {
$('#calendar').addClass("mobile");
h = {
left: 'title, prev, next',
center: '',
right: 'today,month,agendaWeek,agendaDay'
};
} else {
$('#calendar').removeClass("mobile");
h = {
left: 'title',
center: '',
right: 'prev,next,today,month,agendaWeek,agendaDay'
};
}
$('#calendar').fullCalendar('destroy'); // destroy the calendar
$('#calendar').fullCalendar({ //re-initialize the calendar
header: h,
monthNames: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'],
buttonText: {
today: 'Hoy',
week: 'Semana',
month: 'Mes',
day: 'Día'
},
eventClick: updateEvent,
selectable: true,
selectHelper: true,
select: selectDate,
editable: true,
events: {
url: '/Ashx/CargaEventos.ashx',
type: 'GET',
data: {
U: ' <%= UsuarioActual.CveUsuario %>',
E: '<%= UsuarioActual.CveEmpresa %>',
METODO:'servicio_domicilio'
}
},
eventDrop: eventDropped,
eventResize: eventResized
});
}
function InitCalendar() {
$(document).ready(function () {
Calendario();
});
}
</script>
</asp:Content>

View File

@@ -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
<WebMethod()> <Script.Services.ScriptMethodAttribute()>
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
<WebMethod()> <Script.Services.ScriptMethodAttribute()>
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

View File

@@ -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")

View File

@@ -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()

View File

@@ -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"

View File

@@ -4,8 +4,8 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
#C_GvCaracteristicas_LtlCaracteristica_0{
min-width: 275px!important;
#C_GvCaracteristicas_LtlCaracteristica_0 {
min-width: 275px !important;
}
</style>
</asp:Content>
@@ -133,90 +133,104 @@
</tr>
<tr>
<td class="text-right"><b>Estatus:</b></td>
<td colspan="5">
<td>
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>clasificación:</b></td>
<td>
<asp:DropDownList ID="ddlclasificacion" runat="server" Width="100%" CssClass="select2me" AppendDataBoundItems="true" DataTextField="Genero" DataValueField="CveGenero" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Todos" Value="-1" Selected="True" ></asp:ListItem>
<asp:ListItem Text="Activos" Value="0"></asp:ListItem>
<asp:ListItem Text="Reserva" Value="1"></asp:ListItem>
</asp:DropDownList>
</td>
<td></td>
<td></td>
</tr>
<tr style="vertical-align:top;"><td colspan="2">
<asp:GridView ID="GvCrt1" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
DataKeyNames="CveCaracteristica,Caracteristica" ShowHeader="False">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Panel ID="PnlClasif" Visible="False" runat="server">
<div style="width: 100%" class="SubTotales">
<b><asp:Literal ID="LblCaracteristica" runat="server" Text=""></asp:Literal></b>
</div>
</asp:Panel>
<div style="width:105px!important; display: inline-block; text-align:right;">
<asp:Literal ID="LtlCrt" runat="server" Text='<%# Eval("Caracteristica", "<b>{0}:</b>")%>'></asp:Literal>&nbsp;
</div>
<div style="display: inline-block;">
<asp:DropDownList ID="DdlValor" runat="server" Visible="false" DataValueField="CveCaracteristicaOpcion" DataTextField ="CaracteristicaOpcion" Width="100px" CssClass="form-control input-inline input-sm" ></asp:DropDownList>
<asp:TextBox CssClass="form-control input-sm" ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" Visible="false" Width="100px"></asp:TextBox>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
<tr style="vertical-align: top;">
<td colspan="2">
<asp:GridView ID="GvCrt2" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
DataKeyNames="CveCaracteristica,Caracteristica" ShowHeader="False">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Panel ID="PnlClasif" Visible="False" runat="server">
<div style="width: 100%" class="SubTotales">
<b><asp:Literal ID="LblCaracteristica" runat="server" Text=""></asp:Literal></b>
</div>
</asp:Panel>
<div style="width:110px!important; display: inline-block;">
<asp:Literal ID="LtlCrt" runat="server" Text='<%# Eval("Caracteristica", "<b>{0}:</b>")%>'></asp:Literal>
<asp:GridView ID="GvCrt1" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
DataKeyNames="CveCaracteristica,Caracteristica" ShowHeader="False">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Panel ID="PnlClasif" Visible="False" runat="server">
<div style="width: 100%" class="SubTotales">
<b>
<asp:Literal ID="LblCaracteristica" runat="server" Text=""></asp:Literal></b>
</div>
<div style="display: inline-block;">
<asp:DropDownList ID="DdlValor" runat="server" Visible="false" DataValueField="CveCaracteristicaOpcion" DataTextField ="CaracteristicaOpcion" Width="100px" CssClass="form-control input-inline input-sm" ></asp:DropDownList>
<asp:TextBox CssClass="form-control input-sm" ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" Visible="false" Width="100px"></asp:TextBox>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
<div style="width: 105px!important; display: inline-block; text-align: right;">
<asp:Literal ID="LtlCrt" runat="server" Text='<%# Eval("Caracteristica", "<b>{0}:</b>")%>'></asp:Literal>&nbsp;
</div>
<div style="display: inline-block;">
<asp:DropDownList ID="DdlValor" runat="server" Visible="false" DataValueField="CveCaracteristicaOpcion" DataTextField="CaracteristicaOpcion" Width="100px" CssClass="form-control input-inline input-sm"></asp:DropDownList>
<asp:TextBox CssClass="form-control input-sm" ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" Visible="false" Width="100px"></asp:TextBox>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
<td colspan="2">
<asp:GridView ID="GvCrt3" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
DataKeyNames="CveCaracteristica,Caracteristica" ShowHeader="False">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Panel ID="PnlClasif" Visible="False" runat="server">
<div style="width: 100%" class="SubTotales">
<b><asp:Literal ID="LblCaracteristica" runat="server" Text=""></asp:Literal></b>
</div>
</asp:Panel>
<div style="width:110px!important; display: inline-block; text-align:right;">
<asp:Literal ID="LtlCrt" runat="server" Text='<%# Eval("Caracteristica", "<b>{0}:</b>")%>'></asp:Literal>
<asp:GridView ID="GvCrt2" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
DataKeyNames="CveCaracteristica,Caracteristica" ShowHeader="False">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Panel ID="PnlClasif" Visible="False" runat="server">
<div style="width: 100%" class="SubTotales">
<b>
<asp:Literal ID="LblCaracteristica" runat="server" Text=""></asp:Literal></b>
</div>
<div style="display: inline-block;">
<asp:DropDownList ID="DdlValor" runat="server" Visible="false" DataValueField="CveCaracteristicaOpcion" DataTextField ="CaracteristicaOpcion" Width="100px" CssClass="form-control input-inline input-sm" ></asp:DropDownList>
<asp:TextBox CssClass="form-control input-sm" ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" Visible="false" Width="100px"></asp:TextBox>
</asp:Panel>
<div style="width: 110px!important; display: inline-block;">
<asp:Literal ID="LtlCrt" runat="server" Text='<%# Eval("Caracteristica", "<b>{0}:</b>")%>'></asp:Literal>
</div>
<div style="display: inline-block;">
<asp:DropDownList ID="DdlValor" runat="server" Visible="false" DataValueField="CveCaracteristicaOpcion" DataTextField="CaracteristicaOpcion" Width="100px" CssClass="form-control input-inline input-sm"></asp:DropDownList>
<asp:TextBox CssClass="form-control input-sm" ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" Visible="false" Width="100px"></asp:TextBox>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
<td colspan="2">
<asp:GridView ID="GvCrt3" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
DataKeyNames="CveCaracteristica,Caracteristica" ShowHeader="False">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Panel ID="PnlClasif" Visible="False" runat="server">
<div style="width: 100%" class="SubTotales">
<b>
<asp:Literal ID="LblCaracteristica" runat="server" Text=""></asp:Literal></b>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
<div style="width: 110px!important; display: inline-block; text-align: right;">
<asp:Literal ID="LtlCrt" runat="server" Text='<%# Eval("Caracteristica", "<b>{0}:</b>")%>'></asp:Literal>
</div>
<div style="display: inline-block;">
<asp:DropDownList ID="DdlValor" runat="server" Visible="false" DataValueField="CveCaracteristicaOpcion" DataTextField="CaracteristicaOpcion" Width="100px" CssClass="form-control input-inline input-sm"></asp:DropDownList>
<asp:TextBox CssClass="form-control input-sm" ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" Visible="false" Width="100px"></asp:TextBox>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td style="text-align: center;" colspan="6">
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" ValidationGroup="GrpBuscar" class="btn btn-primary" />&nbsp;<asp:Button ID="BtnNuevoPersonal" runat="server" Text="Nuevo" OnClientClick="window.opener.location='/RH/Personal.aspx';window.close(); return false;" class="btn btn-success" /></td>
@@ -226,7 +240,7 @@
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="TblBusqueda" runat="server" border="0" visible="false">
<tr>

View File

@@ -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

View File

@@ -355,7 +355,19 @@
<asp:DropDownList ID="DdlClasificacion2" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -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("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo"))

View File

@@ -370,6 +370,18 @@
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -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

View File

@@ -313,6 +313,17 @@
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -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)

View File

@@ -325,6 +325,17 @@
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Value ="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -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 = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
e.Row.FCLiteral("LtlCantidad").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlCantidad").Text & "</a>"

View File

@@ -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
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
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
<WebMethod()>
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
<WebMethod()>
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
<WebMethod()>
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

View File

@@ -546,6 +546,10 @@