- mejoras, propuesta de julián, SMS
This commit is contained in:
@@ -84,21 +84,16 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarPS" runat="server" PostBackUrl="~/Ventas/ProductosServicios.aspx">
|
||||
<i class="fa fa-plus"></i> Nuevo Producto/Servicio
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="HyperLink1" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivReportes" ID="ImgReportes" runat="server"><i style="font-weight:bold" class="fa fa-file-pdf-o"></i> Exportar productos sin SAT</asp:HyperLink>
|
||||
@@ -111,14 +106,20 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" runat="server"><i style="font-weight:bold" class="fa fa-file-excel-o"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcelPersonalizado" runat="server"><i style="font-weight:bold" class="fa fa-file-excel-o"></i> Excel Personalizado</asp:LinkButton>
|
||||
</li>
|
||||
<asp:UpdatePanel ID="UppExcelPers" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcelPersonalizado" runat="server" Visible="false"><i style="font-weight:bold" class="fa fa-file-excel-o"></i> Excel Personalizado</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LBExcelPersonalizado" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcelPSAdicional" runat="server" Visible="false" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Productos Adicionales</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<%--onclick="AbrirVentana('/Ventas/ProductosServicios.aspx', 700, 400, 'N', 'PS')"--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -214,7 +215,7 @@
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Número de Parte / Código:" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:HyperLinkField ItemStyle-CssClass="Izquierda Texto" HeaderText="Producto o Servicio" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" DataTextField="PS" DataNavigateUrlFields="CvePS" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="AplicaParaVentap" HeaderText="Aplica Para Venta" Visible="false" ItemStyle-Width="20px" />
|
||||
<asp:BoundField DataField="AplicaParaVenta" HeaderText="Aplica Para Venta" Visible="false" ItemStyle-Width="20px" />
|
||||
<%-- <asp:BoundField DataField="Estado" HeaderText="Estado" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
<asp:TemplateField HeaderText="Estado" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -3,6 +3,7 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class CatPS
|
||||
Inherits ClsPaginas
|
||||
@@ -54,7 +55,7 @@ Partial Class CatPS
|
||||
End Sub
|
||||
|
||||
Public Sub CargaClasificaciones()
|
||||
Ddlclasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" (UsoClasificacion = {0} OR {0} = -1)", DdlTipoClasificacion.SelectedValue.ToEntero))
|
||||
Ddlclasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" (UsoClasificacion = {0} OR {0} = -1)", DdlTipoClasificacion.SelectedValue))
|
||||
Ddlclasificacion.DataBind()
|
||||
Ddlclasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
@@ -125,9 +126,22 @@ Partial Class CatPS
|
||||
GvDatos.Columns(15).Visible = ChkCompuesto.Checked
|
||||
GvDatos.Columns(16).Visible = ChkRSCO.Checked
|
||||
|
||||
If ChkAplicaVenta.Checked OrElse
|
||||
ChkProductosServiciosSAT.Checked OrElse
|
||||
ChkAplicaVenta.Checked OrElse
|
||||
ChkClasificacion2.Checked OrElse
|
||||
ChkMarca.Checked OrElse
|
||||
ChkVentaMinima.Checked OrElse
|
||||
ChkCodigoBarras.Checked OrElse
|
||||
ChkCompuesto.Checked OrElse
|
||||
ChkRSCO.Checked Then
|
||||
LBExcelPersonalizado.Visible = True
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
OrdenaDatos()
|
||||
UPDatos.Update()
|
||||
UppExcelPers.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -253,7 +267,7 @@ Partial Class CatPS
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
Dim lista As New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
lista.Add(New CrystalParametro("AplicaVenta", AplicaVenta.ToString))
|
||||
@@ -275,8 +289,6 @@ Partial Class CatPS
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LBExcelPersonalizado_Click(Sender As Object, e As EventArgs) Handles LBExcelPersonalizado.Click
|
||||
@@ -334,7 +346,7 @@ Partial Class CatPS
|
||||
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim workbook As New GemBox.Spreadsheet.ExcelFile()
|
||||
Dim worksheet = workbook.Worksheets.Add("Productos")
|
||||
Dim worksheet As ExcelWorksheet = workbook.Worksheets.Add("Productos")
|
||||
Dim DtExcel As New DataTable
|
||||
DtExcel.Columns.Add("CodigoProducto", GetType(String))
|
||||
DtExcel.Columns.Add("CodigoProductoAdicional", GetType(String))
|
||||
@@ -347,8 +359,8 @@ Partial Class CatPS
|
||||
.StartColumn = 0
|
||||
})
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
workbook.Save(Response, $"CargaProductos.xlsx", GemBox.Spreadsheet.SaveOptions.XlsxDefault)
|
||||
@@ -370,7 +382,7 @@ Partial Class CatPS
|
||||
|
||||
Private Sub CargaArchivoPSAdicional(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Dim ErrorExcel As Boolean = False
|
||||
|
||||
dt = ReadExcelFile(Ruta + FileName, True, 0).FiltraParametros("CodigoProducto <> ''")
|
||||
|
||||
@@ -1038,7 +1038,7 @@ Partial Class ProductosyServicios
|
||||
ChkSeccion.Checked = ObjProductosServicios.AplicaSeccion
|
||||
|
||||
TxtTiempoCaducidad.Text = ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad").ToString()
|
||||
DivTiempoCaducidad.Visible = ChkCaducidad.Checked
|
||||
HabilitaAplicaCaducidadTiempo()
|
||||
|
||||
If ObjProductosServicios.AplicaSeccion Then
|
||||
CargaGvSeccionAlmacen()
|
||||
@@ -1436,7 +1436,7 @@ Partial Class ProductosyServicios
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then CveMarca = DdlMarcaPSDes.SelectedValue.ToEntero Else CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||
|
||||
Dim TiempoCaducidad As Integer = -1
|
||||
If ChkCaducidad.Checked Then
|
||||
If ChkCaducidad.Checked AndAlso DivTiempoCaducidad.Visible Then
|
||||
If TxtTiempoCaducidad.Text.Length > 0 AndAlso IsNumeric(TxtTiempoCaducidad.Text) Then
|
||||
TiempoCaducidad = TxtTiempoCaducidad.Text.ToEntero()
|
||||
Else
|
||||
@@ -1444,13 +1444,9 @@ Partial Class ProductosyServicios
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If TxtFechaVigenciaRSCO.Text = "" Then
|
||||
TxtFechaVigenciaRSCO.Text = "01/01/1900"
|
||||
End If
|
||||
|
||||
|
||||
If CvePS = -1 Then
|
||||
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
|
||||
@@ -3054,9 +3050,13 @@ Partial Class ProductosyServicios
|
||||
End Function
|
||||
|
||||
Protected Sub ChkCaducidad_CheckedChanged(sender As Object, e As EventArgs)
|
||||
Dim Activar As Boolean = ChkCaducidad.Checked
|
||||
DivTiempoCaducidad.Visible = Activar
|
||||
RfvTxtTiempoCaducidad.Enabled = Activar
|
||||
HabilitaAplicaCaducidadTiempo()
|
||||
End Sub
|
||||
Private Sub HabilitaAplicaCaducidadTiempo()
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
|
||||
DivTiempoCaducidad.Visible = ChkCaducidad.Checked
|
||||
RfvTxtTiempoCaducidad.Enabled = ChkCaducidad.Checked
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GuardarProductoEnFranquicia(ObjPS As ClsProductosServicios, PSS As String, CveMetodoInv As Integer, EsPaquete As Integer, Agregar As Boolean) As Boolean
|
||||
|
||||
Reference in New Issue
Block a user