Reporte recuperacion, agregar filtros para la fechaaplicado

This commit is contained in:
HECTOR JAVIER RODRIGUEZ FLORES
2021-02-05 19:13:04 -07:00
parent 3bb23222fb
commit efc17c83bf
3 changed files with 44 additions and 5 deletions

View File

@@ -1437,7 +1437,7 @@ Public Class ClsMovimientos
Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
Optional EsDistribuidor As Integer = -1) As Boolean
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepRecuperacion")
With SqlAdapter.SelectCommand.Parameters
@@ -1460,7 +1460,10 @@ Public Class ClsMovimientos
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -178,6 +178,37 @@
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate">Fecha Inicio: </div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
<asp:TextBox Width="80px" ID="TxtFechaAplicadoI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioAplicadoI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaAplicadoI" runat="server" TargetControlID="TxtFechaAplicadoI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaAplicadoI" PopupButtonID="imgCalendarioAplicadoI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaAplicadoI" runat="server" ControlToValidate="TxtFechaAplicadoI" 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="cvFechaAplicadoI" runat="server" ControlToValidate="TxtFechaAplicadoI" 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="vcoFfvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">Fecha Fin: </div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
<asp:TextBox Width="80px" ID="TxtFechaAplicadoF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioAplicadoF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaAplicadoF" runat="server" TargetControlID="TxtFechaAplicadoF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaAplicadoF" PopupButtonID="imgCalendarioAplicadoF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaAplicadoF" runat="server" ControlToValidate="TxtFechaAplicadoF" 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="cvFechaAplicadoF" runat="server" ControlToValidate="TxtFechaAplicadoF" 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="vcoFfvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>

View File

@@ -121,16 +121,21 @@ Partial Class Ventas_RepRecuperacion
Private Sub CargaDatos()
Dim ObjMovtos As New ClsMovimientos()
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal
Else
TCEspecifico = -1
End If
End If
Dim FechaAplicadoI As Date = If(IsDate(TxtFechaAplicadoI.Text), TxtFechaAplicadoI.Text.ToDate, MinFecha)
Dim FechaAplicadoF As Date = If(IsDate(TxtFechaAplicadoF.Text), TxtFechaAplicadoF.Text.ToDate, MaxFecha)
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero()) Then
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF) Then
GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados
Else