-- para ver importes, se activó un chk, para que sea a petición, y no en automático
This commit is contained in:
@@ -190,6 +190,11 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVOFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVOFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2" runat="server" id="divVerInv">
|
||||||
|
<asp:CheckBox ID="chkInv" Checked="false" runat="server" Text="Ver Inventario"></asp:CheckBox>
|
||||||
|
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlSubProyectos" DataTextField="SubProyecto" DataValueField="CveSubProyecto" runat="server"></asp:DropDownList>--%>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label class="col-md-1">Contrato: </label>
|
<label class="col-md-1">Contrato: </label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ Partial Class RepRemisiones
|
|||||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=UsuarioActual.TienePermisoProceso(201)) Then
|
If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked) Then
|
||||||
DtVentas = ObjVentas.DtResultados.Copy()
|
DtVentas = ObjVentas.DtResultados.Copy()
|
||||||
GvDatos.DataSource = DtVentas
|
GvDatos.DataSource = DtVentas
|
||||||
End If
|
End If
|
||||||
@@ -100,7 +100,7 @@ Partial Class RepRemisiones
|
|||||||
GvDatos.Columns(7).Visible = DtVentas.SUMD("Descuento") > 0
|
GvDatos.Columns(7).Visible = DtVentas.SUMD("Descuento") > 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GvDatos.Columns(10).Visible = UsuarioActual.TienePermisoProceso(201)
|
GvDatos.Columns(10).Visible = chkInv.Checked 'solo se visualiza si está selccionada
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
@@ -148,6 +148,11 @@ Partial Class RepRemisiones
|
|||||||
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
|
divVerInv.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaSucursales()
|
Private Sub CargaSucursales()
|
||||||
|
|
||||||
|
|||||||
@@ -130,11 +130,11 @@
|
|||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" selectedindexchange="DdlClientes_SelectedIndexChanged"></ADS:Dropdownlost>
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" selectedindexchange="DdlClientes_SelectedIndexChanged"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="col-md-1">Contrato: </label>
|
<%-- <label class="col-md-1">Contrato: </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="DdlContrato" DataTextField="ContratoCompleto" DataValueField="CveContrato" runat="server">
|
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlContrato" DataTextField="ContratoCompleto" DataValueField="CveContrato" runat="server">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -187,6 +187,10 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVOFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVOFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-2" runat="server" id="divVerInv">
|
||||||
|
<asp:CheckBox ID="chkInv" Checked="false" runat="server" Text="Ver Inventario"></asp:CheckBox>
|
||||||
|
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlSubProyectos" DataTextField="SubProyecto" DataValueField="CveSubProyecto" runat="server"></asp:DropDownList>--%>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%-- <label class="col-md-1 ">Vendedor:</label>
|
<%-- <label class="col-md-1 ">Vendedor:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ Partial Class RepRemisionesDetalle
|
|||||||
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 Then
|
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 Then
|
||||||
CveCliente = Request("CveCliente").ToEntero
|
CveCliente = Request("CveCliente").ToEntero
|
||||||
|
|
||||||
Dim Cliente = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("NombreComercial", $"CveCliente ={CveCliente}")
|
Dim Cliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
|
||||||
If Cliente <> "" Then
|
If Cliente <> "" Then
|
||||||
DdlClientes.SelectedValue = CveCliente.ToString
|
DdlClientes.SelectedValue = CveCliente.ToString
|
||||||
DdlClientes.SelectedText = Cliente
|
DdlClientes.SelectedText = Cliente
|
||||||
@@ -122,14 +122,14 @@ Partial Class RepRemisionesDetalle
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
CveCliente = -1
|
CveCliente = -1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then
|
'If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then
|
||||||
CveContrato = Request("CveContrato").ToEntero
|
' CveContrato = Request("CveContrato").ToEntero
|
||||||
DdlContrato.SelectedValueExist(CveContrato)
|
' DdlContrato.SelectedValueExist(CveContrato)
|
||||||
Else
|
'Else
|
||||||
CveContrato = -1
|
CveContrato = -1
|
||||||
End If
|
'End If
|
||||||
If Request("CveSubProyecto") IsNot Nothing Then
|
If Request("CveSubProyecto") IsNot Nothing Then
|
||||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||||
DdlSubProyectos.SelectedValuesIfExistM(CveSubProyecto)
|
DdlSubProyectos.SelectedValuesIfExistM(CveSubProyecto)
|
||||||
@@ -155,10 +155,10 @@ Partial Class RepRemisionesDetalle
|
|||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||||
FechaV = If(IsDate(TxtFechaVencimiento.Text.Trim()), TxtFechaVencimiento.Text.Trim(), "-1")
|
FechaV = If(IsDate(TxtFechaVencimiento.Text.Trim()), TxtFechaVencimiento.Text.Trim(), "-1")
|
||||||
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||||
CveContrato = If(DdlContrato.SelectedValue.ToEntero > 0, DdlContrato.SelectedValue.ToEntero, -1)
|
'CveContrato = If(DdlContrato.SelectedValue.ToEntero > 0, DdlContrato.SelectedValue.ToEntero, -1)
|
||||||
CveSubProyecto = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
CveSubProyecto = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
||||||
|
|
||||||
If ObjVentas.GetRepRemisionesSinFacturarDetalle(FechaI, FechaF, FechaV, CveCliente, CveContrato, CveVenta, UsuarioActual.CveEmpresa, CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=UsuarioActual.TienePermisoProceso(201)) Then
|
If ObjVentas.GetRepRemisionesSinFacturarDetalle(FechaI, FechaF, FechaV, CveCliente, CveContrato, CveVenta, UsuarioActual.CveEmpresa, CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked) Then
|
||||||
If CveMoneda = 1 Or CveMoneda = 2 Then
|
If CveMoneda = 1 Or CveMoneda = 2 Then
|
||||||
DtVentas = ObjVentas.DtResultados.FiltraParametros($"CveMoneda = {CveMoneda}")
|
DtVentas = ObjVentas.DtResultados.FiltraParametros($"CveMoneda = {CveMoneda}")
|
||||||
Else
|
Else
|
||||||
@@ -169,13 +169,13 @@ Partial Class RepRemisionesDetalle
|
|||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
GvDatos.Columns(8).Visible = UsuarioActual.TienePermisoProceso(201)
|
GvDatos.Columns(8).Visible = chkInv.Checked
|
||||||
|
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub CargaCombos()
|
Public Sub CargaCombos()
|
||||||
CargaCliente()
|
CargaCliente()
|
||||||
CargaContrato()
|
'CargaContrato()
|
||||||
CargaSucursales()
|
CargaSucursales()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCliente()
|
Private Sub CargaCliente()
|
||||||
@@ -191,20 +191,20 @@ Partial Class RepRemisionesDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaContrato()
|
'Private Sub CargaContrato()
|
||||||
Dim ObjContratos As New ClsContratos
|
' Dim ObjContratos As New ClsContratos
|
||||||
DdlContrato.Items.Clear()
|
' DdlContrato.Items.Clear()
|
||||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClientes.SelectedValue.ToEntero, -1, -1) Then
|
' If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClientes.SelectedValue.ToEntero, -1, -1) Then
|
||||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
' If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||||
DdlContrato.DataSource = ObjContratos.DtResultados
|
' DdlContrato.DataSource = ObjContratos.DtResultados
|
||||||
DdlContrato.DataBind()
|
' DdlContrato.DataBind()
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
' ObjContratos.Dispose()
|
||||||
DdlContrato.Items.Insert(0, New ListItem("Todos", "-1"))
|
' DdlContrato.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
'End Sub
|
||||||
Private Sub CargaSucursales()
|
Private Sub CargaSucursales()
|
||||||
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
DdlSubProyectos.DataBind()
|
DdlSubProyectos.DataBind()
|
||||||
@@ -233,7 +233,7 @@ Partial Class RepRemisionesDetalle
|
|||||||
|
|
||||||
If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Sucursal</b>: {0}", DdlSubProyectos.GetSelectedText)
|
If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Sucursal</b>: {0}", DdlSubProyectos.GetSelectedText)
|
||||||
If DdlClientes.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedText)
|
If DdlClientes.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedText)
|
||||||
If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Contrato</b>: {0}", DdlContrato.SelectedItem.Text)
|
'If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Contrato</b>: {0}", DdlContrato.SelectedItem.Text)
|
||||||
|
|
||||||
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||||
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
|
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
|
||||||
|
|||||||
Reference in New Issue
Block a user