Puntos GDiaz
-- Mostrar precio en ddl lista de precios -- Boton para ver existencias FIX. --Vendedor al facturar remision JAM
This commit is contained in:
@@ -1478,6 +1478,8 @@
|
|||||||
<%--19--%>
|
<%--19--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkExistencias" runat="server" Visible="false" AlternateText="Ver Existencias" CausesValidation="False" CommandName="Existencias" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
||||||
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-eye'></i>" />
|
||||||
<asp:LinkButton ID="LnkDescuentos" runat="server" Visible="false" AlternateText="Descuento" CausesValidation="False" CommandName="Descuento" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
<asp:LinkButton ID="LnkDescuentos" runat="server" Visible="false" AlternateText="Descuento" CausesValidation="False" CommandName="Descuento" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-percent'></i>" />
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-percent'></i>" />
|
||||||
<asp:LinkButton ID="imgClone" runat="server" AlternateText="Clonar" CausesValidation="False" CommandName="Clonar" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
<asp:LinkButton ID="imgClone" runat="server" AlternateText="Clonar" CausesValidation="False" CommandName="Clonar" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
||||||
@@ -8741,8 +8743,36 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="DivModalVerExistencias" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<asp:UpdatePanel ID="UpVerExistencias" runat="server" UpdateMode="Conditional" class="modal-content">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlVerExistenciasPS" runat="server"></asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:GridView ID="GvVerExistencias" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-hover" GridLines="None" OnRowDataBound="GvVerExistencias_RowDataBound">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||||
|
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad Medida" />
|
||||||
|
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="DvModalTipoVenta" class="modal ADS fade" role="dialog">
|
<div id="DvModalTipoVenta" class="modal ADS fade" role="dialog">
|
||||||
|
|
||||||
|
|||||||
@@ -3741,9 +3741,9 @@ Partial Class Ventas
|
|||||||
Dim Dt As DataTable = Nothing
|
Dim Dt As DataTable = Nothing
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(384) Then
|
If UsuarioActual.TienePermisoProceso(384) Then
|
||||||
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True'")
|
Dt = ObjVta.DtResultados.Copy()
|
||||||
Else
|
Else
|
||||||
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True' AND Restringuida = 'False'")
|
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlPrecioLista.DataSource = Dt
|
DdlPrecioLista.DataSource = Dt
|
||||||
@@ -8790,6 +8790,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
e.Row.FCLinkButton("LnkExistencias").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
||||||
' e.Row.FCLinkButton("imgE").Enabled = False
|
' e.Row.FCLinkButton("imgE").Enabled = False
|
||||||
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
|
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
|
||||||
@@ -17933,15 +17937,38 @@ Partial Class Ventas
|
|||||||
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
||||||
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
||||||
|
|
||||||
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
|
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
|
||||||
|
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
|
||||||
|
If dt IsNot Nothing Then
|
||||||
|
If dt.Rows.Count > 0 Then
|
||||||
|
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
|
||||||
|
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
|
||||||
|
If ObjPrecioSugerido.CvePrecioLista = Me.CvePrecioListaCliente Then
|
||||||
|
Alert("La lista de precios del cliente no esta permitido en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
ObjPrecioSugerido.CvePrecioLista = -1
|
||||||
|
ObjPrecioSugerido.PrecioSugerido = 0
|
||||||
|
tPrecioSugerido = 0
|
||||||
|
PrecioSugerido = 0
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ObjPrecioSugerido.CvePrecioLista = -1
|
||||||
|
ObjPrecioSugerido.PrecioSugerido = 0
|
||||||
|
tPrecioSugerido = 0
|
||||||
|
PrecioSugerido = 0
|
||||||
|
|
||||||
|
Alert("No se encontro una lista de precios permitida en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ObjPrecioSugerido.CvePrecioLista = -1
|
||||||
|
ObjPrecioSugerido.PrecioSugerido = 0
|
||||||
|
tPrecioSugerido = 0
|
||||||
|
PrecioSugerido = 0
|
||||||
|
|
||||||
|
Alert("No se encontraron listas de precio disponibles", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
|
|
||||||
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
|
|
||||||
ObjPrecioSugerido.CvePrecioLista = -1
|
|
||||||
ObjPrecioSugerido.PrecioSugerido = 0
|
|
||||||
tPrecioSugerido = 0
|
|
||||||
PrecioSugerido = 0
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -18593,7 +18620,7 @@ Partial Class Ventas
|
|||||||
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaListasPreciosSubProyectos(-1)
|
CargaListasPreciosSubProyectos(If(DdlPS.SelectedValue.ToEntero() <= 0, -1, DdlPS.SelectedValue.ToEntero()))
|
||||||
|
|
||||||
UpDetalle.Update()
|
UpDetalle.Update()
|
||||||
UpEmitirTransitorio.Update()
|
UpEmitirTransitorio.Update()
|
||||||
@@ -25313,6 +25340,35 @@ Partial Class Ventas
|
|||||||
RegistraScript("$('#ModalPermisoDesc').modal({backdrop: 'static', keyboard: false});setTimeout(() => {$('#txtUserDesc').focus();}, 500); ", "A2")
|
RegistraScript("$('#ModalPermisoDesc').modal({backdrop: 'static', keyboard: false});setTimeout(() => {$('#txtUserDesc').focus();}, 500); ", "A2")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ElseIf e.CommandName = "Existencias" Then
|
||||||
|
Dim RowNum As Integer = Convert.ToInt32(e.CommandArgument)
|
||||||
|
Dim GvRow As GridViewRow = GvPS.Rows(RowNum)
|
||||||
|
|
||||||
|
LtlVerExistenciasPS.Text = $"Existencias: {GvRow.DataKey("PS")}"
|
||||||
|
|
||||||
|
Dim RestringirAlmacenes As Integer = -1
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
RestringirAlmacenes = 1 'restringue los almacenes:Consignación,Productos Financieros Asignados,,roductos Financieros,Consumo Interno,Activo Fijo,Merma,Consignación de Contrato,Devolucion proveedor,
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim BuscarEnTabla As Boolean = False
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(715) = "1" Then
|
||||||
|
BuscarEnTabla = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjInventarios As New ClsInventarios()
|
||||||
|
If ObjInventarios.GetExistenciasProducto(GvRow.DataKey("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||||
|
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero,
|
||||||
|
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then
|
||||||
|
GvVerExistencias.DataSource = ObjInventarios.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
|
GvVerExistencias.DataBind()
|
||||||
|
|
||||||
|
UpVerExistencias.Update()
|
||||||
|
|
||||||
|
RegistraScript("$('#DivModalVerExistencias').modal({backdrop: 'static', keyboard: false}); ", "A2")
|
||||||
Else
|
Else
|
||||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||||
End If
|
End If
|
||||||
@@ -32674,7 +32730,6 @@ Partial Class Ventas
|
|||||||
DdlSubProyectoDatos.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveSubProyecto"))
|
DdlSubProyectoDatos.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveSubProyecto"))
|
||||||
End If
|
End If
|
||||||
DdlSucursalCliente.SelectedValueExist(If(dtSeleccionadas.FiltroPrimeroValor("CveClienteSucursal").ToEntero() > 0, dtSeleccionadas.FiltroPrimeroValor("CveClienteSucursal"), "-1"))
|
DdlSucursalCliente.SelectedValueExist(If(dtSeleccionadas.FiltroPrimeroValor("CveClienteSucursal").ToEntero() > 0, dtSeleccionadas.FiltroPrimeroValor("CveClienteSucursal"), "-1"))
|
||||||
DdlVendedor.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveVendedor"))
|
|
||||||
|
|
||||||
CambiaSucursalGeneral()
|
CambiaSucursalGeneral()
|
||||||
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
|
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
|
||||||
@@ -32702,6 +32757,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
RemisionesLista.Clear()
|
RemisionesLista.Clear()
|
||||||
|
|
||||||
|
DdlVendedor.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveVendedor"))
|
||||||
|
|
||||||
Dim MsgUsados As New StringBuilder
|
Dim MsgUsados As New StringBuilder
|
||||||
Dim UsadosValidados As Boolean = True
|
Dim UsadosValidados As Boolean = True
|
||||||
|
|
||||||
@@ -38827,5 +38884,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Return "<a href='javascript:void(0);' class='Texto' onclick=''javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact', 800, 547, 'N', 'PopUpBuscar')''> ver </a>"
|
Return "<a href='javascript:void(0);' class='Texto' onclick=''javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact', 800, 547, 'N', 'PopUpBuscar')''> ver </a>"
|
||||||
End Function
|
End Function
|
||||||
|
Protected Sub GvVerExistencias_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("CveAlmacen") = "" Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user