Libro diario, mayor,
This commit is contained in:
@@ -6708,6 +6708,53 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetLibroMayorSIG(CveCuentaPadre As Integer, FechaInicio As Date, FechaFin As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_LibroMayorSIGGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveCuentaPadre ", SqlDbType.Int).Value = CveCuentaPadre
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaInicio
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaFin
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte de Libro Mayor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetLibroDiarioSIG(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_LibroDiarioSIGGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaInicio
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaFin
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte de Libro Diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(disposing As Boolean)
|
Protected Overridable Sub Dispose(disposing As Boolean)
|
||||||
|
|||||||
@@ -152,53 +152,53 @@ Public Class ClsPV
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Reporte de Compras
|
'Reporte de Compras
|
||||||
Public Function GetRepPVCompras(FechaI As String, FechaF As String, CveProveedor As Integer, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean
|
'Public Function GetRepPVCompras(FechaI As String, FechaF As String, CveProveedor As Integer, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_PV_ComprasGetRep")
|
' DataAdapter("PA_PV_ComprasGetRep")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
' .Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
' .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
' .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@GPO", SqlDbType.Int).Value = Gpo
|
' .Add("@GPO", SqlDbType.Int).Value = Gpo
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener el Reporte de Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al obtener el Reporte de Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
'Reporte de Ventas VS Compras
|
'Reporte de Ventas VS Compras
|
||||||
Public Function GetRepPVVentasCompras(FechaI As String, FechaF As String, CveSubProyecto As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean
|
'Public Function GetRepPVVentasCompras(FechaI As String, FechaF As String, CveSubProyecto As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_PV_VentasComprasGetRep")
|
' DataAdapter("PA_PV_VentasComprasGetRep")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
'.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
' '.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
' .Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
' .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@GPO", SqlDbType.Int).Value = Gpo
|
' .Add("@GPO", SqlDbType.Int).Value = Gpo
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener el Reporte de Ventas y Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al obtener el Reporte de Ventas y Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|
||||||
|
|||||||
@@ -5538,9 +5538,9 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Proveedores/LogInProveedores.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Proveedores/LogInProveedores.aspx".ToUpper(), -1)
|
||||||
|
|
||||||
'Punto de Venta
|
'Punto de Venta
|
||||||
PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270)
|
'PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270)
|
||||||
PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272)
|
'PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272)
|
||||||
PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
|
'PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
|
||||||
|
|
||||||
PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), 911)
|
PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), 911)
|
||||||
PaginaDict.Add("/Contratos/RepContratosObraAvances.aspx".ToUpper(), 914)
|
PaginaDict.Add("/Contratos/RepContratosObraAvances.aspx".ToUpper(), 914)
|
||||||
@@ -5999,7 +5999,7 @@ Public Class ClsPaginas
|
|||||||
Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory)
|
Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory)
|
||||||
|
|
||||||
'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA
|
'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA
|
||||||
If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") Then
|
If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") AndAlso Not RutaReporte.Contains("AC/Reportes/") Then
|
||||||
bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "")
|
bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,18 @@ Partial Class Contabilidad_LibroDiario
|
|||||||
'FechaInicio = New Date(2016, 1, 1)
|
'FechaInicio = New Date(2016, 1, 1)
|
||||||
'FechaFin = New Date(2016, 1, 31)
|
'FechaFin = New Date(2016, 1, 31)
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
If ObjConta.GetLibroDiarioSIG(FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtDatos = ObjConta.DtResultados
|
||||||
|
Else
|
||||||
|
DtDatos = Nothing
|
||||||
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
Else
|
||||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If ObjConta.GetLibroDiario(FechaInicio, FechaFin) Then
|
If ObjConta.GetLibroDiario(FechaInicio, FechaFin) Then
|
||||||
DtDatos = ObjConta.DtResultados
|
DtDatos = ObjConta.DtResultados
|
||||||
@@ -87,6 +99,10 @@ Partial Class Contabilidad_LibroDiario
|
|||||||
DtDatos = Nothing
|
DtDatos = Nothing
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DtDatos IsNot Nothing Then
|
If DtDatos IsNot Nothing Then
|
||||||
ImgExcel.Visible = True
|
ImgExcel.Visible = True
|
||||||
|
|||||||
@@ -44,10 +44,18 @@ Partial Class Contabilidad_LibroMayor
|
|||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
BtnConsultar.Enabled = True
|
BtnConsultar.Enabled = True
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
BtnConsultar.Enabled = True
|
||||||
|
Else
|
||||||
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
|
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub InicializaValores()
|
Private Sub InicializaValores()
|
||||||
@@ -70,6 +78,22 @@ Partial Class Contabilidad_LibroMayor
|
|||||||
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
|
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
|
||||||
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
|
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
|
'140
|
||||||
|
Dim CvecuentaPadre As Integer = 57416 '140
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
If ObjConta.GetLibroMayorSIG(CvecuentaPadre, FechaInicio, FechaFin, 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtDatos = ObjConta.DtResultados
|
||||||
|
Else
|
||||||
|
DtDatos = Nothing
|
||||||
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If ObjConta.GetLibroMayor(1, FechaInicio, FechaFin, 1) Then
|
If ObjConta.GetLibroMayor(1, FechaInicio, FechaFin, 1) Then
|
||||||
DtDatos = ObjConta.DtResultados
|
DtDatos = ObjConta.DtResultados
|
||||||
@@ -77,6 +101,9 @@ Partial Class Contabilidad_LibroMayor
|
|||||||
DtDatos = Nothing
|
DtDatos = Nothing
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DtDatos IsNot Nothing Then
|
If DtDatos IsNot Nothing Then
|
||||||
ImgExcel.Visible = True
|
ImgExcel.Visible = True
|
||||||
@@ -159,6 +186,7 @@ Partial Class Contabilidad_LibroMayor
|
|||||||
#Region " IMPRIMIR "
|
#Region " IMPRIMIR "
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||||
|
|||||||
@@ -235,6 +235,8 @@
|
|||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Concepto">
|
<asp:TemplateField HeaderText="Concepto">
|
||||||
@@ -275,6 +277,52 @@
|
|||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:GridView ID="GvOrigenAplicacionSIG" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveCuenta" Visible="false">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Concepto">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="" Visible="false">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HLlImporteBase" runat="server" Text='<%# Eval("ImporteBase", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="" Visible="false">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HLImporteActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Origen">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HLOrigen" runat="server" Text='<%# Eval("Origen", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Aplicación">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HLAplicacion" runat="server" Text='<%# Eval("Aplicacion", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
|||||||
TdFI.Visible = False
|
TdFI.Visible = False
|
||||||
tdTipoReporte.Visible = False
|
tdTipoReporte.Visible = False
|
||||||
|
|
||||||
|
GvOrigenAplicacionSIG.Visible = True
|
||||||
|
GvDatos.Visible = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -162,25 +165,26 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
|||||||
Dim AnioAnteior As Integer = AnioActual - 1
|
Dim AnioAnteior As Integer = AnioActual - 1
|
||||||
|
|
||||||
|
|
||||||
GvDatos.Columns(1).Visible = True
|
GvOrigenAplicacionSIG.Columns(1).Visible = True
|
||||||
GvDatos.Columns(2).Visible = True
|
GvOrigenAplicacionSIG.Columns(2).Visible = True
|
||||||
|
|
||||||
GvDatos.Columns(1).HeaderText = AnioAnteior.ToString
|
GvOrigenAplicacionSIG.Columns(1).HeaderText = AnioAnteior.ToString
|
||||||
GvDatos.Columns(2).HeaderText = AnioActual.ToString
|
GvOrigenAplicacionSIG.Columns(2).HeaderText = AnioActual.ToString
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
'GvOrigenAplicacionSIG
|
||||||
If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||||
GvDatos.DataSource = ObjConta.DtResultados
|
GvOrigenAplicacionSIG.DataSource = ObjConta.DtResultados
|
||||||
|
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
LnkExcel.Visible = True
|
LnkExcel.Visible = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
GvDatos.DataSource = Nothing
|
GvOrigenAplicacionSIG.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
GvDatos.DataBind()
|
GvOrigenAplicacionSIG.DataBind()
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
@@ -214,6 +218,31 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
'Titulo y Sumatoria de cambios
|
||||||
|
If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then
|
||||||
|
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'CUENTAS
|
||||||
|
If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then
|
||||||
|
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'TOTAL
|
||||||
|
If e.Row.DBCampo("Nombre").ToString.Trim = "" Then
|
||||||
|
e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;")
|
||||||
|
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||||
|
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||||
|
e.Row.FCLabel("LbNombre").Text = "TOTAL"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub GvOrigenAplicacionSIG_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOrigenAplicacionSIG.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
'Titulo y Sumatoria de cambios
|
'Titulo y Sumatoria de cambios
|
||||||
@@ -251,6 +280,12 @@ Partial Class Contabilidad_RepOrigenAplicacion
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,15 +12,17 @@
|
|||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server" >
|
||||||
|
<ContentTemplate>
|
||||||
<div class="portlet solid grey-cascade portlet-filter">
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<asp:Button ID="BtnConsultar" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" runat="server" Visible="false" />
|
<asp:Button ID="BtnConsultar" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" runat="server" Visible="false" />
|
||||||
</div>
|
</div>
|
||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
|
|
||||||
<div class="row" runat="server" visible ="false" id="DvRowFiltrosContanSig1" >
|
<div class="row" runat="server" visible ="false" id="DvRowFiltrosContanSig1" >
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||||
<div class="col-md-2" style="width: 125px;">
|
<div class="col-md-2" style="width: 125px;">
|
||||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||||
@@ -43,13 +45,17 @@
|
|||||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
@@ -87,7 +93,9 @@
|
|||||||
<%-- FechaMovto Mensaje CveIE CveCompra CveVenta CvePrePoliza FolioPoliza--%>
|
<%-- FechaMovto Mensaje CveIE CveCompra CveVenta CvePrePoliza FolioPoliza--%>
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvDatosSIG" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None" Visible="false" >
|
<asp:GridView ID="GvDatosSIG" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None" Visible="false"
|
||||||
|
EmptyDataText="No se encontraron descuadres" ToolTip="Listado de descuadres"
|
||||||
|
>
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Fecha">
|
<asp:TemplateField HeaderText="Fecha">
|
||||||
|
|||||||
@@ -931,7 +931,7 @@
|
|||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
<Format>#,0.00;(#,0.00);'-'</Format>
|
<Format>#,0.00;(#,0.00)</Format>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -951,7 +951,6 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
<rd:Selected>true</rd:Selected>
|
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -1811,31 +1810,28 @@
|
|||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value xml:space="preserve"> </Value>
|
<Value>Régimen:Régimen General de Ley Personas Morales</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
|
||||||
<Value>=Parameters!Fecha.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||||
<Top>2.86594cm</Top>
|
<Top>2.86594cm</Top>
|
||||||
<Left>10.06268cm</Left>
|
<Left>10.09281cm</Left>
|
||||||
<Height>0.7927cm</Height>
|
<Height>1.12078cm</Height>
|
||||||
<Width>9.71199cm</Width>
|
<Width>10.9783cm</Width>
|
||||||
<ZIndex>11</ZIndex>
|
<ZIndex>11</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -2046,7 +2042,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
<rd:DefaultName>Textbox32</rd:DefaultName>
|
||||||
<Top>3.98996cm</Top>
|
<Top>4.05346cm</Top>
|
||||||
<Left>14.07729cm</Left>
|
<Left>14.07729cm</Left>
|
||||||
<Height>0.57354cm</Height>
|
<Height>0.57354cm</Height>
|
||||||
<Width>2.90753cm</Width>
|
<Width>2.90753cm</Width>
|
||||||
@@ -2300,7 +2296,7 @@
|
|||||||
<Source>Embedded</Source>
|
<Source>Embedded</Source>
|
||||||
<Value>ID3</Value>
|
<Value>ID3</Value>
|
||||||
<Sizing>FitProportional</Sizing>
|
<Sizing>FitProportional</Sizing>
|
||||||
<Top>26.4128cm</Top>
|
<Top>26.3493cm</Top>
|
||||||
<Left>0.28014cm</Left>
|
<Left>0.28014cm</Left>
|
||||||
<Height>0.93046cm</Height>
|
<Height>0.93046cm</Height>
|
||||||
<Width>5.37042cm</Width>
|
<Width>5.37042cm</Width>
|
||||||
@@ -2332,7 +2328,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox60</rd:DefaultName>
|
<rd:DefaultName>Textbox60</rd:DefaultName>
|
||||||
<Top>24.07802cm</Top>
|
<Top>24.01452cm</Top>
|
||||||
<Left>0.28014cm</Left>
|
<Left>0.28014cm</Left>
|
||||||
<Height>0.6882cm</Height>
|
<Height>0.6882cm</Height>
|
||||||
<Width>20.71217cm</Width>
|
<Width>20.71217cm</Width>
|
||||||
@@ -2385,7 +2381,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
<rd:DefaultName>Textbox32</rd:DefaultName>
|
||||||
<Top>3.92322cm</Top>
|
<Top>3.98672cm</Top>
|
||||||
<Left>17.11694cm</Left>
|
<Left>17.11694cm</Left>
|
||||||
<Height>0.64028cm</Height>
|
<Height>0.64028cm</Height>
|
||||||
<Width>3.90165cm</Width>
|
<Width>3.90165cm</Width>
|
||||||
@@ -3081,7 +3077,7 @@
|
|||||||
<Value>=System.Convert.FromBase64String(Parameters!QRDescarga.Value)</Value>
|
<Value>=System.Convert.FromBase64String(Parameters!QRDescarga.Value)</Value>
|
||||||
<MIMEType>image/png</MIMEType>
|
<MIMEType>image/png</MIMEType>
|
||||||
<Sizing>FitProportional</Sizing>
|
<Sizing>FitProportional</Sizing>
|
||||||
<Top>10.0185in</Top>
|
<Top>9.9935in</Top>
|
||||||
<Left>6.67743in</Left>
|
<Left>6.67743in</Left>
|
||||||
<Height>0.6035in</Height>
|
<Height>0.6035in</Height>
|
||||||
<Width>0.78275in</Width>
|
<Width>0.78275in</Width>
|
||||||
@@ -3134,7 +3130,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox60</rd:DefaultName>
|
<rd:DefaultName>Textbox60</rd:DefaultName>
|
||||||
<Top>24.5228cm</Top>
|
<Top>24.4593cm</Top>
|
||||||
<Left>0.28014cm</Left>
|
<Left>0.28014cm</Left>
|
||||||
<Height>1.49135cm</Height>
|
<Height>1.49135cm</Height>
|
||||||
<Width>5.37042cm</Width>
|
<Width>5.37042cm</Width>
|
||||||
@@ -3289,7 +3285,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox60</rd:DefaultName>
|
<rd:DefaultName>Textbox60</rd:DefaultName>
|
||||||
<Top>24.5228cm</Top>
|
<Top>24.4593cm</Top>
|
||||||
<Left>7.45145cm</Left>
|
<Left>7.45145cm</Left>
|
||||||
<Height>2.45709cm</Height>
|
<Height>2.45709cm</Height>
|
||||||
<Width>6.56105cm</Width>
|
<Width>6.56105cm</Width>
|
||||||
@@ -3328,7 +3324,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox60</rd:DefaultName>
|
<rd:DefaultName>Textbox60</rd:DefaultName>
|
||||||
<Top>24.51302cm</Top>
|
<Top>24.44952cm</Top>
|
||||||
<Left>14.67145cm</Left>
|
<Left>14.67145cm</Left>
|
||||||
<Height>1.46939cm</Height>
|
<Height>1.46939cm</Height>
|
||||||
<Width>6.32076cm</Width>
|
<Width>6.32076cm</Width>
|
||||||
@@ -3834,47 +3830,11 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</Style>
|
</Style>
|
||||||
</Tablix>
|
</Tablix>
|
||||||
<Textbox Name="Textbox26">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>VERSION 3.3</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>MYRiad Pro</FontFamily>
|
|
||||||
<FontSize>9.16pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
|
||||||
<Top>2.32303cm</Top>
|
|
||||||
<Left>17.39754cm</Left>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<Width>3.32021cm</Width>
|
|
||||||
<ZIndex>4</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</ReportItems>
|
</ReportItems>
|
||||||
<KeepTogether>true</KeepTogether>
|
<KeepTogether>true</KeepTogether>
|
||||||
<Top>20.92547cm</Top>
|
<Top>20.92547cm</Top>
|
||||||
<Left>0.13424cm</Left>
|
<Left>0.13424cm</Left>
|
||||||
<Height>2.97096cm</Height>
|
<Height>2.25247cm</Height>
|
||||||
<Width>20.89818cm</Width>
|
<Width>20.89818cm</Width>
|
||||||
<ZIndex>42</ZIndex>
|
<ZIndex>42</ZIndex>
|
||||||
<Visibility>
|
<Visibility>
|
||||||
@@ -3945,8 +3905,44 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</Style>
|
</Style>
|
||||||
</Image>
|
</Image>
|
||||||
|
<Textbox Name="Textbox26">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>VERSION 3.3</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>MYRiad Pro</FontFamily>
|
||||||
|
<FontSize>9.16pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||||
|
<Top>23.28377cm</Top>
|
||||||
|
<Left>17.70088cm</Left>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<Width>3.32021cm</Width>
|
||||||
|
<ZIndex>45</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
</ReportItems>
|
</ReportItems>
|
||||||
<Height>27.70336cm</Height>
|
<Height>27.49699cm</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>21.16666cm</Width>
|
<Width>21.16666cm</Width>
|
||||||
|
|||||||
@@ -217,19 +217,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row rowpadding">
|
<div class="row rowpadding">
|
||||||
<label class="col-md-3">Chofer:</label>
|
<label class="col-md-3">Chofer:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowpadding">
|
<div class="row rowpadding">
|
||||||
<label class="col-md-3">Unidad:</label>
|
<label class="col-md-3">Unidad:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5071,7 +5071,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If EsConsumoInterno And UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
If EsConsumoInterno And UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||||
|
|
||||||
If DdlSubProyecto.SelectedValue.ToEntero <= 0 Then
|
If DdlSubProyecto.SelectedValue.ToEntero <= 0 Then
|
||||||
Alert("Debe seleccionar un Centro de Constos.", TipoMensaje.MsgAdvertencia)
|
Alert("Debe seleccionar un Centro de Costos.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
Else
|
Else
|
||||||
CargaCultivos()
|
CargaCultivos()
|
||||||
|
|||||||
@@ -1,180 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVRepCompras.aspx.vb" Inherits="PV_PVRepCompras" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="ImgImprimir" runat="server" Enabled="false"> <i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
|
||||||
<%--<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />--%>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="ImgExcel" runat="server" > <i class="fa fa-ad-excel"></i> Generar</asp:LinkButton>
|
|
||||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />--%>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:HyperLink NavigateUrl ="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server" > <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
|
||||||
<%--<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
|
|
||||||
</li>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<%--<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />
|
|
||||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
|
||||||
<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Reporte de Compras
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
|
||||||
<div class="portlet-title portlet-filterT" style="">
|
|
||||||
<div class="titlefiltros caption ">
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li>Proveedor:
|
|
||||||
<asp:DropDownList ID="DdlProveedores" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Responsable:
|
|
||||||
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Moneda:
|
|
||||||
<asp:DropDownList ID="DdlMonedas" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
||||||
<a href="javascript:;" class="expand"></a>
|
|
||||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body" style="display: none;">
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li>F.I.:
|
|
||||||
<asp:TextBox ID="txtFechaI" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
<li style="width: 233px;">F.F.:
|
|
||||||
<asp:TextBox ID="txtFechaF" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
<li>Grupo:
|
|
||||||
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 140px !important;">
|
|
||||||
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
|
|
||||||
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Proveedor" Value="5"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Tipo Documento" Value="6"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Clasificación Prov" Value="7"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Responsable" Value="8"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<br />
|
|
||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" id="tblSucursales" runat="server" visible="false">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 150px"> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Compras con los filtros especificados" ToolTip="Listado de Compras" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>
|
|
||||||
Grupo
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div id="DivPersonalizar" style="width: 315px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
|
|
||||||
<table class="table table-striped table-advance table-hover" width="315px">
|
|
||||||
<tr class="Titulos">
|
|
||||||
<th style="width: 310px">
|
|
||||||
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
|
|
||||||
</th>
|
|
||||||
<th style="padding-right: 4px; padding-top: 4px" valign="top">
|
|
||||||
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr align="left">
|
|
||||||
<td colspan="2">
|
|
||||||
<table class="table table-striped table-advance table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="height: 25px">
|
|
||||||
<td style="text-align: center;" colspan="2">
|
|
||||||
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" class="btn btn-danger" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
@@ -1,307 +0,0 @@
|
|||||||
Option Explicit On
|
|
||||||
Option Strict On
|
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
|
||||||
|
|
||||||
Partial Class PV_PVRepCompras
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
#Region "Propiedades"
|
|
||||||
'Local
|
|
||||||
Private Property TmpDT As DataTable
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("TmpDT"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("TmpDT") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
|
|
||||||
CreaGrid()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
||||||
If Not IsPostBack Then
|
|
||||||
CargaCombos()
|
|
||||||
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaCombos()
|
|
||||||
'CargaProveedores
|
|
||||||
'Dim ObjProveedores As New ClsCompProveedores
|
|
||||||
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
|
||||||
' DdlProveedores.DataSource = ObjProveedores.DtResultados
|
|
||||||
'Else
|
|
||||||
' DdlProveedores.DataSource = Nothing
|
|
||||||
'End If
|
|
||||||
'ObjProveedores.Dispose()
|
|
||||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
|
||||||
DdlProveedores.DataBind()
|
|
||||||
|
|
||||||
'CargaUsuarios
|
|
||||||
DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
DdlUsuario.DataBind()
|
|
||||||
|
|
||||||
DdlMonedas.DataSource = GlobalDTMonedas()
|
|
||||||
DdlMonedas.DataBind()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
|
||||||
CargaDatos()
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CreaGrid()
|
|
||||||
Dim TotalAncho As Integer = 150
|
|
||||||
Dim TotalAnchoSucursal As Integer = 0
|
|
||||||
Dim SucursalTitulo As String = ""
|
|
||||||
|
|
||||||
TmpDT = New DataTable
|
|
||||||
TmpDT.Columns.Add("GPO", GetType(String))
|
|
||||||
|
|
||||||
Dim ObjCompras As New ClsPV()
|
|
||||||
|
|
||||||
Dim FechaI, FechaF As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
If ObjCompras.GetRepPVCompras(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
|
|
||||||
Dim gv As New GridView
|
|
||||||
|
|
||||||
For Each Col As DataColumn In ObjCompras.DtResultados.Columns
|
|
||||||
If Col.ColumnName.Split(CChar("_")).Length = 3 AndAlso Col.ColumnName.Substring(0, 2).ToUpper = "T_" Then
|
|
||||||
Dim Sucursal As String = Col.ColumnName.Split(CChar("_"))(1).ToUpper()
|
|
||||||
Dim Categoria As String = Col.ColumnName.Split(CChar("_"))(2).ToUpper()
|
|
||||||
|
|
||||||
|
|
||||||
Dim bfield As New TemplateField
|
|
||||||
' Dim iTemplate As System.Web.UI.ITemplate
|
|
||||||
bfield.HeaderText = Categoria
|
|
||||||
'bfield.FooterText = Row("CveEstatus").ToString
|
|
||||||
bfield.ItemStyle.HorizontalAlign = HorizontalAlign.Right
|
|
||||||
|
|
||||||
If Sucursal = "TOTAL" Or Categoria = "TOTAL" Then
|
|
||||||
bfield.ItemStyle.Width = 97
|
|
||||||
TotalAnchoSucursal = TotalAnchoSucursal + 100
|
|
||||||
TotalAncho = TotalAncho + 100
|
|
||||||
Else
|
|
||||||
bfield.ItemStyle.Width = 87
|
|
||||||
TotalAnchoSucursal = TotalAnchoSucursal + 90
|
|
||||||
TotalAncho = TotalAncho + 90
|
|
||||||
End If
|
|
||||||
|
|
||||||
bfield.ItemTemplate = New GridViewTemplate(ListItemType.Item, Col.ColumnName)
|
|
||||||
gv.Columns.Add(bfield)
|
|
||||||
|
|
||||||
TmpDT.Columns.Add(Col.ColumnName, GetType(Integer))
|
|
||||||
|
|
||||||
If SucursalTitulo <> Sucursal And Categoria.ToUpper = "TOTAL" Then
|
|
||||||
SucursalTitulo = Sucursal
|
|
||||||
Dim Celda As New HtmlTableCell()
|
|
||||||
Celda.InnerText = SucursalTitulo
|
|
||||||
Celda.Attributes.Add("class", "Titulos")
|
|
||||||
Celda.Attributes.Add("style", "border-width: 1px;border-right-style: solid;")
|
|
||||||
Celda.Width = TotalAnchoSucursal.ToString
|
|
||||||
tblSucursales.Rows(0).Cells.Add(Celda)
|
|
||||||
TotalAnchoSucursal = 0
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each Columna In gv.Columns
|
|
||||||
GvDatos.Columns.Add(CType(Columna, DataControlField))
|
|
||||||
Next
|
|
||||||
GvDatos.Width = TotalAncho
|
|
||||||
Else
|
|
||||||
GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjCompras.Dispose()
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
|
||||||
Dim ObjCompras As New ClsPV()
|
|
||||||
|
|
||||||
Dim FechaI, FechaF As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
|
||||||
If ObjCompras.GetRepPVCompras(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
|
|
||||||
GvDatos.DataSource = ObjCompras.DtResultados
|
|
||||||
tblSucursales.Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjCompras.Dispose()
|
|
||||||
GvDatos.DataBind()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Class GridViewTemplate
|
|
||||||
Implements ITemplate
|
|
||||||
'A variable to hold the type of ListItemType.
|
|
||||||
Private _templateType As ListItemType
|
|
||||||
|
|
||||||
'A variable to hold the column name.
|
|
||||||
Private _columnName As String
|
|
||||||
|
|
||||||
'Constructor where we define the template type and column name.
|
|
||||||
Public Sub New(type As ListItemType, colname As String)
|
|
||||||
'Stores the template type.
|
|
||||||
_templateType = type
|
|
||||||
|
|
||||||
'Stores the column name.
|
|
||||||
_columnName = colname
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ITemplate_InstantiateIn(container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
|
|
||||||
Select Case _templateType
|
|
||||||
Case ListItemType.Header
|
|
||||||
'Creates a new label control and add it to the container.
|
|
||||||
Dim lbl As New Label()
|
|
||||||
'Allocates the new label object.
|
|
||||||
lbl.Text = _columnName
|
|
||||||
'Assigns the name of the column in the lable.
|
|
||||||
container.Controls.Add(lbl)
|
|
||||||
'Adds the newly created label control to the container.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.Item
|
|
||||||
'Creates a new text box control and add it to the container.
|
|
||||||
Dim ltl1 As New Literal
|
|
||||||
|
|
||||||
ltl1.ID = String.Format("ltl{0}", _columnName)
|
|
||||||
AddHandler ltl1.DataBinding, AddressOf ltl_DataBinding
|
|
||||||
|
|
||||||
'Creates a column with size 4.
|
|
||||||
container.Controls.Add(ltl1)
|
|
||||||
'Adds the newly created textbox to the container.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.EditItem
|
|
||||||
'As, I am not using any EditItem, I didnot added any code here.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.Footer
|
|
||||||
Dim chkColumn As New CheckBox()
|
|
||||||
chkColumn.ID = Convert.ToString("Chk") & _columnName
|
|
||||||
container.Controls.Add(chkColumn)
|
|
||||||
Exit Select
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub hdn_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim hidden As HiddenField = DirectCast(sender, HiddenField)
|
|
||||||
Dim row As GridViewRow = DirectCast(hidden.NamingContainer, GridViewRow)
|
|
||||||
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
|
|
||||||
hidden.Value = If(value Is Nothing OrElse value = String.Empty, "-1", value)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ltl_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim ltl As Literal = DirectCast(sender, Literal)
|
|
||||||
Dim row As GridViewRow = DirectCast(ltl.NamingContainer, GridViewRow)
|
|
||||||
Dim celda As DataControlFieldCell = DirectCast(ltl.Parent, DataControlFieldCell)
|
|
||||||
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
|
|
||||||
ltl.Text = value.FormatoNumero
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' This is the event, which will be raised when the binding happens.
|
|
||||||
''' </summary>
|
|
||||||
''' <param name="sender"></param>
|
|
||||||
''' <param name="e"></param>
|
|
||||||
Private Sub tb1_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim txtdata As TextBox = DirectCast(sender, TextBox)
|
|
||||||
Dim container As GridViewRow = DirectCast(txtdata.NamingContainer, GridViewRow)
|
|
||||||
Dim dataValue As Object = DataBinder.Eval(container.DataItem, _columnName)
|
|
||||||
If dataValue Is DBNull.Value Then
|
|
||||||
txtdata.Text = dataValue.ToString()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
Dim Css As String = "Texto"
|
|
||||||
If e.Row.RowIndex = 0 Then
|
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
e.Row.CssClass = "Totales"
|
|
||||||
Css = "Totales"
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If e.Row.DBCampo("Orden") = "" Then
|
|
||||||
' e.Row.BackColor = Drawing.Color.LightGray
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Dim FechaI, FechaF As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
|
|
||||||
Dim Liga As String = String.Format("/Compras/RepComprasDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&FechaI={7}&FechaF={8}&CveMoneda={9}",
|
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"), FechaI, FechaF, e.Row.DBCampo("CveMoneda"))
|
|
||||||
|
|
||||||
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a class='{0}' href='{1}'>{2}</a>", Css, Liga, e.Row.FCLiteral("LtlGrupo").Text)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
|
||||||
If ChkRetIVA.Checked Then
|
|
||||||
GvDatos.Columns(6).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(6).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkRetISR.Checked Then
|
|
||||||
GvDatos.Columns(7).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(7).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMinSub.Checked Then
|
|
||||||
GvDatos.Columns(9).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(9).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkAVGSub.Checked Then
|
|
||||||
GvDatos.Columns(10).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(10).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMaxSub.Checked Then
|
|
||||||
GvDatos.Columns(11).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(11).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMinTot.Checked Then
|
|
||||||
GvDatos.Columns(12).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(12).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkAvgTot.Checked Then
|
|
||||||
GvDatos.Columns(13).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(13).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMaxTot.Checked Then
|
|
||||||
GvDatos.Columns(14).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(14).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
|
|
||||||
GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVRepVentas.aspx.vb" Inherits="PV_PVRepVentas" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="ImgImprimir" runat="server" Enabled="false"> <i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
|
||||||
<%--<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />--%>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="ImgExcel" runat="server" > <i class="fa fa-ad-excel"></i> Generar</asp:LinkButton>
|
|
||||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />--%>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:HyperLink NavigateUrl ="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server" > <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
|
||||||
<%--<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
|
|
||||||
</li>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<%-- <asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />
|
|
||||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
|
||||||
<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Reporte de Ventas
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
|
||||||
<div class="portlet-title portlet-filterT" style="">
|
|
||||||
<div class="titlefiltros caption ">
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li>Cliente:
|
|
||||||
<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Sucursal:
|
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Vendedor:
|
|
||||||
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Usuario:
|
|
||||||
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
||||||
<a href="javascript:;" class="expand"></a>
|
|
||||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body" style="display: none;">
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li style="width: 384px;">Estatus:
|
|
||||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 120px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>F.I.:
|
|
||||||
<asp:TextBox ID="txtFechaI" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
<li style="width: 191px;"> F.F.:
|
|
||||||
<asp:TextBox ID="txtFechaF" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
<li>Grupo:
|
|
||||||
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 120px !important;">
|
|
||||||
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
|
|
||||||
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Cliente" Value="5"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Sucursal" Value="6"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Corte" Value="16"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Vendedor" Value="7"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Año Ejec" Value="11"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Mes Ejec" Value="12"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Año/Mes Ejec" Value="13"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Fecha Ejec" Value="14"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Sucursal Ejec" Value="15"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li>Sucursal Ejecución:
|
|
||||||
<asp:DropDownList ID="DdlSubProyectoEjecucion" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>F.I. E.:
|
|
||||||
<asp:TextBox ID="TxtFechaIEjec" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton ID="ImgCalFechaIEjec" runat="server" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaIEjec" runat="server" TargetControlID="TxtFechaIEjec" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender ID="CalFechaIEjec" runat="server" TargetControlID="TxtFechaIEjec" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaIEjec" runat="server" ControlToValidate="TxtFechaIEjec" Display="None" ErrorMessage="El campo <b>''Fecha Inicial Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="CVFechaIEjec" runat="server" ControlToValidate="TxtFechaIEjec" Display="None" ErrorMessage="El campo <b>''Fecha Inicial Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaIEjec1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaIEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
<li>F.F. E.:
|
|
||||||
<asp:TextBox ID="TxtFechaFEjec" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton ID="ImgCalFechaFEjec" runat="server" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaFEjec" runat="server" TargetControlID="TxtFechaFEjec" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender ID="CalFechaFEjec" runat="server" TargetControlID="TxtFechaFEjec" PopupButtonID="ImgCalFechaFEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaFEjec" runat="server" ControlToValidate="TxtFechaFEjec" Display="None" ErrorMessage="El campo <b>''Fecha Final Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="CVFechaFEjec" runat="server" ControlToValidate="TxtFechaFEjec" Display="None" ErrorMessage="El campo <b>''Fecha Final Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFEjec1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" id="tblSucursales" runat="server" visible="false">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 150px"> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover" Style=" text-align: center;" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>
|
|
||||||
Grupo
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div id="DivPersonalizar" style="width: 330px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
|
|
||||||
<table class="table table-striped table-advance table-hover" width="330px">
|
|
||||||
<tr class="Titulos">
|
|
||||||
<th style="width: 325px">
|
|
||||||
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
|
|
||||||
</th>
|
|
||||||
<th style="padding-right: 4px; padding-top: 4px" valign="top">
|
|
||||||
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr align="left">
|
|
||||||
<td colspan="2">
|
|
||||||
<table class="table table-striped table-advance table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="height: 25px">
|
|
||||||
<td style="text-align: center;" colspan="2">
|
|
||||||
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" class="btn btn-danger" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
@@ -1,365 +0,0 @@
|
|||||||
Option Explicit On
|
|
||||||
Option Strict On
|
|
||||||
|
|
||||||
Imports System.Data
|
|
||||||
Imports Extensiones
|
|
||||||
|
|
||||||
Partial Class PV_PVRepVentas
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
#Region "Propiedades"
|
|
||||||
'Local
|
|
||||||
Private Property TmpDT As DataTable
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("TmpDT"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("TmpDT") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
|
|
||||||
CreaGrid()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
||||||
If Not IsPostBack Then
|
|
||||||
' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
|
||||||
CargaCombos()
|
|
||||||
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaCombos()
|
|
||||||
'CargaClientes
|
|
||||||
Dim ObjClientes As New ClsClientes
|
|
||||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
DdlClientes.DataSource = ObjClientes.DtResultados
|
|
||||||
Else
|
|
||||||
DdlClientes.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjClientes.Dispose()
|
|
||||||
DdlClientes.DataBind()
|
|
||||||
|
|
||||||
'CargaSucursales
|
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
DdlSubProyecto.DataBind()
|
|
||||||
DdlSubProyectoEjecucion.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
DdlSubProyectoEjecucion.DataBind()
|
|
||||||
|
|
||||||
'Vendedor
|
|
||||||
|
|
||||||
'CargaUsuarios
|
|
||||||
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
DdlUsuario.DataBind()
|
|
||||||
|
|
||||||
'CargaEstatus
|
|
||||||
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura NOT IN (1, 4, 5) ")
|
|
||||||
DdlEstatus.DataBind()
|
|
||||||
DdlEstatus.Items.Add(New ListItem("Canceladas", "4"))
|
|
||||||
'If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
|
|
||||||
' DdlEstatus.SelectedIndex = 2
|
|
||||||
'Else
|
|
||||||
DdlEstatus.SelectedIndex = 1
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
|
||||||
CargaDatos()
|
|
||||||
ConfiguraEmpresa()
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CreaGrid()
|
|
||||||
Dim TotalAncho As Integer = 150
|
|
||||||
Dim TotalAnchoSucursal As Integer = 0
|
|
||||||
Dim SucursalTitulo As String = ""
|
|
||||||
|
|
||||||
TmpDT = New DataTable
|
|
||||||
TmpDT.Columns.Add("GPO", GetType(String))
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsPV()
|
|
||||||
|
|
||||||
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
|
|
||||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
|
|
||||||
If ObjVentas.GetRepPVVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue,
|
|
||||||
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
|
|
||||||
Dim gv As New GridView
|
|
||||||
|
|
||||||
For Each Col As DataColumn In ObjVentas.DtResultados.Columns
|
|
||||||
If Col.ColumnName.Split(CChar("_")).Length >= 3 AndAlso Col.ColumnName.Substring(0, 2).ToUpper = "T_" Then
|
|
||||||
Dim Sucursal As String = Col.ColumnName.Split(CChar("_"))(1).ToUpper()
|
|
||||||
Dim Categoria As String = Col.ColumnName.Split(CChar("_"))(2).ToUpper()
|
|
||||||
' Dim CveSucursal As Integer = Col.ColumnName.Split(CChar("_"))(3).ToEntero
|
|
||||||
|
|
||||||
|
|
||||||
Dim bfield As New TemplateField
|
|
||||||
' Dim iTemplate As System.Web.UI.ITemplate
|
|
||||||
bfield.HeaderText = Categoria
|
|
||||||
'bfield.FooterText = Row("CveEstatus").ToString
|
|
||||||
bfield.ItemStyle.HorizontalAlign = HorizontalAlign.Right
|
|
||||||
|
|
||||||
If Sucursal = "TOTAL" Or Categoria = "TOTAL" Then
|
|
||||||
bfield.ItemStyle.Width = 97
|
|
||||||
TotalAnchoSucursal = TotalAnchoSucursal + 100
|
|
||||||
TotalAncho = TotalAncho + 100
|
|
||||||
Else
|
|
||||||
bfield.ItemStyle.Width = 87
|
|
||||||
TotalAnchoSucursal = TotalAnchoSucursal + 90
|
|
||||||
TotalAncho = TotalAncho + 90
|
|
||||||
End If
|
|
||||||
|
|
||||||
bfield.ItemTemplate = New GridViewTemplate(ListItemType.Item, Col.ColumnName)
|
|
||||||
' bfield.ItemTemplate
|
|
||||||
gv.Columns.Add(bfield)
|
|
||||||
|
|
||||||
TmpDT.Columns.Add(Col.ColumnName, GetType(Integer))
|
|
||||||
|
|
||||||
If SucursalTitulo <> Sucursal And Categoria.ToUpper = "TOTAL" Then
|
|
||||||
SucursalTitulo = Sucursal
|
|
||||||
Dim Celda As New HtmlTableCell()
|
|
||||||
'Celda.InnerHtml = String.Format("<font color='White'>{0}</font>", SucursalTitulo)
|
|
||||||
Celda.InnerText = SucursalTitulo
|
|
||||||
'Celda.BorderColor = "White"
|
|
||||||
'Celda.BgColor = "Gray"
|
|
||||||
Celda.Attributes.Add("class", "Titulos")
|
|
||||||
Celda.Attributes.Add("style", "border-width: 1px;border-right-style: solid;")
|
|
||||||
Celda.Width = TotalAnchoSucursal.ToString
|
|
||||||
tblSucursales.Rows(0).Cells.Add(Celda)
|
|
||||||
TotalAnchoSucursal = 0
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each Columna In gv.Columns
|
|
||||||
GvDatos.Columns.Add(CType(Columna, DataControlField))
|
|
||||||
Next
|
|
||||||
GvDatos.Width = TotalAncho
|
|
||||||
Else
|
|
||||||
GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
|
||||||
Dim ObjVentas As New ClsPV()
|
|
||||||
|
|
||||||
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
|
|
||||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
|
|
||||||
If ObjVentas.GetRepPVVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue,
|
|
||||||
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
|
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
|
||||||
tblSucursales.Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
GvDatos.DataBind()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ConfiguraEmpresa()
|
|
||||||
'If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(6).Visible = False
|
|
||||||
'If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(7).Visible = False
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
|
||||||
If ChkRetIVA.Checked Then
|
|
||||||
GvDatos.Columns(6).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(6).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkRetISR.Checked Then
|
|
||||||
GvDatos.Columns(7).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(7).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMinSub.Checked Then
|
|
||||||
GvDatos.Columns(9).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(9).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkAVGSub.Checked Then
|
|
||||||
GvDatos.Columns(10).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(10).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMaxSub.Checked Then
|
|
||||||
GvDatos.Columns(11).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(11).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMinTot.Checked Then
|
|
||||||
GvDatos.Columns(12).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(12).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkAvgTot.Checked Then
|
|
||||||
GvDatos.Columns(13).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(13).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMaxTot.Checked Then
|
|
||||||
GvDatos.Columns(14).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(14).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
|
|
||||||
GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
'Region "TEMPLATE"
|
|
||||||
Public Class GridViewTemplate
|
|
||||||
Implements ITemplate
|
|
||||||
'A variable to hold the type of ListItemType.
|
|
||||||
Private _templateType As ListItemType
|
|
||||||
|
|
||||||
'A variable to hold the column name.
|
|
||||||
Private _columnName As String
|
|
||||||
|
|
||||||
|
|
||||||
'Constructor where we define the template type and column name.
|
|
||||||
Public Sub New(type As ListItemType, colname As String)
|
|
||||||
'Stores the template type.
|
|
||||||
_templateType = type
|
|
||||||
|
|
||||||
'Stores the column name.
|
|
||||||
_columnName = colname
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ITemplate_InstantiateIn(container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
|
|
||||||
Select Case _templateType
|
|
||||||
Case ListItemType.Header
|
|
||||||
'Creates a new label control and add it to the container.
|
|
||||||
Dim lbl As New Label()
|
|
||||||
'Allocates the new label object.
|
|
||||||
lbl.Text = _columnName
|
|
||||||
'Assigns the name of the column in the lable.
|
|
||||||
container.Controls.Add(lbl)
|
|
||||||
'Adds the newly created label control to the container.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.Item
|
|
||||||
'Creates a new text box control and add it to the container.
|
|
||||||
Dim ltl1 As New Literal
|
|
||||||
ltl1.ID = String.Format("ltl{0}", _columnName)
|
|
||||||
AddHandler ltl1.DataBinding, AddressOf ltl_DataBinding
|
|
||||||
|
|
||||||
'AddHandler hdn1.DataBinding, AddressOf hdn_DataBinding
|
|
||||||
|
|
||||||
'Creates a column with size 4.
|
|
||||||
container.Controls.Add(ltl1)
|
|
||||||
'Adds the newly created textbox to the container.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.EditItem
|
|
||||||
'As, I am not using any EditItem, I didnot added any code here.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.Footer
|
|
||||||
Dim chkColumn As New CheckBox()
|
|
||||||
chkColumn.ID = Convert.ToString("Chk") & _columnName
|
|
||||||
container.Controls.Add(chkColumn)
|
|
||||||
Exit Select
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub hdn_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim hidden As HiddenField = DirectCast(sender, HiddenField)
|
|
||||||
Dim row As GridViewRow = DirectCast(hidden.NamingContainer, GridViewRow)
|
|
||||||
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
|
|
||||||
hidden.Value = If(value Is Nothing OrElse value = String.Empty, "-1", value)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ltl_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim ltl As Literal = DirectCast(sender, Literal)
|
|
||||||
Dim row As GridViewRow = DirectCast(ltl.NamingContainer, GridViewRow)
|
|
||||||
Dim celda As DataControlFieldCell = DirectCast(ltl.Parent, DataControlFieldCell)
|
|
||||||
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
|
|
||||||
ltl.Text = value.FormatoNumero
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' This is the event, which will be raised when the binding happens.
|
|
||||||
''' </summary>
|
|
||||||
''' <param name="sender"></param>
|
|
||||||
''' <param name="e"></param>
|
|
||||||
Private Sub tb1_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim txtdata As TextBox = DirectCast(sender, TextBox)
|
|
||||||
Dim container As GridViewRow = DirectCast(txtdata.NamingContainer, GridViewRow)
|
|
||||||
Dim dataValue As Object = DataBinder.Eval(container.DataItem, _columnName)
|
|
||||||
If dataValue Is DBNull.Value Then
|
|
||||||
txtdata.Text = dataValue.ToString()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
Dim Css As String = "Texto"
|
|
||||||
If e.Row.RowIndex = 0 Then
|
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
' e.Row.Cells(0).Width = Unit.Pixel(150)
|
|
||||||
e.Row.CssClass = "Totales"
|
|
||||||
Css = "Totales"
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim FechaI, FechaF As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
|
|
||||||
Dim Liga As String = String.Format("/Ventas/RepVentaDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSucursal={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&FechaI={10}&FechaF={11}&IVA={12}&CveCorte={13}",
|
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"),
|
|
||||||
e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("GPO_IVA"), e.Row.DBCampo("CveCorte"))
|
|
||||||
|
|
||||||
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
|
|
||||||
'e.Row.FCLiteral("LtlCantidad").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlCantidad").Text & "</a>"
|
|
||||||
|
|
||||||
For Each Col As DataColumn In DirectCast(e.Row.DataItem, System.Data.DataRowView).Row.Table.Columns
|
|
||||||
If Col.ColumnName.Split(CChar("_")).Count = 4 Then
|
|
||||||
Dim CveSubProyecto As Integer = Col.ColumnName.Split(CChar("_"))(3).ToEntero
|
|
||||||
Liga = String.Format("/Ventas/RepVentaDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSucursal={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&FechaI={10}&FechaF={11}&IVA={12}&CveCorte={13}",
|
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), CveSubProyecto,
|
|
||||||
e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("GPO_IVA"), e.Row.DBCampo("CveCorte"))
|
|
||||||
|
|
||||||
e.Row.FCLiteral(String.Format("ltl{0}", Col.ColumnName)).Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral(String.Format("ltl{0}", Col.ColumnName)).Text & "</a>"
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'If e.Row.DBCampo("SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlSubTotal").Text = ""
|
|
||||||
'If e.Row.DBCampo("Descuento").ToDouble = 0 Then e.Row.FCLiteral("LtlDescuento").Text = ""
|
|
||||||
'If e.Row.DBCampo("Amortizacion").ToDouble = 0 Then e.Row.FCLiteral("LtlAmortizacion").Text = ""
|
|
||||||
'If e.Row.DBCampo("IVA").ToDouble = 0 Then e.Row.FCLiteral("LtlIVA").Text = ""
|
|
||||||
'If e.Row.DBCampo("RetIVA").ToDouble = 0 Then e.Row.FCLiteral("LtlRetIVA").Text = ""
|
|
||||||
'If e.Row.DBCampo("RetISR").ToDouble = 0 Then e.Row.FCLiteral("LtlRetISR").Text = ""
|
|
||||||
'If e.Row.DBCampo("Total").ToDouble = 0 Then e.Row.FCLiteral("LtlTotal").Text = ""
|
|
||||||
'If e.Row.DBCampo("MAX_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxSubTotal").Text = ""
|
|
||||||
'If e.Row.DBCampo("AVG_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGSubTotal").Text = ""
|
|
||||||
'If e.Row.DBCampo("MIN_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMinSubTotal").Text = ""
|
|
||||||
'If e.Row.DBCampo("MAX_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxTotal").Text = ""
|
|
||||||
'If e.Row.DBCampo("AVG_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGTotal").Text = ""
|
|
||||||
'If e.Row.DBCampo("MIN_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMinTotal").Text = ""
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVRepVentasCompras.aspx.vb" Inherits="PV_PVRepVentasCompras" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
||||||
<asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />
|
|
||||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
|
||||||
<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Reporte de Ventas y Compras
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
|
||||||
<div class="portlet-title portlet-filterT" style="">
|
|
||||||
<div class="titlefiltros caption ">
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li>Sucursal
|
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Fecha Inicial:
|
|
||||||
<asp:TextBox ID="txtFechaI" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
<li>Fecha Final:
|
|
||||||
<asp:TextBox ID="txtFechaF" runat="server" Width="70px"></asp:TextBox>
|
|
||||||
<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</li>
|
|
||||||
<li>Grupo:
|
|
||||||
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
|
||||||
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Año/Mes" Value="3"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Cliente" Value="5"></asp:ListItem>
|
|
||||||
<asp:ListItem Selected="True" Text="Sucursal" Value="6"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<br />
|
|
||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" id="tblSucursales" runat="server" visible="false">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 150px"> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>
|
|
||||||
Grupo
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>
|
|
||||||
Ventas
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlVentas" runat="server" Text='<%# Eval("Ventas", "{0:N2}")%>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>
|
|
||||||
Compras
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlCompras" runat="server" Text='<%# Eval("Compras", "{0:N2}")%>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div id="DivPersonalizar" style="width: 315px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
|
|
||||||
<table class="table table-striped table-advance table-hover" width="315px">
|
|
||||||
<tr class="Titulos">
|
|
||||||
<th style="width: 310px">
|
|
||||||
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
|
|
||||||
</th>
|
|
||||||
<th style="padding-right: 4px; padding-top: 4px" valign="top">
|
|
||||||
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr align="left">
|
|
||||||
<td colspan="2">
|
|
||||||
<table class="table table-striped table-advance table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /></th>
|
|
||||||
<th style="text-align: left;">
|
|
||||||
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="height: 25px">
|
|
||||||
<td style="text-align: center;" colspan="2">
|
|
||||||
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" class="btn btn-danger" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
@@ -1,238 +0,0 @@
|
|||||||
Option Explicit On
|
|
||||||
Option Strict On
|
|
||||||
|
|
||||||
Imports System.Data
|
|
||||||
Imports Extensiones
|
|
||||||
|
|
||||||
Partial Class PV_PVRepVentasCompras
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
#Region "Propiedades"
|
|
||||||
'Local
|
|
||||||
Private Property TmpDT As DataTable
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("TmpDT"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("TmpDT") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
||||||
If Not IsPostBack Then
|
|
||||||
' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
|
||||||
CargaCombos()
|
|
||||||
ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaCombos()
|
|
||||||
'CargaSucursales
|
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
DdlSubProyecto.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
|
||||||
CargaDatos()
|
|
||||||
ConfiguraEmpresa()
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
|
||||||
Dim ObjVentas As New ClsPV()
|
|
||||||
|
|
||||||
Dim FechaI, FechaF As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
|
|
||||||
If ObjVentas.GetRepPVVentasCompras(FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
|
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
|
||||||
tblSucursales.Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
GvDatos.DataBind()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ConfiguraEmpresa()
|
|
||||||
'If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(6).Visible = False
|
|
||||||
'If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(7).Visible = False
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
|
||||||
If ChkRetIVA.Checked Then
|
|
||||||
GvDatos.Columns(6).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(6).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkRetISR.Checked Then
|
|
||||||
GvDatos.Columns(7).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(7).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMinSub.Checked Then
|
|
||||||
GvDatos.Columns(9).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(9).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkAVGSub.Checked Then
|
|
||||||
GvDatos.Columns(10).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(10).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMaxSub.Checked Then
|
|
||||||
GvDatos.Columns(11).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(11).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMinTot.Checked Then
|
|
||||||
GvDatos.Columns(12).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(12).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkAvgTot.Checked Then
|
|
||||||
GvDatos.Columns(13).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(13).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkMaxTot.Checked Then
|
|
||||||
GvDatos.Columns(14).Visible = True
|
|
||||||
Else
|
|
||||||
GvDatos.Columns(14).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
UPDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
|
|
||||||
GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
'Region "TEMPLATE"
|
|
||||||
Public Class GridViewTemplate
|
|
||||||
Implements ITemplate
|
|
||||||
'A variable to hold the type of ListItemType.
|
|
||||||
Private _templateType As ListItemType
|
|
||||||
|
|
||||||
'A variable to hold the column name.
|
|
||||||
Private _columnName As String
|
|
||||||
|
|
||||||
|
|
||||||
'Constructor where we define the template type and column name.
|
|
||||||
Public Sub New(type As ListItemType, colname As String)
|
|
||||||
'Stores the template type.
|
|
||||||
_templateType = type
|
|
||||||
|
|
||||||
'Stores the column name.
|
|
||||||
_columnName = colname
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ITemplate_InstantiateIn(container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
|
|
||||||
Select Case _templateType
|
|
||||||
Case ListItemType.Header
|
|
||||||
'Creates a new label control and add it to the container.
|
|
||||||
Dim lbl As New Label()
|
|
||||||
'Allocates the new label object.
|
|
||||||
lbl.Text = _columnName
|
|
||||||
'Assigns the name of the column in the lable.
|
|
||||||
container.Controls.Add(lbl)
|
|
||||||
'Adds the newly created label control to the container.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.Item
|
|
||||||
'Creates a new text box control and add it to the container.
|
|
||||||
Dim ltl1 As New Literal
|
|
||||||
ltl1.ID = String.Format("ltl{0}", _columnName)
|
|
||||||
AddHandler ltl1.DataBinding, AddressOf ltl_DataBinding
|
|
||||||
|
|
||||||
'AddHandler hdn1.DataBinding, AddressOf hdn_DataBinding
|
|
||||||
|
|
||||||
'Creates a column with size 4.
|
|
||||||
container.Controls.Add(ltl1)
|
|
||||||
'Adds the newly created textbox to the container.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.EditItem
|
|
||||||
'As, I am not using any EditItem, I didnot added any code here.
|
|
||||||
Exit Select
|
|
||||||
|
|
||||||
Case ListItemType.Footer
|
|
||||||
Dim chkColumn As New CheckBox()
|
|
||||||
chkColumn.ID = Convert.ToString("Chk") & _columnName
|
|
||||||
container.Controls.Add(chkColumn)
|
|
||||||
Exit Select
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub hdn_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim hidden As HiddenField = DirectCast(sender, HiddenField)
|
|
||||||
Dim row As GridViewRow = DirectCast(hidden.NamingContainer, GridViewRow)
|
|
||||||
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
|
|
||||||
hidden.Value = If(value Is Nothing OrElse value = String.Empty, "-1", value)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ltl_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim ltl As Literal = DirectCast(sender, Literal)
|
|
||||||
Dim row As GridViewRow = DirectCast(ltl.NamingContainer, GridViewRow)
|
|
||||||
Dim celda As DataControlFieldCell = DirectCast(ltl.Parent, DataControlFieldCell)
|
|
||||||
Dim value As String = DataBinder.Eval(row.DataItem, _columnName).ToString()
|
|
||||||
ltl.Text = value.FormatoNumero
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' This is the event, which will be raised when the binding happens.
|
|
||||||
''' </summary>
|
|
||||||
''' <param name="sender"></param>
|
|
||||||
''' <param name="e"></param>
|
|
||||||
Private Sub tb1_DataBinding(sender As Object, e As EventArgs)
|
|
||||||
Dim txtdata As TextBox = DirectCast(sender, TextBox)
|
|
||||||
Dim container As GridViewRow = DirectCast(txtdata.NamingContainer, GridViewRow)
|
|
||||||
Dim dataValue As Object = DataBinder.Eval(container.DataItem, _columnName)
|
|
||||||
If dataValue Is DBNull.Value Then
|
|
||||||
txtdata.Text = dataValue.ToString()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
Dim Css As String = "Texto"
|
|
||||||
If e.Row.RowIndex = 0 Then
|
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(150)
|
|
||||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
|
||||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
|
||||||
|
|
||||||
e.Row.CssClass = "Totales"
|
|
||||||
|
|
||||||
|
|
||||||
Css = "Totales"
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim FechaI, FechaF As String
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
|
||||||
|
|
||||||
Dim LigaV As String = String.Format("/Ventas/RepVentaDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente=-1&CveSucursal={5}&Vendedor=-1&CveUsuario=-1&CveEstatusFactura=-1&FechaI={6}&FechaF={7}&IVA=-1&CveCorte=-1",
|
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveSucursal"), FechaI, FechaF)
|
|
||||||
Dim LigaC As String = String.Format("/Compras/RepComprasDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor=-1&CveUsuario=-1&FechaI={5}&FechaF={6}",
|
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), FechaI, FechaF)
|
|
||||||
|
|
||||||
e.Row.FCLiteral("LtlVentas").Text = "<a class=""" & Css & """ href=""" & LigaV & """>" & e.Row.FCLiteral("LtlVentas").Text & "</a>"
|
|
||||||
e.Row.FCLiteral("LtlCompras").Text = String.Format("<a class='{0}' href='{1}'>{2}</a>", Css, LigaC, e.Row.FCLiteral("LtlCompras").Text)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
|
|
||||||
@@ -34355,20 +34355,7 @@ Partial Class Ventas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub RdTipoPersona_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
DVRegimenSociedad.Visible = False
|
|
||||||
DivRazonSocial2.Attributes.Add("class", "col-md-12")
|
|
||||||
|
|
||||||
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
|
||||||
|
|
||||||
DivRazonSocial2.Attributes.Add("class", "col-md-8")
|
|
||||||
DVRegimenSociedad.Visible = True
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpAgregarCliente.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user