This commit is contained in:
2023-05-15 18:52:19 -07:00
43 changed files with 5238 additions and 3918 deletions

View File

@@ -91,8 +91,6 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
End Sub
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
@@ -107,13 +105,18 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsadosClientes}
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsadosClientes.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsadosClientes, params, "Entradas usados clientes", "PDF")
Dim FIRutaReporte As New System.IO.FileInfo(String.Format("{0}Formatos/RepEntradasUsadosClientes.rdlc", UsuarioActual.Empresa.Ruta))
Dim PathRutaReporte As String = "\Formatos\RepEntradasUsadosClientes.rdlc"
If Not FIRutaReporte.Exists Then
PathRutaReporte = "\Empresas\Grales\Formatos\RepEntradasUsadosClientes.rdlc" 'No existe el General solo se hizo para la 140
End If
ImprimirPDF(PathRutaReporte, DatosEntradasUsadosClientes, params, "Entradas usados clientes", "PDF")
End Sub
Protected Sub BtnExcel_Click(sender As Object, e As EventArgs)
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
@@ -126,9 +129,16 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
params.Add(New ReportParameter("FechaInicial", TxtFechaI.Text))
params.Add(New ReportParameter("FechaFinal", TxtFechaF.Text))
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsadosClientes}
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsadosClientes}
Dim FIRutaReporte As New System.IO.FileInfo(String.Format("{0}Formatos/RepEntradasUsadosClientes.rdlc", UsuarioActual.Empresa.Ruta))
Dim PathRutaReporte As String = "\Formatos\RepEntradasUsadosClientes.rdlc"
If Not FIRutaReporte.Exists Then
PathRutaReporte = "\Empresas\Grales\Formatos\RepEntradasUsadosClientes.rdlc" 'No existe el General solo se hizo para la 140
End If
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsadosClientes.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsadosClientes, params, "Entradas usados clientes", "Excel")
ImprimirPDF(PathRutaReporte, DatosEntradasUsadosClientes, params, "Entradas usados clientes", "Excel")
End Sub

View File

@@ -261,21 +261,20 @@ Public Class ClsFinanzas
Public Function GetRazonesFinancierasBalanceGeneralRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean
Public Function GetRazonesFinancierasBalanceGeneralRep(CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer, Fechas As String, Opcion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Finan_RF_BalanceGeneralRepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@Periodo", SqlDbType.Int).Value = Periodo
.Add("@Fechas", SqlDbType.VarChar).Value = Fechas
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
SqlAdapter.Fill(Data)
@@ -288,20 +287,20 @@ Public Class ClsFinanzas
Public Function GetRazonesFinancierasEstadoResultadosRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean
Public Function GetRazonesFinancierasEstadoResultadosRep(CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer, Fechas As String, Opcion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Finan_RF_EstadoResultadosRepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@Periodo", SqlDbType.Int).Value = Periodo
.Add("@Fechas", SqlDbType.VarChar).Value = Fechas
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
@@ -314,20 +313,19 @@ Public Class ClsFinanzas
End Function
Public Function GetRazonesFinancierasRatiosRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean
Public Function GetRazonesFinancierasRatiosRep(CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer, Fechas As String, Opcion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Finan_RF_RatiosRepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@Periodo", SqlDbType.Int).Value = Periodo
.Add("@Fechas", SqlDbType.VarChar).Value = Fechas
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try

View File

@@ -3537,19 +3537,18 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
Property GlobalDTAsistenciasInasistencias() As DataTable
Property GlobalDTAsistenciasInasistencias(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
'sino existe, recarga los datos
Dim AppNombre As String = $"GlobalDTAsistenciasInasistencias-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetAsistenciasInasistencias() Then Application(AppNombre) = ObjPersonal.DtResultados
If ObjPersonal.GetAsistenciasInasistencias(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTAsistenciasInasistencias = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
Dim AppNombre As String = $"GlobalDTAsistenciasInasistencias-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
@@ -4648,7 +4647,7 @@ Public Class ClsPaginas
bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "")
End If
RutaReporte.Replace("/", "\")
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
End If
If EsProduccion Then
@@ -5037,466 +5036,7 @@ Public Class ClsPaginas
End Sub
#End Region
#Region "IMPRIMIR FACTURA"
'Public Sub PdfFacturaPyME(ByRef Vta As Modelos.Factura, DT As DataTable, Optional Guardar As Boolean = True)
' Dim retorno As Byte() = Nothing
' 'DATOS GENERALES
' Dim Ruta As String = UsuarioActual.Empresa.Ruta
' Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
' Dim NombreArchivo As String = ""
' Dim NombreArchivoDescarga As String = ""
' Dim TipoDocumento As String = ""
' Dim TipoDocumentoRef As String = ""
' Dim AplicaPagare As String = "1"
' Dim RFCReceptor As String = ""
' If String.IsNullOrEmpty(Vta.RFCReceptor) Then
' RFCReceptor = Vta.Cliente.RFC
' If Vta.FacturarSucursal Then
' If Vta.ClienteSucursal IsNot Nothing Then
' RFCReceptor = Vta.ClienteSucursal.RFC
' End If
' End If
' Else
' RFCReceptor = Vta.RFCReceptor
' End If
' Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
' Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
' Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
' Dim ImagenPath = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
' Dim Logo As New System.IO.FileInfo(ImagenPath)
' Dim ImgLogo = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri
' Dim SBDomicilioSucursal As New StringBuilder()
' Dim CiudadSucursal As String = String.Format("{0},{1}", Vta.SubProyecto.Municipio, Vta.SubProyecto.Estado)
' Dim DomicilioSucursal As String = ""
' SBDomicilioSucursal.AppendFormat("{0}", Vta.SubProyecto.Calle)
' If Vta.SubProyecto.NoExt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Vta.SubProyecto.NoExt)
' If Vta.SubProyecto.NoInt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Vta.SubProyecto.NoInt)
' If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
' If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
' If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
' If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
' DomicilioSucursal = SBDomicilioSucursal.ToString
' Dim Fecha As String = Vta.Fecha.ToShortDateString
' Dim SBDireccion As New StringBuilder()
' Dim SBLugar As New StringBuilder()
' Dim ClienteDireccion As String
' Dim ClienteLugar As String
' '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
' XmlDoc.Load(PathXML)
' Dim TC As Decimal = 1
' Try
' TC = XmlDoc.DocumentElement.Attributes("TipoCambio").InnerText.ToDecimal
' Catch ex As Exception
' TC = 1
' End Try
' Vta.FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
' Vta.NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
' Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
' If Not IsNothing(validaElemento) Then
' For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
' If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
' Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
' Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
' Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
' Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
' Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
' End If
' Next
' Else
' Vta.FolioFiscal = "Sin Timbrar"
' Vta.NoSerieCertificado = "Sin Timbrar"
' Vta.SelloCFDi = "Sin Timbrar"
' Vta.SelloSAT = "Sin Timbrar"
' End If
' 'SIN TIMBRAR - SIN XML
' Else
' Vta.FolioFiscal = "Sin Timbrar"
' Vta.NoSerieCertificado = "Sin Timbrar"
' Vta.SelloCFDi = "Sin Timbrar"
' Vta.SelloSAT = "Sin Timbrar"
' End If
' 'DIRECCION CLIENTE
' If Vta.CveClienteSucursal.ToEntero > 0 Then
' 'Si cliente tiene Noint, NoExt, CP
' SBDireccion.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
' If Vta.ClienteSucursal.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
' If Vta.ClienteSucursal.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
' If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.ClienteSucursal.Colonia)
' If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
' If Vta.ClienteSucursal.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.ClienteSucursal.CP.Trim)
' End If
' 'Si cliente tiene Local, CD, Edo, Pais
' If Vta.ClienteSucursal.Localidad IsNot Nothing AndAlso Vta.ClienteSucursal.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.ClienteSucursal.Localidad)
' If Vta.ClienteSucursal.Municipio IsNot Nothing AndAlso Vta.ClienteSucursal.Municipio.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.ClienteSucursal.Municipio)
' If Vta.ClienteSucursal.Estado IsNot Nothing AndAlso Vta.ClienteSucursal.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.ClienteSucursal.Estado)
' If Vta.ClienteSucursal.Pais IsNot Nothing AndAlso Vta.ClienteSucursal.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.ClienteSucursal.Pais)
' Else
' SBDireccion.AppendFormat("{0}", Vta.Cliente.Direccion)
' If Vta.Cliente.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
' If Vta.Cliente.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
' If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.Cliente.Colonia)
' If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
' If Vta.Cliente.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.Cliente.CP.Trim)
' End If
' 'Si cliente tiene Local, CD, Edo, Pais
' If Vta.Cliente.Localidad IsNot Nothing AndAlso Vta.Cliente.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.Cliente.Localidad)
' If Vta.Cliente.Ciudad IsNot Nothing AndAlso Vta.Cliente.Ciudad.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.Cliente.Ciudad)
' If Vta.Cliente.Estado IsNot Nothing AndAlso Vta.Cliente.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.Cliente.Estado)
' If Vta.Cliente.Pais IsNot Nothing AndAlso Vta.Cliente.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.Cliente.Pais)
' End If
' ClienteDireccion = SBDireccion.ToString
' ClienteLugar = SBLugar.ToString
' SBDireccion.Clear()
' SBLugar.Clear()
' 'LOGO
' Dim LogoRuta As String = ""
' 'POR SUCURSAL
' LogoRuta = String.Format("{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
' If File.Exists(LogoRuta) Then
' LogoRuta = String.Format("file://{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
' 'POR EMPRESA
' Else
' LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
' If File.Exists(LogoRuta) Then
' 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
' LogoRuta = String.Format("{0}", LogoRuta)
' End If
' End If
' 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
' LogoRuta = String.Format("{0}", LogoRuta)
' 'Si no tiene CBB, SE GENERA
' If Not ImagenCBB.Exists Then
' Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
' CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
' End If
' ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
' Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
' If Not ImagenCBB.Exists Then ImgCBB = ""
' Dim RutaFormato As String = ""
' 'AQUI EMPIEZA LOS PARAMETROS
' Try
' Dim params = New List(Of CrystalParametro)
' 'CLIENTE
' params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
' params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
' params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
' params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
' 'TOTALES
' params.Add(New CrystalParametro("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("Descuento", Vta.Descuento.ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("Amortizacion", Vta.Amortizacion.ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("SubTotal2", (Vta.SubTotal - Vta.Descuento - Vta.Amortizacion).ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("IVA", Vta.IVA.ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("RetIVA", Vta.RetIVA.ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("RetISR", Vta.RetISR.ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("Total", Vta.Total.ToString.FormatoNumero(2)))
' params.Add(New CrystalParametro("ImporteLetra", Vta.Total.ToString.ToDouble.Texto2Letras(Vta.CveMoneda)))
' 'DATOS GENERALES
' params.Add(New CrystalParametro("Observaciones", Vta.Observaciones))
' params.Add(New CrystalParametro("CveVendedor", Vta.CveVendedor.ToString))
' 'params.Add(New CrystalParametro("Status", Vta.EstatusFactura))
' params.Add(New CrystalParametro("FechaSolicitud", Vta.Fecha.ToString("dd/MMMM/yyyy"))) ' se puede omitir
' params.Add(New CrystalParametro("Serie", Vta.Serie))
' params.Add(New CrystalParametro("Folio", Vta.Folio.ToString))
' params.Add(New CrystalParametro("DomicilioSucursal", DomicilioSucursal))
' params.Add(New CrystalParametro("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
' params.Add(New CrystalParametro("FolioFiscal", Vta.FolioFiscal))
' params.Add(New CrystalParametro("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
' params.Add(New CrystalParametro("SelloCFDI", Vta.SelloCFDi))
' params.Add(New CrystalParametro("CadenaSAT", CadenaOriginals))
' params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
' params.Add(New CrystalParametro("QR", ImgCBB))
' params.Add(New CrystalParametro("ClienteRFC", RFCReceptor))
' params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
' params.Add(New CrystalParametro("Moneda", Vta.Moneda))
' params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
' params.Add(New CrystalParametro("CondicionPago", Vta.CondicionesPagoText))
' params.Add(New CrystalParametro("CadenaOriginal", CadenaOriginals))
' params.Add(New CrystalParametro("SerieCertificadoSAT", Vta.NoSerieCertificado))
' params.Add(New CrystalParametro("CertificadoContribuyente", Vta.NoSerieCertificadoContribuyente))
' params.Add(New CrystalParametro("NumCta", Vta.NumeroCuenta))
' params.Add(New CrystalParametro("LogoPath", LogoRuta))
' 'VENDEDOR
' Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
' If Not IsNothing(RowVendedor) Then
' params.Add(New CrystalParametro("VendedorNombre", RowVendedor("Vendedor").ToString))
' params.Add(New CrystalParametro("VendedorMail", RowVendedor("Correo").ToString))
' params.Add(New CrystalParametro("VendedorTelefono", RowVendedor("Telefono").ToString))
' params.Add(New CrystalParametro("VendedorCelular", RowVendedor("Celular").ToString))
' End If
' params.Add(New CrystalParametro("CiudadSucursal", CiudadSucursal))
' params.Add(New CrystalParametro("OC", Vta.Det_OrdenCompra.ToString))
' If UsuarioActual.Empresa.Funcionalidad(508) = "1" Then
' params.Add(New CrystalParametro("IEPS", Vta.IEPS.ToString.FormatoNumero(2)))
' End If
' If Vta.CveClienteSucursal > 0 Then
' params.Add(New CrystalParametro("ClienteContactoMail", Vta.ClienteSucursal.CorreoSucursal))
' params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
' Else
' params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion))
' params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
' End If
' If UsuarioActual.CveEmpresa.Contiene(17) Then
' params.Add(New CrystalParametro("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
' Else
' params.Add(New CrystalParametro("MetodoPago", Vta.MetodoPago.ToString))
' End If
' Select Case Vta.TipoDocto
' Case "Ing"
' NombreArchivo = "Factura"
' NombreArchivoDescarga = "Factura"
' TipoDocumento = "INGRESO"
' 'GENERAL
' params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
' params.Add(New CrystalParametro("Tipo", TipoDocumento))
' params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
' params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
' 'VSH
' If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
' 'DATOS CLIENTES
' Dim ClienteRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString))
' Dim DatosCliente = ""
' If ClienteRow IsNot Nothing Then
' DatosCliente = String.Format("{0} | {1} | {2}", Vta.SubProyecto.Municipio, ClienteRow("CuentaContable"), ClienteRow("Codigo"))
' End If
' params.Add(New CrystalParametro("DatosClientes", DatosCliente))
' params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
' End If
' 'COMPU, DN DIFUSA
' If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
' params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
' params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
' params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
' params.Add(New CrystalParametro("DescripcionContrato", Vta.NumeroDescripcionContrato))
' params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
' params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
' params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
' params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
' 'INE COMPLEMENTOS
' If UsuarioActual.CveEmpresa.Contiene(72) Then
' Dim INETipoProceso As String = ""
' Dim INETipoComite As String = ""
' Dim INEIdContabilidad As Integer = 0
' If Vta.ComplementoINE IsNot Nothing Then
' INETipoProceso = Vta.ComplementoINE.INETipoProceso
' INETipoComite = Vta.ComplementoINE.INETipoComite
' INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
' End If
' params.Add(New CrystalParametro("INETipoProceso", INETipoProceso))
' params.Add(New CrystalParametro("INETipoComite", INETipoComite))
' params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad))
' params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal))
' params.Add(New CrystalParametro("ClienteContacto", Vta.AtencionA))
' End If
' 'DIRECCION ENVIO
' If Vta.EnviarA.CveDireccionEnvio > 0 Then
' Dim StrEnvioDi As New StringBuilder
' StrEnvioDi.AppendFormat("{0}", Vta.EnviarA.EnvioDireccion)
' If Vta.EnviarA.EnvioNoExt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.EnviarA.EnvioNoExt)
' If Vta.EnviarA.EnvioNoInt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.EnviarA.EnvioNoInt)
' params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
' params.Add(New CrystalParametro("EnvioNoExt", Vta.EnviarA.EnvioNoExt))
' params.Add(New CrystalParametro("EnvioNoInt", Vta.EnviarA.EnvioNoInt))
' params.Add(New CrystalParametro("EnvioColonia", Vta.EnviarA.EnvioColonia))
' params.Add(New CrystalParametro("EnvioCiudad", Vta.EnviarA.EnvioCiudad))
' params.Add(New CrystalParametro("EnvioEstado", Vta.EnviarA.EnvioEstado))
' params.Add(New CrystalParametro("EnvioContacto", Vta.EnviarA.EnvioContacto))
' params.Add(New CrystalParametro("EnvioDepartamento", Vta.EnviarA.EnvioDepartamento))
' params.Add(New CrystalParametro("EnvioCP", Vta.EnviarA.EnvioCP))
' Else
' If Vta.CveClienteSucursal.ToEntero > 0 Then
' Dim StrEnvioDi As New StringBuilder
' StrEnvioDi.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
' If Vta.ClienteSucursal.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
' If Vta.ClienteSucursal.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
' params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
' params.Add(New CrystalParametro("EnvioColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
' params.Add(New CrystalParametro("EnvioCiudad", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
' params.Add(New CrystalParametro("EnvioEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
' params.Add(New CrystalParametro("EnvioCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
' Else
' Dim StrEnvioDi As New StringBuilder
' StrEnvioDi.AppendFormat("{0}", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, ""))
' If Vta.Cliente.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
' If Vta.Cliente.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
' params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
' params.Add(New CrystalParametro("EnvioColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
' params.Add(New CrystalParametro("EnvioCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
' params.Add(New CrystalParametro("EnvioEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
' params.Add(New CrystalParametro("EnvioCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
' End If
' End If
' 'CLIENTE SUCURSAL
' If Vta.CveClienteSucursal.ToEntero > 0 Then
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
' params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
' params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
' Else
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
' params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
' params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
' End If
' End If
' RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, NombreArchivo)
' Case "Egs"
' If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
' NombreArchivo = "NotaCredito"
' Else
' NombreArchivo = "Factura"
' End If
' NombreArchivoDescarga = "Nota de Crédito"
' TipoDocumento = "EGRESO"
' TipoDocumentoRef = String.Format(": Ref.:{0}", Vta.RefDocto)
' AplicaPagare = "0"
' 'GENERAL
' params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
' params.Add(New CrystalParametro("Tipo", TipoDocumento))
' params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
' params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
' params.Add(New CrystalParametro("Fecha", String.Format("{0}T{1}", Vta.Fecha.ToString("yyyy-MM-dd"), Vta.Fecha.ToString("HH:mm:ss"))))
' 'ALAN YEPIZ
' If UsuarioActual.CveEmpresa.Contiene(123) Then
' params.Add(New CrystalParametro("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
' params.Add(New CrystalParametro("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
' params.Add(New CrystalParametro("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
' End If
' 'COMPU, DN DIFUSA
' If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
' params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
' params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
' params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
' params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
' params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
' params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
' params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
' 'CLIENTE SUCURSAL
' If Vta.CveClienteSucursal.ToEntero > 0 Then
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
' params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
' params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
' Else
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
' params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
' params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
' End If
' End If
' RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, "Factura")
' Case Else
' NombreArchivo = ""
' TipoDocumento = ""
' End Select
' If NombreArchivo = "" Then
' GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
' Exit Sub
' End If
' 'TERMINA REGION PARAMETROS
' Dim lrds As New List(Of ReportDataSource)
' 'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
' If UsuarioActual.CveEmpresa.Contiene(1, 15, 17, 71, 76, 125) Then
' Dim DtDetalleFirmas As New DataTable
' DtDetalleFirmas.TableName = "DetalleFirma"
' DtDetalleFirmas = Vta.DtDetalle.Copy()
' 'SI NO TIENE LAS COLUMNAS DE FIRMAS LAS CREA.
' If Not DtDetalleFirmas.Columns.Contains("Titulo") Then
' DtDetalleFirmas.Columns.Add("Titulo", GetType(String))
' DtDetalleFirmas.Columns.Add("Nombre", GetType(String))
' DtDetalleFirmas.Columns.Add("Puesto", GetType(String))
' DtDetalleFirmas.Columns.Add("Lado", GetType(Integer))
' End If
' 'Se llenan los Rows de las columnas con los datos del DtFirmas
' For i As Integer = 0 To Vta.DtFirmas.Rows.Count - 1
' 'Si DtDetalle es menor al DtFirmas, crea un nuevo Row en DtDetalle y le asigna valor, Si no solo asigna valor
' If DtDetalleFirmas.Rows.Count < i + 1 Then
' Dim Dr = DtDetalleFirmas.NewRow
' Dr("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
' Dr("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
' Dr("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
' Dr("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
' DtDetalleFirmas.Rows.Add(Dr)
' Else
' DtDetalleFirmas(i)("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
' DtDetalleFirmas(i)("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
' DtDetalleFirmas(i)("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
' DtDetalleFirmas(i)("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
' End If
' Next i
' Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = DtDetalleFirmas}
' lrds.Add(rds)
' Else
' Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = Vta.DtDetalle}
' lrds.Add(rds)
' End If
' Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(Vta.DtDeduccion IsNot Nothing, Vta.DtDeduccion, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
' lrds.Add(rds1)
' 'DETALLE FIRMAS
' Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(Vta.DtFirmas IsNot Nothing, Vta.DtFirmas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
' lrds.Add(rds2)
' Dim Archivo As New System.IO.FileInfo(RutaFormato)
' Dim DataSet As New DataSet
' Vta.DtDetalle.TableName = "Datos"
' Vta.DtDeduccion.TableName = "Deduccion"
' DataSet.Tables.Add(Vta.DtDetalle.Copy)
' DataSet.Tables.Add(Vta.DtDeduccion.Copy)
' If Archivo.Exists Then
' ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
' If Guardar Then
' Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
' If Not ArchivoPDF.Exists Then
' Try
' DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
' DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
' File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
' Catch ex As Exception
' Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
' End Try
' Else
' Try
' ArchivoPDF.Delete()
' File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
' Catch ex As Exception
' Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
' End Try
' End If
' End If
' Else
' params.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
' params.Add(New CrystalParametro("RFC", UsuarioActual.Empresa.RFC))
' ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
' End If
' Catch ex As Exception
' GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
' End Try
'End Sub
Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimulsoft As Boolean = False) As Byte()
Dim retorno As Byte() = Nothing
' Dim ObjVentas As New ClsVentas
@@ -6647,6 +6187,20 @@ Public Class ClsPaginas
End If
End Sub
#End Region
Public Function RutaFormatoReporte(NombreReporte As String) As String
Dim Retorno As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreReporte)
If Not File.Exists(Retorno) Then
Retorno = $"{DirectorioEmpresas}Grales\Formatos\{NombreReporte}"
End If
Return Retorno
End Function
Public Function RutaImagenLogo() As String
Dim Retorno As String = "" 'si existe le agrega el texto ''file:// sino lo regresa vacío
Dim Ruta As String = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
If File.Exists(Ruta) Then Retorno = $"file://{Ruta}"
Return Retorno
End Function
#Region "PDF OC NEW 3.0"
Public Function NewGeneraBytesOC(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
Dim bytes As Byte() = Nothing
@@ -8231,12 +7785,12 @@ Public Class ClsPaginas
If Pago.CveMonedaPago > 1 Then
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 295, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 295, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 227, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 227, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
Else
'Agregamos Nacional
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
End If
If Not ErrorMovtos AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=Pago.CveIE, CveVenta:=VentaActual.CveVenta, CveSubProyecto:=VentaActual.CveSubProyecto, CveCliente:=VentaActual.CveCliente, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then

View File

@@ -314,11 +314,13 @@ Public Class ClsRH
#End Region
#Region "ClsRHAsistenciasInasistencias"
Public Function GetAsistenciasInasistencias() As Boolean
Public Function GetAsistenciasInasistencias(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_AsistenciasInasistenciasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True

View File

@@ -465,7 +465,7 @@ Public Class ClsSisEmpresas
_Empresa.FielPassword = Data.Rows(0)("FielPassword").ToString
_Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString
_Empresa.Ruta = Data.Rows(0)("RutaArchivos").ToString
_Empresa._RutaArchivos = Data.Rows(0)("RutaArchivos").ToString
Else
'Alert("No se encontró la Empresa solicitada.", TipoMensaje.MsgAdvertencia)

View File

@@ -97,36 +97,24 @@ Public Class Empresa
Public Property Soporte_PWD As String
Public Property Soporte_Tipo As String
Public Property Timbres As Integer
Private Property RutaArchivos As String
Public Property _RutaArchivos As String
Public Property Ruta As String
Public ReadOnly Property Ruta As String
Get
If Not String.IsNullOrEmpty(RutaArchivos) AndAlso ClsPaginas.EsProduccion Then
Return RutaArchivos
If Not String.IsNullOrEmpty(_RutaArchivos) AndAlso ClsPaginas.EsProduccion Then
Return _RutaArchivos
Else
Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa)
Return String.Format("{0}{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa)
End If
End Get
Set(ByVal value As String)
RutaArchivos = value
End Set
'Set(ByVal value As String)
' _RutaArchivos = value
'End Set
End Property
'Public Property IdCuentaIVAxTrasladar As Integer
'Public Property IdCuentaIVATrasladado As Integer
'Public Property IdCuentaPerdidaCambiaria As Integer
'Public Property IdCuentaGananciaCambiaria As Integer
' Public Property ContaContabilizacionNC As Integer
Public Property PV_TerminalTipo As Integer
Public Property PlantillaMailVenta As String
Public Property AsuntoPlantillaMailVenta As String
'Nuevas
'Public Property IdCuentaIVAxAcreditar As Integer
'Public Property IdCuentaIVAAcreditable As Integer
'Public Property IdCuentaRetIVACirculacion As Integer
'Public Property IdCuentaRetISRCirculacion As Integer
'Public Property IdCuentaDSV As Integer
'Public Property IdCuentaImpuestosLocales As Integer
Public Property AsuntoPlantillaMailVenta As String
Public Property IdCtaProveedor As Integer
Public Property IdCtaCliente As Integer
Public Property IdCtaDeudores As Integer

View File

@@ -97,7 +97,7 @@ Public Class LogicNominas
Dim DtDeducciones As Data.DataTable = Nothing
Dim DtOtrosPagos As Data.DataTable = Nothing
Dim DtHorasExtras As Data.DataTable = Nothing
'Dim DtHorasExtras As Data.DataTable = Nothing
Dim TotalPercepciones As Decimal = 0
Dim TotalDeducciones As Decimal = 0
Dim TotalOtrosPagos As Decimal = 0
@@ -253,13 +253,13 @@ Public Class LogicNominas
continuar = False
End If
If Not TimbreIndemnizacion Then
If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
DtHorasExtras = objNomina.DtResultados
Else
continuar = False
End If
'If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
' DtHorasExtras = objNomina.DtResultados
'Else
' continuar = False
'End If
Else
DtHorasExtras = New DataTable()
'DtHorasExtras = New DataTable()
End If
If continuar AndAlso objNomina.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodo) AndAlso objNomina.DtResultados.Rows().Count > 0 Then
Dim DrPeriodo As DataRow = objNomina.DtResultados.Rows(0)
@@ -350,14 +350,32 @@ Public Class LogicNominas
.ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()})
End If
'RMF, falta poner el numero de horas pagadas
If Row("SATCveConcepto").ToString().ToEntero() = 19 AndAlso DtHorasExtras IsNot Nothing Then 'cuando son horas extras
If Row("SATCveConcepto").ToString().ToEntero() = 19 Then 'cuando son horas extras
'Obtengo el desglose de horas extras
Dim dr As DataRow = DtHorasExtras.FiltroPrimero("")
If dr IsNot Nothing Then
If dr("HorasDobles").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 12 Then ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasDobles").ToString().ToEntero().ToString(), .TipoHoras = "01", .HorasExtra = dr("HorasDobles").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal})
If dr("HorasTriples").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 13 Then ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasTriples").ToString().ToEntero().ToString(), .TipoHoras = "02", .HorasExtra = dr("HorasTriples").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal})
'Dim dr As DataRow = DtHorasExtras.FiltroPrimero("")
'If dr IsNot Nothing Then
' If dr("HorasDobles").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 12 Then
' ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasDobles").ToString().ToEntero().ToString(),
' .TipoHoras = "01", .HorasExtra = dr("HorasDobles").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal()})
' End If
' If dr("HorasTriples").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 13 Then
' ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasTriples").ToString().ToEntero().ToString(),
' .TipoHoras = "02", .HorasExtra = dr("HorasTriples").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal})
' End If
'End If
Dim horasextra As Integer = If(Row("ImporteValor").ToString().Replace("-", "").ToEntero() > 0, Row("ImporteValor").ToString().Replace("-", "").ToEntero(), 1)
Dim diasextra As Integer = (horasextra / 3).ToString("N0").ToEntero() + If((horasextra Mod 3) > 0, 1, 0)
If Row("CveSistema").ToString().ToEntero() = 12 Then
ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = diasextra.ToString(),
.TipoHoras = "01", .HorasExtra = horasextra, .ImportePagado = Row("Importe").ToString().ToDecimal()})
End If
If Row("CveSistema").ToString().ToEntero() = 13 Then
ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = diasextra.ToString(),
.TipoHoras = "02", .HorasExtra = horasextra, .ImportePagado = Row("Importe").ToString().ToDecimal})
End If
End If
'subsidio al empleo
If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio

View File

@@ -3818,7 +3818,7 @@ Public Class Timbrado
'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS
If Not ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("P", "N") AndAlso (Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0)) Then
If concep.Impuestos.Count > 0 Then
If concep.Impuestos.Count > 0 AndAlso concep.ObjetoImpuesto.Contiene("02", "03", "04") Then
comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI40.ComprobanteConceptoImpuestos()
comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI40.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {}
@@ -4859,13 +4859,15 @@ 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####"), 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)
Else
cfdi.ConceptoRetencion(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
End If
Next
If concep.ObjetoImpuesto.Contiene("02", "03", "04") Then
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)
Else
cfdi.ConceptoRetencion(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
End If
Next
End If
If concep.CuentaPredial <> "" Then cfdi.CuentaPredial(concep.CuentaPredial)
If concep.NumeroPedimento <> "" Then cfdi.InformacionAduanera(concep.NumeroPedimento)

View File

@@ -794,7 +794,7 @@ Partial Class Bancos_PolizaCheque
e.Row.FCDropDownList("DdlSubProyecto").SelectedValue = e.Row.DBCampo("CveSubProyecto")
e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
If UsuarioActual.CveEmpresa = 119 Then
If UsuarioActual.CveEmpresa.Contiene(119, 7, 11, 12, 122, 145) Then
e.Row.FCLiteral("LtlSP").Visible = False
e.Row.FCDropDownList("DdlSubProyecto").Visible = True
End If

File diff suppressed because it is too large Load Diff

View File

@@ -891,35 +891,42 @@ Partial Class Compras_ReembolsosComprobaciones
'Conta ContPAQ AUTOMATICA
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
If CvePrePolizaIERegistrado > 0 Then
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
If IdCtaProveedor > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
If IdCtaProveedor > 0 Then
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
Else
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
MsgError = "No tiene cuenta contable de proveedor"
End If
Else
MsgError = "No tiene cuenta contable de proveedor"
MsgError = "No tiene cuenta contable de personal"
End If
Else
MsgError = "No tiene cuenta contable de personal"
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
End If
End If
If ChkChequeExcedente.Checked Then
If IdCuentaBancaria > 0 Then
If IdCtaProveedor > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePolizaExcedente, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If IdCuentaBancaria > 0 Then
If IdCtaProveedor > 0 Then
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
Else
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
MsgError = "No tiene cuenta contable de proveedor"
End If
Else
MsgError = "No tiene cuenta contable de proveedor"
MsgError = "No tiene cuenta contable de personal"
End If
Else
MsgError = "No tiene Cuenta contable Bancaria"
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
End If
End If
End If

View File

@@ -77,12 +77,7 @@ Partial Class Contabilidad_PolizasImpresion
folf = FolioFin.Text.ToEntero()
End If
Dim ArchivoReporte As String = "Empresas/Grales/Formatos/Polizas.rdlc"
If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
End If
Dim ArchivoReporte As String = RutaFormatoReporte("Polizas.rdlc")
Dim ObjConta As New ClsContabilidad
If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, CveTipoPoliza:=ddlTipoPoliza.SelectedValue.ToEntero, FolioI:=foli,
FolioF:=folf, CveUsuario:=DdlUsuarioRegistro.SelectedValue.ToEntero, CveSubProyecto:=DdlSegmentoNeg.SelectedValue.ToEntero,
@@ -99,8 +94,6 @@ Partial Class Contabilidad_PolizasImpresion
params.Add(New ReportParameter("Finicio", TxtFechaInicio.Text))
params.Add(New ReportParameter("FFin", TxtFechaFin.Text))
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
params.Add(New ReportParameter("Numero", dr("Folio").ToString))
params.Add(New ReportParameter("Moneda", ""))
params.Add(New ReportParameter("CodigoPostal", ""))

View File

@@ -78,8 +78,8 @@
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="true" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
</li>
<asp:HyperLink ID="HplImprimirPDF" runat="server" Target="_blank" Visible="false" ><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:HyperLink>
</li>
<%-- <li>
<asp:LinkButton ID="LnkImprimePDFResumen" runat="server" Visible="true" OnClick="LnkImprimePDFResumen_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir PDF Resumen</asp:LinkButton>

View File

@@ -5,6 +5,7 @@ Imports ADSNetLibrary.SIGAPI.Models.OC.Response
'Imports DocumentFormat.OpenXml
Imports Extensiones
Imports GemBox.Spreadsheet
Imports Microsoft.JScript
Imports Microsoft.Reporting.WebForms
Partial Class ContabilidadC_RegPrePolizaS
@@ -310,7 +311,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Else
BtnEliminar.Visible = False
LnkExcel.Visible = True
LnkImprimirPDF.Visible = False
DvPlantilla.Visible = True
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
@@ -336,7 +336,6 @@ Partial Class ContabilidadC_RegPrePolizaS
CreaDT()
BtnEliminar.Visible = False
LnkExcel.Visible = True
LnkImprimirPDF.Visible = False
DvPlantilla.Visible = True
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
@@ -463,7 +462,8 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtUsuarioElaboro.Text = dr("Usuario").ToString
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}"
HplImprimirPDF.Visible = True
If UsuarioActual.CveRol = 1 Then
TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString
End If
@@ -542,7 +542,6 @@ Partial Class ContabilidadC_RegPrePolizaS
RegistraScript("comparar();")
LnkExcel.Visible = False
LnkImprimirPDF.Visible = True
Else
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnEliminar.Visible = False
@@ -2164,23 +2163,6 @@ Partial Class ContabilidadC_RegPrePolizaS
RegistraScript("calculateCargo()", "abono")
RegistraScript("comparar()", "compara")
End Sub
'Protected Sub DdlSubProyectoFiltroMov_SelectedIndexChanged(sender As Object, e As EventArgs)
' For Each Gvr As GridViewRow In GvMov.Rows
' If DdlSubProyectoFiltroMov.SelectedValue.ToEntero > 0 Then
' If Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero = DdlSubProyectoFiltroMov.SelectedValue.ToEntero Or Not Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero > 0 Then
' Gvr.Visible = True
' Else
' Gvr.Visible = False
' End If
' Else
' Gvr.Visible = True
' End If
' Next
' UpPrePoliza.Update()
' RegistraScript("calculateAbono()", "cargo")
' RegistraScript("calculateCargo()", "abono")
' RegistraScript("comparar()", "compara")
'End Sub
Private Sub GvMov_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvMov.RowEditing
Actualizar = True
@@ -2716,81 +2698,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub
#Region "Paquete Egresos"
Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(282).ToEntero = 1 Then
ImprimePrePolizasDetalleResumen("PDF")
Else
ImprimirPolizaPDF(IdPoliza)
End If
End Sub
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
Dim Bytes As Byte() = Nothing
Dim ObjConta As New ClsContabilidad
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dtVC As DataTable
Dim dr As DataRow
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
dr = dtVC.Rows(0)
Dim ruta As String = ""
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
If UsuarioActual.CveEmpresa.Contiene(141) Then
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
Else
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
End If
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
params.Add(New ReportParameter("Moneda", ""))
params.Add(New ReportParameter("CodigoPostal", ""))
If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
End If
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
End If
If Archivo.Exists Then
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
Else
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
End If
ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True)
End If
'Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
ObjConta.Dispose()
End Sub
#End Region
#Region "Crear A Partier de"
@@ -2928,7 +2835,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'Next
End If
LnkExcel.Visible = False
LnkImprimirPDF.Visible = True
HplImprimirPDF.Visible = True
Else
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnEliminar.Visible = False
@@ -3220,98 +3127,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub
Private Sub ImprimePrePolizasDetalleResumen(Optional Tipo As String = "PDF")
Dim Archivo As System.IO.FileInfo
Dim params As New List(Of ReportParameter)
Dim Bytes As Byte() = Nothing
Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
Dim ConceptoPoliza As String = TxtConcepto.Text
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
Dim ObjConta As New ClsContabilidad
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dtVC As DataTable
Dim dr As DataRow
dtVC = ObjConta.DtResultados '.FiltraParametros("Contabilizable = 1", "Orden")
dr = dtVC.Rows(0)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", DdlTipoPoliza.SelectedItem.Text))
params.Add(New ReportParameter("Finicio", TxtFechaDocumento.Text))
params.Add(New ReportParameter("FFin", TxtFechaDocumento.Text))
params.Add(New ReportParameter("Fecha", TxtFechaDocumento.Text))
params.Add(New ReportParameter("Numero", TxtFolio.Text))
params.Add(New ReportParameter("Moneda", If(CveMoneda = 2, "Dolar", "Peso Mexicano")))
params.Add(New ReportParameter("CodigoPostal", ""))
params.Add(New ReportParameter("UsuarioRegistro", TxtUsuarioElaboro.Text))
params.Add(New ReportParameter("ConceptoPoliza", ConceptoPoliza))
params.Add(New ReportParameter("Folio", TxtFolio.Text))
If Logo.Exists Then
params.Add(New ReportParameter("pImg", $"file://{Logo.FullName}"))
Else
params.Add(New ReportParameter("pImg", ""))
End If
Dim RutaReprote As String
If Archivo.Exists Then
RutaReprote = Archivo.FullName
Else
RutaReprote = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc"
End If
Dim TipoPolizaString = ""
Select Case DdlTipoPoliza.SelectedValue.ToEntero
Case 1
TipoPolizaString = "I"
Exit Select
Case 2
TipoPolizaString = "E"
Exit Select
Case Else
TipoPolizaString = "D"
Exit Select
End Select
ImprimirbytesPDF(StreamPDF(RutaReprote, dtVC, params, "PrePoliza", Formato:=Tipo), $"P{TipoPolizaString}{TxtFolio.Text}", Formato:=Tipo, Descarga:=True)
End If
ObjConta.Dispose()
End Sub
Protected Sub LnkImprimePDFResumen_Click(sender As Object, e As EventArgs)
ImprimePrePolizasDetalleResumen("PDF")
End Sub
'Protected Sub LnkImprimeExcelResumen_Click(sender As Object, e As EventArgs)
' ImprimePrePolizasDetalleResumen("Excel")
'End Sub
End Class

View File

@@ -1,4 +1,4 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoMensual" %>
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoMensual" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
@@ -54,19 +54,41 @@
<div class="portlet-title portlet-filterT smalltitle magindate">
<div class="tools">
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 12px;">
<li>Ejercicio:
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 100px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</li>
<li>
<label class="col-md-1" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me">
<div class="row">
<div class="col-md-1 truncate">
Cuenta:
</div>
<div class="col-md-3">
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">
Ejercicio:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 100px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</div>
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div runat="server" id="DivProyecto" class="col-md-2">
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList>
</div>
<div class="col-md-1 truncate" style="display:none;">
Periodo:
</div>
<div class="col-md-1" style="display:none;">
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
@@ -78,52 +100,38 @@
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12" Selected="True"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</li>
<li>SubProyecto:
<asp:DropDownList ID="DdlSubProyecto" Width="180px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
</li>
<li>Divisor:
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<div class="col-md-1 truncate">
Divisor:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Trimestre Cuatrimestre:
<asp:DropDownList ID="DdlTri" runat="server" CssClass="select2me" Width="100px" >
</div>
<div class="col-md-1 truncate">
Trimestre Cuatrimestre:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlTri" runat="server" CssClass="select2me" Width="100px" >
<asp:ListItem Value="0">NO</asp:ListItem>
<asp:ListItem Value="1">Trimestre</asp:ListItem>
<asp:ListItem Value="2">Cuatrimestre</asp:ListItem>
</asp:DropDownList>
</li>
<li>Cuenta:
</li>
<li>
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
@@ -213,7 +221,7 @@
<asp:BoundField HeaderText="T4" DataField="Tri1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="C4" DataField="Cua1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
</Columns>
</asp:GridView>

View File

@@ -88,10 +88,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
Private Sub InicializaValores()
CargaCombos()
End Sub
Private Sub CargaCombos()
Private Sub CargaCombos()
Dim Conta As New ClsContabilidad
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
DdlEjercicio.DataSource = Conta.DtResultados
@@ -115,13 +113,9 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
DdlEjercicio.DataBind()
DdlEjercicio.SelectedValueExist(Now.Year.ToString)
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyecto.SelectedValue = "-1"
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
End Sub
#End Region
@@ -182,11 +176,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
GvMensual2.Columns(27).Visible = True
GvMensual2.Columns(42).Visible = True
End If
End If
UpMensual.Update()
If GvMensual2.Rows.Count > 0 Then
@@ -194,10 +184,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
LnkExportar.Visible = True
UpAcciones.Update()
End If
'RegistraScript($"LimpiaCeros();")
End If
Conta.Dispose()
End Sub
@@ -208,131 +195,105 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Style.Add("font-weight", "bold")
End If
'If e.Row.RowIndex = 0 Then
' e.Row.Style.Add("font-weight", "bold")
'End If
setgrafica(e)
If e.Row.DataKey("Level").ToEntero = 0 Then
If e.Row.DataKey("Level") = "0" Then
e.Row.CssClass = "Totales"
End If
If e.Row.DataKey("Level").ToEntero = 1 Then
ElseIf e.Row.DataKey("Level") = "1" Then
e.Row.CssClass = "SubTotales"
End If
'If e.Row.DBCampo("TipoCuenta").Contiene("3", "4") Then
' e.Row.CssClass = "Totales"
'ElseIf e.Row.DBCampo("TipoCuenta").Contiene("1") Then
' e.Row.CssClass = "SubTotales"
'End If
Dim Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre As Decimal
Enero = e.Row.DBCampo("Enero").ToDecimal()
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
Abril = e.Row.DBCampo("Abril").ToDecimal()
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
Junio = e.Row.DBCampo("Junio").ToDecimal()
Julio = e.Row.DBCampo("Julio").ToDecimal()
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
Enero = e.Row.DBCampo("Enero").ToDecimal()
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
Abril = e.Row.DBCampo("Abril").ToDecimal()
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
Junio = e.Row.DBCampo("Junio").ToDecimal()
Julio = e.Row.DBCampo("Julio").ToDecimal()
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
For x = 2 To GvMensual2.Columns.Count - 1
For x = 2 To GvMensual2.Columns.Count - 1
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
e.Row.Cells(x).Text = "-"
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
e.Row.Cells(x).ForeColor = Drawing.Color.Red
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
e.Row.Cells(x).Text = "-"
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
e.Row.Cells(x).ForeColor = Drawing.Color.OrangeRed
End If
If x = 2 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 3 Then
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
End If
If x = 6 Then
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
End If
If x = 10 Then
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
End If
If x = 14 Then
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Mayo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Mayo.ToString("###,###,##0"), Mayo.ToString("###,###,###.00")) }</a>"
End If
If x = 17 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Junio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Junio.ToString("###,###,##0"), Junio.ToString("###,###,###.00")) }</a>"
End If
If x = 21 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Julio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Julio.ToString("###,###,##0"), Julio.ToString("###,###,###.00")) }</a>"
End If
If x = 24 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Agosto < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Agosto.ToString("###,###,##0"), Agosto.ToString("###,###,###.00")) }</a>"
End If
If x = 28 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Septiembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Septiembre.ToString("###,###,##0"), Septiembre.ToString("###,###,###.00")) }</a>"
End If
If x = 32 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
e.Row.Cells(x).Text = $"<a { If(Octubre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Octubre.ToString("###,###,##0"), Octubre.ToString("###,###,###.00")) }</a>"
End If
If x = 35 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
If x = 35 Then
e.Row.Cells(x).Text = $"<a { If(Noviembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Noviembre.ToString("###,###,##0"), Noviembre.ToString("###,###,###.00")) }</a>"
End If
If x = 38 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
If x = 38 Then
e.Row.Cells(x).Text = $"<a { If(Diciembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Diciembre.ToString("###,###,##0"), Diciembre.ToString("###,###,###.00")) }</a>"
End If
Next
If Enero = 0 Then
e.Row.Cells(2).Text = "-"
End If
Next
If Enero = 0 Then
e.Row.Cells(2).Text = "-"
Else
End If
' e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
' Level 0 Total 1 SubTotal 1
End If
End If
End Sub
Public Sub setgrafica(e As GridViewRowEventArgs)
@@ -356,23 +317,19 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
Dim SubProyecto As String = ""
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
SubProyecto = DdlSubProyecto.SelectedItem.Text
End If
Dim SbFiltros As New StringBuilder()
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
SbFiltros.AppendFormat("Cuenta : {0}|", DdlCuentas.SelectedItem.Text)
SbFiltros.AppendFormat("Centro Costo : {0}|", If(DdlSubproyecto.SelectedValue.ToEntero > 0, DdlSubproyecto.SelectedItem.Text, "Todos"))
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, "Anexo del Catálogo - Mensual", DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}", DatosFiltros:=SbFiltros.ToString())
'GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}", "Anexo del Catálogo - Mensual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, "Anexo del Catálogo - Mensual", DatosFiltros:=SbFiltros.ToString())
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
' Verifies that the control is rendered
End Sub
End Class

View File

@@ -66,8 +66,8 @@
</asp:DropDownList>
</div>
<label class="col-md-1" >Consolidado: </label>
<div class="col-md-1">
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
<div class="col-md-1" runat="server" id="DVConsolidado2" visible="false">
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
<asp:ListItem Value ="2">Consolidado</asp:ListItem>

View File

@@ -98,6 +98,13 @@ Partial Class AC_RepEstadoActividades
CargaEjercicios()
CargaDatos()
If UsuarioActual.Empresa.GrupoEmpresa > 0 And UsuarioActual.CveRol = 1 Then
DVConsolidado1.Visible = True
DVConsolidado2.Visible = True
End If
End If
End Sub

View File

@@ -64,8 +64,8 @@
</asp:DropDownList>
</div>
<label class="col-md-1" >Consolidado: </label>
<div class="col-md-1">
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
<div class="col-md-1" runat="server" id="DVConsolidado2" visible="false">
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
<asp:ListItem Value ="2">Consolidado</asp:ListItem>

View File

@@ -149,6 +149,11 @@ Partial Class AC2_SituacionFinanciera
CargaEjercicios()
If UsuarioActual.Empresa.GrupoEmpresa > 0 And UsuarioActual.CveRol = 1 Then
DVConsolidado1.Visible = True
DVConsolidado2.Visible = True
End If
'CargaDatos()
End If
End Sub

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -40,19 +40,29 @@
<div class="row">
<div class="col-md-12">
<label class="col-md-1" runat="server" id="LblVista">Vista: </label>
<div class="col-md-1 " runat="server" >
<asp:DropDownList ID="DdlVista" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlVista_SelectedIndexChanged">
<asp:ListItem Value="1" Selected="True">Ejercicio</asp:ListItem>
<asp:ListItem Value="2">Mensual</asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1" runat="server" id="LiEjercicioLbl">Ejercicio Inicio: </label>
<div class="col-md-1 " runat="server" id="LiEjercicioDdl">
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlEjercicio_SelectedIndexChanged">
<div class="col-md-2 " runat="server" id="LiEjercicioDdl">
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="130px" AutoPostBack="true" >
</asp:DropDownList>
</div>
<label class="col-md-1" runat="server" id="LiEjercicioLbl2" visible="True">Ejercicio Fin: </label>
<div class="col-md-1" runat="server" id="LiEjercicioDdl2" visible="True">
<asp:DropDownList ID="DdlEjercicio2" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlEjercicio2_SelectedIndexChanged">
<div class="col-md-2" runat="server" id="LiEjercicioDdl2" visible="True">
<asp:DropDownList ID="DdlEjercicio2" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="130px" AutoPostBack="true" >
</asp:DropDownList>
</div>
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
<div class="col-md-2 " runat="server" id="LiPeriodoDdl">
<label class="col-md-2" style="width: 80px;" runat="server" id="LblPeriodo" visible="false" >Periodo: </label>
<div class="col-md-2 " runat="server" id="DivPeriodo" visible="false">
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>

View File

@@ -31,18 +31,32 @@ Partial Class Finanzas_RepRazonesFinancieras2
End Property
Property DTEjercicios As DataTable
Get
If ViewState("DTEjercicios") Is Nothing Then
ViewState("DTEjercicios") = New DataTable
End If
Return DirectCast(ViewState("DTEjercicios"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTEjercicios") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Tab.ActiveTabIndex = 0
CargaEjercicios()
CargaDTEjercicios()
DdlVista_SelectedIndexChanged(Nothing, Nothing)
CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual)
ValidaEjercicios()
@@ -85,26 +99,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
UpFiltros.Update()
End Sub
Private Sub CargaEjercicios()
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim ClsConta As New ClsContabilidad
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
DdlEjercicio.DataSource = ClsConta.DtResultados
DdlEjercicio2.DataSource = ClsConta.DtResultados
Else
DdlEjercicio.DataSource = Nothing
DdlEjercicio2.DataSource = Nothing
End If
ClsConta.Dispose()
DdlEjercicio.DataBind()
DdlEjercicio2.DataBind()
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
If DdlEjercicio.Items.Count = 0 Then
DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString))
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
@@ -137,8 +132,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
LnkExportar.Visible = False
GvBalanceGeneralOcultarColumnas(GvBalanceGeneral, 1)
Dim FechaI = New Date(DdlEjercicio.SelectedValue.ToEntero, 1, 1)
Dim FechaF = New Date(DdlEjercicio2.SelectedValue.ToEntero, 1, 1)
Dim CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero
@@ -147,7 +141,12 @@ Partial Class Finanzas_RepRazonesFinancieras2
Dim objFinanzas As New ClsFinanzas
Dim dtTemp As New DataTable
If objFinanzas.GetRazonesFinancierasBalanceGeneralRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero) Then
Dim FechasConsultar As String = GetFechasConsultar()
' Alert(FechasConsultar)
If objFinanzas.GetRazonesFinancierasBalanceGeneralRep(-1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero, FechasConsultar, DdlVista.SelectedValue.ToEntero) Then
dtTemp = objFinanzas.DtResultados
GvBalanceGeneralMostrarColumnas(dtTemp, GvBalanceGeneral)
@@ -168,6 +167,8 @@ Partial Class Finanzas_RepRazonesFinancieras2
End Sub
Private Sub GvBalanceGeneralOcultarColumnas(ByRef Gv As GridView, Optional index As Integer = 2)
For index = 2 To Gv.Columns.Count - 1
@@ -232,8 +233,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
GVEstadoRsultadosOcultarColumnas(GVEstadoRsultados, 1)
Dim FechaI = New Date(DdlEjercicio.SelectedValue.ToEntero, 1, 1)
Dim FechaF = New Date(DdlEjercicio2.SelectedValue.ToEntero, 1, 1)
Dim CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero
@@ -242,7 +242,9 @@ Partial Class Finanzas_RepRazonesFinancieras2
Dim objFinanzas As New ClsFinanzas
Dim dtTemp As New DataTable
If objFinanzas.GetRazonesFinancierasEstadoResultadosRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero) Then
Dim FechasConsultar As String = GetFechasConsultar()
If objFinanzas.GetRazonesFinancierasEstadoResultadosRep(-1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero, FechasConsultar, DdlVista.SelectedValue.ToEntero) Then
dtTemp = objFinanzas.DtResultados
GVEstadoRsultadosMostrarColumnas(dtTemp, GVEstadoRsultados)
@@ -280,11 +282,12 @@ Partial Class Finanzas_RepRazonesFinancieras2
CType(Gv.Columns(index + 4), BoundField).DataField = dt.Columns(index + 4).ColumnName
Gv.Columns(index + 4).Visible = True
Dim tmpDate As Date
If (Date.TryParse(dt.Columns(index + 4).ColumnName, tmpDate)) Then
CType(Gv.Columns(index + 4), BoundField).HeaderText = tmpDate.ToString("dd-MMM").Replace(".", "")
Else
CType(Gv.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
End If
CType(Gv.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
'If (Date.TryParse(dt.Columns(index + 4).ColumnName, tmpDate)) Then
' CType(Gv.Columns(index + 4), BoundField).HeaderText = tmpDate.ToString("dd-MMM").Replace(".", "")
'Else
' CType(Gv.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
'End If
Next
End Sub
@@ -329,17 +332,17 @@ Partial Class Finanzas_RepRazonesFinancieras2
GVRatiosOcultarColumnas(GVRatios, 1)
Dim FechaI = New Date(DdlEjercicio.SelectedValue.ToEntero, 1, 1)
Dim FechaF = New Date(DdlEjercicio2.SelectedValue.ToEntero, 1, 1)
Dim CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero
Dim FechasConsultar As String = GetFechasConsultar()
Dim objFinanzas As New ClsFinanzas
If objFinanzas.GetRazonesFinancierasRatiosRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero) Then
If objFinanzas.GetRazonesFinancierasRatiosRep(-1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero, FechasConsultar, DdlVista.SelectedValue.ToEntero) Then
DTRatios = objFinanzas.DtResultados
GVRatiosMostrarColumnas(DTRatios, GVRatios)
@@ -387,6 +390,18 @@ Partial Class Finanzas_RepRazonesFinancieras2
If e.Row.RowType = DataControlRowType.DataRow Then
For x = 1 To DTRatios.Columns.Count
If e.Row.DataKey("Ratio") = "INCREMENTO DE VENTAS" Then
Dim asddas = ""
End If
If e.Row.Cells(x).Text.ToDecimal < 0 Then
e.Row.Cells(x).ForeColor = Drawing.Color.Red
End If
Next
If e.Row.DataKey("Tipo").ToEntero = 1 Then
e.Row.Font.Bold = True
End If
@@ -422,6 +437,12 @@ Partial Class Finanzas_RepRazonesFinancieras2
End If
End If
End Sub
@@ -477,15 +498,143 @@ Partial Class Finanzas_RepRazonesFinancieras2
Protected Sub DdlVista_SelectedIndexChanged(sender As Object, e As EventArgs)
LblPeriodo.Visible = False
DivPeriodo.Visible = False
DdlPeriodo.SelectedValueExist(12)
DdlEjercicio.SelectedValue = Nothing
DdlEjercicio2.SelectedValue = Nothing
DdlEjercicio.Items.Clear()
DdlEjercicio2.Items.Clear()
If DdlVista.SelectedValue.ToEntero = 1 Then
LblPeriodo.Visible = True
DivPeriodo.Visible = True
AddHandler DdlEjercicio.SelectedIndexChanged, AddressOf DdlEjercicio_SelectedIndexChanged
AddHandler DdlEjercicio2.SelectedIndexChanged, AddressOf DdlEjercicio2_SelectedIndexChanged
CargaEjercicios()
Else
RemoveHandler CType(DdlEjercicio, DropDownList).SelectedIndexChanged, AddressOf DdlEjercicio_SelectedIndexChanged
RemoveHandler CType(DdlEjercicio2, DropDownList).SelectedIndexChanged, AddressOf DdlEjercicio2_SelectedIndexChanged
CargaMeses()
End If
UpFiltros.Update()
End Sub
Private Sub CargaDTEjercicios()
Dim ClsConta As New ClsContabilidad
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
DTEjercicios = ClsConta.DtResultados
End If
ClsConta.Dispose()
End Sub
Private Sub CargaEjercicios()
Dim Count As Integer = 0
For Each dRow As DataRow In DTEjercicios.Rows
DdlEjercicio.Items.Add(New ListItem($"{dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}"))
DdlEjercicio2.Items.Add(New ListItem($"{dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}"))
Count = Count + 1
Next
If Count > 0 Then
DdlEjercicio.SelectedIndex = 0
DdlEjercicio2.SelectedIndex = 0
End If
End Sub
Private Sub CargaMeses()
Dim Count As Integer = 0
For Each dRow As DataRow In DTEjercicios.Rows
DdlEjercicio.Items.Add(New ListItem($"Enero {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-01"))
DdlEjercicio.Items.Add(New ListItem($"Febrero {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-02"))
DdlEjercicio.Items.Add(New ListItem($"Marzo {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-03"))
DdlEjercicio.Items.Add(New ListItem($"Abril {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-04"))
DdlEjercicio.Items.Add(New ListItem($"Mayo {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-05"))
DdlEjercicio.Items.Add(New ListItem($"Junio {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-06"))
DdlEjercicio.Items.Add(New ListItem($"Julio {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-07"))
DdlEjercicio.Items.Add(New ListItem($"Agosto {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-08"))
DdlEjercicio.Items.Add(New ListItem($"Septiembre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-09"))
DdlEjercicio.Items.Add(New ListItem($"Octubre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-10"))
DdlEjercicio.Items.Add(New ListItem($"Noviembre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-11"))
DdlEjercicio.Items.Add(New ListItem($"Diciembre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-12"))
DdlEjercicio2.Items.Add(New ListItem($"Enero {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-01"))
DdlEjercicio2.Items.Add(New ListItem($"Febrero {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-02"))
DdlEjercicio2.Items.Add(New ListItem($"Marzo {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-03"))
DdlEjercicio2.Items.Add(New ListItem($"Abril {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-04"))
DdlEjercicio2.Items.Add(New ListItem($"Mayo {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-05"))
DdlEjercicio2.Items.Add(New ListItem($"Junio {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-06"))
DdlEjercicio2.Items.Add(New ListItem($"Julio {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-07"))
DdlEjercicio2.Items.Add(New ListItem($"Agosto {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-08"))
DdlEjercicio2.Items.Add(New ListItem($"Septiembre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-09"))
DdlEjercicio2.Items.Add(New ListItem($"Octubre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-10"))
DdlEjercicio2.Items.Add(New ListItem($"Noviembre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-11"))
DdlEjercicio2.Items.Add(New ListItem($"Diciembre {dRow("Ejercicio").ToString}", $"{dRow("Ejercicio").ToString}-12"))
Count = Count + 1
Next
If Count > 0 Then
DdlEjercicio.SelectedIndex = 0
DdlEjercicio2.SelectedIndex = 0
End If
End Sub
Private Function GetFechasConsultar() As String
Dim ListaFechas As New List(Of String)
If DdlVista.SelectedValue.ToEntero = 1 Then 'POR EJERCICIO
If DdlEjercicio2.SelectedValue.ToEntero >= DdlEjercicio.SelectedValue.ToEntero Then
Dim x As Integer = DdlEjercicio.SelectedValue.ToEntero
For x = DdlEjercicio.SelectedValue.ToEntero To DdlEjercicio2.SelectedValue.ToEntero
ListaFechas.Add($"{x}-12-31")
Next x
End If
Else ' POR MESES
ListaFechas.Add($"{DdlEjercicio.SelectedValue}-01".ToDate.LastDayOfMonth.ToString("yyyy-MM-dd"))
ListaFechas.Add($"{DdlEjercicio2.SelectedValue}-01".ToDate.LastDayOfMonth.ToString("yyyy-MM-dd"))
End If
Return String.Join(",", ListaFechas)
End Function
End Class

View File

@@ -24,16 +24,9 @@
Sub Application_Start(sender As Object, e As EventArgs)
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
Dim sessionData As New Dictionary(Of String, HttpSessionState)()
Application("s") = sessionData
'BANDERA PARA VALIDACION DE CFDI
Application("GlobalValidarCFDI") = True
@@ -42,39 +35,18 @@
GuardaLogAsax(String.Format("Globalasax 5:{0}", DateTime.Now))
Using ObjAC As New ClsAC
'If ObjAC.GetClasificacionFuncional() Then Application("GlobalDTAC_ClasificacionFuncional") = ObjAC.DtResultados Else Application("GlobalDTAC_ClasificacionFuncional") = Nothing
'If ObjAC.GetClasificacionGeografica() Then Application("GlobalDTAC_ClasificacionGeografica") = ObjAC.DtResultados Else Application("GlobalDTAC_ClasificacionGeografica") = Nothing
'If ObjAC.GetFuentesFinanciamiento() Then Application("GlobalDTAC_FuentesFinanciamiento") = ObjAC.DtResultados Else Application("GlobalDTAC_FuentesFinanciamiento") = Nothing
If ObjAC.GetFuenteFinanciamientoCONAC() Then Application("GlobalDTAC_FuentesFinanciamientoCONAC") = ObjAC.DtResultados Else Application("GlobalDTAC_FuentesFinanciamientoCONAC") = Nothing
If ObjAC.GetProgramaCONAC() Then Application("GlobalDTAC_ProgramasCONAC") = ObjAC.DtResultados Else Application("GlobalDTAC_ProgramasCONAC") = Nothing
'If ObjAC.GetUnidadesAdministrativas() Then Application("GlobalDTAC_UnidadesAdministrativas") = ObjAC.DtResultados Else Application("GlobalDTAC_UnidadesAdministrativas") = Nothing
'If ObjAC.GetClasificacionAdministrativa() Then Application("GlobalDTAC_ClasificacionAdministrativa") = ObjAC.DtResultados Else Application("GlobalDTAC_ClasificacionAdministrativa") = Nothing
'If ObjAC.GetPD_EjeRector() Then Application("GlobalDTAC_PD_EjeRector") = ObjAC.DtResultados Else Application("GlobalDTAC_PD_EjeRector") = Nothing
If ObjAC.GetPD_Programas() Then Application("GlobalDTAC_PD_Programas") = ObjAC.DtResultados Else Application("GlobalDTAC_PD_Programas") = Nothing
If ObjAC.GetPD_Estrategias() Then Application("GlobalDTAC_PD_Estrategias") = ObjAC.DtResultados Else Application("GlobalDTAC_PD_Estrategias") = Nothing
If ObjAC.GetPD_LineasAccion() Then Application("GlobalDTAC_PD_LineasAccion") = ObjAC.DtResultados Else Application("GlobalDTAC_PD_LineasAccion") = Nothing
If ObjAC.GetPD_Metas() Then Application("GlobalDTAC_PD_Metas") = ObjAC.DtResultados Else Application("GlobalDTAC_PD_Metas") = Nothing
If ObjAC.GetTipoGasto() Then Application("GlobalDTAC_TipoGasto") = ObjAC.DtResultados Else Application("GlobalDTAC_TipoGasto") = Nothing
'If ObjAC.GetProgramaOperativo() Then Application("GlobalDTAC_ProgramaOperativo") = ObjAC.DtResultados Else Application("GlobalDTAC_ProgramaOperativo") = Nothing
If ObjAC.GetRubrosIngreso() Then Application("GlobalDTAC_RubrosIngreso") = ObjAC.DtResultados Else Application("GlobalDTAC_RubrosIngreso") = Nothing
'If ObjAC.GetFuentesRecaudacion() Then Application("GlobalDTAC_FuentesRecaudacion") = ObjAC.DtResultados Else Application("GlobalDTAC_FuentesRecaudacion") = Nothing
If ObjAC.GetMatrizID Then Application("GlobalDTAC_MatrizIngresos") = ObjAC.DtResultados Else Application("GlobalDTAC_MatrizIngresos") = Nothing
If ObjAC.GetMatrizGD Then Application("GlobalDTAC_MatrizEgresos") = ObjAC.DtResultados Else Application("GlobalDTAC_MatrizEgresos") = Nothing
' If ObjAC.GetAreas() Then Application("GlobalDTAC_Areas") = ObjAC.DtResultados Else Application("GlobalDTAC_Areas") = Nothing
'If ObjAC.GetProyectosProceso() Then Application("GlobalDTAC_ProyectosProceso") = ObjAC.DtResultados Else Application("GlobalDTAC_ProyectosProceso") = Nothing
'If ObjAC.GetFuncion() Then Application("GlobalDTAC_Funcion") = ObjAC.DtResultados Else Application("GlobalDTAC_Funcion") = Nothing
'If ObjAC.GetSubFuncion() Then Application("GlobalDTAC_SubFuncion") = ObjAC.DtResultados Else Application("GlobalDTAC_SubFuncion") = Nothing
'If ObjAC.GetSubProgramas() Then Application("GlobalDTAC_SubProgramas") = ObjAC.DtResultados Else Application("GlobalDTAC_SubProgramas") = Nothing
'If ObjAC.GetUbicaciones() Then Application("GlobalDTAC_Ubicaciones") = ObjAC.DtResultados Else Application("GlobalDTAC_Ubicaciones") = Nothing
' If ObjAC.GetOG() Then Application("GlobalDTAC_OG") = ObjAC.DtResultados Else Application("GlobalDTAC_OG") = Nothing
' If ObjAC.GetClasificadorOG() Then Application("GlobalDTAC_ClasificadorOG") = ObjAC.DtResultados Else Application("GlobalDTAC_ClasificadorOG") = Nothing
'If ObjAC.GetProgramas() Then Application("GlobalDTAC_Programas") = ObjAC.DtResultados Else Application("GlobalDTAC_Programas") = Nothing
' If ObjAC.GetCuentas() Then Application("GlobalDTAC_Cuentas") = ObjAC.DtResultados Else Application("GlobalDTAC_Cuentas") = Nothing
' If ObjAC.GetDependencias() Then Application("GlobalDTAC_Dependencias") = ObjAC.DtResultados Else Application("GlobalDTAC_Dependencias") = Nothing
'If ObjAC.GetFinalidad() Then Application("GlobalDTAC_Finalidad") = ObjAC.DtResultados Else Application("GlobalDTAC_Finalidad") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 6:{0}", DateTime.Now))
Using Finan As New ClsFinanzas
@@ -82,23 +54,6 @@
End Using
'GuardaLogAsax(String.Format("Globalasax 7:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'C A R G A - N O M
'Using ObjNom As New ClsNominas()
' 'If ObjNom.GetConceptos(-1) Then Application("GlobalDTNomConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomConceptos") = Nothing
' 'If ObjNom.GetConceptosFunciones() Then Application("GlobalDTNomConceptosFunciones") = ObjNom.DtResultados Else Application("GlobalDTNomConceptosFunciones") = Nothing
' 'If ObjNom.GetTiposPeriodos() Then Application("GlobalDTTipoPeriodo") = ObjNom.DtResultados Else Application("GlobalDTTipoPeriodo") = Nothing
' 'If ObjNom.GetPeriodos(-1, -1, -1, -1, -1) Then Application("GlobalDTNominasPeriodos") = ObjNom.DtResultados Else Application("GlobalDTNominasPeriodos") = Nothing
' 'If ObjNom.GetBancos Then Application("GlobalDTNomSatBancos") = ObjNom.DtResultados Else Application("GlobalDTNomSatBancos") = Nothing
' 'If ObjNom.GetConceptos Then Application("GlobalDTNomSatConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomSatConceptos") = Nothing
' 'If ObjNom.GetRegimenContratacion Then Application("GlobalDTNomSatRegimenContratacion") = ObjNom.DtResultados Else Application("GlobalDTNomSatRegimenContratacion") = Nothing
' 'If ObjNom.GetRiesgoPuesto Then Application("GlobalDTNomSatRiesgoPuesto") = ObjNom.DtResultados Else Application("GlobalDTNomSatRiesgoPuesto") = Nothing
' 'If ObjNom.GetTipoIncapacidad Then Application("GlobalDTNomSatTipoIncapacidad") = ObjNom.DtResultados Else Application("GlobalDTNomSatTipoIncapacidad") = Nothing
'End Using
' GuardaLogAsax(String.Format("Globalasax 9:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------S I S T E M A ----------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -110,20 +65,18 @@
GuardaLogAsax(String.Format("Globalasax 35:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'G L O B A L E S A P L I C A C I Ó N
Using ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Now) Then
If ObjGral.DtResultados.Rows.Count > 0 Then
Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
End If
End If
End Using
GuardaLogAsax(String.Format("Globalasax 41:{0}", DateTime.Now))
'Using ObjGral As New ClsGenerales
' If ObjGral.GetTipoCambio(-1, Now) Then
' If ObjGral.DtResultados.Rows.Count > 0 Then
' Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
' End If
' End If
'End Using
'GuardaLogAsax(String.Format("Globalasax 41:{0}", DateTime.Now))
BundleConfig.RegistrarBundles(BundleTable.Bundles)

View File

@@ -15,7 +15,7 @@
.infomov .col-md-1, .infomov .col-md-2, .infomov .col-md-6 {
float: left;
padding-right: 5px;
padding-right: 5px;
}
.infomov .col-md-1 {
@@ -116,47 +116,14 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<%--FILTROS--%>
<asp:UpdatePanel ID="UPEncabezado" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 39px;">
<div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" />
</div>
<div class="titlefiltros caption ">
<div class="row" style="padding-top: 10px;">
<%--<label class="col-md-1 truncate">Almacén:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlCAlmacen" runat="server" CssClass="form-control input-sm" Style="max-width: 200px" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
</div>--%>
<label class="col-md-1 truncate">Concepto:</label>
<div class="col-md-3 ">
<asp:DropDownList ID="DdlCConcepto" DataTextField="Concepto" CssClass="form-control input-sm" DataValueField="CveConcepto" runat="server" Style="max-width: 200px"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Folio:</label>
<div class="col-md-2 ">
<asp:TextBox ID="TxtCFolio" runat="server" Style="max-width: 120px" ></asp:TextBox>
</div>
</div>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<asp:UpdatePanel ID="UpGenerales" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-8">
<div class="portlet smmallpadding light bordered infomov" style="width: 750px">
<div class="portlet xspadding light bordered infomov" style="width: 750px">
<div class="portlet-title">
<div class="tools">
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
@@ -797,14 +764,14 @@
<ItemTemplate>
<asp:Literal ID="lbCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,##0.######}")%>'> </asp:Literal>
</ItemTemplate>
<ItemStyle Width="43px"></ItemStyle>
<ItemStyle Width="60px"></ItemStyle>
</asp:TemplateField>
<asp:BoundField HeaderText="Producto" ReadOnly="true" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Unidad">
<ItemTemplate>
<asp:Literal ID="lbUnidad" runat="server" Text='<%# Eval("UnidadMedida")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="73px"></ItemStyle>
<ItemStyle Width="80px"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Precio unitario" Visible="false">
<EditItemTemplate>
@@ -813,14 +780,14 @@
<ItemTemplate>
<asp:Literal ID="lbPrecio" runat="server" Text='<%# Eval("PU", "{0:#,###,###.00####}")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="63px" HorizontalAlign="Right"></ItemStyle>
<ItemStyle Width="80px" HorizontalAlign="Right"></ItemStyle>
<FooterTemplate>
<b>
<asp:Literal ID="lbTotProducto" runat="server" Text="Total:"></asp:Literal></b>
</FooterTemplate>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-Width="63px" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="Total" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Literal>
</ItemTemplate>
@@ -901,15 +868,12 @@
</ItemTemplate>
<ItemStyle Width="90px"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Observaciones">
<EditItemTemplate>
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("Observaciones")%>' Style="text-align: right;"></asp:TextBox>
</EditItemTemplate>
<asp:TemplateField HeaderText="Observaciones">
<ItemTemplate>
<asp:Literal ID="lblObservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
<ItemStyle Width="120px" ></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>

View File

@@ -625,11 +625,6 @@ Partial Class Inventarios_EntradasSalidas
DdlConcepto.DataSource = GlobalDTInvConceptos.FiltraParametros(IIf(UsuarioActual.CveEmpresa.Contiene(72, 80, 1), "CveConcepto NOT IN (4,5,10)", "CveConcepto NOT IN (1,2,4,5,8,9,10,12,26,27,29)").ToString)
DdlConcepto.DataBind()
'FILTRO
DdlCConcepto.DataSource = GlobalDTInvConceptos.FiltraParametros("CveConcepto NOT IN (4,5)")
DdlCConcepto.DataBind()
'Llenar el dropdownlist de almacén
If Not IfNull(Request("CI"), -1).ToString.ToEntero > 0 AndAlso Not IfNull(Request("CveEntregaAlmacen"), -1).ToString.ToEntero > 0 Then
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
@@ -743,11 +738,7 @@ Partial Class Inventarios_EntradasSalidas
#Region " CARGA DATOS "
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
GvM.EditIndex = -1
LimpiarMovimiento()
CargaDatos(-1, DdlCConcepto.SelectedValue.ToEntero(), TxtCFolio.Text.ToEntero)
End Sub
Private Sub CargaDatos(tCveMovimiento As Integer, Optional pCveConcepto As Integer = -1, Optional pFolio As Integer = -1)
Dim Mov As New ClsInventarios
DtMovimientos.Clear()
@@ -1163,7 +1154,6 @@ Partial Class Inventarios_EntradasSalidas
UpGenerales.Update()
UPDatos.Update()
UppGrid.Update()
UPEncabezado.Update()
UpRegistroTipoCambio.Update()
End Sub
@@ -1221,7 +1211,7 @@ Partial Class Inventarios_EntradasSalidas
End Sub
Private Sub CargaCodigoBarras()
If DdlCConcepto.SelectedValue.ToEntero = 1 Then
If DdlConcepto.SelectedValue.ToEntero = 1 Then
DivCodigoBarras.Visible = True
End If
End Sub
@@ -1889,7 +1879,7 @@ Partial Class Inventarios_EntradasSalidas
Dim CveConceptoContable As Integer = 260
Dim CveClasificacion As Integer = -1
Select Case DdlConcepto.SelectedValue.ToEntero
Case 2
Case 2, 32
CveConceptoContable = 78
EsContabilizable = True
Case 28, 31
@@ -1921,10 +1911,10 @@ Partial Class Inventarios_EntradasSalidas
CveClasificacion = drr("CveClasificacion").ToString.ToEntero
IdCtaContableOtro = drr("IdCuentaCostos").ToString.ToEntero
End If
Case Else
CveConceptoContable = 95
End Select
'2-78
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, 68, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
@@ -2121,12 +2111,6 @@ Partial Class Inventarios_EntradasSalidas
End If
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
'Limpia Valores cuando inserta de campos especiales
If UsuarioActual.CveEmpresa = 66 Then
DdlSubProyecto.SelectedValueExist("-1")
UPEncabezado.Update()
End If
UPDatos.Update()
If UsuarioActual.TienePermisoProceso(139) Then
@@ -2532,7 +2516,6 @@ Partial Class Inventarios_EntradasSalidas
TxtFolio.Text = Folio.ToString
FolioAsignado = Folio
UPEncabezado.Update()
End Sub
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
ChangeDdlProducto()
@@ -3447,8 +3430,6 @@ Partial Class Inventarios_EntradasSalidas
#Region " CONSUMO INTERNO "
Private Sub ActivaConsumoInterno()
EsConsumoInterno = True
Panel1.Visible = False
DdlConcepto.Items.Insert(0, New ListItem("Salida por Consumo Interno", "30"))
DdlConcepto.SelectedValue = "30"
DdlAlmacen.AutoPostBack = False
@@ -3928,7 +3909,7 @@ Partial Class Inventarios_EntradasSalidas
ErrorMovInv = True
End If
Else
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24", "32") Then
'genero las prepolizas manuales
Dim tCveConcepto As Integer = 95
Dim CveCuenta As Integer
@@ -3936,9 +3917,7 @@ Partial Class Inventarios_EntradasSalidas
IdCtaContable = 1
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero

View File

@@ -615,30 +615,17 @@
<div class="col-sm-9">
<asp:CheckBox ID="ChkRealizarDevolucion" runat="server" Checked="false" />
</div>
</div>
</div>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="row">
<ContentTemplate>
<div class="row">
<div style="text-align: center;" class="col-sm-12">
<asp:Button ID="BtnRecibir" runat="server" Text="Recibir Traspaso" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />&nbsp;&nbsp;&nbsp;
<asp:Button ID="BtnCancelarTraspaso" runat="server" Text="Cancelar Traspaso" OnClick="BtnCancelarTraspaso_Click" class="btn btn-danger" Visible="false" ValidationGroup="GrpRecibir" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:UpdatePanel>
</div>
</div>
@@ -679,25 +666,22 @@
<ContentTemplate>
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,CveMovimientoDetalleTransitorio,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo,CveAlmacenTransitorioVirtual" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<%--<HeaderTemplate>
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
</HeaderTemplate>--%>
<asp:TemplateField ItemStyle-Width="2%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="Chk" Checked="true" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,###.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
<%--<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" />--%>
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,###.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="15%" />
<asp:TemplateField HeaderText="Serie" ItemStyle-Width="15%" Visible="false" >
<ItemTemplate>
<asp:TextBox ID="TxtSerie" Width="90px" runat="server" Text='<%# Eval("Serie") %>'></asp:TextBox>

View File

@@ -1491,16 +1491,14 @@ Partial Class Inventarios_TraspasoAlmacen
End If
CveAlmacenDestino = DdlAlmacenRecepcion.SelectedValue.ToEntero
'CveUsuarioResponsable = DdlResponsableRecepcion.SelectedValue.ToEntero
GvDatosRecepcion.DataSource = Dtt
GvDatosRecepcion.DataBind()
'GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("Serie") <> ""
GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("AplicaSerie") = "True"
GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("AplicaLote").ToEntero > 0 'Dtt.MAX("Lote") <> ""
GvDatosRecepcion.Columns(8).Visible = Dtt.MAX("AplicaCaducidad").ToEntero > 0 'Dtt.MAX("FechaCaducidad").ToDate > MinFecha
GvDatosRecepcion.Columns(9).Visible = Dtt.MAX("CveSeccionAlmacen").ToEntero > 0
GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("AplicaSerie") = "True"
GvDatosRecepcion.Columns(8).Visible = Dtt.MAX("AplicaLote").ToEntero > 0 'Dtt.MAX("Lote") <> ""
GvDatosRecepcion.Columns(9).Visible = Dtt.MAX("AplicaCaducidad").ToEntero > 0 'Dtt.MAX("FechaCaducidad").ToDate > MinFecha
GvDatosRecepcion.Columns(10).Visible = Dtt.MAX("CveSeccionAlmacen").ToEntero > 0
'Dt.Dispose()
End If
@@ -1517,7 +1515,6 @@ Partial Class Inventarios_TraspasoAlmacen
DivRealizarDevolucion.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
HplImprimirRecepcion.Visible = True
HplImprimirRecepcion.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=Alm&CveMovimiento={CveMovimientoTraspaso}&EsTransitorio=True&CveAlmacenRecepcion={DdlAlmacenRecepcion.SelectedValue.ToEntero}&CveAlmacenTransitorioRecepcion={DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero}&FolioBusquedaTrasitorio={FolioBusqueda}")}"

View File

@@ -4511,9 +4511,9 @@ Portlets
.portlet > .portlet-title > .caption {
float: left;
display: inline-block;
font-size: 18px;
line-height: 18px;
padding: 10px 0;
font-size: 14px;
line-height: 14px;
padding: 5px 0;
}
.portlet > .portlet-title > .caption.bold {
font-weight: 400;

View File

@@ -1857,6 +1857,8 @@ div.md-checkbox {
.portlet.light.xspadding > .portlet-title > .caption {
padding: 2px 0;
font-size: 14px;
line-height: 1;
}
.portlet.light.xspadding > .portlet-title > .actions {

View File

@@ -35,7 +35,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
TxtRpdFechaInicio.Text = string.Format("{1}{0:/MM/yyyy}", DateTime.Now,(DateTime.Now.Day>15?"16":"01"));
DdlTipoVista.SelectedValue = "2";
}
DdlTipoAsistencias.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa));
DdlTipoAsistencias.DataSource = get_GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa);
DdlTipoAsistencias.DataBind();
@@ -453,7 +453,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
//Label LblAsisSubProyectoB = (Label)e.Row.FindControl("LblAsisSubProyecto");
Panel PnlProyectoB = (Panel)e.Row.FindControl("PnlProyecto");
DdlTipoAsistenciasB.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa));
DdlTipoAsistenciasB.DataSource = get_GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa);
DdlTipoAsistenciasB.DataBind();
DdlTipoAsistenciasB.SelectedValueExist(CveAsistenciasInasistencias);
if (DdlTipoAsistenciasB.SelectedIndex == 0)
@@ -462,19 +462,11 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
}
else
{
DdlTipoAsistenciasB.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0} AND CveAsistenciasInasistencias IN({1},{2})", UsuarioActual.CveEmpresa, DdlTipoAsistenciasB.Items[0].Value, DdlTipoAsistenciasB.SelectedValue));
DdlTipoAsistenciasB.DataSource = get_GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa);
DdlTipoAsistenciasB.DataBind();
DdlTipoAsistenciasB.Enabled = true;
}
/*
DdlAsisProyectoB.DataSource = DdlAsisProyecto.DataSource;
DdlAsisProyectoB.DataBind();
DdlAsisSubProyectoB.DataSource = DdlAsisSubProyecto.DataSource;
DdlAsisSubProyectoB.DataBind();
LblAsisProyectoB.Text = LblAsisProyecto.Text;
LblAsisSubProyectoB.Text = LblAsisSubProyecto.Text;
*/
CargarCentrosDeCosto(DdlAsisProyectoB, DdlAsisSubProyectoB, LblAsisProyectoB, LblAsisSubProyecto);
PnlProyectoB.Visible = PnlProyecto.Visible;
DdlAsisProyectoB.SelectedValueExist(CveProyecto);

View File

@@ -774,6 +774,9 @@
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtObservaciones" runat="server" MaxLength="150"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtObservaciones" Text="Observaciones"></asp:Label>
</div>
<div class=" text-right">
<asp:CheckBox ID="chkAistenciaRecalcular" Text="¿Volver a calcular la nómina?" runat="server" />
</div>
</div>

View File

@@ -259,7 +259,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
if (!IsPostBack)
{
{
enviarCorreoEnTimbrado = (UsuarioActual.CveEmpresa == 141 ? true : true);
LnkCargaNetos.Visible = (UsuarioActual.Empresa.Funcionalidad(267) == "1") || (UsuarioActual.CveRol == 1);
if (UsuarioActual.CveEmpresa == 141) { ddlfiniquito.SelectedValueExist("2"); }
@@ -2810,7 +2810,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LblEmpleado.Text = Nombre;
LblEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", SRCvePersonal);
TabPersonal.ActiveTabIndex = 0;
DdlTipoAsistenciasB.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
DdlTipoAsistenciasB.DataSource = get_GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa);
DdlTipoAsistenciasB.DataBind();
cargaasistenciaSR();
mostrarConceptos();
@@ -2964,7 +2964,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
e.Row.FCTextBox("TxtHorasTriples").Text = e.Row.DBCampo("HorasTriples");
// Carga Tipos de Asistencia
e.Row.FCDropDownList("DdlTipoAsistencias").DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
e.Row.FCDropDownList("DdlTipoAsistencias").DataSource = get_GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa);
e.Row.FCDropDownList("DdlTipoAsistencias").DataBind();
if (e.Row.DBCampo("CveAsistenciasInasistencias") != "-1")
e.Row.FCDropDownList("DdlTipoAsistencias").SelectedValue = e.Row.DBCampo("CveAsistenciasInasistencias");
@@ -5217,7 +5217,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
private void ImprimirReporte()
{
string RutaDocumento = System.IO.Path.Combine(UsuarioActual.Empresa.RutaArchivos, "/Lista de Raya.docx");
string RutaDocumento = System.IO.Path.Combine(UsuarioActual.Empresa.Ruta, "/Lista de Raya.docx");
if (!System.IO.File.Exists(RutaDocumento))
{
RutaDocumento = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Lista de Raya.docx");
@@ -7082,6 +7082,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
}
if (chkAistenciaRecalcular.Checked)
{
cargaDatos(true);
}
}
protected void btnasis_Click(object sender, EventArgs e)
@@ -7094,7 +7099,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
DdlAsisSubProyecto.SelectedValueExist("-1");
if (DdlTipoAsistencias.Items.Count == 1)
{
DdlTipoAsistencias.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa));
DdlTipoAsistencias.DataSource = get_GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa);
DdlTipoAsistencias.DataBind();
}
@@ -8893,7 +8898,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
int CvePersonal = 0;
string Codigo;
DateTime FechaAsis;
DataTable dtasis = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
DataTable dtasis = get_GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa);
List<string> listaerrores = new List<string>();
using (ClsRH ObjPersonal = new ClsRH())
{

View File

@@ -25,169 +25,138 @@
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 55px;">
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-2">
Cliente:
<div>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
</div>
</div>
<div class="col-md-2" id="DivProyectosAsignado1" runat="server">
<asp:Label runat="server" ID="LblProyectoAsignado" AssociatedControlID="DdlProyecto">Proyecto: </asp:Label>
<div id="DivProyectosAsignado2" runat="server">
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block;" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:Label ID="LblCliente" runat="server" class="col-md-1 truncate">Cliente:</asp:Label>
<div class="col-md-2" id="divCliente" runat="server">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
</div>
<asp:Label ID="LblProyectoAsignado" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div class="col-md-1" id="DivProyectosAsignado1" runat="server">
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-2">
<asp:Label runat="server" ID="LblSubProyectoAsignado" AssociatedControlID="DdlSubProyecto">SubProyecto: </asp:Label>
<div>
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
</div>
<asp:Label ID="LblSubProyectoAsignado" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" runat="server" Style="display: inline-block" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-2">
<asp:Label runat="server" AssociatedControlID="DdlTurno">Turno: </asp:Label>
<div>
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno"
Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-2">
<asp:Label AssociatedControlID="DdlSupervisorOrganigrama" runat="server" Text="Supervisor:" Style="display: inline-block;"></asp:Label>
<div>
<asp:DropDownList ID="DdlSupervisorOrganigrama" runat="server" Style="display: inline-block;" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-1">
<asp:Label runat="server" AssociatedControlID="TxtFechaAsistencia">F. Asistencia: </asp:Label>
<div >
</div>
<asp:Label runat="server" class="col-md-1 truncate" AssociatedControlID="TxtFechaAsistencia">F. Asistencia: </asp:Label>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaAsistencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</span>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaAsistencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaAsistencia" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<asp:Label runat="server" class="col-md-1 truncate" Text="Supervisor:" ></asp:Label>
<div class="col-md-1">
<div>
<asp:DropDownList ID="DdlSupervisorOrganigrama" runat="server" Style="display: inline-block;" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
</div>
<div class="portlet-body" style="display: none">
<div class="row">
<asp:Label runat="server" class="col-md-1 truncate">Turno: </asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno"
Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<table style="width: 100%;">
<tr>
<td>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveCliente" EmptyDataText="No se encontró Personal asignado al Proyecto o al Cliente" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveCliente" EmptyDataText="No se encontró Personal asignado al Proyecto o al Cliente" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="70px">
<HeaderTemplate>N°</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="300px">
<HeaderTemplate>Personal</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlPersonal" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px" HeaderStyle-Width="100px" FooterStyle-HorizontalAlign="Left">
<asp:TemplateField HeaderStyle-Width="100px" >
<HeaderTemplate>Cliente</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LtlCliente" CssClass="truncate" Width="100px" runat="server" Text='<%# Eval("Nombre") %>'></asp:Label>
<asp:Label ID="LtlCliente" CssClass="truncate" Width="100px" runat="server" Text='<%# Eval("Cliente") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="110px">
<HeaderTemplate>Asistencia</HeaderTemplate>
<ItemTemplate>
<asp:DropDownList ID="DdlTipoAsistencias" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
<asp:DropDownList ID="DdlTipoAsistencias" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="80px">
<HeaderTemplate>% de Pago</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPorPago" runat="server" MaxLength="3" Text="100" Width="74px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="80px">
<HeaderTemplate>Hrs Dobles</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtHorasDobles" runat="server" MaxLength="3" Text="0" Width="79px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="80px">
<HeaderTemplate>Hrs Triples</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtHorasTriples" runat="server" MaxLength="3" Text="0" Width="79px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="150px">
<HeaderTemplate>Motivo H. Extras</HeaderTemplate>
<ItemTemplate>
<asp:DropDownList ID="DdlMotivoHoraExtra" runat="server" AppendDataBoundItems="true" DataTextField="MotivoHoraExtra" DataValueField="CveMotivoHoraExtra" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 140px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Obs.</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtObservaciones" runat="server" Width="84px" MaxLength="150"></asp:TextBox>
<asp:TextBox ID="TxtObservaciones" runat="server" Width="100%" MaxLength="150"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -197,35 +166,31 @@
</asp:GridView>
<div class="text-right">
<asp:Button ID="BtnGuardar" Visible="false" runat="server" Text="Guardar Asistencia" class="btn btn-primary" />
<table class="table table-striped table-advance table-hover">
<thead>
<tr class="Titulos">
<th>#</th>
<th style="text-align: left;">&nbsp;Notación</th>
</tr>
</thead>
<tr>
<td>1&nbsp;</td>
<td style="text-align: left;">&nbsp;Sin registrar asistencia</td>
</tr>
<tr>
<td>2&nbsp;</td>
<td style="text-align: left; background-color: #ADD8E6">&nbsp;Se registró asistencia</td>
</tr>
<tr>
<td>3&nbsp;</td>
<td style="text-align: left; background-color: #f2dede">&nbsp;Se registró asistencia y fue modificada</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td style="width: 250px; text-align: left; vertical-align: top;">
<table class="table table-striped table-advance table-hover">
<thead>
<tr class="Titulos">
<th>#</th>
<th style="text-align: left;">&nbsp;Notación</th>
</tr>
</thead>
<tr>
<td>1&nbsp;</td>
<td style="text-align: left;">&nbsp;Sin registrar asistencia</td>
</tr>
<tr>
<td>2&nbsp;</td>
<td style="text-align: left; background-color: #ADD8E6">&nbsp;Se registró asistencia</td>
</tr>
<tr>
<td>3&nbsp;</td>
<td style="text-align: left; background-color: #f2dede">&nbsp;Se registró asistencia y fue modificada</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="DModalCargaASistenciaMasiva" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UPP" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">

View File

@@ -13,7 +13,12 @@ Partial Class RH_Asistencias
CargaSuperioresOrganigrama()
CargaProyecto()
CargaTurnos()
TxtFechaAsistencia.Text = Now.ToShortDateString
If UsuarioActual.Empresa.Funcionalidad(267) = "1" Then ' emp citricola
divCliente.Visible = False
LblCliente.Visible = False
GV.Columns(2).Visible = False
End If
txtFechaAsistencia.Text = Now.ToShortDateString
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2343 Then
PnlMasivo.Visible = True
CargaTiposPeriodo()
@@ -25,15 +30,7 @@ Partial Class RH_Asistencias
#Region " ORGANIGRAMA "
Private Sub CargaSuperioresOrganigrama()
'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()
Using objbase As New ClsRH()
If (objbase.SupervisorOrganigramaGet(UsuarioActual.CveEmpresa)) Then
DdlSupervisorOrganigrama.DataSource = objbase.DtResultados
@@ -41,44 +38,18 @@ Partial Class RH_Asistencias
End If
End Using
End Sub
#End Region
'Private Sub CargaClientes()
' Dim ObjClientes As New ClsClientes
' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then
' DdlCliente.DataSource = ObjClientes.DtResultados
' Else
' DdlCliente.DataSource = Nothing
' End If
' ObjClientes.Dispose()
' 'Application("GlobalDTResponsable")
' DdlCliente.DataBind()
'End Sub
'Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
' 'CargaClientes()
' 'DdlCliente.Attributes.Remove("onclick")
'End Sub
Private Sub CargaProyecto()
'DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", DistinctColumns:={"CveProyecto", "Proyecto"})
'DdlProyecto.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlProyecto, LblProyectoAsignado, LblSubProyectoAsignado)
DivProyectosAsignado1.Visible = LblProyectoAsignado.Visible
DivProyectosAsignado2.Visible = LblProyectoAsignado.Visible
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoAsignado, LblSubProyectoAsignado, divProyecto:=DivProyectosAsignado1)
DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
@@ -103,7 +74,6 @@ Partial Class RH_Asistencias
dt = dt.FiltraParametros(String.Format("CvePersonalPadre = {0}", DdlSupervisorOrganigrama.SelectedValue.ToEntero()))
ElseIf DdlSupervisorOrganigrama.SelectedValue.ToEntero() = -2 Then
dt = dt.FiltraParametros("CvePersonalPadre IS NULL")
Else
End If
@@ -177,16 +147,16 @@ Partial Class RH_Asistencias
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(60)
e.Row.Cells(1).Width = Unit.Pixel(300)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(80)
e.Row.Cells(4).Width = Unit.Pixel(85)
e.Row.Cells(5).Width = Unit.Pixel(85)
e.Row.Cells(6).Width = Unit.Pixel(150)
e.Row.Cells(7).Width = Unit.Pixel(90)
End If
'If e.Row.RowIndex = 0 Then
' e.Row.Cells(0).Width = Unit.Pixel(60)
' e.Row.Cells(1).Width = Unit.Pixel(300)
' e.Row.Cells(2).Width = Unit.Pixel(100)
' e.Row.Cells(3).Width = Unit.Pixel(80)
' e.Row.Cells(4).Width = Unit.Pixel(85)
' e.Row.Cells(5).Width = Unit.Pixel(85)
' e.Row.Cells(6).Width = Unit.Pixel(150)
' e.Row.Cells(7).Width = Unit.Pixel(90)
'End If
e.Row.FCLiteral("LtlCodigo").Text = "<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal=" & e.Row.DBCampo("CvePersonal") & "&Opt=4"">" & e.Row.DBCampo("Codigo") & "</a>"
e.Row.FCLiteral("LtlPersonal").Text = "<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal=" & e.Row.DBCampo("CvePersonal") & "&Opt=4"">" & e.Row.DBCampo("Nombre") & "</a>"
@@ -197,7 +167,7 @@ Partial Class RH_Asistencias
e.Row.FCTextBox("TxtHorasTriples").Text = e.Row.DBCampo("HorasTriples")
'Carga Tipos de Asistencia
e.Row.FCDropDownList("DdlTipoAsistencias").DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlTipoAsistencias").DataSource = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlTipoAsistencias").DataBind()
If e.Row.DBCampo("CveAsistenciasInasistencias") <> "-1" Then e.Row.FCDropDownList("DdlTipoAsistencias").SelectedValue = e.Row.DBCampo("CveAsistenciasInasistencias")

View File

@@ -46,9 +46,8 @@ Partial Class RH_CatAsistenciasInasistencias
Public Sub CargaDatos()
Dim ObjAsistenciasInasistencias As New ClsRH
If ObjAsistenciasInasistencias.GetAsistenciasInasistencias() Then
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
If ObjAsistenciasInasistencias.GetAsistenciasInasistencias(UsuarioActual.CveEmpresa) Then
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados
Else
Me.GvDatos.DataSource = Nothing
End If
@@ -96,7 +95,7 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa) = Nothing
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
@@ -176,7 +175,7 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
aplicaPrimaVac) Then
GvDatos.EditIndex = -1
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa) = Nothing
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
ObjAsistenciasInasistencias.Dispose()
@@ -200,7 +199,7 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
If ObjAsistenciasInasistencias.RemoveAsistenciasInasistencias(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa) = Nothing
Alert("El AsistenciasInasistencias se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjAsistenciasInasistencias.Dispose()

View File

@@ -65,7 +65,7 @@ Partial Class RH_ListaAsistenciaRH
If e.Row.RowType = DataControlRowType.DataRow Then
'CvePersonal,CveAsistencia,CveAsistenciasInasistencias
'DdlAsistenciaInasistencia
Dim DTAsistenciasInasistencias As DataTable = GlobalDTAsistenciasInasistencias().FiltraParametros($"CveEmpresa ={ UsuarioActual.CveEmpresa}")
Dim DTAsistenciasInasistencias As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa)
'If DTAsistenciasInasistencias.Rows.Count = 0 Then
' DTAsistenciasInasistencias = GlobalDTAsistenciasInasistencias().FiltraParametros($"CveEmpresa = 2 ")
@@ -85,7 +85,7 @@ Partial Class RH_ListaAsistenciaRH
Private Sub BtnProcesaLista_Click(sender As Object, e As EventArgs) Handles BtnProcesaLista.Click
Dim TieneError As Boolean = False
Dim DTAsistenciasInasistencias As DataTable = GlobalDTAsistenciasInasistencias().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
Dim DTAsistenciasInasistencias As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa)
If DTAsistenciasInasistencias.Rows.Count > 0 Then

View File

@@ -1323,7 +1323,7 @@ Partial Class RH_Personal
End Sub
Private Sub CargaTiposAsistencia()
DdlTipoAsistencias.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlTipoAsistencias.DataSource = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa)
DdlTipoAsistencias.DataBind()
End Sub
@@ -1548,7 +1548,7 @@ Partial Class RH_Personal
e.Row.FCTextBox("TxtHorasTriples").Text = e.Row.DBCampo("HorasTriples")
'Carga Tipos de Asistencia
e.Row.FCDropDownList("DdlTipoAsistencias").DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlTipoAsistencias").DataSource = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlTipoAsistencias").DataBind()
If e.Row.DBCampo("CveAsistenciasInasistencias") <> "-1" Then e.Row.FCDropDownList("DdlTipoAsistencias").SelectedValue = e.Row.DBCampo("CveAsistenciasInasistencias")

View File

@@ -35,7 +35,7 @@
<div class="titlefiltros caption ">
<ul class="list-inline text-size-12">
<li>Tipo Periodo:
<asp:DropDownList ID="DdlTipoPeriodo" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 200px !important;" ValidationGroup="GrpGuardar" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo">
<asp:DropDownList ID="DdlTipoPeriodo" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 150px !important;" ValidationGroup="GrpGuardar" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo">
</asp:DropDownList>
</li>
<li><asp:label ID="LblPeriodo" runat="server" Visible="true" >Periodo:</asp:label>

View File

@@ -141,7 +141,7 @@ Partial Class RH_RepChecadorPreAsistencia
Private Sub CargaCombos()
DdlAsistenciaInacistencia.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveEmpresa = {0} AND CveAsistenciasInasistencias <> 6", UsuarioActual.Empresa.CveEmpresa))
DdlAsistenciaInacistencia.DataSource = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" CveAsistenciasInasistencias <> 6")
DdlAsistenciaInacistencia.DataBind()
DdlAsistenciaInacistencia.Items.Insert(0, New ListItem("Seleccionar una opción", "-1"))
Dim objNom As New ClsNominas
@@ -295,10 +295,10 @@ Partial Class RH_RepChecadorPreAsistencia
Dim CveAsistenciaInasistenciaDescanso As Integer = -1
Try
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'A' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'F' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'R' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'D' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'A'")(0)("CveAsistenciasInasistencias").ToString().ToEntero
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'F'")(0)("CveAsistenciasInasistencias").ToString().ToEntero
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'R' ")(0)("CveAsistenciasInasistencias").ToString().ToEntero
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'D' ")(0)("CveAsistenciasInasistencias").ToString().ToEntero
Catch ex As Exception
Alert("Se presento un error al obtener las claves de asistencia.", TipoMensaje.MsgError)
@@ -1585,14 +1585,14 @@ Partial Class RH_RepChecadorPreAsistencia
Dim objRH As New ClsRH
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa) Then
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
DTChecadorRegistros = objRH.DtResultados
End If
objRH.Dispose()
Instruccion = arrayComands(0)
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias.FiltraParametros(" CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa & " AND TipoCorto = '" & Instruccion & "' ")
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ")
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
CveEstado = DTTipoAsistenciaInasistencia(0)(0).ToString().ToEntero
@@ -1748,7 +1748,7 @@ Partial Class RH_RepChecadorPreAsistencia
Dim CvePersonal As Integer = temtDt(0)("CvePersonal").ToString().ToEntero
Dim filtro As String = String.Format(" CvePersonal = '{0}' AND Fecha = '{1}'", CvePersonal, fecha)
Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
myRow = DtResultados.Select(filtro)
@@ -1763,7 +1763,7 @@ Partial Class RH_RepChecadorPreAsistencia
myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
RegistraScript("$('#divDetallesDia').modal('hide');")
Alert("Actualizado correctamente.")

View File

@@ -236,24 +236,24 @@ Partial Class Sistemas_CatSesiones
End Sub
Private Sub CargaRH()
Dim ObjRH As New ClsRH
If ObjRH.GetTipoBuzon() Then Application("GlobalDTTipoBuzon") = ObjRH.DtResultados Else Application("GlobalDTTipoBuzon") = Nothing
If ObjRH.GetDepartamentos(UsuarioActual.CveEmpresa) Then Application("GlobalDTDepartamentos") = ObjRH.DtResultados Else Application("GlobalDTDepartamentos") = Nothing
If ObjRH.GetDocumentos() Then Application("GlobalDTDocumentos") = ObjRH.DtResultados Else Application("GlobalDTDocumentos") = Nothing
If ObjRH.GetEscolaridades() Then Application("GlobalDTEscolaridad") = ObjRH.DtResultados Else Application("GlobalDTEscolaridad") = Nothing
If ObjRH.GetEstadoCivil() Then Application("GlobalDTEstadoCivil") = ObjRH.DtResultados Else Application("GlobalDTEstadoCivil") = Nothing
If ObjRH.GetEstatusPersonal() Then Application("GlobalDTEstatusPersonal") = ObjRH.DtResultados Else Application("GlobalDTEstatusPersonal") = Nothing
If ObjRH.GetGeneros() Then Application("GlobalDTGenero") = ObjRH.DtResultados Else Application("GlobalDTGenero") = Nothing
If ObjRH.GetMotivoBaja(UsuarioActual.CveEmpresa) Then Application("GlobalDTMotivoBaja") = ObjRH.DtResultados Else Application("GlobalDTMotivoBaja") = Nothing
If ObjRH.GetPuestos(-1) Then Application("GlobalDTRHPuestos") = ObjRH.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
If ObjRH.GetRutas(UsuarioActual.CveEmpresa) Then Application("GlobalDTRutas") = ObjRH.DtResultados Else Application("GlobalDTRutas") = Nothing
If ObjRH.GetTiposContrato() Then Application("GlobalDTTiposContrato") = ObjRH.DtResultados Else Application("GlobalDTTiposContrato") = Nothing
If ObjRH.GetTurnos() Then Application("GlobalDTTurno") = ObjRH.DtResultados Else Application("GlobalDTTurno") = Nothing
If ObjRH.GetJornadas() Then Application("GlobalDTJornadas") = ObjRH.DtResultados Else Application("GlobalDTJornadas") = Nothing
If ObjRH.GetAsistenciasInasistencias() Then Application("GlobalDTAsistenciasInasistencias") = ObjRH.DtResultados Else Application("GlobalDTAsistenciasInasistencias") = Nothing
If ObjRH.GetMotivoHorasExtras(UsuarioActual.CveEmpresa) Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
ObjRH.Dispose()
'Dim ObjRH As New ClsRH
'If ObjRH.GetTipoBuzon() Then Application("GlobalDTTipoBuzon") = ObjRH.DtResultados Else Application("GlobalDTTipoBuzon") = Nothing
'If ObjRH.GetDepartamentos(UsuarioActual.CveEmpresa) Then Application("GlobalDTDepartamentos") = ObjRH.DtResultados Else Application("GlobalDTDepartamentos") = Nothing
'If ObjRH.GetDocumentos() Then Application("GlobalDTDocumentos") = ObjRH.DtResultados Else Application("GlobalDTDocumentos") = Nothing
'If ObjRH.GetEscolaridades() Then Application("GlobalDTEscolaridad") = ObjRH.DtResultados Else Application("GlobalDTEscolaridad") = Nothing
'If ObjRH.GetEstadoCivil() Then Application("GlobalDTEstadoCivil") = ObjRH.DtResultados Else Application("GlobalDTEstadoCivil") = Nothing
'If ObjRH.GetEstatusPersonal() Then Application("GlobalDTEstatusPersonal") = ObjRH.DtResultados Else Application("GlobalDTEstatusPersonal") = Nothing
'If ObjRH.GetGeneros() Then Application("GlobalDTGenero") = ObjRH.DtResultados Else Application("GlobalDTGenero") = Nothing
'If ObjRH.GetMotivoBaja(UsuarioActual.CveEmpresa) Then Application("GlobalDTMotivoBaja") = ObjRH.DtResultados Else Application("GlobalDTMotivoBaja") = Nothing
'If ObjRH.GetPuestos(-1) Then Application("GlobalDTRHPuestos") = ObjRH.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
'If ObjRH.GetRutas(UsuarioActual.CveEmpresa) Then Application("GlobalDTRutas") = ObjRH.DtResultados Else Application("GlobalDTRutas") = Nothing
'If ObjRH.GetTiposContrato() Then Application("GlobalDTTiposContrato") = ObjRH.DtResultados Else Application("GlobalDTTiposContrato") = Nothing
'If ObjRH.GetTurnos() Then Application("GlobalDTTurno") = ObjRH.DtResultados Else Application("GlobalDTTurno") = Nothing
'If ObjRH.GetJornadas() Then Application("GlobalDTJornadas") = ObjRH.DtResultados Else Application("GlobalDTJornadas") = Nothing
'If ObjRH.GetAsistenciasInasistencias(UsuarioActual.CveEmpresa) Then Application("GlobalDTAsistenciasInasistencias") = ObjRH.DtResultados Else Application("GlobalDTAsistenciasInasistencias") = Nothing
'If ObjRH.GetMotivoHorasExtras(UsuarioActual.CveEmpresa) Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
'If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
'ObjRH.Dispose()
End Sub

View File

@@ -591,11 +591,11 @@ table.rompe td select{
}
.portlet > .portlet-title > .caption {
float: left;
display: inline-block;
font-size: 14px;
line-height: 14px;
padding: 5px 0;
float: left;
display: inline-block;
font-size: 14px !important;
line-height: 14px;
padding: 5px 0;
}
ul.list-inline {
margin:0px;