--Rep Ventas Periodo

This commit is contained in:
2025-02-26 00:24:24 -07:00
parent 4aad796406
commit acdffa4946
3 changed files with 394 additions and 256 deletions

View File

@@ -4,6 +4,7 @@ Option Strict On
Imports System.Data Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports Extensiones Imports Extensiones
Imports Profact.TimbraCFDI40
Public Class ClsVentas Public Class ClsVentas
Implements IDisposable Implements IDisposable
@@ -1826,6 +1827,7 @@ Public Class ClsVentas
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Retorno = True
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener los datos del reporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al obtener los datos del reporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
@@ -1856,38 +1858,53 @@ Public Class ClsVentas
'Reporte de Ventas por Período 'Reporte de Ventas por Período
'Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
' CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
' Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1,
' Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1,
Optional VerEn As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetRepPeriodo") DataAdapter("PA_VentasGetRepPeriodo")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
'.Add("@CveVenta", SqlDbType.Int).Value = CveVenta 'PARAMETROS BASE
.Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@FechaIEjec", SqlDbType.Date).Value = FechaIEjec .Add("@FechaIEjec", SqlDbType.Date).Value = FechaIEjec
.Add("@FechaFEjec", SqlDbType.Date).Value = FechaFEjec .Add("@FechaFEjec", SqlDbType.Date).Value = FechaFEjec
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveSubProyectoEjecucion", SqlDbType.Int).Value = CveSubProyectoEjecucion .Add("@CveSubProyectoEjecucion", SqlDbType.Int).Value = CveSubProyectoEjecucion
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus .Add("@CveEstatus", SqlDbType.VarChar).Value = CveEstatus
.Add("@IVA", SqlDbType.VarChar).Value = IVA .Add("@IVA", SqlDbType.VarChar).Value = IVA
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@GPO", SqlDbType.Int).Value = Gpo .Add("@GPO", SqlDbType.Int).Value = Gpo
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@VerEn", SqlDbType.Int).Value = VerEn
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
.Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion
.Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio
.Add("@EsFacturaGlobal", SqlDbType.Int).Value = EsFacturaGlobal
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
'PARAMETROS EXTRA
.Add("@VerEn", SqlDbType.Int).Value = VerEn
End With End With
Try Try
@@ -2485,32 +2502,28 @@ Public Class ClsVentas
Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer, Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,
CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1, Optional CvePS As Integer = -1) As Boolean CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1, Optional CvePS As Integer = -1) As Boolean
Dim Retorno As Boolean = False
Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesGet")
DataAdapter("PA_Vta_PromocionesGet") With SqlAdapter.SelectCommand.Parameters
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
With SqlAdapter.SelectCommand.Parameters .Add("@Fecha", SqlDbType.Date).Value = Fecha
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario End With
.Add("@CvePS", SqlDbType.Int).Value = CvePS Try
End With SqlAdapter.Fill(Data)
Retorno = True
Try Catch ex As Exception
SqlAdapter.Fill(Data) OnError("Ocurrió un error al obtener las Promociones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Retorno = True End Try
Catch ex As Exception Return Retorno
OnError("Ocurrió un error al obtener las Promociones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Function
End Try
Return Retorno
End Function
Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String, CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String,
@@ -2615,26 +2628,23 @@ Public Class ClsVentas
End Function End Function
Public Function UpdatePromocionEstatus(CvePromocion As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function UpdatePromocionEstatus(CvePromocion As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionEstatusUpdate") DataAdapter("PA_Vta_PromocionEstatusUpdate")
With SqlAdapter.SelectCommand.Parameters
With SqlAdapter.SelectCommand.Parameters .Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion
.Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion .Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With
End With Try
SqlAdapter.Fill(Data)
Try Retorno = True
SqlAdapter.Fill(Data) Catch ex As Exception
Retorno = True OnError("Ocurrió un error al actualizar el estatus la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception End Try
OnError("Ocurrió un error al actualizar el estatus la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Return Retorno
End Try End Function
Return Retorno
End Function
@@ -3297,32 +3307,29 @@ Public Class ClsVentas
Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer, Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer,
Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False, Optional PrimerProducto As Boolean = False) As Boolean Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False, Optional PrimerProducto As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepRemisionesGet") DataAdapter("PA_Vta_RepRemisionesGet")
With SqlAdapter.SelectCommand.Parameters
With SqlAdapter.SelectCommand.Parameters .Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaV", SqlDbType.VarChar).Value = FechaV
.Add("@FechaV", SqlDbType.VarChar).Value = FechaV .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@ConsultaInventario", SqlDbType.Bit).Value = ConsultaInventario
.Add("@ConsultaInventario", SqlDbType.Bit).Value = ConsultaInventario .Add("@PrimerProducto", SqlDbType.Bit).Value = PrimerProducto
.Add("@PrimerProducto", SqlDbType.Bit).Value = PrimerProducto End With
End With Try
SqlAdapter.Fill(Data)
Try Retorno = True
SqlAdapter.Fill(Data) Catch ex As Exception
Retorno = True OnError("Ocurrió un error al obtener las remisiones sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception End Try
OnError("Ocurrió un error al obtener las remisiones sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Return Retorno
End Try End Function
Return Retorno
End Function
Public Function GetRepRemisionesSinFacturarDetalle(FechaI As String, FechaF As String, FechaV As String, CveCliente As Integer, CveContrato As Integer, CveVenta As Integer, CveEmpresa As Integer, CveSubProyecto As String, Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False) As Boolean Public Function GetRepRemisionesSinFacturarDetalle(FechaI As String, FechaF As String, FechaV As String, CveCliente As Integer, CveContrato As Integer, CveVenta As Integer, CveEmpresa As Integer, CveSubProyecto As String, Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7615,28 +7622,25 @@ Public Class ClsVentas
End Function End Function
Public Function GetSabanaE189(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, CveProveedor As Integer, CodigoPSInicio As String, CodigoPSFin As String) As Boolean Public Function GetSabanaE189(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, CveProveedor As Integer, CodigoPSInicio As String, CodigoPSFin As String) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasSabanaDatos") DataAdapter("PA_Vta_VentasSabanaDatos")
With SqlAdapter.SelectCommand.Parameters
With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CodigoProductoI", SqlDbType.VarChar).Value = CodigoPSInicio
.Add("@CodigoProductoI", SqlDbType.VarChar).Value = CodigoPSInicio .Add("@CodigoProductoF", SqlDbType.VarChar).Value = CodigoPSFin
.Add("@CodigoProductoF", SqlDbType.VarChar).Value = CodigoPSFin End With
End With Try
SqlAdapter.Fill(Data)
Try Retorno = True
SqlAdapter.Fill(Data) Catch ex As Exception
Retorno = True OnError("Ocurrió un error al obtener los datos de la Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception End Try
OnError("Ocurrió un error al obtener los datos de la Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Return Retorno
End Try End Function
Return Retorno
End Function
#Region "IDisposable Support" #Region "IDisposable Support"

View File

@@ -15,6 +15,39 @@
color: #FFF; color: #FFF;
font-weight: bold; font-weight: bold;
} }
.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> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
@@ -67,17 +100,26 @@
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a> <a href="javascript:;" class="expand"></a>
</div> </div>
<div class="titlefiltros caption"> <div class="titlefiltros caption">
<div class="row"> <div class="row" style="height: 32px;">
<label class="col-md-1">Tipo: </label> <label class="col-md-1">Tipo: </label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true"> <asp:ListBox ID="DdlTipoComprobante" AutoPostBack="true" OnTextChanged="DdlTipoComprobante_SelectedIndexChanged" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
<asp:ListItem Text="Remisión" Value="Rem"></asp:ListItem>
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
</asp:ListBox>
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem> <asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem> <asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
@@ -86,16 +128,44 @@
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem> <asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem> <asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem> <asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>--%>
</div> </div>
<div class="col-md-1 truncate">
Fecha Inicio:
<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:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div> </div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="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>
</div>
<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 class="col-md-1 truncate">
Fecha Fin:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="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>
</div>
<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>
<label class="col-md-1 ">Grupo:</label> <label class="col-md-1 ">Grupo:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
@@ -120,67 +190,52 @@
<asp:ListItem Text="Tipo Cliente" Value="19"></asp:ListItem> <asp:ListItem Text="Tipo Cliente" Value="19"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body" style="display: none">
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Sucursal:</label> <asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div class="col-md-2"> <div runat="server" id="DivProyecto" 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="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;"></asp:DropDownList>
</div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <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:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>--%>
</div> </div>
<label class="col-md-1 truncate">F.I.:</label> <label class="col-md-1 ">Cliente:</label>
<div class="col-md-2"> <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;"> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <%-- <asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<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;">
<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 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:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>--%>
</div>
<label class="col-md-1 truncate">Vendedor:</label>
<div class="col-md-2">
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Sucursal Ejecución:</label> <label class="col-md-1 ">Estatus:</label>
<div class="col-md-2">
<asp:ListBox ID="DdlEstatus" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <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:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<label runat="server" id="LblSubProyectoEjecucion" class="col-md-1 truncate">SubProyecto Ejecución:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlSubProyectoEjecucion" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlSubProyectoEjecucion" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 truncate">F.I. E.:</label> <label class="col-md-1 truncate">Fecha I. Ejecución:</label>
<div class="col-md-2"> <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;"> <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="TxtFechaIEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFechaIEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -195,7 +250,7 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaIEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFechaIEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">F.F. E.:</label> <label class="col-md-1 truncate">Fecha F. Ejecución:</label>
<div class="col-md-2"> <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;"> <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="TxtFechaFEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFechaFEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -210,34 +265,28 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaFEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFechaFEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">Vendedor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Proyecto:</label> <label class="col-md-1 truncate">Usuario:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList 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:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Cliente:</label> <label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cli.:</label>
<div class="col-md-2">
<%--<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<label title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Clasificacion Cli.:</label>
<div class="col-md-2"> <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"></asp:DropDownList>
</div> </div>
<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: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>
</asp:DropDownList>
</div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label> <label title="Tipo Cliente" data-toggle="tooltip" class="col-md-1 truncate">Tipo Cliente:</label>
<div class="col-md-2"> <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">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -245,13 +294,51 @@
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem> <asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Lectura administrativa:</label> <label class="col-md-1 truncate">Lectura administrativa:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" /> <asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
</div> </div>
<label title="Es parte relacionada" data-toggle="tooltip" class="col-md-1 truncate" runat="server" id="Label4">Parte Relacionada:</label>
<div class="col-md-2" runat="server" id="DivFilial">
<asp:DropDownList ID="DdlFilial" 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>
<asp:ListItem Text="Solo parte relacionadas" Value="1"></asp:ListItem>
<asp:ListItem Text="Sin parte relacionadas" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" visible="false" runat="server" id="DivLblDistr">Distribuidor:</label>
<div class="col-md-2" visible="false" runat="server" id="DivDistr">
<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>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio" visible="false">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblFacturaGlobal" class="col-md-1 truncate" Visible="false">Factura Global:</asp:Label>
<div class="col-md-2" runat="server" id="DivFacturaGlobal" visible="false">
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1 truncate">Relación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -605,8 +692,7 @@
try { try {
document.getElementById("topScroll").value = document.getElementById('divDias').scrollTop; document.getElementById("topScroll").value = document.getElementById('divDias').scrollTop;
} }
catch (e) catch (e) { }
{ }
} }
$('.Consultar').click(function () { $('.Consultar').click(function () {

View File

@@ -69,6 +69,7 @@ Partial Class RepVentasPeriodo
TCEspecifico = -1 TCEspecifico = -1
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargaCombos() CargaCombos()
'CargaGrupo()
'MODALIDADES 'MODALIDADES
If Request("Op") IsNot Nothing AndAlso Request("Op").ToString <> "" Then If Request("Op") IsNot Nothing AndAlso Request("Op").ToString <> "" Then
@@ -83,7 +84,7 @@ Partial Class RepVentasPeriodo
'Modalidad Cotizacion 'Modalidad Cotizacion
If Opcion = "Cot" Then If Opcion = "Cot" Then
DdlTipoComprobante.SelectedValueExist(Opcion) DdlTipoComprobante.SelectedValuesIfExistM(Opcion)
DdlGrupo.SelectedValueExist("7") DdlGrupo.SelectedValueExist("7")
DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty) DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty)
DdlEstatus.SelectedValue = "-1" DdlEstatus.SelectedValue = "-1"
@@ -100,29 +101,25 @@ Partial Class RepVentasPeriodo
End Sub End Sub
Private Sub CargaCombos() Private Sub CargaCombos()
''CargaClientes
'Dim ObjClientes As New ClsClientes
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
' DdlClientes.DataSource = ObjClientes.DtResultados
'Else
' DdlClientes.DataSource = Nothing
'End If
'ObjClientes.Dispose()
'DdlClientes.DataBind()
DdlClientes.setEsWebService(True)
DdlClientes.Attributes.Add("data-metodo", "getcliente")
DdlClientes.SelectedText = "Todos"
DdlClientes.SelectedValue = "-1"
'CargaSucursales CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1)
DdlSubProyectoEjecucion.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) 'CargaClientes
DdlSubProyectoEjecucion.DataBind() Dim EsWS As Boolean = 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
'Vendedor 'Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
DdlVendedor.DataBind() DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
'CargaUsuarios 'CargaUsuarios
DdlUsuario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa) DdlUsuario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
@@ -133,41 +130,61 @@ Partial Class RepVentasPeriodo
DdlEstatus.DataBind() DdlEstatus.DataBind()
DdlEstatus.Items.Add(New ListItem("Canceladas", "4")) DdlEstatus.Items.Add(New ListItem("Canceladas", "4"))
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
DdlEstatus.SelectedIndex = 2
Else
DdlEstatus.SelectedIndex = 1 DdlEstatus.SelectedIndex = 1
Else
DdlEstatus.SelectedIndex = 0
End If End If
'CargaProyectos
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", "", {"CveProyecto", "Proyecto"})
DdlProyecto.DataBind()
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
'Carga Clasificacion Cliente 'Carga Clasificacion Cliente
DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa) DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
DdlClienteClasificacion.DataBind() DdlClienteClasificacion.DataBind()
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
DdlTipoRelacion.DataSource = GlobalDTVtaTiposRelacion
DdlTipoRelacion.DataBind()
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
End Sub End Sub
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaClientes()
End Sub
Private Sub CargaClientes()
DdlClientes.ddl.Items.Clear()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargaSubProyecto() CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
End Sub
Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
''dsadasd
End Sub End Sub
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlEstatus.Items.Clear() DdlEstatus.Items.Clear()
If DdlTipoComprobante.SelectedValue <> "-1" Then If DdlTipoComprobante.GetSelectedValuesM <> "" Then
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue)) DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto IN ({0}) OR ('Cot' IN ({0}) AND CveEstatusFactura = 2)", DdlTipoComprobante.GetSelectedValuesM(True).Replace("Ant", "Ing").Replace("Egs", "Ing")))
Else Else
DdlEstatus.DataSource = GlobalDTEstatusFactura DdlEstatus.DataSource = GlobalDTEstatusFactura
End If End If
DdlEstatus.Items.Add(New ListItem("Todos", "-1")) 'DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
DdlEstatus.DataBind() DdlEstatus.DataBind()
If DdlTipoComprobante.GetSelectedValuesM(True).Contains("Rem") Then
For Each item As ListItem In DdlEstatus.Items
If item.Value = "11" Then
DdlEstatus.Items.Remove(item)
DdlEstatus.Items.Insert(0, New ListItem("Registrada", "2"))
Exit For
End If
Next
End If
End Sub End Sub
#End Region #End Region
@@ -180,8 +197,33 @@ Partial Class RepVentasPeriodo
End Sub End Sub
Private Sub CargaGrupo()
DdlGrupo.Items.Insert(0, New ListItem("Año", "1"))
DdlGrupo.Items.Insert(1, New ListItem("Mes", "2"))
DdlGrupo.Items.Insert(2, New ListItem("Año/Mes", "3"))
DdlGrupo.Items.Insert(3, New ListItem("Fecha", "4"))
DdlGrupo.Items.Insert(4, New ListItem("Cliente", "5"))
DdlGrupo.Items.Insert(4, New ListItem(LblSubProyecto.Text, "6"))
DdlGrupo.Items.Insert(5, New ListItem("Corte", "16"))
DdlGrupo.Items.Insert(6, New ListItem("Vendedor", "7"))
DdlGrupo.Items.Insert(7, New ListItem("Usuario", "8"))
DdlGrupo.Items.Insert(8, New ListItem("Estatus", "9"))
DdlGrupo.Items.Insert(9, New ListItem("% IVA", "10"))
DdlGrupo.Items.Insert(10, New ListItem("Año Ejec.", "11"))
DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12"))
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20"))
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
DdlGrupo.Items.Insert(13, New ListItem("Giro", "22"))
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("3")
End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjVentas As New ClsVentas()
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal TCEspecifico = TxtEspecifico.Text.ToDecimal
Else Else
@@ -193,29 +235,47 @@ Partial Class RepVentasPeriodo
If RbTotal.Checked Then VerEn = 2 If RbTotal.Checked Then VerEn = 2
If RbIVA.Checked Then VerEn = 3 If RbIVA.Checked Then VerEn = 3
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
Dim Estatus As String = If(DdlEstatus.GetSelectedValuesM = "", "-1", DdlEstatus.GetSelectedValuesM)
Dim Vendedores As String = If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM)
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
If TipoComprobante.Contiene("Rem") And Not Estatus.Contiene("11") Then
Estatus = Estatus & ",11"
End If
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal
Else
TCEspecifico = -1
End If
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha) FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha) FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha) FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha) FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked CveProyecto = DdlProyecto.SelectedValue.ToEntero
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, VerEn:=VerEn) Then
DtVentas = ObjVentas.DtResultados.Copy()
If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero,
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue,
DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
Else Else
GvDatos.DataSource = Nothing GvDatos.DataSource = Nothing
End If End If
CveProyecto = DdlProyecto.SelectedValue.ToEntero
ObjVentas.Dispose() ObjVentas.Dispose()
GvDatos.DataSource = DtVentas
GvDatos.DataBind() GvDatos.DataBind()
If GvDatos.Rows.Count > 0 Then If GvDatos.Rows.Count > 0 Then
CargaGraficas(DtVentas) CargaGraficas(DtVentas)
Me.DvGraficas.Visible = True Me.DvGraficas.Visible = True
@@ -413,18 +473,6 @@ Partial Class RepVentasPeriodo
End If End If
RegistraScript(SBJSScript.ToString, Indicador) RegistraScript(SBJSScript.ToString, Indicador)
End Sub End Sub
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaClientes()
End Sub
Private Sub CargaClientes()
DdlClientes.ddl.Items.Clear()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
End Class End Class