Puntos GDiaz:
--Selectivas
This commit is contained in:
@@ -10821,6 +10821,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/CatMotivosDevoluciones.aspx".ToUpper(), 786)
|
||||
PaginaDict.Add("/Ventas/CatPSSubProyectosVendedores.aspx".ToUpper(), 787)
|
||||
PaginaDict.Add("/Ventas/CatMotivosCancelacion.aspx".ToUpper(), 788)
|
||||
PaginaDict.Add("/Ventas/CatSelectivas.aspx".ToUpper(), 897)
|
||||
|
||||
#End Region
|
||||
#Region "VIA"
|
||||
|
||||
@@ -415,7 +415,7 @@ Public Class ClsProductosServicios
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False,
|
||||
Optional Imagen As String = "", Optional PorcentajeMinimoUtilidad As Decimal = 0) As Integer
|
||||
Optional Imagen As String = "", Optional PorcentajeMinimoUtilidad As Decimal = 0, Optional CveSelectiva As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_ProductosServiciosAdd")
|
||||
@@ -526,6 +526,7 @@ Public Class ClsProductosServicios
|
||||
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
||||
.Add("@Imagen", SqlDbType.VarChar).Value = Imagen
|
||||
.Add("@PorcentajeMinimoUtilidad", SqlDbType.Decimal).Value = PorcentajeMinimoUtilidad
|
||||
.Add("@CveSelectiva", SqlDbType.Int).Value = CveSelectiva
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -682,7 +683,8 @@ Public Class ClsProductosServicios
|
||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False, Optional Imagen As String = "", Optional PorcentajeMinimoUtilidad As Decimal = 0) As Boolean
|
||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False, Optional Imagen As String = "", Optional PorcentajeMinimoUtilidad As Decimal = 0,
|
||||
Optional CveSelectiva As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -792,6 +794,7 @@ Public Class ClsProductosServicios
|
||||
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
||||
.Add("@Imagen", SqlDbType.VarChar).Value = Imagen
|
||||
.Add("@PorcentajeMinimoUtilidad", SqlDbType.Decimal).Value = PorcentajeMinimoUtilidad
|
||||
.Add("@CveSelectiva", SqlDbType.Int).Value = CveSelectiva
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1663,6 +1666,119 @@ Public Class ClsProductosServicios
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddSelectiva(Selectiva As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_SelectivasAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Selectiva", SqlDbType.VarChar).Value = Selectiva
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al Guardar la Selectiva.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar la Selectiva.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateSelectiva(CveSelectiva As Integer, Selectiva As String, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_SelectivasUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSelectiva", SqlDbType.Int).Value = CveSelectiva
|
||||
.Add("@Selectiva", SqlDbType.VarChar).Value = Selectiva
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al Guardar la Selectiva.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar la Selectiva.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetSelectiva(CveSelectiva As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_SelectivasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSelectiva", SqlDbType.Int).Value = CveSelectiva
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al obtener las selectivas.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las selectivas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveSelectiva(CveSelectiva As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_SelectivasRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSelectiva", SqlDbType.Int).Value = CveSelectiva
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al eliminar las selectivas.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar las selectivas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetPSSelectiva(CveSelectiva As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_SelectivasPSGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSelectiva", SqlDbType.Int).Value = CveSelectiva
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al obtener las selectivas.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las selectivas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
#Region "IMPUESTOS LOCALES"
|
||||
Public Function GetPSImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate"><asp:Label runat="server" ID="LblFiltroSubProyecto">SubProyecto:</asp:Label></div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:Label runat="server" ID="LblFiltroSubProyecto">SubProyecto:</asp:Label></div>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlFiltroSubProyecto" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="70%"></asp:DropDownList>
|
||||
</div>
|
||||
@@ -89,9 +90,9 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
||||
<asp:TemplateField HeaderText="">
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplDif" runat="server" NavigateUrl='<%# Eval("CveInventarioFisico", "~/Inventarios/RepAnomalias.aspx?CveInventarioFisico={0}") %>' Text="Dif."></asp:HyperLink>
|
||||
<asp:HyperLink ID="HplDif" runat="server" NavigateUrl='<%# Eval("CveInventarioFisico", "~/Inventarios/RepAnomalias.aspx?CveInventarioFisico={0}") %>' Text="Dif."></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
@@ -218,7 +219,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvClasificacion" runat="server" GridLines="None" DataKeyNames="CveClasificacion,Clasificacion" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" ToolTip="Listado de Clasificaciones" >
|
||||
<asp:GridView ID="GvClasificacion" runat="server" GridLines="None" DataKeyNames="CveClasificacion,Clasificacion" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" ToolTip="Listado de Clasificaciones">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
@@ -254,8 +255,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label for="<%= DdlProductosServicios.ClientID.ToString()%>">Productos:</label>
|
||||
<ADS:Dropdownlost ID="DdlProductosServicios" CssStyle="width: 95%;" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" >
|
||||
</ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProductosServicios" CssStyle="width: 95%;" runat="server" DataTextField="PSCodigo" DataValueField="CvePS"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top: 20px;">
|
||||
@@ -263,11 +263,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivSelectiva" runat="server" visible="false">
|
||||
<div class="col-md-10">
|
||||
<label for="<%= DdlSelectiva.ClientID.ToString()%>">Selectiva:</label><br />
|
||||
<asp:DropDownList ID="DdlSelectiva" CssClass="form-control select2me" Width="95%" runat="server" DataTextField="Selectiva" DataValueField="CveSelectiva"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top: 20px;">
|
||||
<asp:Button for="DdlSelectiva" ID="BtnSelectiva" runat="server" CssClass="btn btn-primary btn-sm" Text="+" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvPS" runat="server" GridLines="None" DataKeyNames="CvePS" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" EmptyDataText="">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Productos" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="310px" HeaderStyle-Width="310px"/>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Productos" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="310px" HeaderStyle-Width="310px" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos" ItemStyle-Width="70px" HeaderStyle-Width="70px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="DeleteProductosServicios_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
@@ -314,7 +325,7 @@
|
||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarClasificacionExcluida" OnClick="LnkEliminarClasificacionExcluida_Click" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="LnkEliminarClasificacionExcluida" OnClick="LnkEliminarClasificacionExcluida_Click" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -345,11 +356,10 @@
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label for="<%= DdlPSExcluye.ClientID.ToString()%>">Productos:</label>
|
||||
<ADS:Dropdownlost ID="DdlPSExcluye" CssStyle="width: 95%;" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" >
|
||||
</ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlPSExcluye" CssStyle="width: 95%;" runat="server" DataTextField="PSCodigo" DataValueField="CvePS"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top:20px;">
|
||||
<div class="col-md-2" style="margin-top: 20px;">
|
||||
<asp:Button for="DdlPSExcluye" ID="BtnAddPSExcluye" runat="server" CssClass="btn btn-primary btn-sm" Text="+" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -390,23 +400,22 @@
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>
|
||||
<ADS:Dropdownlost ID="DdlProveedor" CssStyle="width: 95%;" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" >
|
||||
</ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProveedor" CssStyle="width: 95%;" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top:20px;">
|
||||
<div class="col-md-2" style="margin-top: 20px;">
|
||||
<asp:Button for="DdlProveedor" ID="BtnAgregarProveedor" runat="server" CssClass="btn btn-primary btn-sm" Text="+" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvProveedor" runat="server" GridLines="None" DataKeyNames="CveProveedor,RazonSocial" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" ToolTip="Listado de Proveedores" >
|
||||
<asp:GridView ID="GvProveedor" runat="server" GridLines="None" DataKeyNames="CveProveedor,RazonSocial" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" ToolTip="Listado de Proveedores">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="DeleteProveedor_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"/>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="DeleteProveedor_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -420,7 +429,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="border-top: 1px solid #e5e5e5;">
|
||||
<div class="col-md-12" style="margin-top:15px;">
|
||||
<div class="col-md-12" style="margin-top: 15px;">
|
||||
<div class="col-md-6" runat="server" id="divUsuarios" visible="false">
|
||||
<div class="portlet light xspadding bordered" id="idUsuarios">
|
||||
<div class="portlet-title">
|
||||
@@ -438,12 +447,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label for="<%= DdlUsuarios.ClientID.ToString()%>">Usuarios:</label>
|
||||
<asp:DropDownList ID="DdlUsuarios" CssClass="form-control select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
||||
<asp:DropDownList ID="DdlUsuarios" CssClass="form-control select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top:20px;">
|
||||
<div class="col-md-2" style="margin-top: 20px;">
|
||||
<asp:Button for="DdlUsuarios" ID="btnAddUsuarios" runat="server" CssClass="btn btn-primary btn-sm" Text="+" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -460,12 +469,12 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Bloqueado">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkBloqueado" runat="server" />
|
||||
<asp:CheckBox ID="chkBloqueado" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cerrado">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgCerrar" runat="server" AlternateText="Cerrar" OnClick="imgCerrar_Click" CausesValidation="False" CssClass="btn black" Text="<i class='fa fa-lock'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" style="padding-left: 7px;padding-bottom: 1px;padding-top: 1px;padding-right: 7px; color:black;"/>
|
||||
<asp:LinkButton ID="imgCerrar" runat="server" AlternateText="Cerrar" OnClick="imgCerrar_Click" CausesValidation="False" CssClass="btn black" Text="<i class='fa fa-lock'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" Style="padding-left: 7px; padding-bottom: 1px; padding-top: 1px; padding-right: 7px; color: black;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -483,11 +492,11 @@
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:CheckBox runat="server" ID="chkUsarApp" AutoPostBack="true" Text="Usar en App:"/>
|
||||
<asp:CheckBox runat="server" ID="chkUsarApp" AutoPostBack="true" Text="Usar en App:" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -83,6 +83,11 @@ Partial Class Inventarios_InventarioFisico
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
DivSelectiva.Visible = True
|
||||
CargaSelectivas()
|
||||
End If
|
||||
|
||||
CargaDdlSubProyectos()
|
||||
CargaDdlClasificacion()
|
||||
CargDdlProveedor()
|
||||
@@ -100,6 +105,17 @@ Partial Class Inventarios_InventarioFisico
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaSelectivas()
|
||||
Using ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetSelectiva(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlSelectiva.DataSource = ObjPS.DtResultados
|
||||
End If
|
||||
End Using
|
||||
DdlSelectiva.DataBind()
|
||||
DdlSelectiva.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos(CveEmpresa As Integer)
|
||||
Dim Inventario As New ClsInventarios
|
||||
Dim dt As New DataTable
|
||||
@@ -261,6 +277,35 @@ Partial Class Inventarios_InventarioFisico
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtnSelectiva_Click(sender As Object, e As EventArgs) Handles BtnSelectiva.Click
|
||||
If DdlSelectiva.SelectedValue = "-1" Then
|
||||
Alert("Tienes seleccionada la opcion 'Seleccione'.", TipoMensaje.MsgInformacion)
|
||||
GvPS.DataSource = Nothing
|
||||
GvPS.DataBind()
|
||||
tDTPS.Rows.Clear()
|
||||
Else
|
||||
If tDTPS IsNot Nothing Then
|
||||
tDTPS.Rows.Clear()
|
||||
End If
|
||||
|
||||
Using ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSSelectiva(DdlSelectiva.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
For Each RowPS As DataRow In ObjPS.DtResultados.Rows
|
||||
Dim Row As DataRow = tDTPS.NewRow
|
||||
Row("CvePS") = RowPS("CvePS")
|
||||
Row("CodigoPS") = RowPS("CodigoPS")
|
||||
|
||||
tDTPS.Rows.Add(Row)
|
||||
Next
|
||||
End If
|
||||
End Using
|
||||
|
||||
GvPS.DataSource = tDTPS
|
||||
GvPS.DataBind()
|
||||
UpProductosServicios.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAddPSExcluye_Click(sender As Object, e As EventArgs) Handles BtnAddPSExcluye.Click
|
||||
If DdlPSExcluye.SelectedValue = "-1" Then
|
||||
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
|
||||
|
||||
85
Ventas/CatSelectivas.aspx
Normal file
85
Ventas/CatSelectivas.aspx
Normal file
@@ -0,0 +1,85 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSelectivas.aspx.vb" Inherits="Ventas_CatSelectivas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de selectivas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregar" data-toggle="tooltip" data-placement="left" title="Agregar un motivo" Text="<i class='fa fa-plus'></i>Agregar selectiva" OnClick="LnkAgregar_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light ">
|
||||
<div class="portlet-body">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" Width="100%" DataKeyNames="CveSelectiva,Selectiva" CssClass=" table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" OnRowDeleting="GvDatos_RowDeleting">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Selectiva" HeaderText="Selectiva" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50%" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:d}" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" OnClick="imgE_Click" AlternateText="Editar" CommandArgument='<%# Eval("CveSelectiva")%>' CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Desea eliminar este registro?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivDatos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal runat="server">Selectiva</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtSelectiva" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMotivo" runat="server" ControlToValidate="TxtSelectiva" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Selectiva''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="TxtSelectiva">Selectiva:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpGuardar" OnClick="BtnGuardar_Click" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
91
Ventas/CatSelectivas.aspx.vb
Normal file
91
Ventas/CatSelectivas.aspx.vb
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_CatSelectivas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveSelectiva As Integer
|
||||
Get
|
||||
Return (IfNull(ViewState("CveSelectiva"), "-1", ViewState("CveSelectiva"))).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSelectiva") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
LimpiaDatos()
|
||||
|
||||
Dim ObjGral As New ClsProductosServicios()
|
||||
If ObjGral.GetSelectiva(-1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjGral.DtResultados.Copy()
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As GridViewDeleteEventArgs)
|
||||
Dim GvRow As GridViewRow = GvDatos.Rows(e.RowIndex)
|
||||
|
||||
CveSelectiva = GvRow.DataKey("CveSelectiva").ToEntero()
|
||||
|
||||
Using ObjVentas As New ClsProductosServicios
|
||||
If ObjVentas.RemoveSelectiva(CveSelectiva, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Se eliminó correctamente")
|
||||
End If
|
||||
End Using
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub imgE_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
CveSelectiva = GvRow.DataKey("CveSelectiva").ToEntero()
|
||||
TxtSelectiva.Text = GvRow.DataKey("Selectiva")
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
RegistraScript("$('#DivDatos').modal('show');")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaDatos()
|
||||
CveSelectiva = -1
|
||||
TxtSelectiva.Text = ""
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjVentas As New ClsProductosServicios
|
||||
If CveSelectiva = -1 Then
|
||||
If ObjVentas.AddSelectiva(TxtSelectiva.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La selectiva se agrego correctamente")
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.UpdateSelectiva(CveSelectiva, TxtSelectiva.Text, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La selectiva se actualizó correctamente")
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
RegistraScript("$('#DivDatos').modal('hide');")
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
|
||||
LimpiaDatos()
|
||||
|
||||
RegistraScript("$('#DivDatos').modal('show');")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -254,6 +254,12 @@
|
||||
<label for="<%= DdlMarca.ClientID.ToString()%>">Marca:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div runat="server" id="DivSelectiva" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSelectiva" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="Selectiva" DataValueField="CveSelectiva" Width="350px" Enabled="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlSelectiva.ClientID.ToString()%>">Selectiva:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Aplica para Venta:</label>
|
||||
<asp:CheckBox ID="ChkAplicaParaVenta" CssClass="make-switchsd" data-size="small" runat="server" Checked="True" />
|
||||
@@ -276,7 +282,6 @@
|
||||
<label class="truncate" style="padding-left: 1px;" for="<%= TxtPorMinimoUtilidad.ClientID.ToString()%>">% Minimo de utilidad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class=" col-md-12">
|
||||
<div runat="server" id="DivCompuesto" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
@@ -350,6 +355,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -450,6 +450,9 @@ Partial Class ProductosyServicios
|
||||
DivPSAdicionales.Visible = True
|
||||
DivTipoAdicional.Visible = True
|
||||
DivPorMinimoUtilidad.Visible = True
|
||||
DivSelectiva.Visible = True
|
||||
|
||||
CargaSelectivas()
|
||||
End If
|
||||
|
||||
CvePSAdicional = -1
|
||||
@@ -473,7 +476,15 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSelectivas()
|
||||
Using ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetSelectiva(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlSelectiva.DataSource = ObjPS.DtResultados
|
||||
End If
|
||||
End Using
|
||||
DdlSelectiva.DataBind()
|
||||
DdlSelectiva.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaCombosPSComplementos()
|
||||
|
||||
DdlClaveSectorCOFEPRIS.DataSource = GlobalDT_SAT_CP_SectorCOFEPRIS
|
||||
@@ -1152,6 +1163,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
TxtPorMinimoUtilidad.Text = ObjProductosServicios.DtResultados.Rows(0)("PorcentajeMinimoUtilidad").ToString
|
||||
DdlSelectiva.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveSelectiva").ToString)
|
||||
End If
|
||||
Else
|
||||
Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1550,7 +1562,7 @@ Partial Class ProductosyServicios
|
||||
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
|
||||
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim.Replace(".", ""), EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal,
|
||||
CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal, CodigoAlterno:=TxtCodigoAlterno.Text.Trim, PSAlterno:=TxtPSAlterno.Text.Trim, ProductoExhibicion:=ChkPSExhibicion.Checked,
|
||||
PorcentajeMinimoUtilidad:=TxtPorMinimoUtilidad.Text.ToDecimal()) > 0 Then
|
||||
PorcentajeMinimoUtilidad:=TxtPorMinimoUtilidad.Text.ToDecimal(), CveSelectiva:=DdlSelectiva.SelectedValue.ToEntero()) > 0 Then
|
||||
ViewState("CvePS") = ObjProductosServicios.CvePS
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
@@ -1624,7 +1636,7 @@ Partial Class ProductosyServicios
|
||||
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
|
||||
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim.Replace(".", ""), ActivoEcommerce:=ChkActivoEcommerce.Checked,
|
||||
EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal,
|
||||
CodigoAlterno:=TxtCodigoAlterno.Text.Trim, PSAlterno:=TxtPSAlterno.Text.Trim, ProductoExhibicion:=ChkPSExhibicion.Checked, PorcentajeMinimoUtilidad:=TxtPorMinimoUtilidad.Text.ToDecimal()) Then
|
||||
CodigoAlterno:=TxtCodigoAlterno.Text.Trim, PSAlterno:=TxtPSAlterno.Text.Trim, ProductoExhibicion:=ChkPSExhibicion.Checked, PorcentajeMinimoUtilidad:=TxtPorMinimoUtilidad.Text.ToDecimal(), CveSelectiva:=DdlSelectiva.SelectedValue.ToEntero()) Then
|
||||
|
||||
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
||||
TieneError = True
|
||||
|
||||
Reference in New Issue
Block a user