This commit is contained in:
janeth arvizu
2020-01-02 12:56:20 -07:00
13 changed files with 4404 additions and 3783 deletions

View File

@@ -292,7 +292,7 @@ Public Class ClsCompProveedores
Return Retorno
End Function
Public Function GetProveedores(TipoConsulta As TipoConsulta, CveProveedor As Integer, Codigo As String, RazonSocial As String, NombreComercial As String,
Public Function GetProveedores(tipoConsulta As TipoConsulta, CveProveedor As Integer, Codigo As String, RazonSocial As String, NombreComercial As String,
NombreCorto As String, RFC As String, ContactoNombre As String, Telefono As String, Estatus As Integer, CveEmpresa As Integer,
Optional CveTipoProveedor As Integer = -1, Optional CveUsuarioResponsable As Integer = -1,
Optional CveMonedaPreferente As Integer = -1, Optional CveProveedorClasificacion As Integer = -1) As Boolean
@@ -301,7 +301,7 @@ Public Class ClsCompProveedores
DataAdapter("PA_Comp_ProveedoresGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@TipoConsulta", SqlDbType.Int).Value = TipoConsulta
.Add("@TipoConsulta", SqlDbType.Int).Value = tipoConsulta
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
.Add("@RazonSocial", SqlDbType.VarChar).Value = RazonSocial
@@ -321,7 +321,7 @@ Public Class ClsCompProveedores
Try
SqlAdapter.Fill(Data)
If Data.Rows.Count = 1 Then
If Data.Rows.Count = 1 And tipoConsulta <> TipoConsulta.ParaGlobalDT Then
Me.CveProveedor = Data.Rows(0)("CveProveedor").ToString.ToEntero
Me.Codigo = Data.Rows(0)("Codigo").ToString
Me.RazonSocial = Data.Rows(0)("RazonSocial").ToString

View File

@@ -1,72 +1,72 @@
<%@ WebHandler Language="VB" Class="SIGWeb" %>
Imports System
Imports System.Web
Imports System.Data
Imports Newtonsoft.Json
Imports Extensiones
Imports System.IO
Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain"
Try
Select Case context.Request("metodo")
Case "getps"
GETPS(context)
Case "getps2"
GETPS(context, "PSCodigoClasificacion")
Case "getpsalmacen"
getpsalmacen(context)
Case "Uploadfile"
uploadfile(context)
Case "Downfile"
Downfile(context)
Case "GetImg"
GetImg(context)
Case "getpssat"
GETPSSAT(context)
Case "getpsusados"
GETPSUSADOS(context)
Case "getumsat"
GETUMSAT(context)
Case "getcliente"
GetClientes(context)
Case "getproveedores"
GetProveedores(context)
Case "getfraccionarancelaria"
GetFraccionArancelaria(context)
Case "GetUser"
Imports System
Imports System.Web
Imports System.Data
Imports Newtonsoft.Json
Imports Extensiones
Imports System.IO
Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain"
Try
Select Case context.Request("metodo")
Case "getps"
GETPS(context)
Case "getps2"
GETPS(context, "PSCodigoClasificacion")
Case "getpsalmacen"
getpsalmacen(context)
Case "Uploadfile"
uploadfile(context)
Case "Downfile"
Downfile(context)
Case "GetImg"
GetImg(context)
Case "getpssat"
GETPSSAT(context)
Case "getpsusados"
GETPSUSADOS(context)
Case "getumsat"
GETUMSAT(context)
Case "getcliente"
GetClientes(context)
Case "getproveedores"
GetProveedores(context)
Case "getfraccionarancelaria"
GetFraccionArancelaria(context)
Case "GetUser"
GetUser(context)
Case "ActualizaPreP"
ActualizaPrePoliza(context)
End Select
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
End Sub
Private Sub GetUser(ByVal context As HttpContext)
Dim usuario As String = context.Request("usuario").ToString()
Dim CveUsuario As Integer = -1
Dim objs As New ClsSisUsuarios
objs.GetWSusuarios(usuario)
If objs.DtResultados.Rows.Count > 0 Then
CveUsuario = objs.DtResultados.Rows(0)("CveUsuario").ToString().ToEntero()
End If
objs.Dispose()
If CveUsuario > 0 Then
CveUsuario = 1
End If
context.Response.Write(CveUsuario.ToString())
context.Response.StatusCode = 200
Case "ActualizaPreP"
ActualizaPrePoliza(context)
End Select
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
End Sub
Private Sub ActualizaPrePoliza(ByVal context As HttpContext)
Private Sub GetUser(ByVal context As HttpContext)
Dim usuario As String = context.Request("usuario").ToString()
Dim CveUsuario As Integer = -1
Dim objs As New ClsSisUsuarios
objs.GetWSusuarios(usuario)
If objs.DtResultados.Rows.Count > 0 Then
CveUsuario = objs.DtResultados.Rows(0)("CveUsuario").ToString().ToEntero()
End If
objs.Dispose()
If CveUsuario > 0 Then
CveUsuario = 1
End If
context.Response.Write(CveUsuario.ToString())
context.Response.StatusCode = 200
End Sub
Private Sub ActualizaPrePoliza(ByVal context As HttpContext)
Dim CvePrePoliza As Integer = context.Request("CvePrePoliza").ToString.ToEntero
Dim CveEmpresa As Integer = context.Request("CveEmpresa").ToString.ToEntero
Dim CveUsuario As Integer = context.Request("CveUsuario").ToString.ToEntero
@@ -96,95 +96,95 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
ObjConta.Dispose()
'context.Response.Write(CveUsuario.ToString())
context.Response.StatusCode = Retorno
End Sub
Private Sub GetImg(ByVal context As HttpContext)
Dim Url As String = Decripta(context.Request("r").ToString)
Dim usuario As Usuario = UsuarioActual(context)
If Not IsNothing(usuario) Then
Url = String.Format("{0}Empresas\{1}\{2}", AppDomain.CurrentDomain.BaseDirectory, usuario.CveEmpresa, Url)
Dim FileInfo As FileInfo = New FileInfo(Url)
If FileInfo.Exists Then
context.Response.ContentType = "image/png"
context.Response.Flush()
context.Response.WriteFile(FileInfo.FullName)
context.Response.End()
End If
End If
context.Response.StatusCode = Retorno
End Sub
#Region "File"
Private Sub GetImg(ByVal context As HttpContext)
Dim Url As String = Decripta(context.Request("r").ToString)
Private Sub Downfile(ByVal context As HttpContext)
Dim savepath As String = ""
Dim tempPath As String = ""
tempPath = String.Format("{0}{1}", System.Configuration.ConfigurationManager.AppSettings("FolderPath"), "/Temp")
savepath = context.Server.MapPath(tempPath)
Dim nombre As String = String.Format("{0}\{1}", savepath, context.Request("nombre"))
File.Delete(nombre)
context.Response.StatusCode = 200
End Sub
Private Sub uploadfile(ByVal context As HttpContext)
Dim postedFile As HttpPostedFile
Dim savepath As String = ""
Dim tempPath As String = ""
tempPath = String.Format("{0}{1}", System.Configuration.ConfigurationManager.AppSettings("FolderPath"), "/Temp")
savepath = context.Server.MapPath(tempPath)
Dim filename As String
Dim tick As String
tick = (DateTime.Now.Ticks + 1).ToString()
If Not Directory.Exists(savepath) Then
Directory.CreateDirectory(savepath)
End If
If context.Request.Files.Count = 0 Then
Dim copyFile As String = context.Request("File")
Dim Cve As String = context.Request("Cve")
If copyFile <> "" Then
Dim ext As Integer = copyFile.IndexOf(","c) + 1
Dim extncion As String = copyFile.Substring(5, ext - 5)
If extncion.Contains("image/") Then extncion = extncion.Replace("image/", "").Replace(";base64,", "")
'Dim extncion As String =
filename = String.Format("{0}-{1}.{2}", tick, Cve, extncion)
Dim msf As New MemoryStream(Convert.FromBase64String(copyFile.Substring(ext)))
Dim stem As Stream = New FileStream(String.Format("{0}\{1}", savepath, filename), FileMode.Create)
msf.WriteTo(stem)
msf.Close()
stem.Close()
End If
Else
postedFile = context.Request.Files(0)
filename = String.Format("{0}-{1}", tick, postedFile.FileName)
postedFile.SaveAs((savepath & "\") + filename)
End If
context.Response.Write(tick)
context.Response.StatusCode = 200
Dim usuario As Usuario = UsuarioActual(context)
If Not IsNothing(usuario) Then
Url = String.Format("{0}Empresas\{1}\{2}", AppDomain.CurrentDomain.BaseDirectory, usuario.CveEmpresa, Url)
Dim FileInfo As FileInfo = New FileInfo(Url)
If FileInfo.Exists Then
context.Response.ContentType = "image/png"
context.Response.Flush()
context.Response.WriteFile(FileInfo.FullName)
context.Response.End()
End If
End If
End Sub
#End Region
#Region "Get Cliente"
Private Function GetClientes(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
#Region "File"
Private Sub Downfile(ByVal context As HttpContext)
Dim savepath As String = ""
Dim tempPath As String = ""
tempPath = String.Format("{0}{1}", System.Configuration.ConfigurationManager.AppSettings("FolderPath"), "/Temp")
savepath = context.Server.MapPath(tempPath)
Dim nombre As String = String.Format("{0}\{1}", savepath, context.Request("nombre"))
File.Delete(nombre)
context.Response.StatusCode = 200
End Sub
Private Sub uploadfile(ByVal context As HttpContext)
Dim postedFile As HttpPostedFile
Dim savepath As String = ""
Dim tempPath As String = ""
tempPath = String.Format("{0}{1}", System.Configuration.ConfigurationManager.AppSettings("FolderPath"), "/Temp")
savepath = context.Server.MapPath(tempPath)
Dim filename As String
Dim tick As String
tick = (DateTime.Now.Ticks + 1).ToString()
If Not Directory.Exists(savepath) Then
Directory.CreateDirectory(savepath)
End If
If context.Request.Files.Count = 0 Then
Dim copyFile As String = context.Request("File")
Dim Cve As String = context.Request("Cve")
If copyFile <> "" Then
Dim ext As Integer = copyFile.IndexOf(","c) + 1
Dim extncion As String = copyFile.Substring(5, ext - 5)
If extncion.Contains("image/") Then extncion = extncion.Replace("image/", "").Replace(";base64,", "")
'Dim extncion As String =
filename = String.Format("{0}-{1}.{2}", tick, Cve, extncion)
Dim msf As New MemoryStream(Convert.FromBase64String(copyFile.Substring(ext)))
Dim stem As Stream = New FileStream(String.Format("{0}\{1}", savepath, filename), FileMode.Create)
msf.WriteTo(stem)
msf.Close()
stem.Close()
End If
Else
postedFile = context.Request.Files(0)
filename = String.Format("{0}-{1}", tick, postedFile.FileName)
postedFile.SaveAs((savepath & "\") + filename)
End If
context.Response.Write(tick)
context.Response.StatusCode = 200
End Sub
#End Region
#Region "Get Cliente"
Private Function GetClientes(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
'sino existe, recarga los datos
'sino existe, recarga los datos
If context.Application(AppNombre) Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then
@@ -214,24 +214,24 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
context.Response.Write("[]")
End If
Return retorno
Return retorno
End Function
#End Region
#End Region
#Region "Get Proveedor"
Private Function GetProveedores(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
#Region "Get Proveedor"
Private Function GetProveedores(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
'sino existe, recarga los datos
'sino existe, recarga los datos
If context.Application(AppNombre) Is Nothing Then
Dim ObjProveedores As New ClsCompProveedores
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
@@ -260,110 +260,114 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
context.Response.Write("[]")
End If
Return retorno
Return retorno
End Function
#End Region
#End Region
#Region " GET PS "
Private Function getpsalmacen(ByVal context As HttpContext) As String
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
Dim retorno As String = ""
Dim DtPSRetorno As DataTable = Nothing
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
DtPSRetorno = New DataTable
DtPSRetorno.Columns.Add(New DataColumn("id", System.Type.GetType("System.Int32")))
DtPSRetorno.Columns.Add(New DataColumn("existencia", System.Type.GetType("System.Int32")))
DtPSRetorno.Columns.Add(New DataColumn("almacen", System.Type.GetType("System.String")))
Dim CvePS = IfNull(context.Request("cveps"), "0").ToString.ToEntero
Dim objInv As New ClsInventarios
If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
' limpio los almacenes donde no tiene ningun producto existencia
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CveAlmacen", "Almacen", "Existencia") Then
objInv.DtResultados.Columns.RemoveAt(i)
End If
Next
DtPSRetorno = objInv.DtResultados.FiltraParametros("CveAlmacen > 0 and Existencia > 0")
End If
objInv.Dispose()
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CveAlmacen").ColumnName = "id"
DtPSRetorno.Columns("Almacen").ColumnName = "almacen"
DtPSRetorno.Columns("Existencia").ColumnName = "existencia"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
Return retorno
End Function
Private Function GETPS(ByVal context As HttpContext, Optional PSCodigoDescripcion As String = "PSCodigo") As String
Dim retorno As String = ""
Dim DtPSRetorno As DataTable = Nothing
'NOTA:
' EN EL WHERE DE LINQ NO SE DEBE USAS EL OPERADOR 'AND' SABE PORQUE FUNCIONA DIFERENTE SE DEBE USAR 'ANDALSO',
' EJEMPLO UNA CONDICION AND DE DOS CAMPOS ARROJA CERO RESULTADOS PERO SI SE PONE ESTAS DOS CONDICIONES POR SEPARADO ARROJA DATOS
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim FuePorXml = IfNull(context.Request("FuePorXml"), "-1").ToString.ToEntero
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim CveClasificacion = IfNull(context.Request("CveClasificacion"), "-1").ToString.ToEntero
Dim CveSubFamilia = IfNull(context.Request("CveSubFamilia"), "-1").ToString.ToEntero
Dim CveClasificacionPresupuesto = IfNull(context.Request("CveClasificacionPresupuesto"), "-1").ToString.ToEntero
Dim Pagina = IfNull(context.Request("Pagina"), "-1").ToString
Dim Estatus = IfNull(context.Request("Estatus"), "1").ToString
Dim CveSucursal = IfNull(context.Request("cvesucursal"), "-1").ToString.ToEntero
Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "-1").ToString.ToEntero
Dim UsaGlobal As Boolean = True
'verifica existencias
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141) Then
UsaGlobal = False
Dim objInv As New ClsInventarios
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
' limpio los almacenes donde no tiene ningun producto existencia
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
#Region " GET PS "
Private Function getpsalmacen(ByVal context As HttpContext) As String
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then
objInv.DtResultados.Columns.RemoveAt(i)
End If
Next
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
Dim retorno As String = ""
Dim DtPSRetorno As DataTable = Nothing
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
DtPSRetorno = New DataTable
DtPSRetorno.Columns.Add(New DataColumn("id", System.Type.GetType("System.Int32")))
DtPSRetorno.Columns.Add(New DataColumn("existencia", System.Type.GetType("System.Int32")))
DtPSRetorno.Columns.Add(New DataColumn("almacen", System.Type.GetType("System.String")))
Dim CvePS = IfNull(context.Request("cveps"), "0").ToString.ToEntero
Dim objInv As New ClsInventarios
If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
' limpio los almacenes donde no tiene ningun producto existencia
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CveAlmacen", "Almacen", "Existencia") Then
objInv.DtResultados.Columns.RemoveAt(i)
End If
Next
DtPSRetorno = objInv.DtResultados.FiltraParametros("CveAlmacen > 0 and Existencia > 0")
End If
objInv.Dispose()
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CveAlmacen").ColumnName = "id"
DtPSRetorno.Columns("Almacen").ColumnName = "almacen"
DtPSRetorno.Columns("Existencia").ColumnName = "existencia"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
Return retorno
End Function
Private Function GETPS(ByVal context As HttpContext, Optional PSCodigoDescripcion As String = "PSCodigo") As String
Dim retorno As String = ""
Dim DtPSRetorno As DataTable = Nothing
'NOTA:
' EN EL WHERE DE LINQ NO SE DEBE USAS EL OPERADOR 'AND' SABE PORQUE FUNCIONA DIFERENTE SE DEBE USAR 'ANDALSO',
' EJEMPLO UNA CONDICION AND DE DOS CAMPOS ARROJA CERO RESULTADOS PERO SI SE PONE ESTAS DOS CONDICIONES POR SEPARADO ARROJA DATOS
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim FuePorXml = IfNull(context.Request("FuePorXml"), "-1").ToString.ToEntero
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim CveClasificacion = IfNull(context.Request("CveClasificacion"), "-1").ToString.ToEntero
Dim CveSubFamilia = IfNull(context.Request("CveSubFamilia"), "-1").ToString.ToEntero
Dim CveClasificacionPresupuesto = IfNull(context.Request("CveClasificacionPresupuesto"), "-1").ToString.ToEntero
Dim Pagina = IfNull(context.Request("Pagina"), "-1").ToString
Dim Estatus = IfNull(context.Request("Estatus"), "1").ToString
Dim CveSucursal = IfNull(context.Request("cvesucursal"), "-1").ToString.ToEntero
Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "-1").ToString.ToEntero
Dim UsaGlobal As Boolean = True
'verifica existencias
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141) Then
UsaGlobal = False
Dim objInv As New ClsInventarios
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
' limpio los almacenes donde no tiene ningun producto existencia
Dim i As Integer = 0
While i < objInv.DtResultados.Columns.Count
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then
objInv.DtResultados.Columns.RemoveAt(i)
Else
i = i + 1
End If
End While
DtPSRetorno = objInv.DtResultados
End If
objInv.Dispose()
End If
objInv.Dispose()
End If
If usuario.Empresa.Funcionalidad(558) = "1" Then
@@ -373,15 +377,15 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Catch ex As Exception
End Try
End If
End If
If UsaGlobal Then
'se recarga el global, y el clspaginas, son los unicos 2 lugares
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
If context.Application(String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSSimplificado(CveEmpresa) Then context.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
ObjPS.Dispose()
ObjPS.Dispose()
End If
@@ -469,217 +473,217 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If
End If
Return retorno
Return retorno
End Function
#End Region
#End Region
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property
#Region "Funciones"
Public Function GetJson(ByVal dt As DataTable) As String
Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer()
Dim rows As New List(Of Dictionary(Of String, Object))
Dim row As Dictionary(Of String, Object)
For Each dr As DataRow In dt.Rows
row = New Dictionary(Of String, Object)
For Each col As DataColumn In dt.Columns
row.Add(col.ColumnName, dr(col))
Next
rows.Add(row)
Next
Return serializer.Serialize(rows)
End Function
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
Get
UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
End Get
#Region "Funciones"
Public Function GetJson(ByVal dt As DataTable) As String
Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer()
Dim rows As New List(Of Dictionary(Of String, Object))
Dim row As Dictionary(Of String, Object)
For Each dr As DataRow In dt.Rows
row = New Dictionary(Of String, Object)
For Each col As DataColumn In dt.Columns
row.Add(col.ColumnName, dr(col))
Next
rows.Add(row)
Next
Return serializer.Serialize(rows)
End Function
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
Get
UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
End Get
End Property
#End Region
#End Region
#Region " GET PS SAT "
Private Function GETPSSAT(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DTPS = DirectCast(context.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow))
Dim DtPSRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
If Name <> "-1" Then
DTPS = DTPS.Where((Function(a) a!SATClaveProductoServicio.ToString.ToLower Like ($"*{Name.ToLower}*")))
End If
DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!SATClavePS).CopyToDataTable).ToTable(True, {"CveSATPS", "SATClaveProductoServicio"})
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CveSATPS").ColumnName = "id"
DtPSRetorno.Columns("SATClaveProductoServicio").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
DtPSRetorno.Dispose()
Return retorno
#Region " GET PS SAT "
Private Function GETPSSAT(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DTPS = DirectCast(context.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow))
Dim DtPSRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
If Name <> "-1" Then
DTPS = DTPS.Where((Function(a) a!SATClaveProductoServicio.ToString.ToLower Like ($"*{Name.ToLower}*")))
End If
DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!SATClavePS).CopyToDataTable).ToTable(True, {"CveSATPS", "SATClaveProductoServicio"})
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CveSATPS").ColumnName = "id"
DtPSRetorno.Columns("SATClaveProductoServicio").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
DtPSRetorno.Dispose()
Return retorno
End Function
#End Region
#End Region
#Region " GET UM SAT "
Private Function GETUMSAT(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DTUM = DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow))
Dim DtPSRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
If Name <> "-1" Then
DTUM = DTUM.Where((Function(a) a!ClaveNombre.ToString.ToLower Like ("*" + Name.ToLower + "*")))
End If
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!Nombre).CopyToDataTable).ToTable(True, {"CveSATUnidadMedida", "ClaveNombre"})
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CveSATUnidadMedida").ColumnName = "id"
DtPSRetorno.Columns("ClaveNombre").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
Return retorno
#Region " GET UM SAT "
Private Function GETUMSAT(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DTUM = DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow))
Dim DtPSRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
If Name <> "-1" Then
DTUM = DTUM.Where((Function(a) a!ClaveNombre.ToString.ToLower Like ("*" + Name.ToLower + "*")))
End If
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!Nombre).CopyToDataTable).ToTable(True, {"CveSATUnidadMedida", "ClaveNombre"})
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CveSATUnidadMedida").ColumnName = "id"
DtPSRetorno.Columns("ClaveNombre").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
Return retorno
End Function
#End Region
#End Region
#Region " GET FRACCION ARANCELARIA "
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DT = DirectCast(context.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow))
Dim DtRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
If Name <> "-1" Then
DT = DT.Where((Function(a) a!ClaveSATFraccionArancelariaDescripcion.ToString.ToLower Like ($"*{Name.ToLower}*")))
End If
DtRetorno = New DataView(DT.OrderBy(Function(a) a!ClaveSATFraccionArancelaria).CopyToDataTable).ToTable(True, {"CveFraccionArancelaria", "ClaveSATFraccionArancelariaDescripcion"})
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CveFraccionArancelaria").ColumnName = "id"
DtRetorno.Columns("ClaveSATFraccionArancelariaDescripcion").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
DtRetorno.Dispose()
Return retorno
#Region " GET FRACCION ARANCELARIA "
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DT = DirectCast(context.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow))
Dim DtRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
If Name <> "-1" Then
DT = DT.Where((Function(a) a!ClaveSATFraccionArancelariaDescripcion.ToString.ToLower Like ($"*{Name.ToLower}*")))
End If
DtRetorno = New DataView(DT.OrderBy(Function(a) a!ClaveSATFraccionArancelaria).CopyToDataTable).ToTable(True, {"CveFraccionArancelaria", "ClaveSATFraccionArancelariaDescripcion"})
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CveFraccionArancelaria").ColumnName = "id"
DtRetorno.Columns("ClaveSATFraccionArancelariaDescripcion").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
DtRetorno.Dispose()
Return retorno
End Function
#End Region
#End Region
#Region "USADOS"
#Region "USADOS"
Private Function GETPSUSADOS(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtPSRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim FuePorXml = IfNull(context.Request("FuePorXml"), "-1").ToString.ToEntero
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim CveClasificacion = IfNull(context.Request("CveClasificacion"), "-1").ToString.ToEntero
Dim CveSubFamilia = IfNull(context.Request("CveSubFamilia"), "-1").ToString.ToEntero
Dim CveClasificacionPresupuesto = IfNull(context.Request("CveClasificacionPresupuesto"), "-1").ToString.ToEntero
Dim Pagina = IfNull(context.Request("Pagina"), "-1").ToString
Dim Estatus = IfNull(context.Request("Estatus"), "1").ToString
Dim CveSucursal = IfNull(context.Request("cvesucursal"), "-1").ToString.ToEntero
Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
Private Function GETPSUSADOS(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtPSRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim FuePorXml = IfNull(context.Request("FuePorXml"), "-1").ToString.ToEntero
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim CveClasificacion = IfNull(context.Request("CveClasificacion"), "-1").ToString.ToEntero
Dim CveSubFamilia = IfNull(context.Request("CveSubFamilia"), "-1").ToString.ToEntero
Dim CveClasificacionPresupuesto = IfNull(context.Request("CveClasificacionPresupuesto"), "-1").ToString.ToEntero
Dim Pagina = IfNull(context.Request("Pagina"), "-1").ToString
Dim Estatus = IfNull(context.Request("Estatus"), "1").ToString
Dim CveSucursal = IfNull(context.Request("cvesucursal"), "-1").ToString.ToEntero
Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
Dim UsaGlobal As Boolean = True
If UsaGlobal Then
If UsaGlobal Then
Dim DTPS = DirectCast(context.Application(String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)), EnumerableRowCollection(Of DataRow))
If DTPS IsNot Nothing Then
'APLICACION DE FILTROS
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If Estatus = 1 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEstado) = 1))
ElseIf Estatus = -1 Then
End If
If Name <> "-1" Then
DTPS = DTPS.Where((Function(a) a!PSCodigo.ToString.ToLower Like ("*" + Name.ToLower + "*")))
End If
If CveClasificacion > 0 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
ElseIf CveClasificacion = -1 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveClasificacion) >= 0))
End If
If CveClasificacionPresupuesto > 0 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveClasificacionPresupuesto) = CveClasificacionPresupuesto))
End If
If UsoClasificacion > 0 Then DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!UsoClasificacion) = UsoClasificacion))
If Pagina <> "-1" Then
If Pagina = "Compras" Then
DTPS = DTPS.Where((Function(a) a!CveTipoPS = 1 AndAlso a!CveEstado = 1))
ElseIf Pagina = "Compras2" Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveTipoPS) = 1 AndAlso (Convert.ToInt32(a!CveEstado) = 1 OrElse Convert.ToInt32(a!CveEstado) = 2)))
ElseIf Pagina = "Inventarios" Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveTipoPS) = 2))
End If
End If
Try
DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!PSCodigo).CopyToDataTable).ToTable(True, {"CvePS", "PSCodigo", "CveTamaño"})
DtPSRetorno = DtPSRetorno.FiltraParametros("CveTamaño > 0")
Catch ex As Exception
DtPSRetorno = Nothing
End Try
End If
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CvePS").ColumnName = "id"
DtPSRetorno.Columns("PSCodigo").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
End If
Return retorno
If DTPS IsNot Nothing Then
'APLICACION DE FILTROS
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If Estatus = 1 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEstado) = 1))
ElseIf Estatus = -1 Then
End If
If Name <> "-1" Then
DTPS = DTPS.Where((Function(a) a!PSCodigo.ToString.ToLower Like ("*" + Name.ToLower + "*")))
End If
If CveClasificacion > 0 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
ElseIf CveClasificacion = -1 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveClasificacion) >= 0))
End If
If CveClasificacionPresupuesto > 0 Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveClasificacionPresupuesto) = CveClasificacionPresupuesto))
End If
If UsoClasificacion > 0 Then DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!UsoClasificacion) = UsoClasificacion))
If Pagina <> "-1" Then
If Pagina = "Compras" Then
DTPS = DTPS.Where((Function(a) a!CveTipoPS = 1 AndAlso a!CveEstado = 1))
ElseIf Pagina = "Compras2" Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveTipoPS) = 1 AndAlso (Convert.ToInt32(a!CveEstado) = 1 OrElse Convert.ToInt32(a!CveEstado) = 2)))
ElseIf Pagina = "Inventarios" Then
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveTipoPS) = 2))
End If
End If
Try
DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!PSCodigo).CopyToDataTable).ToTable(True, {"CvePS", "PSCodigo", "CveTamaño"})
DtPSRetorno = DtPSRetorno.FiltraParametros("CveTamaño > 0")
Catch ex As Exception
DtPSRetorno = Nothing
End Try
End If
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CvePS").ColumnName = "id"
DtPSRetorno.Columns("PSCodigo").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
End If
Return retorno
End Function
#End Region
#End Region
End Class

View File

@@ -274,7 +274,7 @@
<asp:TemplateField >
<ItemTemplate>
<div data-toggle="tooltip" title="Remplazar PDF" data-original-title="Add" style="display: inline-block;">
<asp:LinkButton ID="lnkRegenerarPDF" Visible="false" runat="server" OnClick="lnkRegenerarPDF_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-file-pdf-o'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea regenerar el PDF?" data-btn-ok-label="si" />
<asp:LinkButton ID="lnkRegenerarPDF" Visible="true" runat="server" OnClick="lnkRegenerarPDF_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-file-pdf-o'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea regenerar el PDF?" data-btn-ok-label="si" />
</div>
</ItemTemplate>
</asp:TemplateField>

File diff suppressed because it is too large Load Diff

View File

@@ -329,9 +329,10 @@
<table class="table Widthall ">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Agrupador</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 30%; border-right: 3px solid white;">Ejercido</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 30%; border-right: 3px solid white;">Por Ejercer</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Ejercido</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Por Ejercer</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Pagado</td>
</tr>
</table>
<div class="row">
@@ -340,11 +341,12 @@
<Columns>
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="PorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
</Columns>
</asp:GridView>
</div>
@@ -359,85 +361,113 @@
<table class="table" style="overflow-x: auto">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 200px; border-right: 3px solid white;">Agrupador</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 120px; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Enero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Febrero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Marzo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Abril</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Mayo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Junio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Julio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Agosto</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Septiembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Octubre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Noviembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Diciembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 110px; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Enero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Febrero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Marzo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Abril</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Mayo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Junio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Julio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Agosto</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Septiembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Octubre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Noviembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Diciembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 370px; border-right: 3px solid white;">Total</td>
</tr>
</table>
<asp:GridView ID="GvDatosMensual" OnRowDataBound="GvDatosMensual_RowDataBound" runat="server" AutoGenerateColumns="False" Style="min-width: 2000px; overflow-y: hidden" Width="2000px" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover" GridLines="None" data-sort="true">
<asp:GridView ID="GvDatosMensual" OnRowDataBound="GvDatosMensual_RowDataBound" runat="server" AutoGenerateColumns="False" Style="min-width: 2000px; overflow-y: hidden" Width="4740px" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover" GridLines="None" data-sort="true">
<Columns>
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="200px" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="120px" />
<asp:BoundField HeaderText="Autorizado" DataField="EneroAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="EneroEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="EneroEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="EneroPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="EneroPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="EneroPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="FebreroAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="FebreroEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="FebreroEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="FebreroPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="FebreroPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="FebreroPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="MarzoAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="MarzoEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="MarzoEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="MarzoPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="MarzoPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="MarzoPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Ejercido" DataField="AbrilEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Autorizado" DataField="AbrilAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="AbrilEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="AbrilEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="AbrilPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="DiciembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="DiciembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="MayoAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="MayoEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="MayoEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="MayoPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="MayoPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="MayoPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="JunioAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="JunioEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="JunioEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="JunioPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="JunioPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="JunioPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="JulioAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="JulioEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="JulioEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="JulioPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="JulioPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="JulioPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="AgostoAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="AgostoEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="AgostoEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="AgostoPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="AgostoPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="AgostoPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="SeptiembreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="SeptiembreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="SeptiembreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="SeptiembrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="SeptiembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="SeptiembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="OctubreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="OctubreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="OctubreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="OctubrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="OctubrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="OctubrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="NoviembreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="NoviembreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="NoviembreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="NoviembrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="NoviembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="NoviembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="DiciembreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="DiciembreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="DiciembreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="DiciembrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="DiciembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="DiciembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Ejercido" DataField="TotalEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
<asp:BoundField HeaderText="%" DataField="TotalEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="TotalPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
</Columns>
</asp:GridView>
</div>

View File

@@ -344,6 +344,9 @@ Partial Class Contratos_RepPresupuestos
If e.Row.DBCampo("PorEjercerPorcentaje").ToDecimal = 0 Then
e.Row.Cells(5).Text = "-"
End If
If e.Row.DBCampo("Pagado").ToDecimal = 0 Then
e.Row.Cells(6).Text = "-"
End If
If e.Row.RowIndex > 0 Then
Dim CveAgrupador = e.Row.DBCampo("CveAgrupador").ToEntero
@@ -387,50 +390,94 @@ Partial Class Contratos_RepPresupuestos
End Select
If e.Row.DBCampo("EneroEjercido").ToDecimal = 0 Then
e.Row.Cells(2).Text = "-"
e.Row.Cells(3).Text = "-"
End If
If e.Row.DBCampo("EneroPagado").ToDecimal = 0 Then
e.Row.Cells(5).Text = "-"
End If
If e.Row.DBCampo("FebreroEjercido").ToDecimal = 0 Then
e.Row.Cells(4).Text = "-"
e.Row.Cells(7).Text = "-"
End If
If e.Row.DBCampo("FebreroPagado").ToDecimal = 0 Then
e.Row.Cells(9).Text = "-"
End If
If e.Row.DBCampo("MarzoEjercido").ToDecimal = 0 Then
e.Row.Cells(6).Text = "-"
e.Row.Cells(11).Text = "-"
End If
If e.Row.DBCampo("MarzoPagado").ToDecimal = 0 Then
e.Row.Cells(13).Text = "-"
End If
If e.Row.DBCampo("AbrilEjercido").ToDecimal = 0 Then
e.Row.Cells(8).Text = "-"
e.Row.Cells(15).Text = "-"
End If
If e.Row.DBCampo("AbrilPagado").ToDecimal = 0 Then
e.Row.Cells(17).Text = "-"
End If
If e.Row.DBCampo("MayoEjercido").ToDecimal = 0 Then
e.Row.Cells(10).Text = "-"
e.Row.Cells(19).Text = "-"
End If
If e.Row.DBCampo("MayoPagado").ToDecimal = 0 Then
e.Row.Cells(21).Text = "-"
End If
If e.Row.DBCampo("JunioEjercido").ToDecimal = 0 Then
e.Row.Cells(12).Text = "-"
e.Row.Cells(23).Text = "-"
End If
If e.Row.DBCampo("JunioPagado").ToDecimal = 0 Then
e.Row.Cells(25).Text = "-"
End If
If e.Row.DBCampo("JulioEjercido").ToDecimal = 0 Then
e.Row.Cells(14).Text = "-"
e.Row.Cells(27).Text = "-"
End If
If e.Row.DBCampo("JulioPagado").ToDecimal = 0 Then
e.Row.Cells(29).Text = "-"
End If
If e.Row.DBCampo("AgostoEjercido").ToDecimal = 0 Then
e.Row.Cells(16).Text = "-"
e.Row.Cells(31).Text = "-"
End If
If e.Row.DBCampo("AgostoPagado").ToDecimal = 0 Then
e.Row.Cells(33).Text = "-"
End If
If e.Row.DBCampo("SeptiembreEjercido").ToDecimal = 0 Then
e.Row.Cells(18).Text = "-"
e.Row.Cells(35).Text = "-"
End If
If e.Row.DBCampo("SeptiembrePagado").ToDecimal = 0 Then
e.Row.Cells(37).Text = "-"
End If
If e.Row.DBCampo("OctubreEjercido").ToDecimal = 0 Then
e.Row.Cells(20).Text = "-"
e.Row.Cells(39).Text = "-"
End If
If e.Row.DBCampo("OctubrePagado").ToDecimal = 0 Then
e.Row.Cells(41).Text = "-"
End If
If e.Row.DBCampo("NoviembreEjercido").ToDecimal = 0 Then
e.Row.Cells(22).Text = "-"
e.Row.Cells(43).Text = "-"
End If
If e.Row.DBCampo("NoviembrePagado").ToDecimal = 0 Then
e.Row.Cells(45).Text = "-"
End If
If e.Row.DBCampo("DiciembreEjercido").ToDecimal = 0 Then
e.Row.Cells(24).Text = "-"
e.Row.Cells(47).Text = "-"
End If
If e.Row.DBCampo("DiciembrePagado").ToDecimal = 0 Then
e.Row.Cells(49).Text = "-"
End If
If e.Row.DBCampo("TotalEjercido").ToDecimal = 0 Then
e.Row.Cells(50).Text = "-"
End If
If e.Row.DBCampo("TotalPagado").ToDecimal = 0 Then
e.Row.Cells(52).Text = "-"
End If
If e.Row.RowIndex > 0 Then

View File

@@ -247,9 +247,10 @@
<table class="table Widthall ">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Agrupador</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 30%; border-right: 3px solid white;">Ejercido</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 30%; border-right: 3px solid white;">Por Ejercer</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Ejercido</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Por Ejercer</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Pagado</td>
</tr>
</table>
<div class="row">
@@ -257,12 +258,13 @@
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
<Columns>
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="PorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
</Columns>
</asp:GridView>
</div>
@@ -277,85 +279,113 @@
<table class="table" style="overflow-x: auto">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 200px; border-right: 3px solid white;">Agrupador</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 120px; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Enero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Febrero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Marzo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Abril</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Mayo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Junio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Julio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Agosto</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Septiembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Octubre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Noviembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 140px; border-right: 3px solid white;">Diciembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 110px; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Enero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Febrero</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Marzo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Abril</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Mayo</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Junio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Julio</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Agosto</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Septiembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Octubre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Noviembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 338px; border-right: 3px solid white;">Diciembre</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; min-width: 370px; border-right: 3px solid white;">Total</td>
</tr>
</table>
<asp:GridView ID="GvDatosMensual" OnRowDataBound="GvDatosMensual_RowDataBound" runat="server" AutoGenerateColumns="False" Style="min-width: 2000px; overflow-y: hidden" Width="2000px" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover" GridLines="None" data-sort="true">
<asp:GridView ID="GvDatosMensual" OnRowDataBound="GvDatosMensual_RowDataBound" runat="server" AutoGenerateColumns="False" Style="min-width: 2000px; overflow-y: hidden" Width="4740px" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover" GridLines="None" data-sort="true">
<Columns>
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="200px" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="120px" />
<asp:BoundField HeaderText="Autorizado" DataField="EneroAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="EneroEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="EneroEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="EneroPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="EneroPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="EneroPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="FebreroAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="FebreroEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="FebreroEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="FebreroPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="FebreroPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="FebreroPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="MarzoAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="MarzoEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="MarzoEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="MarzoPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="MarzoPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="MarzoPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="AbrilAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="AbrilEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="AbrilEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="AbrilPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="DiciembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="DiciembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="MayoAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="MayoEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="MayoEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="MayoPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="MayoPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="MayoPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="JunioAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="JunioEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="JunioEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="JunioPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="JunioPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="JunioPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="JulioAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="JulioEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="JulioEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="JulioPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="JulioPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="JulioPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="AgostoAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="AgostoEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="AgostoEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="AgostoPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="AgostoPorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="AgostoPorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="SeptiembreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="SeptiembreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="SeptiembreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="SeptiembrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="SeptiembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="SeptiembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="OctubreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="OctubreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="OctubreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="OctubrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="OctubrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="OctubrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="NoviembreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="NoviembreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="NoviembreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="NoviembrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- <asp:BoundField HeaderText="Por Ejercer" DataField="NoviembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="NoviembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Autorizado" DataField="DiciembreAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Ejercido" DataField="DiciembreEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="%" DataField="DiciembreEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="DiciembrePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--<asp:BoundField HeaderText="Por Ejercer" DataField="DiciembrePorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="130px" />
<asp:BoundField HeaderText="%" DataField="DiciembrePorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px" />--%>
<asp:BoundField HeaderText="Ejercido" DataField="TotalEjercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
<asp:BoundField HeaderText="%" DataField="TotalEjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Pagado" DataField="TotalPagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
</Columns>
</asp:GridView>
</div>

View File

@@ -164,6 +164,9 @@ Partial Class Contratos_RepPresupuestosDetalle
If e.Row.DBCampo("PorEjercerPorcentaje").ToDecimal = 0 Then
e.Row.Cells(5).Text = "-"
End If
If e.Row.DBCampo("Pagado").ToDecimal = 0 Then
e.Row.Cells(6).Text = "-"
End If
If e.Row.RowIndex > 0 Then
Dim CveAgrupador = e.Row.DBCampo("CveAgrupador").ToEntero
Dim EsProyecto = False
@@ -195,50 +198,94 @@ Partial Class Contratos_RepPresupuestosDetalle
End Select
If e.Row.DBCampo("EneroEjercido").ToDecimal = 0 Then
e.Row.Cells(2).Text = "-"
e.Row.Cells(3).Text = "-"
End If
If e.Row.DBCampo("EneroPagado").ToDecimal = 0 Then
e.Row.Cells(5).Text = "-"
End If
If e.Row.DBCampo("FebreroEjercido").ToDecimal = 0 Then
e.Row.Cells(4).Text = "-"
e.Row.Cells(7).Text = "-"
End If
If e.Row.DBCampo("FebreroPagado").ToDecimal = 0 Then
e.Row.Cells(9).Text = "-"
End If
If e.Row.DBCampo("MarzoEjercido").ToDecimal = 0 Then
e.Row.Cells(6).Text = "-"
e.Row.Cells(11).Text = "-"
End If
If e.Row.DBCampo("MarzoPagado").ToDecimal = 0 Then
e.Row.Cells(13).Text = "-"
End If
If e.Row.DBCampo("AbrilEjercido").ToDecimal = 0 Then
e.Row.Cells(8).Text = "-"
e.Row.Cells(15).Text = "-"
End If
If e.Row.DBCampo("AbrilPagado").ToDecimal = 0 Then
e.Row.Cells(17).Text = "-"
End If
If e.Row.DBCampo("MayoEjercido").ToDecimal = 0 Then
e.Row.Cells(10).Text = "-"
e.Row.Cells(19).Text = "-"
End If
If e.Row.DBCampo("MayoPagado").ToDecimal = 0 Then
e.Row.Cells(21).Text = "-"
End If
If e.Row.DBCampo("JunioEjercido").ToDecimal = 0 Then
e.Row.Cells(12).Text = "-"
e.Row.Cells(23).Text = "-"
End If
If e.Row.DBCampo("JunioPagado").ToDecimal = 0 Then
e.Row.Cells(25).Text = "-"
End If
If e.Row.DBCampo("JulioEjercido").ToDecimal = 0 Then
e.Row.Cells(14).Text = "-"
e.Row.Cells(27).Text = "-"
End If
If e.Row.DBCampo("JulioPagado").ToDecimal = 0 Then
e.Row.Cells(29).Text = "-"
End If
If e.Row.DBCampo("AgostoEjercido").ToDecimal = 0 Then
e.Row.Cells(16).Text = "-"
e.Row.Cells(31).Text = "-"
End If
If e.Row.DBCampo("AgostoPagado").ToDecimal = 0 Then
e.Row.Cells(33).Text = "-"
End If
If e.Row.DBCampo("SeptiembreEjercido").ToDecimal = 0 Then
e.Row.Cells(18).Text = "-"
e.Row.Cells(35).Text = "-"
End If
If e.Row.DBCampo("SeptiembrePagado").ToDecimal = 0 Then
e.Row.Cells(37).Text = "-"
End If
If e.Row.DBCampo("OctubreEjercido").ToDecimal = 0 Then
e.Row.Cells(20).Text = "-"
e.Row.Cells(39).Text = "-"
End If
If e.Row.DBCampo("OctubrePagado").ToDecimal = 0 Then
e.Row.Cells(41).Text = "-"
End If
If e.Row.DBCampo("NoviembreEjercido").ToDecimal = 0 Then
e.Row.Cells(22).Text = "-"
e.Row.Cells(43).Text = "-"
End If
If e.Row.DBCampo("NoviembrePagado").ToDecimal = 0 Then
e.Row.Cells(45).Text = "-"
End If
If e.Row.DBCampo("DiciembreEjercido").ToDecimal = 0 Then
e.Row.Cells(24).Text = "-"
e.Row.Cells(47).Text = "-"
End If
If e.Row.DBCampo("DiciembrePagado").ToDecimal = 0 Then
e.Row.Cells(49).Text = "-"
End If
If e.Row.DBCampo("TotalEjercido").ToDecimal = 0 Then
e.Row.Cells(50).Text = "-"
End If
If e.Row.DBCampo("TotalPagado").ToDecimal = 0 Then
e.Row.Cells(52).Text = "-"
End If
If e.Row.RowIndex > 0 Then

View File

@@ -111,6 +111,12 @@
</div>
</div>
<div class="row" style="margin-left: 105px">
<asp:RadioButtonList runat="server" ID="RblUsadosAjuste" RepeatDirection="Horizontal" AutoPostBack="true" Font-Size="18pt" Width="70%" OnSelectedIndexChanged="OnRblUsadosAjuste_Change">
<asp:ListItem Selected="True" Value="0">Usados</asp:ListItem>
<asp:ListItem Value="1">Ajuste/Garantía</asp:ListItem>
</asp:RadioButtonList>
</div>
<div class="row">
<label class="col-md-1 truncate" style="width: 110px">Almacén:</label>
@@ -324,8 +330,8 @@
<asp:HyperLink runat="server" ID="HplFolio" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente"/>
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente" />
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton Text="Recibir" ID="BtnRecibir" CommandArgument="-1" OnClick="BtnRecibir_Click" CssClass="btn btn-primary btn-xs" runat="server" />
@@ -337,6 +343,186 @@
</div>
</div>
</div>
<div id="DivAjuste" runat="server" visible="false" class="col-md-6">
<div id="DivAjusteFormulario" runat="server" class="portlet light xspadding bordered">
<asp:UpdatePanel ID="UpAjuste" runat="server" class="portlet-body form" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Ajuste</span>
</div>
</div>
<div class="portlet-body">
<div class="row">
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm ddlps" data-metodo="getps" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" causesvalidation="true" DataTextField="pscodigo" DataValueField="cveps" Onselectedindexchange="ddlpsajuste_selectedindexchange"></ADS:Dropdownlost>
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">producto/servicio a recibir:</label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars=".," />
<label for="<%= TxtPUFactura.ClientID.ToString()%>">P.U.:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlFolioGarantia" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FolioGarantia" DataValueField="CveFolioGarantia" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVFolioGarantia" runat="server" ControlToValidate="DdlFolioGarantia" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFolioGarantia" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolioGarantia"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlFolioGarantia.ClientID.ToString()%>">Folio:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>
<%--<ajax:ValidatorCalloutExtender ID="VCEConsecutivoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsecutivoAjuste"></ajax:ValidatorCalloutExtender>--%>
<%--<label for="<%= TxtConsecutivoAjuste.ClientID.ToString()%>">Consec.:</label>--%>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%
<%--<ajax:ValidatorCalloutExtender ID="VCECodEnsamble" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodEnsamble"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoUso" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoUso" DataValueField="CveTipoUso" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoUso_SelectedIndexChanged">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoUso" runat="server" ControlToValidate="DdlTipoUso" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoUso" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoUso"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlTipoUso.ClientID.ToString()%>">Tipo de Uso:</label>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxtCodLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[*]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodLinea" runat="server" ControlToValidate="TxtCodLinea" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Linea''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodLinea" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodLinea"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
</div>
</div>
<div class="col-md-4">
<label for="<%= TxtFechaAjuste.ClientID.ToString()%>">Fecha:</label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaAjuste" CssClass="form-control input-sm ADSMaskDate" Width="100%" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaAjuste" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaAjuste" runat="server" TargetControlID="TxtFechaAjuste" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaAjuste" TargetControlID="TxtFechaAjuste" PopupButtonID="LnkFechaAjuste" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaAjuste" runat="server" ControlToValidate="TxtFechaAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFechaAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAjuste"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMesesUso" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMesesUso" runat="server" ControlToValidate="TxtMesesUso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meses de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMesesUso" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesesUso"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEMesesUso" runat="server" TargetControlID="TxtMesesUso" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtMesesUso.ClientID.ToString()%>">Meses de Uso:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoDefecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoDefecto" DataValueField="CveTipoDefecto" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoDefecto" runat="server" ControlToValidate="DdlTipoDefecto" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Defecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoDefecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoDefecto"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlTipoDefecto.ClientID.ToString()%>">Tipo de Defecto:</label>
</div>
</div>
<div class="col-md-4">
<div id="DivCodigoTD" class="form-group form-md-line-input input-iconright" runat="server" visible="false">
<asp:TextBox ID="TxtCodigoTD" CssClass="form-control" runat="server" MaxLength="11" Width="100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCodigoTD" runat="server" ControlToValidate="TxtCodigoTD" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigoTD"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCodigoTD" FilterType="Custom, Numbers, UppercaseLetters " ValidChars="." />
<label for="<%= TxtCodigoTD.ClientID.ToString()%>">Código:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPorcentajeAjuste" CssClass="form-control" Enabled="false" runat="server" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVPorcentajeAjuste" runat="server" ControlToValidate="TxtPorcentajeAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''% Ajuste''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPorcentajeAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeAjuste"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEPorcentajeAjuste" runat="server" TargetControlID="TxtPorcentajeAjuste" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtPorcentajeAjuste.ClientID.ToString()%>">% Ajuste:</label>
</div>
</div>
</div>
<div class="row" style="margin-top: 17px;">
<div class="col-md-2">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCEPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVPoliza"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtPoliza.ClientID.ToString()%>">Poliza:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEImporteAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteAjuste"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEImporteAjuste" runat="server" TargetControlID="TxtImporteAjuste" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
</div>
</div>
<div class="col-md-4">
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
<asp:Button ID="BtnAgregarProductoAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnAgregarProductoAjuste_Click" runat="server" Text="Agregar" />
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<%--INVENTARIO INICIAL--%>
@@ -841,6 +1027,7 @@
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:LinkButton ID="LnkModalAgregarUsado" runat="server" CssClass="btn btn-success" Text="Agregar" OnClick="LnkModalAgregarUsado_Click" ValidationGroup="GprAgregarUsado"></asp:LinkButton>
<asp:Button ID="BtnCalculaMesesUso" Text="" OnClick="BtnCalculaMesesUso_Click" ClientIDMode="Static" Style="display: none;" runat="server" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
@@ -856,6 +1043,10 @@
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
function CalculaMesesUso() {
$get("BtnCalculaMesesUso").click();
}
function GenerarRNC() {
$('#BtnGenerarRNC').click();
}

View File

@@ -23,6 +23,14 @@ Partial Class Inventarios_RecepcionUsados
ViewState("DtMovimientos") = value
End Set
End Property
Private Property ConsecutivoVenta As Integer
Get
Return ViewState("ConsecutivoVenta").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("ConsecutivoVenta") = value
End Set
End Property
Public Property DtTamaños() As DataTable
Get
Return CType(ViewState("DtTamaños"), DataTable)
@@ -285,7 +293,22 @@ Partial Class Inventarios_RecepcionUsados
ViewState("ObjFactura") = value
End Set
End Property
Private Property IndexAjuste As Integer
Get
Return ViewState("IndexAjuste").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("IndexAjuste") = value
End Set
End Property
Private Property TmpDTAjustes As DataTable
Get
Return If(IsNothing(ViewState("TmpDTAjustes")), Nothing, CType(ViewState("TmpDTAjustes"), DataTable))
End Get
Set(value As DataTable)
ViewState("TmpDTAjustes") = value
End Set
End Property
#End Region
@@ -364,8 +387,6 @@ Partial Class Inventarios_RecepcionUsados
CargaTamaños()
'DdlProducto2.setEsWebService(True)
'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
End If
End Sub
@@ -2382,4 +2403,250 @@ Partial Class Inventarios_RecepcionUsados
objAcum.Dispose()
End Sub
#Region "Ajustes"
Public Sub OnRblUsadosAjuste_Change(sender As Object, e As EventArgs)
If RblUsadosAjuste.SelectedValue = "1" Then
CargaAjuste()
DivAjuste.Visible = True
Else
DivAjuste.Visible = False
End If
End Sub
Private Sub CargaAjuste()
CreaDTmpDTAjustes()
CargaPSAjuste()
CargaBCIAjuste()
CargaFolioAjuste()
CargaTipoDefecto()
CargaTipoDeUso()
TxtFechaAjuste.Attributes.Add("onchange", "CalculaMesesUso();")
TxtFechaAjuste.Text = Today.ToString("d")
End Sub
Private Sub CreaDTmpDTAjustes()
TmpDTAjustes = New DataTable
TmpDTAjustes.Columns.Add("CveFolioGarantia", GetType(Integer))
TmpDTAjustes.Columns.Add("CveTipoUso", GetType(Integer))
TmpDTAjustes.Columns.Add("CveTipoDefecto", GetType(Integer))
TmpDTAjustes.Columns.Add("CodigoEnsamble", GetType(String))
TmpDTAjustes.Columns.Add("CodigoLinea", GetType(String))
TmpDTAjustes.Columns.Add("CodigoInspeccion", GetType(String))
TmpDTAjustes.Columns.Add("Consecutivo", GetType(String))
TmpDTAjustes.Columns.Add("ConsecutivoVenta", GetType(Integer))
TmpDTAjustes.Columns.Add("FechaAjuste", GetType(Date))
TmpDTAjustes.Columns.Add("Meses", GetType(String))
TmpDTAjustes.Columns.Add("PorcentajeAjuste", GetType(Double))
TmpDTAjustes.Columns.Add("NumPoliza", GetType(String))
TmpDTAjustes.Columns.Add("Importe", GetType(Double))
TmpDTAjustes.Columns.Add("CvePS", GetType(Integer))
TmpDTAjustes.Columns.Add("PS", GetType(String))
TmpDTAjustes.Columns.Add("Cantidad", GetType(Decimal))
TmpDTAjustes.Columns.Add("CveUM", GetType(Integer))
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
TmpDTAjustes.Columns.Add("PUFactura", GetType(Double))
End Sub
Private Sub CargaAjusteDetalle()
Dim Dr As DataRow = Nothing
IndexAjuste = 0
For Each Dr2 As DataRow In TmpDTAjustes.Rows
If Dr2("ConsecutivoVenta").ToString.ToEntero = ConsecutivoVenta Then
Dr = Dr2
Exit For
End If
IndexAjuste += 1
Next
If Dr IsNot Nothing Then
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
TxtConsecutivoAjuste.Text = Dr("Consecutivo").ToString
TxtCodEnsamble.Text = Dr("CodigoEnsamble").ToString
DdlTipoUso.SelectedValueExist(Dr("CveTipoUso").ToString)
TxtCodLinea.Text = Dr("CodigoLinea").ToString
TxtCodInspeccion.Text = Dr("CodigoInspeccion").ToString
TxtMesesUso.Text = Dr("Meses").ToString
DdlTipoDefecto.SelectedValueExist(Dr("CveTipoDefecto").ToString)
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
TxtPoliza.Text = Dr("NumPoliza").ToString
TxtImporteAjuste.Text = Dr("Importe").ToString
'DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString)
CargaPSAjuste()
DdlPSAjuste.SelectedValue = (Dr("CvePS").ToString)
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString
txtPrecio.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
txtPrecio.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
End If
End Sub
Private Sub CargaPSAjuste()
DdlPSAjuste.setEsWebService(True)
End Sub
Protected Sub DdlPSAjuste_selectedindexchange(sender As Object, e As EventArgs)
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim PrecioSugerido As Decimal = 0
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
If drPS IsNot Nothing Then
PrecioSugerido = drPS("Precio").ToString.ToDecimal
End If
txtPrecio.Text = PrecioSugerido.FormatoNumero(2)
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
End If
End Sub
Private Sub CargaBCIAjuste()
Dim ObjGral As New ClsGenerales
If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
DdlBCIAjuste.DataSource = ObjGral.DtResultados
DdlBCIAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
ObjGral.Dispose()
DdlBCIAjuste.DataBind()
End Sub
Private Sub CargaFolioAjuste()
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then
DdlFolioGarantia.DataSource = ObjAcum.DtResultados
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
ObjAcum.Dispose()
DdlFolioGarantia.DataBind()
End Sub
Protected Sub DdlFolioGarantia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFolioGarantia.SelectedIndexChanged
Dim ObjAcumuladores As New ClsAcumuladores
If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then
Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo")
TxtConsecutivoAjuste.Text = resultado
UpAjuste.Update()
End If
ObjAcumuladores.Dispose()
End Sub
Protected Sub CargaTipoDeUso()
DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTipoUso.DataBind
End Sub
Protected Sub DdlTipoUso_SelectedIndexChanged(sender As Object, e As EventArgs)
CalculaPorcentajeAjuste()
End Sub
Protected Sub CargaTipoDefecto()
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTipoDefecto.DataBind
End Sub
Private Sub CalculaPorcentajeAjuste()
Try
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then
Dim CveMarca As Integer = -1
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
If ObjAcum.DtResultados.Rows.Count > 0 Then
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
Dim CargoVendido As Decimal = 0
Dim CargoGarantia As Decimal = 0
Dim CveTamaño As Integer = 0
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("")
If Dr IsNot Nothing Then
CargoGarantia = Dr("Cargo").ToString.ToDecimal
End If
End If
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("")
If Dr IsNot Nothing Then
CveTamaño = Dr("CveTamaño").ToString.ToEntero
End If
End If
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}")
If DrCargo IsNot Nothing Then
CargoVendido = DrCargo("Cargo").ToString.ToDecimal
End If
'el ajuste no puede ser mayor al precio de lo vendido de nuevo
If (txtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))) < 0 Then
TxtImporteAjuste.Text = "0.00"
CargoGarantia = CargoVendido
End If
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(txtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
Else
'cuando no está registrada, no da ajuste
TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo"
TxtImporteAjuste.Text = "0.00"
End If
End If
ObjAcum.Dispose()
End If
Catch ex As Exception
OnError("Ocurrió un error al recalcular el costo", ex)
End Try
UpAjuste.Update()
End Sub
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
CalculaMesesUso()
End Sub
Protected Sub BtnCalcularImporteAjuste_Click(sender As Object, e As EventArgs)
CalculaPorcentajeAjuste()
End Sub
Private Sub CalculaMesesUso()
Dim FechaI As Date = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaF As Date = Now
Dim Dia As Integer = FechaI.Day
'validación adicional, para saber si el mes tiene 31 días y el actua es menor.
If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day
Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo
If FechaT > FechaF Then
'todavía está en el mes actual.
MesesTrascurridos = MesesTrascurridos
Else
MesesTrascurridos = MesesTrascurridos + 1
End If
TxtMesesUso.Text = MesesTrascurridos.ToString
CalculaPorcentajeAjuste()
End Sub
Protected Sub BtnAgregarProductoAjuste_Click(sender As Object, e As EventArgs)
Dim CvePS As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim ObjPS As New ClsProductosServicios
Dim CveTamaño As Integer = -1
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
CveTamaño = ObjPS.DtResultados.FiltroPrimeroValor("CveTamaño").ToEntero
End If
Dim Datos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
Dim TamañoPS As DataRow
If ObjPS.GetPS(Datos.Item("CvePSCargo").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
TamañoPS = ObjPS.DtResultados.FiltroPrimero("")
End If
AddNew(TamañoPS.Item("CvePS").ToString.ToEntero, TamañoPS.Item("PSCodigo").ToString, TamañoPS.Item("CveUM").ToString.ToEntero, TamañoPS.Item("UnidadMedida").ToString, 1.0, TxtPUFactura.Text.ToDouble,
"", "-1", "-1", "-1", "", "", "", -1, "", "", -1)
ObjPS.Dispose()
End Sub
#End Region
End Class

View File

@@ -799,6 +799,7 @@ Partial Class Inventarios_TraspasoAlmacen
'VIRTUAL SALIDA
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenOrigen.SelectedValue}").ToEntero()
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
@@ -1613,7 +1614,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveMovimientoVirtualEntrada As Integer = 0
Dim FolioVirtualEntrada As Integer = 0
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenRecepcion.SelectedValue}").ToEntero()
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()

View File

@@ -7273,10 +7273,10 @@
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable").scrollTop(stop);
}
function CargaExistenciaAlmacenes(data, params) {
var div = $('<div class="select2anothertable"></div>');
var div = $('<div class="select2anothertable" style=" max-width: 950px; overflow-x: auto;"></div>');
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
var table = $('<table id="TExistencias"></table>'); div.append(table);
var table = $('<table id="TExistencias" ></table>'); div.append(table);
var tbody = $('<tbody></tbody>'); table.append(tbody);
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);

View File

@@ -5406,7 +5406,11 @@ Partial Class Ventas
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
Else
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
If UsuarioActual.CveEmpresa = 141 Then
cvesubproyecto = "-1"
End If
Objeto.Attributes.Add("data-cvesubproyecto", cvesubproyecto)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
Objeto.ddlWS.Attributes.Add("data-Estatus", "1")