-parametros de filtro de distribuidor, condiciiones de pago
This commit is contained in:
@@ -1421,7 +1421,8 @@ Public Class ClsVentas
|
||||
Public Function GetRepVentas(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
|
||||
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 String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago 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) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRep")
|
||||
|
||||
@@ -1448,6 +1449,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
End With
|
||||
|
||||
@@ -1554,7 +1556,8 @@ Public Class ClsVentas
|
||||
Vendedor As String, CveUsuario As Integer, CveEstatus As String, FechaI As Date, FechaF As Date, CveCorte As Integer, TipoDocto As String,
|
||||
CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1,
|
||||
Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago 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) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRepDetalle")
|
||||
|
||||
@@ -1586,6 +1589,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
End With
|
||||
|
||||
@@ -1606,7 +1610,8 @@ Public Class ClsVentas
|
||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer,
|
||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1,
|
||||
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, Optional EsGarantia As Integer = -1) As Boolean
|
||||
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
|
||||
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPS")
|
||||
|
||||
@@ -1638,6 +1643,8 @@ Public Class ClsVentas
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
|
||||
End With
|
||||
|
||||
@@ -1656,7 +1663,8 @@ Public Class ClsVentas
|
||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1,
|
||||
Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1,
|
||||
Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, Optional EsGarantia As Integer = -1) As Boolean
|
||||
Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
|
||||
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPSDetalle")
|
||||
|
||||
@@ -1691,6 +1699,8 @@ Public Class ClsVentas
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -216,6 +216,14 @@
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</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">
|
||||
<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 Text="Frecuente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
@@ -310,15 +318,15 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
|
||||
<label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</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="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="Frecuente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
|
||||
Garantía?:
|
||||
</div>
|
||||
@@ -329,11 +337,19 @@
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:Dropdownlist>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
||||
|
||||
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate">Distribuidor:</label>
|
||||
<div class="col-md-2">
|
||||
<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>
|
||||
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -250,9 +250,11 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -284,7 +286,8 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
||||
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
||||
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
|
||||
CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
|
||||
@@ -315,6 +315,30 @@
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</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>
|
||||
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
|
||||
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:Dropdownlist>
|
||||
</div>
|
||||
|
||||
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate">Distribuidor:</label>
|
||||
<div class="col-md-2">
|
||||
<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>
|
||||
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||
|
||||
@@ -324,9 +324,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
txtFechaI.Text = Fecha
|
||||
txtFechaF.Text = Fecha
|
||||
End If
|
||||
If FechaI <> "-1" Then
|
||||
txtFechaI.Text = FechaI
|
||||
End If
|
||||
|
||||
If FechaF <> "-1" Then
|
||||
txtFechaF.Text = FechaF
|
||||
End If
|
||||
@@ -357,7 +355,13 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
End If
|
||||
|
||||
Else
|
||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||
|
||||
If FechaI = "-1" Then
|
||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||
Else
|
||||
txtFechaI.Text = FechaI
|
||||
End If
|
||||
|
||||
FechaFtemporal = $"01/{AnioMes.Substring(5, 1).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
||||
|
||||
If FechaF = "-1" Then
|
||||
@@ -464,7 +468,7 @@ 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) Then
|
||||
ModalidadContable:=Not ChkLecturaAdmin.Checked, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -616,8 +620,10 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
|
||||
If CveCliente > 0 Then
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre")
|
||||
End If
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
|
||||
|
||||
@@ -304,6 +304,14 @@
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</div>
|
||||
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate">Distribuidor:</label>
|
||||
<div class="col-md-2">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -283,6 +283,9 @@ Partial Class Ventas_RepVentas
|
||||
DdlClienteClasificacion.DataBind()
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -330,7 +333,8 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
If ObjVentas.GetRepVentas(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) Then
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
|
||||
EsDistribuidor:=DdlDistribuidor.selectedvalue.toentero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user