From 6f721834ecbb47e526bd43391076140f6bae731f Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 14 Dec 2022 12:01:22 -0700 Subject: [PATCH 01/11] -- mejora en personalizar columnas de cuentas bancarias de personal --- RH/CatPersonal.aspx | 29 +++++++++++++++++++++++++++++ RH/CatPersonal.aspx.vb | 4 ++++ 2 files changed, 33 insertions(+) diff --git a/RH/CatPersonal.aspx b/RH/CatPersonal.aspx index eb25ddb01..dda232f49 100644 --- a/RH/CatPersonal.aspx +++ b/RH/CatPersonal.aspx @@ -651,6 +651,24 @@ + + Banco + + + + + + Cuenta Bancaria + + + + + + CLABE + + + + @@ -832,6 +850,17 @@
+ +
+
+ +
+
+ +
+
+ +
diff --git a/RH/CatPersonal.aspx.vb b/RH/CatPersonal.aspx.vb index c2264872e..f15c45134 100644 --- a/RH/CatPersonal.aspx.vb +++ b/RH/CatPersonal.aspx.vb @@ -2,6 +2,7 @@ Option Strict On Imports System.Data +Imports CFDI_GenCodigo Imports Extensiones Imports Microsoft.Reporting.WebForms @@ -605,6 +606,9 @@ Partial Class RH_CatPersonal Else GvDatos.Columns(45).Visible = False End If + GvDatos.Columns(46).Visible = ChkBanco.Checked + GvDatos.Columns(47).Visible = ChkCuentaBancaria.Checked + GvDatos.Columns(48).Visible = ChkClaBE.Checked If (GvDatos.Rows.Count > 0) Then From 83b34036c8e9338341b50d4ff61f9ccb4293293b Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 14 Dec 2022 12:23:00 -0700 Subject: [PATCH 02/11] -- texto --- CRM/CatTipoProceso.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/CatTipoProceso.aspx b/CRM/CatTipoProceso.aspx index 4c5b7f802..1523b8fad 100644 --- a/CRM/CatTipoProceso.aspx +++ b/CRM/CatTipoProceso.aspx @@ -74,7 +74,7 @@ - + Date: Wed, 14 Dec 2022 10:21:50 -0700 Subject: [PATCH 03/11] Comentar console.log Rep Indicadores --- General/RepIndicadorResumen.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 4d18b8fc9..31e334953 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -612,7 +612,7 @@ //newData.sort(function (a, b) { // return a[0] > b[0] ? 1 : -1; //}); - console.log(JSON.stringify(newData)) + //console.log(JSON.stringify(newData)) return newData; } From 6b3ea4669a34ee5848afc917a6e1c44db21fe87e Mon Sep 17 00:00:00 2001 From: MLopez Date: Wed, 14 Dec 2022 16:18:23 -0700 Subject: [PATCH 04/11] =?UTF-8?q?Entrega=20Almacen:=20Bit=C3=A1cora=20de?= =?UTF-8?q?=20carga.=20Que=20se=20guarde=20en=20un=20xml,=20las=20series?= =?UTF-8?q?=20que=20se=20vayan=20registrando,=20y=20se=20puedan=20recupera?= =?UTF-8?q?r.=20En=20acciones,=20cargar=20bit=C3=A1cora?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntregaAlmacen.aspx | 8 +++ Inventarios/EntregaAlmacen.aspx.vb | 79 ++++++++++++++++++++++++++++-- Inventarios/RecepcionAlmacen.aspx | 14 +++--- 3 files changed, 92 insertions(+), 9 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index d23155cc2..4a3ee93ec 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -48,6 +48,14 @@ Entrega Almacén (Surtir Mercancia) + + +
  • + Cargar Bitácora +
  • +
    +
    +
  • diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index ef402e041..bbe6bc894 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -268,7 +268,30 @@ Partial Class Inventarios_EntregaAlmacen ViewState("FormaPaqueteria") = value End Set End Property - + 'Private Property IndexSeccionAlmacen As Integer + ' Get + ' Return CType(ViewState("IndexSeccionAlmacen"), Integer) + ' End Get + ' Set(value As Integer) + ' ViewState("IndexSeccionAlmacen") = value + ' End Set + 'End Property + Private Property ArchivoBitacora As String + Get + Return CType(ViewState("ArchivoBitacora"), String) + End Get + Set(value As String) + ViewState("ArchivoBitacora") = value + End Set + End Property + Private Property ArchivoBitacoraDetalle As String + Get + Return CType(ViewState("ArchivoBitacoraDetalle"), String) + End Get + Set(value As String) + ViewState("ArchivoBitacoraDetalle") = value + End Set + End Property #End Region @@ -318,7 +341,10 @@ Partial Class Inventarios_EntregaAlmacen DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) DdlAlmacen.SelectedValue = "-1" DdlAlmacen.DataBind() - DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + If UsuarioActual.CveAlmacen > 0 Then + DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + RecargaporAlmacenes() + End If DdlAlmacenTransitorio.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) DdlAlmacenTransitorio.DataBind() @@ -551,6 +577,15 @@ Partial Class Inventarios_EntregaAlmacen If ObjInventario.EntregaAlmacenGet(CveVenta, CveAlmacen) Then If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta) + ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta) + If ArchivoBitacora <> "" Then + Dim Archivo = New System.IO.FileInfo(ArchivoBitacora) + If Archivo.Exists() Then + HplCargaBitacora.Visible = True + uppCargaBitacora.Update() + End If + End If DtDatos = ObjInventario.DtResultados If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer)) @@ -1280,6 +1315,7 @@ Partial Class Inventarios_EntregaAlmacen Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidad.Text, MinFecha.ToShortDateString) DtDatosDetalle.Rows.Add(Row) + ActualizaBitacora() RegistraScript("playsonidito('beep-07.wav')", "Sonidito") If Tipo = 1 Then @@ -1307,11 +1343,44 @@ Partial Class Inventarios_EntregaAlmacen End Try DtDatosDetalle.AcceptChanges() + ActualizaBitacora() CargaSerie() End Sub #End Region +#Region "Bitacora" + Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False) + If Not Eliminar Then + DtDatos.TableName = "DtDatos" + DtDatosDetalle.TableName = "DtDatosDetalle" + DtDatos.WriteXml(ArchivoBitacora, XmlWriteMode.WriteSchema) + DtDatosDetalle.WriteXml(ArchivoBitacoraDetalle, XmlWriteMode.WriteSchema) + Else + File.Delete(ArchivoBitacora) + End If + End Sub + + Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs) + + If IO.File.Exists(ArchivoBitacora) Then + 'DtInv.Clear() + 'DtDatosDetalle.Clear() + DtDatos.ReadXml(ArchivoBitacora) + If IO.File.Exists(ArchivoBitacoraDetalle) Then + Dim dtt As New DataTable + dtt.ReadXml(ArchivoBitacoraDetalle) + DtDatosDetalle = dtt + Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion) + End If + CargaGvDatos() + + Else + Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion) + End If + + End Sub +#End Region #Region " AGREGA CON LOTE BATCH " Private Sub CreaDtDetalleLote() @@ -3894,7 +3963,11 @@ Partial Class Inventarios_EntregaAlmacen RegistraScript("$('#ModalVerSugerencias').modal('hide')") End Sub - Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged + Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) 'Handles DdlAlmacen.SelectedIndexChanged + RecargaporAlmacenes() + End Sub + + Private Sub RecargaporAlmacenes() If DdlAlmacen.SelectedValue <> "-1" Then CargaGvDatos(DdlAlmacen.SelectedValue.ToEntero) End If diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index bdd49fea6..35fdb222e 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -17,13 +17,15 @@
  • Cargar Excel
  • - - -
  • - Cargar Bitácora + + + +
  • + Cargar Bitácora
  • -
    - + + +
    Recepción Almacén From 203d5e5071bf3dfeb2c8e94a21d97d4b7e3aae01 Mon Sep 17 00:00:00 2001 From: MLopez Date: Wed, 14 Dec 2022 18:56:48 -0700 Subject: [PATCH 05/11] =?UTF-8?q?E172=20Rep=20Indicadores=20agregar=20expo?= =?UTF-8?q?rta=20PDF=20de=20nuevo=20Parece=20que=20un=20commit=20borr?= =?UTF-8?q?=C3=B3=20estas=20l=C3=ADneas=20accidentalmente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- General/RepIndicadorResumen.aspx.vb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 5f26ee141..6d0f8569b 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -37,6 +37,13 @@ Partial Class General_RepIndicadorResumen Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click CargaDatos() End Sub + Protected Sub LnkExportarPDF_Click(sender As Object, e As EventArgs) Handles LnkExportarPDF.Click + UPPMov.GenerarReportePDF("Reporte Resumen de Indicadores", TxtFechaI.Text, TxtFechaF.Text) + End Sub + 'No quitar porque no funciona el exporta PDF + Public Overrides Sub VerifyRenderingInServerForm(control As Control) + ' Verifies that the control is rendered + End Sub Private Sub CargaDatos() Dim ObjVentas As New ClsVentas From 699e4b39945132d65ad432944b5691665a0390fd Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Dec 2022 09:30:37 -0700 Subject: [PATCH 06/11] mejora en namespace --- Compras/PopUpVerFactura.aspx.vb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index aa810b9d4..832f9d9e0 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -5,7 +5,6 @@ Imports System.Data Imports System.IO Imports System.Xml Imports Extensiones -Imports iText.Kernel.Pdf Imports Microsoft.Reporting.WebForms Imports Stimulsoft.Report Imports Stimulsoft.Report.Web @@ -183,9 +182,9 @@ Partial Class PopUpVerFactura End If End If - If Request("REPORTE") IsNot Nothing Then - CType(Session("DTPDF"), HtmlTable).GenerarReportePDF("Reporte") - End If + 'If Request("REPORTE") IsNot Nothing Then + ' CType(Session("DTPDF"), HtmlTable).GenerarReportePDF("Reporte") + 'End If 'OPCIONES @@ -6572,7 +6571,7 @@ Partial Class PopUpVerFactura Dim PS As String = "" Dim All As Byte() Using ms As New MemoryStream - Using pdfdoc As New PdfDocument(New PdfReader(ms)) + Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(ms)) pdfdoc.InitializeOutlines() If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then If ObjInventarios.DtResultados IsNot Nothing Then @@ -6584,7 +6583,7 @@ Partial Class PopUpVerFactura If Modalidad = "Individual" Then Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Else @@ -6593,7 +6592,7 @@ Partial Class PopUpVerFactura For i As Integer = 0 To Cant Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Next @@ -6622,7 +6621,7 @@ Partial Class PopUpVerFactura Dim All As Byte() Using ms As New MemoryStream - Using pdfdoc As New PdfDocument(New PdfReader(ms)) + Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(ms)) pdfdoc.InitializeOutlines() If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveAlmacen.ToString) Then If ObjInventarios.DtResultados IsNot Nothing Then @@ -6632,7 +6631,7 @@ Partial Class PopUpVerFactura If Modalidad = "Individual" Then Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Else @@ -6641,7 +6640,7 @@ Partial Class PopUpVerFactura For i As Integer = 0 To Cant Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Next From cb126e1bf469647b2ae843dfefa5d0743760c85d Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Dec 2022 09:30:56 -0700 Subject: [PATCH 07/11] - --- Compras/PopUpVerFactura.aspx.vb | 80 ++++++++++++++++----------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 832f9d9e0..16072afc4 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -182,56 +182,56 @@ Partial Class PopUpVerFactura End If End If - 'If Request("REPORTE") IsNot Nothing Then - ' CType(Session("DTPDF"), HtmlTable).GenerarReportePDF("Reporte") - 'End If + If Request("REPORTE") IsNot Nothing Then + CType(Session("DTPDF"), HtmlTable).GenerarReportePDF("Reporte") + End If 'OPCIONES If Request("P") IsNot Nothing AndAlso Decripta((Request("P").ToString)) <> "" Then - Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString))) - If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then - SeleccionaReporte(UrlParametros) + Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString))) + If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then + SeleccionaReporte(UrlParametros) + End If End If - End If - If Request("onlyPrint") IsNot Nothing Then - If Request("onlyPrint").ToString() = "GeneraPDFNomina" AndAlso Not IsNothing(Request("CvePersonal")) AndAlso + If Request("onlyPrint") IsNot Nothing Then + If Request("onlyPrint").ToString() = "GeneraPDFNomina" AndAlso Not IsNothing(Request("CvePersonal")) AndAlso Not IsNothing(Request("CvePeriodo")) AndAlso Not IsNothing(Request("indemnizacion")) Then - Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa - Dim RutaEmpresa As String = UsuarioActual.Empresa.Ruta - Dim indemnizacion As Boolean = Request("indemnizacion").ToString.ToEntero() = 1 - GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa, indemnizacion) - End If - If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then - imprimirpallet2(Request("CvePallet").ToString.ToEntero()) - End If - If Request("onlyPrint").ToString() = "PalletCaja" AndAlso Not IsNothing(Request("CvePallet")) Then - imprimirpallet(Request("CvePallet").ToString.ToEntero()) - End If - If Request("onlyPrint").ToString() = "PalletCaja2" AndAlso Not IsNothing(Request("CvePallet")) Then - imprimirpalletWalamart(Request("CvePallet").ToString.ToEntero()) + Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa + Dim RutaEmpresa As String = UsuarioActual.Empresa.Ruta + Dim indemnizacion As Boolean = Request("indemnizacion").ToString.ToEntero() = 1 + GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa, indemnizacion) + End If + If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then + imprimirpallet2(Request("CvePallet").ToString.ToEntero()) + End If + If Request("onlyPrint").ToString() = "PalletCaja" AndAlso Not IsNothing(Request("CvePallet")) Then + imprimirpallet(Request("CvePallet").ToString.ToEntero()) + End If + If Request("onlyPrint").ToString() = "PalletCaja2" AndAlso Not IsNothing(Request("CvePallet")) Then + imprimirpalletWalamart(Request("CvePallet").ToString.ToEntero()) + End If + + If Request("onlyPrint").ToString() = "manifiesto" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then + imprimirManifiesto(Request("cveEmbarqueManifiesto").ToString.ToEntero()) + End If + If Request("onlyPrint").ToString() = "manifiestoRemision" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then + imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero()) + End If + If Request("onlyPrint").ToString() = "manifiestoCartaPorte" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then + imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero()) + End If + + If Request("onlyPrint").ToString() = "rfctxtvalidar" Then + rfctxtvalidar() + End If + If Request("onlyPrint").ToString() = "Recibo" Then + ReciboAgropecuaria() + End If End If - If Request("onlyPrint").ToString() = "manifiesto" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then - imprimirManifiesto(Request("cveEmbarqueManifiesto").ToString.ToEntero()) - End If - If Request("onlyPrint").ToString() = "manifiestoRemision" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then - imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero()) - End If - If Request("onlyPrint").ToString() = "manifiestoCartaPorte" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then - imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero()) - End If - - If Request("onlyPrint").ToString() = "rfctxtvalidar" Then - rfctxtvalidar() - End If - If Request("onlyPrint").ToString() = "Recibo" Then - ReciboAgropecuaria() - End If End If - - End If End Sub From 1ced90bf3297e147d87037634a159a37a1217ba7 Mon Sep 17 00:00:00 2001 From: MLopez Date: Wed, 14 Dec 2022 19:23:41 -0700 Subject: [PATCH 08/11] CatAutorizacionLimites exporta Excel --- Ventas/CatAutorizacionLimites.aspx | 8 ++++++-- Ventas/CatAutorizacionLimites.aspx.vb | 29 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/Ventas/CatAutorizacionLimites.aspx b/Ventas/CatAutorizacionLimites.aspx index 3660fee70..4936e1d5e 100644 --- a/Ventas/CatAutorizacionLimites.aspx +++ b/Ventas/CatAutorizacionLimites.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAutorizacionLimites.aspx.vb" Inherits="Ventas_CatAutorizacionLimites" %> +<%@ Page Title="" Language="VB" EnableEventValidation="false" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAutorizacionLimites.aspx.vb" Inherits="Ventas_CatAutorizacionLimites" %> @@ -22,9 +22,13 @@
  • - Agregar autorización
  • + Agregar autorización +
    +
  • + Exportar Excel +
  • diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb index fa4e3f54b..a12618ea2 100644 --- a/Ventas/CatAutorizacionLimites.aspx.vb +++ b/Ventas/CatAutorizacionLimites.aspx.vb @@ -336,4 +336,33 @@ Partial Class Ventas_CatAutorizacionLimites End Select UpModal.Update() End Sub + +#Region " EXPORTA EXCEL " + Protected Sub LnkExportarExcel_Click(sender As Object, e As EventArgs) Handles LnkExportarExcel.Click + If GvDatos.Rows.Count <= 0 Then + Alert("No hay registros para exportar. Por favor modifique su consulta.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim StrFiltro As New StringBuilder + StrFiltro.AppendFormat("Filtro: ") + StrFiltro.AppendFormat("Estatus: {0}, ", DdlEstatus.SelectedItem) + StrFiltro.AppendFormat("Cliente: {0}, ", IIf(DdlClienteFiltro.SelectedText <> "", DdlClienteFiltro.SelectedText, "Todos")) + StrFiltro.AppendFormat("Vendedor: {0}, ", DdlVendedorFiltro.SelectedItem) + StrFiltro.AppendFormat("Fecha Inicio: {0}", txtFechaI.Text.ToDate.ToString("dd/MM/yyyy")) + 'If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(", Fecha Fin: {0}", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy")) + Dim fechaFin As String = IIf(txtFechaF.Text <> "", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"), Now.ToString("dd/MM/yyyy")) + StrFiltro.AppendFormat(", Fecha Fin: {0}", fechaFin) + + 'Oculta columnas en export sin afectar GridView en página + Dim tcols = GvDatos.Columns.Count + GvDatos.HeaderRow.Cells(tcols - 2).Visible = False 'Autorizar/Rechazar + GvDatos.HeaderRow.Cells(tcols - 1).Visible = False 'Eliminar + + GvDatos.ExportToExcelGembox("CatAutorizacionLimites " & txtFechaI.Text.ToDate.ToString("dd-MM-yyyy") + " a " & fechaFin.ToDate.ToString("dd-MM-yyyy"), UsuarioActual, "Catálogo de autorizaciones de límite de crédito", DatosFiltros:=StrFiltro.ToString()) + End Sub + + Public Overrides Sub VerifyRenderingInServerForm(control As Control) + End Sub +#End Region End Class From 7151f961c5c8391e307878c647f7c6df1ae16f84 Mon Sep 17 00:00:00 2001 From: MLopez Date: Thu, 15 Dec 2022 14:11:46 -0700 Subject: [PATCH 09/11] =?UTF-8?q?E172=20Rep=20Indicador=20ordenar=20gr?= =?UTF-8?q?=C3=A1ficas=20de=20manera=20descendiente=20-=20Excepto=20cxc=20?= =?UTF-8?q?porque=20son=20dos=20series,=20tienen=20que=20estar=20en=20el?= =?UTF-8?q?=20orden=20que=20vienen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- General/RepIndicadorResumen.aspx.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 6d0f8569b..7f8645f87 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -225,7 +225,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_vxp = top_vxp.Union(group_resto_vxp) + Dim query_vxp = top_vxp.Union(group_resto_vxp).OrderByDescending(Function(x) x.Valor) 'Dim query_vxp = top_vxp.Concat(From e In resto_vxp Group e By e.Texto Into gpo = Group) 'Dim group_resto_vxp = From e In resto_vxp Group e By e.Texto Into gpo = Group 'Dim group_resto_vxp = resto_vxp.GroupBy(Function(e) New With {Key e.Texto, Key e.Valor, Key e.Color, Key e.Unidad}).ToList() @@ -255,7 +255,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores) + Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores).OrderByDescending(Function(x) x.Valor) 'Compras TipoProveedor=1 Acreedores (Gastos) DtCompAcreed.Reset() @@ -284,7 +284,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed) + Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed).OrderByDescending(Function(x) x.Valor) 'Cuentas por cobrar x Cliente -- Saldo DtCxC.Reset() @@ -313,7 +313,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxc = top_cxc.Union(group_resto_cxc) + Dim query_cxc = top_cxc.Union(group_resto_cxc) '.OrderByDescending(Function(x) x.Valor) 'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CxC.Rows)) 'Cuentas por cobrar x Cliente -- Recuperado @@ -343,7 +343,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) + Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) '.OrderByDescending(Function(x) x.Valor) 'CxP proveedores DtCxP192.Reset() @@ -372,7 +372,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192) + Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192).OrderByDescending(Function(x) x.Valor) 'CxP NO proveedor DtCxP.Reset() @@ -401,7 +401,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxp = top_cxp.Union(group_resto_cxp) + Dim query_cxp = top_cxp.Union(group_resto_cxp).OrderByDescending(Function(x) x.Valor) 'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CompProductores = query_comp_productores, .CompAcreed = query_comp_acreed, .CxC = query_cxc, .CxCR = query_cxcr, .CxP192 = query_cxp192, .CxP = query_cxp}) From 2be82bf16d1ae1fc14fd8a75f9cdab68e170e65e Mon Sep 17 00:00:00 2001 From: MLopez Date: Thu, 15 Dec 2022 14:23:45 -0700 Subject: [PATCH 10/11] E172 Rep Indicadores ordenar productores de manera ascendiente --- General/RepIndicadorResumen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 7f8645f87..0566e31e4 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -58,7 +58,7 @@ Partial Class General_RepIndicadorResumen If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then 'Compras Productores - GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial DESC") + GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial ASC") 'CxP Productores GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(1).FiltraParametros("", "CveMoneda,Saldo DESC") 'CxP NO productores From 2a222d870382e2850b132075beef09a3b8f53470 Mon Sep 17 00:00:00 2001 From: MLopez Date: Thu, 15 Dec 2022 16:17:49 -0700 Subject: [PATCH 11/11] =?UTF-8?q?Inventarios=20Kardex=20caducidades/etique?= =?UTF-8?q?tas=20fix=20generaci=C3=B3n=20PDF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 3 ++- Compras/PopUpVerFactura.aspx.vb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 13a442376..510ec9aef 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6410,7 +6410,8 @@ Public Class ClsPaginas Else Response.ContentType = mimeType End If - Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) + Response.ClearHeaders() + Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) Response.BinaryWrite(bytes) ' create the file Response.Flush() ' send it to the client to download bytes = Nothing diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 16072afc4..86c157413 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -6571,7 +6571,7 @@ Partial Class PopUpVerFactura Dim PS As String = "" Dim All As Byte() Using ms As New MemoryStream - Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(ms)) + Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms)) pdfdoc.InitializeOutlines() If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then If ObjInventarios.DtResultados IsNot Nothing Then @@ -6621,7 +6621,7 @@ Partial Class PopUpVerFactura Dim All As Byte() Using ms As New MemoryStream - Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(ms)) + Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms)) pdfdoc.InitializeOutlines() If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveAlmacen.ToString) Then If ObjInventarios.DtResultados IsNot Nothing Then