Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3189,13 +3189,13 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
DTAnticipoCliente.AcceptChanges()
|
DTAnticipoCliente.AcceptChanges()
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
If Not AsignacionCuenta(ObjConta, 66, CveCuentaContable, -1, -1, CveCliente, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
ErrorProceso = True
|
||||||
|
Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
If Not AsignacionCuenta(ObjConta, 66, CveCuentaContable, -1, -1, CveCliente, -1, UsuarioActual.CveEmpresa, -1) Then
|
|
||||||
ErrorProceso = True
|
|
||||||
Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Anticipo/Cliente/SaldoInicial", 24, Importe, Importe, CveMoneda, Fecha, FolioStr, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Anticipo/Cliente/SaldoInicial", 24, Importe, Importe, CveMoneda, Fecha, FolioStr, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|||||||
@@ -66,7 +66,8 @@
|
|||||||
<asp:ListItem Text="GlobalDTVendedoresOld" Value="GlobalDTVendedoresOld"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTVendedoresOld" Value="GlobalDTVendedoresOld"></asp:ListItem>
|
||||||
<asp:ListItem Text="GlobalDTAC" Value="GlobalDTAC"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTAC" Value="GlobalDTAC"></asp:ListItem>
|
||||||
<asp:ListItem Text="GlobalDTSATUsosCFDI" Value="GlobalDTSATUsosCFDI"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTSATUsosCFDI" Value="GlobalDTSATUsosCFDI"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="GlobalDTVtaCondicionesEntrega" Value="GlobalDTVtaCondicionesEntrega"></asp:ListItem>
|
||||||
|
|
||||||
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ Partial Class Sistemas_CatSesiones
|
|||||||
cargaAC()
|
cargaAC()
|
||||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSATUsosCFDI" Then
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSATUsosCFDI" Then
|
||||||
CargaUsosCFDI()
|
CargaUsosCFDI()
|
||||||
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTVtaCondicionesEntrega" Then
|
||||||
|
CargaCondicionesEntrega()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -289,7 +290,9 @@ Partial Class Sistemas_CatSesiones
|
|||||||
|
|
||||||
'Fin Carga Usuarios
|
'Fin Carga Usuarios
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub CargaCondicionesEntrega()
|
||||||
|
GlobalDTVtaCondicionesEntrega(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaProductosServiciosSimplificado()
|
Private Sub CargaProductosServiciosSimplificado()
|
||||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
|||||||
@@ -766,7 +766,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
function impresionBase64(pdfBase64) {
|
||||||
|
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||||
|
}
|
||||||
|
|
||||||
function convertirTabla() {
|
function convertirTabla() {
|
||||||
let json = tableToJson($('#GvMultiple').get(0));
|
let json = tableToJson($('#GvMultiple').get(0));
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Imports System.Data
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports ZXing
|
||||||
|
|
||||||
Partial Class Ventas_ActualizarPrecios
|
Partial Class Ventas_ActualizarPrecios
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -325,6 +327,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso sbProductos.Length > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso sbProductos.Length > 0 Then
|
||||||
MensajeAlert.AppendFormat("Los precios de lista de los productos/servicios se actualizaron correctamente. <br/> <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Etiquetas</a></b>", Encripta(String.Format("OP=ETIQUETA&CVEPRECIOLISTA={0}&PRODUCTOS={1}", DdlPrecioLista.SelectedValue.ToEntero, sbProductos.ToString())))
|
MensajeAlert.AppendFormat("Los precios de lista de los productos/servicios se actualizaron correctamente. <br/> <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Etiquetas</a></b>", Encripta(String.Format("OP=ETIQUETA&CVEPRECIOLISTA={0}&PRODUCTOS={1}", DdlPrecioLista.SelectedValue.ToEntero, sbProductos.ToString())))
|
||||||
|
ImprimirEtiquetas(sbProductos.ToString())
|
||||||
Else
|
Else
|
||||||
MensajeAlert.Append("Los precios de lista de los productos/servicios se actualizaron correctamente.")
|
MensajeAlert.Append("Los precios de lista de los productos/servicios se actualizaron correctamente.")
|
||||||
End If
|
End If
|
||||||
@@ -998,4 +1001,134 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
UpEncabezado.Update()
|
UpEncabezado.Update()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImprimirEtiquetas(StrClavesPS As String)
|
||||||
|
Dim CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
|
||||||
|
Dim DtPrecios As DataTable = Nothing
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsProductosServicios
|
||||||
|
If ObjVentas.GetPSPrecios(CvePrecioListaPredeterminada, StrClavesPS) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
DtPrecios = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If DtPrecios IsNot Nothing Then
|
||||||
|
|
||||||
|
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||||
|
|
||||||
|
For Each Row As DataRow In DtPrecios.Rows
|
||||||
|
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
|
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||||
|
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||||
|
End If
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
Dim rds As New ReportDataSource
|
||||||
|
rds.Name = "Datos"
|
||||||
|
rds.Value = DtPrecios
|
||||||
|
lrds.Add(rds)
|
||||||
|
|
||||||
|
Dim bytesPDF = StreamBytesStimul("Facturas", DirectorioArchivo, lrds, params, NombreArchivo:="Precios", Formato:="PDF")
|
||||||
|
Dim pdf64 = Convert.ToBase64String(bytesPDF)
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
|
'ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||||
|
|
||||||
|
Dim barcodeWriter As New BarcodeWriter
|
||||||
|
Dim opciones As New ZXing.Common.EncodingOptions
|
||||||
|
Dim FormatoBar As New BarcodeFormat
|
||||||
|
'Dim Respuesta As Byte()
|
||||||
|
|
||||||
|
opciones.Height = Alto
|
||||||
|
opciones.Width = Largo
|
||||||
|
opciones.Margin = Margen
|
||||||
|
opciones.PureBarcode = PureBacode
|
||||||
|
barcodeWriter.Options = opciones
|
||||||
|
|
||||||
|
Select Case Formato
|
||||||
|
Case "All_1D"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.All_1D
|
||||||
|
Exit Select
|
||||||
|
Case "AZTEC"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.AZTEC
|
||||||
|
Exit Select
|
||||||
|
Case "CODABAR"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODABAR
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_128"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_128
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_39"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_39
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_93"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_93
|
||||||
|
Exit Select
|
||||||
|
Case "DATA_MATRIX"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.DATA_MATRIX
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_13"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_13
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_8"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_8
|
||||||
|
Exit Select
|
||||||
|
Case "IMB"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.IMB
|
||||||
|
Exit Select
|
||||||
|
Case "ITF"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.ITF
|
||||||
|
Exit Select
|
||||||
|
Case "MAXICODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MAXICODE
|
||||||
|
Exit Select
|
||||||
|
Case "MSI"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MSI
|
||||||
|
Exit Select
|
||||||
|
Case "PDF_417"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PDF_417
|
||||||
|
Exit Select
|
||||||
|
Case "PLESSEY"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PLESSEY
|
||||||
|
Exit Select
|
||||||
|
Case "QR_CODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.QR_CODE
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_14"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_14
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_EXPANDED"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_EXPANDED
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_A"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_A
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_E"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_E
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_EAN_EXTENSION"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_EAN_EXTENSION
|
||||||
|
Exit Select
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim imgCod As Drawing.Bitmap = barcodeWriter.Write(CodigoBarras)
|
||||||
|
Dim memoriStream As New System.IO.MemoryStream
|
||||||
|
imgCod.Save(memoriStream, Drawing.Imaging.ImageFormat.Bmp)
|
||||||
|
|
||||||
|
'Respuesta = Convert.ToBase64String(memoriStream.ToArray())
|
||||||
|
|
||||||
|
Return memoriStream.ToArray()
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -300,6 +300,10 @@
|
|||||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkImprimir" runat="server" AlternateText="Imprimir ticket"
|
||||||
|
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||||
|
OnClick="LnkImprimir_Click" Visible="false" />
|
||||||
|
|
||||||
<asp:LinkButton ID="BtnPagar" runat="server" CssClass="btn btn-xs btn-success" Text="Cobrar" CommandName="Cobrar" CommandArgument='<%# Eval("CveVenta") %>' />
|
<asp:LinkButton ID="BtnPagar" runat="server" CssClass="btn btn-xs btn-success" Text="Cobrar" CommandName="Cobrar" CommandArgument='<%# Eval("CveVenta") %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -220,8 +220,13 @@ Partial Class Ventas_PVCobranza
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DBCampo("CveUsuarioCobranza") <> "" Then
|
If e.Row.DBCampo("CveUsuarioCobranza") <> "" Then
|
||||||
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#3598dc")
|
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#3598dc")
|
||||||
'e.Row.CssClass = "blue-madison"
|
'e.Row.CssClass = "blue-madison"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveCondicionEntrega").ToEntero() = 9 Then
|
||||||
|
e.Row.FCLinkButton("LnkImprimir").Visible = True
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkImprimir"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -598,4 +603,14 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||||
|
|
||||||
|
If CveVenta > 0 Then
|
||||||
|
ImpresionDirectaPDF(CveVenta)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -94,14 +94,19 @@
|
|||||||
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 240px; margin-top: 5px">
|
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 240px; margin-top: 5px">
|
||||||
<asp:GridView ID="GvDatos" DataKeyNames="CvePs" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Productos o Servicios registrados" ToolTip="Listado de Productos o Servicios" CssClass="table table-striped table-hover Widthall" UseAccessibleHeader="true" GridLines="None">
|
<asp:GridView ID="GvDatos" DataKeyNames="CvePs" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Productos o Servicios registrados" ToolTip="Listado de Productos o Servicios" CssClass="table table-striped table-hover Widthall" UseAccessibleHeader="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||||
<asp:TemplateField HeaderText="Producto o Servicio" ItemStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Producto o Servicio" ItemStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lnkPs" runat="server"></asp:Literal>
|
<asp:Literal ID="lnkPs" runat="server"></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||||
|
<asp:TemplateField HeaderText="Etiqueta" ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="5%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkGenerarEtiqueta" runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir" OnClick="LnkGenerarEtiqueta_Click"></asp:LinkButton>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
@@ -112,8 +117,13 @@
|
|||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
function impresionBase64(pdfBase64) {
|
||||||
|
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||||
|
}
|
||||||
|
|
||||||
function Ir(v) {
|
function Ir(v) {
|
||||||
gotourl('/Ventas/ProductosServicios.aspx?CvePS=' + v);
|
gotourl('/Ventas/ProductosServicios.aspx?CvePS=' + v);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ Option Strict On
|
|||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports ZXing
|
||||||
|
|
||||||
Partial Class PopUpBuscarPs
|
Partial Class PopUpBuscarPs
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
@@ -24,8 +26,8 @@ Partial Class PopUpBuscarPs
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " INICIALIZA VALORES "
|
#Region " INICIALIZA VALORES "
|
||||||
Private Sub CargaClasificaciones()
|
Private Sub CargaClasificaciones()
|
||||||
Ddlclasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
Ddlclasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
@@ -44,9 +46,9 @@ Partial Class PopUpBuscarPs
|
|||||||
DdlCompuesto.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlCompuesto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
DdlCompuesto.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlCompuesto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CARGA DATOS "
|
#Region " CARGA DATOS "
|
||||||
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
@@ -79,24 +81,34 @@ Partial Class PopUpBuscarPs
|
|||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
GvDatos.UseAccessibleHeader = True
|
GvDatos.UseAccessibleHeader = True
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
GvDatos.Columns(4).Visible = True
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
|
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " GV DATOS "
|
#Region " GV DATOS "
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Try
|
Try
|
||||||
e.Row.FCLiteral("LnkPs").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CvePs") & """);'>", e.Row.DBCampo("Ps"))
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
e.Row.FCLiteral("LnkPs").Text = String.Format("<div style='width:100%;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CvePs") & """);'>", e.Row.DBCampo("Ps"))
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkGenerarEtiqueta"))
|
||||||
|
Else
|
||||||
|
e.Row.FCLiteral("LnkPs").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CvePs") & """);'>", e.Row.DBCampo("Ps"))
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Dim exexex As String = ex.Message
|
Dim exexex As String = ex.Message
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Function ValidarUnFiltroSeleccionado() As Boolean
|
Private Function ValidarUnFiltroSeleccionado() As Boolean
|
||||||
If TxtCodigo.Text.Trim <> String.Empty Then Return True
|
If TxtCodigo.Text.Trim <> String.Empty Then Return True
|
||||||
If TxtCodigoBarras.Text.Trim <> String.Empty Then Return True
|
If TxtCodigoBarras.Text.Trim <> String.Empty Then Return True
|
||||||
@@ -109,7 +121,136 @@ Partial Class PopUpBuscarPs
|
|||||||
If DdlCompuesto.SelectedValue.ToEntero > 0 Then Return True
|
If DdlCompuesto.SelectedValue.ToEntero > 0 Then Return True
|
||||||
|
|
||||||
Return False
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Protected Sub LnkGenerarEtiqueta_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Dim CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
|
||||||
|
Dim DtPrecios As DataTable = Nothing
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsProductosServicios
|
||||||
|
If ObjVentas.GetPSPrecios(CvePrecioListaPredeterminada, GvRow.DataKey("CvePs").ToString()) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
DtPrecios = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If DtPrecios IsNot Nothing Then
|
||||||
|
|
||||||
|
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||||
|
|
||||||
|
For Each Row As DataRow In DtPrecios.Rows
|
||||||
|
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
|
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||||
|
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||||
|
End If
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
Dim rds As New ReportDataSource
|
||||||
|
rds.Name = "Datos"
|
||||||
|
rds.Value = DtPrecios
|
||||||
|
lrds.Add(rds)
|
||||||
|
|
||||||
|
Dim bytesPDF = StreamBytesStimul("Facturas", DirectorioArchivo, lrds, params, NombreArchivo:="Precios", Formato:="PDF")
|
||||||
|
Dim pdf64 = Convert.ToBase64String(bytesPDF)
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||||
|
|
||||||
|
Dim barcodeWriter As New BarcodeWriter
|
||||||
|
Dim opciones As New ZXing.Common.EncodingOptions
|
||||||
|
Dim FormatoBar As New BarcodeFormat
|
||||||
|
'Dim Respuesta As Byte()
|
||||||
|
|
||||||
|
opciones.Height = Alto
|
||||||
|
opciones.Width = Largo
|
||||||
|
opciones.Margin = Margen
|
||||||
|
opciones.PureBarcode = PureBacode
|
||||||
|
barcodeWriter.Options = opciones
|
||||||
|
|
||||||
|
Select Case Formato
|
||||||
|
Case "All_1D"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.All_1D
|
||||||
|
Exit Select
|
||||||
|
Case "AZTEC"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.AZTEC
|
||||||
|
Exit Select
|
||||||
|
Case "CODABAR"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODABAR
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_128"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_128
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_39"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_39
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_93"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_93
|
||||||
|
Exit Select
|
||||||
|
Case "DATA_MATRIX"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.DATA_MATRIX
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_13"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_13
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_8"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_8
|
||||||
|
Exit Select
|
||||||
|
Case "IMB"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.IMB
|
||||||
|
Exit Select
|
||||||
|
Case "ITF"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.ITF
|
||||||
|
Exit Select
|
||||||
|
Case "MAXICODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MAXICODE
|
||||||
|
Exit Select
|
||||||
|
Case "MSI"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MSI
|
||||||
|
Exit Select
|
||||||
|
Case "PDF_417"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PDF_417
|
||||||
|
Exit Select
|
||||||
|
Case "PLESSEY"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PLESSEY
|
||||||
|
Exit Select
|
||||||
|
Case "QR_CODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.QR_CODE
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_14"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_14
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_EXPANDED"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_EXPANDED
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_A"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_A
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_E"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_E
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_EAN_EXTENSION"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_EAN_EXTENSION
|
||||||
|
Exit Select
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim imgCod As Drawing.Bitmap = barcodeWriter.Write(CodigoBarras)
|
||||||
|
Dim memoriStream As New System.IO.MemoryStream
|
||||||
|
imgCod.Save(memoriStream, Drawing.Imaging.ImageFormat.Bmp)
|
||||||
|
|
||||||
|
'Respuesta = Convert.ToBase64String(memoriStream.ToArray())
|
||||||
|
|
||||||
|
Return memoriStream.ToArray()
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2426,9 +2426,13 @@
|
|||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
<script src="/Metronic/assets/global/plugins/cubeportfolio/js/jquery.cubeportfolio.min.js" type="text/javascript"></script>
|
<script src="/Metronic/assets/global/plugins/cubeportfolio/js/jquery.cubeportfolio.min.js" type="text/javascript"></script>
|
||||||
|
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
|
||||||
|
function impresionBase64(pdfBase64) {
|
||||||
|
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||||
|
}
|
||||||
|
|
||||||
function CreaDescripcionPS() {
|
function CreaDescripcionPS() {
|
||||||
var Text = '';
|
var Text = '';
|
||||||
if ($('#C_Tab_TabPS_DdlTipoPSDes').val() != "-1") {
|
if ($('#C_Tab_TabPS_DdlTipoPSDes').val() != "-1") {
|
||||||
|
|||||||
@@ -3615,7 +3615,17 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
Dim rds As New ReportDataSource
|
||||||
|
rds.Name = "Datos"
|
||||||
|
rds.Value = DtPrecios
|
||||||
|
lrds.Add(rds)
|
||||||
|
|
||||||
|
Dim bytesPDF = StreamBytesStimul("Facturas", DirectorioArchivo, lrds, params, NombreArchivo:="Precios", Formato:="PDF")
|
||||||
|
Dim pdf64 = Convert.ToBase64String(bytesPDF)
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
|
'ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -2644,7 +2644,10 @@ Partial Class Ventas
|
|||||||
CargaMonedas()
|
CargaMonedas()
|
||||||
CargaVendedores()
|
CargaVendedores()
|
||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
'CargaFormaEntrega()
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
CargaFormaEntrega()
|
||||||
|
End If
|
||||||
|
|
||||||
CargaCuentasTerminal()
|
CargaCuentasTerminal()
|
||||||
'CargaDdlNCPS()
|
'CargaDdlNCPS()
|
||||||
'CargarCamiones()
|
'CargarCamiones()
|
||||||
@@ -4972,6 +4975,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
||||||
|
|
||||||
|
If DbRowVenta("CveCondicionEntrega").ToString().ToEntero() > 0 Then
|
||||||
|
DdlFormaEntrega.SelectedValueExist(DbRowVenta("CveCondicionEntrega").ToString())
|
||||||
|
DdlFormaEntrega.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString().ToEntero()
|
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString().ToEntero()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||||
@@ -10914,6 +10922,12 @@ Partial Class Ventas
|
|||||||
MensajeAlert.Clear()
|
MensajeAlert.Clear()
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
If ObjFactura.TipoDocto.Contiene("Ing", "Cot") AndAlso ObjFactura.CondicionesPago = 1 Then
|
||||||
|
ImpresionDirectaPDF()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'LIMPIA CONDICIONES DE PAGO - CONTADO
|
'LIMPIA CONDICIONES DE PAGO - CONTADO
|
||||||
RBLPago.SelectedValue = "1"
|
RBLPago.SelectedValue = "1"
|
||||||
LimpiaEscondeContado()
|
LimpiaEscondeContado()
|
||||||
@@ -10923,10 +10937,6 @@ Partial Class Ventas
|
|||||||
OnError("Ocurrió un error al limpiar los datos", ex)
|
OnError("Ocurrió un error al limpiar los datos", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
|
||||||
' ImpresionDirectaPDF()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjVentas.RollBack()
|
ObjVentas.RollBack()
|
||||||
|
|
||||||
@@ -37767,7 +37777,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RecalculaPrecios()
|
Private Sub RecalculaPrecios()
|
||||||
If TmpDT IsNot Nothing Then
|
If TmpDT IsNot Nothing AndAlso (CveVenta <= 0 OrElse EsCreaApartirDe OrElse ModalidadEdicion) Then
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||||
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
||||||
|
|||||||
Reference in New Issue
Block a user