--merge RepEntregaAlmacen

This commit is contained in:
2022-03-05 14:05:29 -07:00
479 changed files with 42458 additions and 18681 deletions

View File

@@ -6852,7 +6852,7 @@ Partial Class PV
Private Sub CargaModelos()
Dim ObjGral As New ClsGenerales
If ObjGral.ModelosAutosGet(UsuarioActual.CveEmpresa) Then
If ObjGral.ModelosAutosGet(1, UsuarioActual.CveEmpresa) Then
DtModelosAuto = ObjGral.DtResultados
DdlModeloAuto.DataSource = DtModelosAuto
End If

View File

@@ -0,0 +1,148 @@
<%@ Page Title="Rep. Cancelación Ventas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCancelacionesVentas.aspx.vb" Inherits="Compras_RepCancelacionesVentas" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dataTables_scrollHead {
background-color: #95A5A6;
color: white;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Rep. Cancelación Ventas
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="UpdatePanel1" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server" Visible="false"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultarFiltros" OnClick="BtnConsultarFiltros_Click" runat="server" Text="Consultar" ValidationGroup="GrpFiltros" 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="titlefiltros caption ">
<div class="row">
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto">
</asp:DropDownList>
</div>
<div class="col-md-1" style="max-width: 90px">Fecha Inicio:</div>
<div class="col-md-1" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LBCalendarFiltrosFechaInicio" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaInicio" runat="server" TargetControlID="TxtFiltrosFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaInicio" TargetControlID="TxtFiltrosFechaInicio" PopupButtonID="LBCalendarFiltrosFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaInicio" runat="server" ControlToValidate="TxtFiltrosFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="max-width: 75px">Fecha Fin:</div>
<div class="col-md-1" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LBCalendarFiltrosFechaFin" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaFin" runat="server" TargetControlID="TxtFiltrosFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaFin" TargetControlID="TxtFiltrosFechaFin" PopupButtonID="LBCalendarFiltrosFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaFin" runat="server" ControlToValidate="TxtFiltrosFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate" title="Motivo Cancelación">Mto. Cancel.</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlMotivoCancelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="MotivoCancelacion" DataValueField="CveMotivoCancelacion">
</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%;"></ADS:Dropdownlost>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD"
DataKeyNames="CveCliente,Nombre,CveVenta,SerieFolio,Fecha,FechaCancelacion,CveSubProyecto,SubProyecto,CveMotivoCancelacion,MotivoCancelacion,MotivoCancelacionVenta,CveEstatusFactura"
GridLines="None" data-sort="true">
<Columns>
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" Target="_blank" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
<asp:HyperLinkField HeaderText="Cliente" DataTextField="Nombre" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" Target="_blank" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Fecha Cancelación" DataField="FechaCancelacion" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Motivo Cancelacion" DataField="MotivoCancelacion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Motivo Cancelación Venta" DataField="MotivoCancelacionVenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,124 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Compras_RepCancelacionesVentas
Inherits ClsPaginas
'Private Property DTComplemntos As DataTable
' Get
' If ViewState("DTComplemntos") Is Nothing Then
' Return New DataTable
' Else
' Return DirectCast(ViewState("DTComplemntos"), DataTable)
' End If
' End Get
' Set(value As DataTable)
' ViewState("DTComplemntos") = value
' End Set
'End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaValores()
End If
End Sub
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
TxtFiltrosFechaInicio.Text = Now.FirstDayOfMonth.ToShortDateString
TxtFiltrosFechaFin.Text = Now.ToShortDateString
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
DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion IN (2,3)")
DdlMotivoCancelacion.DataBind()
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Todos", "-1"))
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto)
GvDatos.Columns(4).HeaderText = LblSubProyecto.Text
UpFiltros.Update()
End Sub
#End Region
#Region " CARGA DATOS "
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Private Sub CargaDatos()
LnkExcel.Visible = False
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepCancelacionVentas(FechaInicio, FechaFin, DdlSubProyecto.SelectedValue.ToEntero, CveCliente, DdlMotivoCancelacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjVentas.DtResultados
If ObjVentas.DtResultados.Rows.Count > 0 Then
LnkExcel.Visible = True
End If
Else
GvDatos.DataSource = Nothing
End If
ObjVentas.Dispose()
GvDatos.DataBind()
UpAcciones.Update()
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
End If
End Sub
#End Region
#Region "IMPRESION"
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
GeneraImpresion()
End Sub
Private Sub GeneraImpresion()
GvDatos.ExportToExcel2("RepCancelacionVentas.xlsx")
End Sub
#End Region
End Class

View File

@@ -202,7 +202,7 @@
</div>
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<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 select2me">
<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 select2me" Style="width: 100%;" >
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -220,7 +220,7 @@
<div class="row">
<label class="col-md-1 ">Estatus:</label>
<div class="col-md-2">
<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 select2me">
<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 select2me" Style="width: 100%;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -264,7 +264,7 @@
<div class="row">
<label class="col-md-1 truncate">Usuario:</label>
<div class="col-md-2">
<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 select2me">
<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 select2me" Style="width: 100%;" >
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -288,7 +288,7 @@
<div class="row">
<label title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Clasif. Cli.:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion" Style="width: 100%;" ></asp:DropDownList>
</div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2">
@@ -314,7 +314,7 @@
<div class="row">
<label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;" >
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>

View File

@@ -91,6 +91,8 @@ Partial Class Ventas_RepProductosServicios
DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22"))
DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23"))
DdlGrupo.Items.Insert(18, New ListItem("Marca", "24"))
DdlGrupo.Items.Insert(18, New ListItem("Cliente Sucursal", "26"))
DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("8")
@@ -380,13 +382,13 @@ Partial Class Ventas_RepProductosServicios
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}",
Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}",
e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"),
e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"),
e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"),
FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca,
CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0),
e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"))
e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClienteSucursal").ToString.ToEntero)
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo"))

View File

@@ -203,13 +203,13 @@
</div>
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<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 select2me">
<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 select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<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%;"></ADS:Dropdownlost>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" Onselectedindexchange="DdlClientes_selectedindexchange"></ADS:Dropdownlost>
</div>
<label class="col-md-1 truncate">Vendedor:</label>
<div class="col-md-2">
@@ -221,7 +221,7 @@
<div class="row">
<label class="col-md-1 ">Estatus:</label>
<div class="col-md-2">
<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 select2me">
<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 select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -265,7 +265,7 @@
<div class="row">
<label class="col-md-1 truncate">Usuario:</label>
<div class="col-md-2">
<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 select2me">
<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 select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -289,7 +289,7 @@
<div class="row">
<label title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Clasif.Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion" Style="width: 100%"></asp:DropDownList>
</div>
<label title="Proveedor" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Proveedor:</label>
<div class="col-md-2">
@@ -309,7 +309,7 @@
<div class="row">
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
@@ -334,7 +334,7 @@
</asp:Dropdownlist>
</div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label>
<div class="col-md-2" id="divdistribuidor2" runat="server" visible="false">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -346,10 +346,24 @@
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text ="Litraje:&nbsp;&nbsp;&nbsp;" TextAlign="Left" />
</div>
</div>
<div class="row">
<div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" />
</div>
<div class="row">
<label class="col-md-1 truncate" id="LblClienteSucursal" runat="server">Cliente Sucursal:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClienteSucursal" runat="server" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal"
CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%" >
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" />
</div>
</div>
</div>
</div>

View File

@@ -109,6 +109,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
DdlGrupo.Items.Insert(13, New ListItem("Año/Mes Ejec.", "17"))
DdlGrupo.Items.Insert(14, New ListItem("Fecha Ejec.", "18"))
DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20"))
DdlGrupo.Items.Insert(15, New ListItem("Cliente Sucursal", "26"))
DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("8")
End Sub
@@ -272,6 +273,38 @@ Partial Class Ventas_RepProductosServiciosDetalle
TCEspecifico = 0
TipoCambio = 1
End Sub
Private Sub CargaSucursales(CveCliente As Integer, CveClienteSucursal As Integer)
DdlClienteSucursal.Items.Clear()
If CveCliente > 0 Then
Dim ObjCliente As New ClsClientes
If ObjCliente.GetSucursales(CveCliente) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
DdlClienteSucursal.DataSource = ObjCliente.DtResultados
Else
DdlClienteSucursal.DataSource = Nothing
End If
End If
ObjCliente.Dispose()
DdlClienteSucursal.DataBind()
End If
DdlClienteSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
DdlClienteSucursal.Items.Insert(1, New ListItem("Sin Sucursal", "0"))
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
End Sub
Private Sub CargaParametrosDetalle()
@@ -281,6 +314,9 @@ Partial Class Ventas_RepProductosServiciosDetalle
Dim CveVendedor As Integer
Dim CveMarca As Integer = -1
Dim CveClasificacionDetalle As Integer = -1
Dim CveClienteSucursal As Integer = -1
GPO = If(Request("Grupo") IsNot Nothing AndAlso Request("Grupo").ToEntero() > 0, Request("Grupo").ToEntero(), -1).ToString
CveProyecto = If(Request("CveProyecto") IsNot Nothing AndAlso Request("CveProyecto").ToEntero() > 0, Request("CveProyecto").ToEntero(), -1).ToString
@@ -316,6 +352,9 @@ Partial Class Ventas_RepProductosServiciosDetalle
CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca").ToEntero() > 0, Request("CveMarca").ToEntero(), -1).ToString.ToEntero
CveClasificacionDetalle = If(Request("CveClasificacionDetalle") IsNot Nothing AndAlso Request("CveClasificacionDetalle").ToEntero() > 0, Request("CveClasificacionDetalle").ToEntero(), -1).ToString.ToEntero
CveClienteSucursal = If(Request("CveClienteSucursal") IsNot Nothing AndAlso Request("CveClienteSucursal").ToEntero() >= 0, Request("CveClienteSucursal").ToEntero(), -1).ToString.ToEntero
'CveEstatusFactura = If(Request("CveEstatusFactura") IsNot Nothing AndAlso Request("CveEstatusFactura").ToEntero() > 0, Request("CveEstatusFactura").ToEntero(), -1).ToString.ToEntero
DdlGarantia.SelectedValueExist(If(Request("EsGarantia") IsNot Nothing AndAlso Request("EsGarantia").ToEntero() > 0, Request("EsGarantia").ToEntero(), -1).ToString)
DdlCondicionesPago.SelectedValueExist(If(Request("CveCondicionesPago") IsNot Nothing AndAlso Request("CveCondicionesPago").ToEntero() > 0, Request("CveCondicionesPago").ToEntero(), -1).ToString)
DdlDistribuidor.SelectedValueExist(If(Request("EsDistribuidor") IsNot Nothing AndAlso Request("EsDistribuidor").ToEntero() > 0, Request("EsDistribuidor").ToEntero(), -1).ToString)
@@ -456,6 +495,10 @@ Partial Class Ventas_RepProductosServiciosDetalle
CargaProvedores(CveProveedorCompra)
'If CveProveedorCompra.ToEntero > 0 Then DdlProveedor.SelectedValue = CveProveedorCompra
DdlTipoPSDes.SelectedValueExist(CveClasificacionDetalle)
CargaSucursales(DdlClientes.txtValue.Value.ToString.ToEntero, CveClienteSucursal)
' DdlEstatus.SelectedValueExist(CveEstatusFactura)
CargaDatos()
End Sub
@@ -486,7 +529,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda,
TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero) Then
ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados
Else
@@ -675,7 +719,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
Private Sub CargaEstatus()
DdlEstatus.Items.Clear()
If DdlTipoComprobante.SelectedValue <> "-1" Then
If DdlTipoComprobante.SelectedValue <> "-1" AndAlso DdlTipoComprobante.SelectedValue <> "" Then
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue))
Else
DdlEstatus.DataSource = GlobalDTEstatusFactura
@@ -941,4 +985,15 @@ Partial Class Ventas_RepProductosServiciosDetalle
Protected Sub DdlClientes_selectedindexchange(sender As Object, e As EventArgs)
If DdlClientes.txtValue.Value.ToEntero > 0 Then
CargaSucursales(DdlClientes.txtValue.Value.ToEntero, -1)
Else
CargaSucursales(-1, -1)
End If
End Sub
End Class

View File

@@ -205,8 +205,8 @@
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
<asp:BoundField HeaderText="Fecha" DataField="Fecha" />
<asp:BoundField HeaderText="Fecha Vencimiento" DataField="FechaVencimiento" />
<asp:BoundField HeaderText="Cantidad" DataField="CantidadOriginal" />
<asp:BoundField HeaderText="Por Facturar" DataField="Cantidad" />
<asp:BoundField HeaderText="Cantidad" DataField="CantidadOriginal" DataFormatString="{0:N2}" />
<asp:BoundField HeaderText="Por Facturar" DataField="Cantidad" DataFormatString="{0:N2}" />
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />