Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4451,11 +4451,13 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678)
|
||||
PaginaDict.Add("/Ventas/RepArqueos.aspx".ToUpper(), 679)
|
||||
PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680)
|
||||
PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686)
|
||||
PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687)
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
'Portal Cliente/Proveedor
|
||||
|
||||
|
||||
|
||||
'Portal Cliente/Proveedor
|
||||
PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101)
|
||||
PaginaDict.Add("/PortalProveedor/PortalProveedor.aspx".ToUpper(), 1201)
|
||||
|
||||
|
||||
@@ -2452,6 +2452,50 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetRepCotizacionesSinFacturar(FechaI As String, FechaF As String, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
||||
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las cotizaciones sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetRepRemisionesNCSinFacturar(FechaI As String, FechaF As String, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepRemisionesNCGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
||||
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las Remisiones de NC sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteHP(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Compu_HPRep")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -114,12 +114,12 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel runat="server" ID="TabConfiguracion" HeaderText="Configuracion">
|
||||
<ajax:TabPanel runat="server" ID="TabPanel3" HeaderText="Configuración">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UPPEmp" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpPrueba" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvEstatusUsuarios" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<asp:GridView ID="Prueba" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="false" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios" style="text-align:center">
|
||||
<HeaderStyle VerticalAlign="Middle" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -129,177 +129,10 @@
|
||||
<asp:Label Font-Bold="true" Width="250px" ID="LblUsuario" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus1" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios1" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior1" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites1" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus2" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios2" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior2" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites2" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus3" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios3" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior3" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites3" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus4" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios4" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior4" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites4" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus5" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios5" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior5" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites5" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus6" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios6" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior6" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites6" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus7" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios7" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior7" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites7" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus8" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios8" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior8" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites8" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus9" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios9" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior9" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites9" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus10" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios10" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior10" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites10" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div style="width:100%;text-align:center">
|
||||
<asp:Button ID="btnGuardarEstatusUsuariosREQ" Text="Guardar" runat="server" Visible="true" CssClass="btn btn-primary" />
|
||||
<div style="width: 100%; text-align: center">
|
||||
<asp:Button ID="BtnGuardarPruebas" Text="Guardar" runat="server" Visible="true" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -42,18 +42,34 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
ViewState("DTEstatusUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTUsuarios As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTUsuarios"), DataTable)
|
||||
End Get
|
||||
Set(value As Data.DataTable)
|
||||
ViewState("DTUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtEstatusUsuariosAsociados As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtEstatusUsuariosAsociados"), DataTable)
|
||||
End Get
|
||||
Set(value As Data.DataTable)
|
||||
ViewState("DtEstatusUsuariosAsociados") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
DTUsuarios = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
CargaDatos()
|
||||
CreaGrid("Req")
|
||||
CargaGridEstatusUsuarios()
|
||||
ViewState("Orden") = ""
|
||||
|
||||
'CreaGrid()
|
||||
'CargaGridEstatusUsuarios()
|
||||
AsociarEstatusUsuarios()
|
||||
CargarUsuarioConEstatus()
|
||||
CveEstatuOS = -1
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -171,79 +187,65 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
#End Region
|
||||
|
||||
#Region "Configuracion"
|
||||
Private Sub CreaGrid(Tipo As String)
|
||||
Dim i As Integer = 1
|
||||
|
||||
For Each Row As DataRow In GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).Rows
|
||||
|
||||
GvEstatusUsuarios.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
|
||||
GvEstatusUsuarios.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
|
||||
|
||||
i += 1
|
||||
Private Sub AsociarEstatusUsuarios()
|
||||
Dim tableResultado As DataTable = DTUsuarios
|
||||
For Each Estatus As DataRow In DtEstatusOS.Rows
|
||||
Dim CveColumnaEstatus As String = Estatus.Item("CveEstatusOrdenServicio").ToString
|
||||
tableResultado.Columns.Add(CveColumnaEstatus, Type.GetType("System.Boolean"))
|
||||
For Each Usuario As DataRow In tableResultado.Rows
|
||||
Usuario.Item(CveColumnaEstatus) = Not IsNothing(DTEstatusUsuarios.FiltroPrimero(String.Format("CveUsuario = {0} and CveEstatusOrdenServicio = {1}", Usuario.Item("CveUsuario"), CveColumnaEstatus)))
|
||||
Next
|
||||
Next
|
||||
|
||||
While i <= 10
|
||||
GvEstatusUsuarios.Columns(i).Visible = False
|
||||
i += 1
|
||||
End While
|
||||
DtEstatusUsuariosAsociados = tableResultado
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaGridEstatusUsuarios()
|
||||
GvEstatusUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
GvEstatusUsuarios.DataBind()
|
||||
'UPPEmp.Update()
|
||||
Private Sub CargarUsuarioConEstatus()
|
||||
For Each Estatus As DataRow In DtEstatusOS.Rows
|
||||
Dim test As New CheckBoxField
|
||||
test.HeaderText = Estatus.Item("EstatusOrdenServicio").ToString
|
||||
test.DataField = Estatus.Item("CveEstatusOrdenServicio").ToString
|
||||
Prueba.Columns.Add(test)
|
||||
Next
|
||||
Prueba.DataSource = DtEstatusUsuariosAsociados
|
||||
Prueba.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub btnGuardarEstatusUsuariosREQ_Click(sender As Object, e As EventArgs) Handles btnGuardarEstatusUsuariosREQ.Click
|
||||
Private Sub Prueba_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Prueba.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", e.Row.DBCampo("CveUsuario").ToString))
|
||||
For i As Integer = 1 To e.Row.Cells.Count - 1
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim checkBox As CheckBox = TryCast(e.Row.Cells(i).Controls(0), CheckBox)
|
||||
checkBox.Enabled = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GuardarDatosPrueba(sender As Object, e As EventArgs) Handles BtnGuardarPruebas.Click
|
||||
Dim objEstatusOC As New ClsOS
|
||||
objEstatusOC.IniciaTransacSQL()
|
||||
Dim HuboErrores As Boolean = False
|
||||
Dim CveSubProyecto = 59
|
||||
|
||||
For Each Row As GridViewRow In GvEstatusUsuarios.Rows
|
||||
Dim r As Integer = 1
|
||||
For i = 0 To Row.Cells.Count - 1
|
||||
|
||||
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuarios.Columns(i).FooterText), GvEstatusUsuarios.Columns(i).FooterText.ToEntero, 0)
|
||||
|
||||
If CveEstatus > 0 Then
|
||||
|
||||
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False Then
|
||||
'Eliminar el registro existente
|
||||
If Not objEstatusOC.RemoveEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True Then
|
||||
'Guardado masivo cuando sea SubProyecto "Todos"
|
||||
If CveSubProyecto = -2 Then
|
||||
For Each dr As DataRow In GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).Rows
|
||||
If Not objEstatusOC.AddEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero, CveSubProyecto) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If HuboErrores Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Insertar el nuevo registro
|
||||
Else
|
||||
If Not objEstatusOC.AddEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero, CveSubProyecto) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
For Each Row As GridViewRow In Prueba.Rows
|
||||
Dim controles As Integer = Row.Controls.Count
|
||||
For i = 1 To Row.Cells.Count - 1
|
||||
Dim chk As CheckBox = CType(Row.Cells(i).Controls(0), CheckBox)
|
||||
Dim CveEstatus As Integer = DtEstatusOS.FiltroPrimeroValor("CveEstatusOrdenServicio", String.Format("EstatusOrdenServicio = '{0}'", Prueba.Columns(i).HeaderText)).ToEntero
|
||||
If Not chk.Checked Then
|
||||
If Not objEstatusOC.RemoveEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
ElseIf chk.Checked Then
|
||||
'Guardado masivo cuando sea SubProyecto "Todos"
|
||||
If Not objEstatusOC.AddEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero, CveSubProyecto) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
r += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
'Si tubo algun error terminamos el proceso (FOR)
|
||||
If HuboErrores Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not HuboErrores Then
|
||||
@@ -253,27 +255,7 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
objEstatusOC.RollBack()
|
||||
Alert("Ocurrió un error al guardar los cambios. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objEstatusOC.Dispose()
|
||||
CargaDatos()
|
||||
CargaGridEstatusUsuarios()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvEstatusUsuarios_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuarios.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", e.Row.DBCampo("CveUsuario").ToString))
|
||||
Dim CveUsuario As String = e.Row.DBCampo("CveUsuario").ToString
|
||||
For i As Integer = 1 To 10
|
||||
Dim CveEstatus As Integer = GvEstatusUsuarios.Columns(i).FooterText.ToEntero
|
||||
If CveEstatus > 0 Then
|
||||
Dim auxiliarBandera As DataRow = PermisosDeUsuario.FiltroPrimero(String.Format("CveEstatusOrdenServicio = {0}", CveEstatus.ToString))
|
||||
If auxiliarBandera IsNot Nothing Then
|
||||
Dim chkEstatus As CheckBox = e.Row.FCCheckBox(String.Format("chkEstatus{0}", i))
|
||||
chkEstatus.Checked = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
438
Ventas/RepCotizacionesxFacturar.aspx
Normal file
438
Ventas/RepCotizacionesxFacturar.aspx
Normal file
@@ -0,0 +1,438 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesxFacturar.aspx.vb" Inherits="RepCotizacionesxFacturar" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
margin-top: 0px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.select2-selection {
|
||||
margin-top: 0px;
|
||||
height: 31px;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Reporte de Cotizaciones por Facturar"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="btn-group pull-right btn-separete">
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<label class="col-md-1 truncate">F.I.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top:10px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">F.F.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top:10px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Sucursal: </label>
|
||||
<div class="col-md-2" style="margin-top:5px;">
|
||||
<asp:ListBox ID="DdlSubProyectos" SelectionMode="Multiple" data-text="Todas" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlSubProyectos" DataTextField="SubProyecto" DataValueField="CveSubProyecto" runat="server"></asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<label class="col-md-1">Cliente: </label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" selectedindexchange="DdlClientes_SelectedIndexChanged"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <label class="col-md-1 ">F. Venc. al:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVencimiento" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaVencimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaVencimiento" PopupButtonID="imgCalendarioV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaVencimiento" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" ErrorMessage="El campo <b>''Fecha Vencimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVOFechaVencimiento" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" ErrorMessage="El campo <b>''Fecha Vencimiento''</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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVOFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" DataKeyNames="CveVenta"
|
||||
ToolTip="Remisiones sin Facturar"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Folio" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Fecha" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Fecha Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVencimiento" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Cliente" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCliente" runat="server" Text='<%# Eval("Cliente") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Contrato" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("TieneContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}" HtmlEncode="false" />
|
||||
<%-- <asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Facturado" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAvance" runat="server" Text='<%# String.Concat(Eval("PorcentajeAvance"), "%") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="SubTotal" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="IVA" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Total" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") & " " & Eval("Abreviatura").ToString %>'></asp:Literal>
|
||||
<%--<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkUsuarioCancelacion" runat="server" Text="Usuario Cancelación" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTipo" runat="server" Text="Cargo/Abono" /></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-success" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%--<script type="text/javascript">
|
||||
|
||||
function Scroll() {
|
||||
$(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>--%>
|
||||
|
||||
<script type="text/javascript">
|
||||
function GetSelectedRow(lnk, txtf, txtoi) {
|
||||
|
||||
|
||||
//var row = lnk.parentNode.parentNode;
|
||||
//var txtoi = row.cells[10].getElementsByTagName("input")[1];
|
||||
if (lnk.checked) {
|
||||
debugger;
|
||||
if (txtf) { txtf.style.display = ""; }
|
||||
if (txtoi) { txtoi.style.display = ""; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// if (txtoi) { txtoi.style.display = ""; }
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// }
|
||||
} else {
|
||||
if (txtf) { txtf.style.display = "none"; }
|
||||
if (txtoi) { txtoi.style.display = "none"; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function FechaGeneral(lnk, FechaDocumento) {
|
||||
debugger;
|
||||
var row = lnk.parentNode.parentNode;
|
||||
|
||||
var parts = FechaDocumento.split("/");
|
||||
var F1 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
|
||||
if (lnk.checked) {
|
||||
try {
|
||||
parts = $get("TxtFechaAplicadoHeader").value.split("/");
|
||||
var F2 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
if (F1 < F2) {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
} else {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = FechaDocumento;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
row = row.parentNode;
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function OnClientShown(sender, args) {
|
||||
sender._popupBehavior._element.style.zIndex = 10005;
|
||||
sender._popupBehavior._element.style.position = "absolute";
|
||||
sender._popupBehavior._element.style.top = "0px";
|
||||
document.getElementById("C_GvDatosPanelItem").style.overflow = "initial";
|
||||
}
|
||||
</script>
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//function OrdenarGV() {
|
||||
// var Tam = TamañoVentana();
|
||||
// var Alto = Tam.height - 270;
|
||||
// if (Alto < 100) {
|
||||
// Alto = 100;
|
||||
// }
|
||||
// $('#C_GvDatos').DataTable({
|
||||
// scrollY: Alto + 'px',
|
||||
// scrollCollapse: true,
|
||||
// paging: false,
|
||||
// searching: false,
|
||||
// info: false
|
||||
// });
|
||||
// $('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
//}
|
||||
</script>
|
||||
</asp:Content>
|
||||
188
Ventas/RepCotizacionesxFacturar.aspx.vb
Normal file
188
Ventas/RepCotizacionesxFacturar.aspx.vb
Normal file
@@ -0,0 +1,188 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
Partial Class RepCotizacionesxFacturar
|
||||
Inherits ClsPaginas
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCliente").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Sucursales As String
|
||||
Get
|
||||
Return ViewState("Sucursales").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Sucursales") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
CargaSucursales()
|
||||
CargaCliente()
|
||||
CargaDatos()
|
||||
OrdenaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||
|
||||
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetRepCotizacionesSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub OrdenaDatos()
|
||||
'If (GvDatos.Rows.Count > 0) Then
|
||||
' GvDatos.UseAccessibleHeader = True
|
||||
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
' RegistraScript("OrdenarGV();")
|
||||
'End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveCliente") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DBCampo("CveVenta") = "" Then
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "background:#CCCCCC !important")
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
Private Sub CargaCliente()
|
||||
'CargaClientes
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSucursales()
|
||||
|
||||
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "PDF"
|
||||
'Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
' If DtVentas IsNot Nothing Then
|
||||
' Dim StrFiltro As New StringBuilder
|
||||
' If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Sucursal</b>: {0}", DdlSubProyectos.GetSelectedText)
|
||||
' If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedText)
|
||||
' 'If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Contrato</b>: {0}", DdlContrato.SelectedItem.Text)
|
||||
|
||||
' If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||
' If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
|
||||
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim FechaI, FechaF As String
|
||||
' FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
|
||||
' FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
|
||||
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
' params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
' Else
|
||||
' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
'End Sub
|
||||
#End Region
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
'Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString)
|
||||
'End Sub
|
||||
End Class
|
||||
@@ -125,6 +125,7 @@ Partial Class RepRemisiones
|
||||
e.Row.Attributes.Add("style", "background:#CCCCCC !important")
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
e.Row.FCLiteral("LtlFecha").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFecha").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
|
||||
438
Ventas/RepRemisionesNC.aspx
Normal file
438
Ventas/RepRemisionesNC.aspx
Normal file
@@ -0,0 +1,438 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRemisionesNC.aspx.vb" Inherits="RepRemisionesNC" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
margin-top: 0px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.select2-selection {
|
||||
margin-top: 0px;
|
||||
height: 31px;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Reporte de Remisiones de NC Sin Aplicar"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="btn-group pull-right btn-separete">
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<label class="col-md-1 truncate">F.I.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top:10px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">F.F.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top:10px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Sucursal: </label>
|
||||
<div class="col-md-2" style="margin-top:5px;">
|
||||
<asp:ListBox ID="DdlSubProyectos" SelectionMode="Multiple" data-text="Todas" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlSubProyectos" DataTextField="SubProyecto" DataValueField="CveSubProyecto" runat="server"></asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<label class="col-md-1">Cliente: </label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" selectedindexchange="DdlClientes_SelectedIndexChanged"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <label class="col-md-1 ">F. Venc. al:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVencimiento" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaVencimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaVencimiento" PopupButtonID="imgCalendarioV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaVencimiento" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" ErrorMessage="El campo <b>''Fecha Vencimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVOFechaVencimiento" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" ErrorMessage="El campo <b>''Fecha Vencimiento''</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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVOFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" DataKeyNames="CveVenta"
|
||||
ToolTip="Remisiones sin Facturar"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Folio" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Fecha" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Fecha Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVencimiento" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Cliente" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCliente" runat="server" Text='<%# Eval("Cliente") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Contrato" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("TieneContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}" HtmlEncode="false" />
|
||||
<%-- <asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Facturado" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAvance" runat="server" Text='<%# String.Concat(Eval("PorcentajeAvance"), "%") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="SubTotal" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="IVA" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Total" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") & " " & Eval("Abreviatura").ToString %>'></asp:Literal>
|
||||
<%--<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkUsuarioCancelacion" runat="server" Text="Usuario Cancelación" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTipo" runat="server" Text="Cargo/Abono" /></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-success" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%--<script type="text/javascript">
|
||||
|
||||
function Scroll() {
|
||||
$(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>--%>
|
||||
|
||||
<script type="text/javascript">
|
||||
function GetSelectedRow(lnk, txtf, txtoi) {
|
||||
|
||||
|
||||
//var row = lnk.parentNode.parentNode;
|
||||
//var txtoi = row.cells[10].getElementsByTagName("input")[1];
|
||||
if (lnk.checked) {
|
||||
debugger;
|
||||
if (txtf) { txtf.style.display = ""; }
|
||||
if (txtoi) { txtoi.style.display = ""; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// if (txtoi) { txtoi.style.display = ""; }
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// }
|
||||
} else {
|
||||
if (txtf) { txtf.style.display = "none"; }
|
||||
if (txtoi) { txtoi.style.display = "none"; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function FechaGeneral(lnk, FechaDocumento) {
|
||||
debugger;
|
||||
var row = lnk.parentNode.parentNode;
|
||||
|
||||
var parts = FechaDocumento.split("/");
|
||||
var F1 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
|
||||
if (lnk.checked) {
|
||||
try {
|
||||
parts = $get("TxtFechaAplicadoHeader").value.split("/");
|
||||
var F2 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
if (F1 < F2) {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
} else {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = FechaDocumento;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
row = row.parentNode;
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function OnClientShown(sender, args) {
|
||||
sender._popupBehavior._element.style.zIndex = 10005;
|
||||
sender._popupBehavior._element.style.position = "absolute";
|
||||
sender._popupBehavior._element.style.top = "0px";
|
||||
document.getElementById("C_GvDatosPanelItem").style.overflow = "initial";
|
||||
}
|
||||
</script>
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//function OrdenarGV() {
|
||||
// var Tam = TamañoVentana();
|
||||
// var Alto = Tam.height - 270;
|
||||
// if (Alto < 100) {
|
||||
// Alto = 100;
|
||||
// }
|
||||
// $('#C_GvDatos').DataTable({
|
||||
// scrollY: Alto + 'px',
|
||||
// scrollCollapse: true,
|
||||
// paging: false,
|
||||
// searching: false,
|
||||
// info: false
|
||||
// });
|
||||
// $('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
//}
|
||||
</script>
|
||||
</asp:Content>
|
||||
188
Ventas/RepRemisionesNC.aspx.vb
Normal file
188
Ventas/RepRemisionesNC.aspx.vb
Normal file
@@ -0,0 +1,188 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
Partial Class RepRemisionesNC
|
||||
Inherits ClsPaginas
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCliente").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Sucursales As String
|
||||
Get
|
||||
Return ViewState("Sucursales").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Sucursales") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
CargaSucursales()
|
||||
CargaCliente()
|
||||
CargaDatos()
|
||||
OrdenaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||
|
||||
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetRepCotizacionesSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub OrdenaDatos()
|
||||
'If (GvDatos.Rows.Count > 0) Then
|
||||
' GvDatos.UseAccessibleHeader = True
|
||||
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
' RegistraScript("OrdenarGV();")
|
||||
'End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveCliente") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DBCampo("CveVenta") = "" Then
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "background:#CCCCCC !important")
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
Private Sub CargaCliente()
|
||||
'CargaClientes
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSucursales()
|
||||
|
||||
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "PDF"
|
||||
'Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
' If DtVentas IsNot Nothing Then
|
||||
' Dim StrFiltro As New StringBuilder
|
||||
' If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Sucursal</b>: {0}", DdlSubProyectos.GetSelectedText)
|
||||
' If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedText)
|
||||
' 'If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Contrato</b>: {0}", DdlContrato.SelectedItem.Text)
|
||||
|
||||
' If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||
' If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
|
||||
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim FechaI, FechaF As String
|
||||
' FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
|
||||
' FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
|
||||
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
' params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
' Else
|
||||
' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
'End Sub
|
||||
#End Region
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
'Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString)
|
||||
'End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user