From 13ed6d722678eb750c6c7ba6049569686eba32e4 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 3 Jun 2020 23:33:09 -0700 Subject: [PATCH 01/18] - --- App_Code/modExtensiones.vb | 4 ++-- Compras/PopUpVerFactura.aspx.vb | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 2032e20f1..0c2141fd0 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -192,10 +192,10 @@ Namespace Extensiones Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log") Dim ArchivoW As StreamWriter - Dim MensajeFormato = $"{Chr(13)}{Chr(10)}Log: {Mensaje} | Fecha:{Now.ToString("dd/MM/yyyy HH:mm")}" + Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, Now.ToString("dd/MM/yyyy HH:mm")) Try - ArchivoW = New StreamWriter($"{AppDomain.CurrentDomain.BaseDirectory}\Log\{Archivo}.txt", True, System.Text.Encoding.UTF8) + ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException 'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError) Exit Sub diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 548e22999..afbf7ad7b 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4047,6 +4047,7 @@ Partial Class PopUpVerFactura ObjCompra.Dispose() Dim rds2 = New ReportDataSource("DataSet2", dtnc) reportDataSetsList.Add(rds2) + dtnc.Dispose() Dim paramList As New List(Of ReportParameter) With paramList @@ -4075,15 +4076,19 @@ Partial Class PopUpVerFactura End If End With + dtMovs.Dispose() - - ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, "IE Movimient", "PDF") + ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF") End If End If End If + DtGvRH.Dispose() + DtComprobacion.Dispose() + ParamComprobacion.Dispose() + ObjIE.Dispose() End Sub From 32888e4a8d3132cf160047908051eb4200e6eac6 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 3 Jun 2020 23:33:24 -0700 Subject: [PATCH 02/18] entregas --- Inventarios/RepMovimientosSalida.aspx | 46 ++++++++++++++++- Inventarios/RepMovimientosSalida.aspx.cs | 65 ++++++++++++++++++++++-- 2 files changed, 106 insertions(+), 5 deletions(-) diff --git a/Inventarios/RepMovimientosSalida.aspx b/Inventarios/RepMovimientosSalida.aspx index 4a75260b7..c1e270942 100644 --- a/Inventarios/RepMovimientosSalida.aspx +++ b/Inventarios/RepMovimientosSalida.aspx @@ -63,10 +63,45 @@ + +
+ + + +
+ +
+ + + + + + + + + +
+ + + -
+
@@ -77,7 +112,7 @@ " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - +
@@ -94,6 +129,13 @@ + + + + + + + diff --git a/Inventarios/RepMovimientosSalida.aspx.cs b/Inventarios/RepMovimientosSalida.aspx.cs index 399526c7f..c845da4e0 100644 --- a/Inventarios/RepMovimientosSalida.aspx.cs +++ b/Inventarios/RepMovimientosSalida.aspx.cs @@ -16,18 +16,50 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas { txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); txtFechaF.Text = DateTime.Now.ToShortDateString(); + DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa); + DdlSubProyecto.DataBind(); + + //Cargo Clasificaciones + DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa); + DdlClasificacion.DataBind(); + + DdlClientes.setEsWebService(true); + } private void Consulta() { + int tCveCliente = -1; + int tCveGrupo = -1; + if (DdlClientes.SelectedValue.ToEntero() > 0) tCveCliente = DdlClientes.SelectedValue.ToEntero(); + if (DdlGrupo.SelectedValue.ToEntero() > 0) tCveGrupo = DdlGrupo.SelectedValue.ToEntero(); + ClsInventarios ObjInv = new ClsInventarios(); - if (ObjInv.GetRepMovimientosSalida(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa)) + if (ObjInv.GetRepMovimientosSalida(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlSubProyecto.SelectedValue.ToEntero(), tCveCliente, DdlClasificacion.SelectedValue.ToEntero(), DdlGrupo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)) { - GvDatos.DataSource = ObjInv.DtResultados; + if (tCveGrupo == 1) + GvDatos.DataSource = ObjInv.DtResultados; + else + GvGrupo.DataSource = ObjInv.DtResultados; } ObjInv.Dispose(); GvDatos.DataBind(); + GvGrupo.DataBind(); UpDatos.Update(); + + if (DdlGrupo.SelectedValue == "1") + { + TbDetalle.Visible = true; + GvDatos.Visible = true; + GvGrupo.Visible = false; + } + else + { + TbDetalle.Visible = false; + GvDatos.Visible = false; + GvGrupo.Visible = true; + } + } protected void BtnConsultar_Click(object sender, EventArgs e) @@ -48,6 +80,25 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas } + protected void GvGrupo_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + if (e.Row.RowIndex == 0) + { + e.Row.Cells[0].Text = "Total"; + e.Row.CssClass = "Totales"; + } + else + { + if (e.Row.DBCampo("Grupo2") == "" && e.Row.DBCampo("Grupo1") != "") + { + e.Row.CssClass = "SubTotales"; + } + } + } + } + public override void VerifyRenderingInServerForm(Control control) { //base.VerifyRenderingInServerForm(control); @@ -55,6 +106,14 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas protected void LnkExcel_Click(object sender, EventArgs e) { - GvDatos.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual); + if (DdlGrupo.SelectedValue == "1") + { + GvDatos.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual); + } + else + { + GvGrupo.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual); + } + } } \ No newline at end of file From 02fa6f66e657d0a6871c3bb67d426570a2c7c93f Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 4 Jun 2020 18:47:23 -0700 Subject: [PATCH 03/18] =?UTF-8?q?impresi=C3=B3n=20masica?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OC/RepSolicitudesAnticipo.aspx | 5 ++- OC/RepSolicitudesAnticipo.aspx.cs | 52 +++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/OC/RepSolicitudesAnticipo.aspx b/OC/RepSolicitudesAnticipo.aspx index 7b3187682..4cfdc6282 100644 --- a/OC/RepSolicitudesAnticipo.aspx +++ b/OC/RepSolicitudesAnticipo.aspx @@ -16,6 +16,9 @@
  • Exporta Excel
  • +
  • + Descargar PDFs +
  • @@ -92,7 +95,7 @@ " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - diff --git a/OC/RepSolicitudesAnticipo.aspx.cs b/OC/RepSolicitudesAnticipo.aspx.cs index b8cc189ea..d4c250158 100644 --- a/OC/RepSolicitudesAnticipo.aspx.cs +++ b/OC/RepSolicitudesAnticipo.aspx.cs @@ -9,7 +9,11 @@ using System.Web.UI.WebControls; using Extensiones; using Microsoft.Reporting.WebForms; using static Extensiones.ModExtensiones; - +using iTextSharp; +using iTextSharp.text; +using iTextSharp.text.pdf; +using System.IO; +using Ionic.Zip; public partial class OC_RepSolicitudesAnticipo : ClsPaginas { #region "Propiedades" @@ -75,7 +79,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas { DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa); DdlProveedor.DataBind(); - DdlProveedor.Items.Insert(0, new ListItem("Todos", "-1")); + DdlProveedor.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Todos", "-1")); DdlProveedor.SelectedValue = "-1"; } @@ -124,6 +128,10 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas { GenerarPDF("PDF"); } + protected void LnkImpresionMasiva_Click(object sender,EventArgs e) + { + GenerarImpresionMasiva(); + } protected void GenerarPDF(String Opcion) { @@ -161,4 +169,44 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia); } } + + private void GenerarImpresionMasiva() + { + + byte[] all; + + using (MemoryStream ms = new MemoryStream()) + { + using (Document d = new Document()) + { + using (PdfCopy copy = new PdfCopy(d,ms)) + { + d.Open(); + foreach (GridViewRow Gvr in GvSolicitudes.Rows) + { + int CveOC = Gvr.DataKey("CveOrdenCompra").ToEntero(); + byte[] reporteByte = NewGeneraBytesOC(CveOC); + PdfReader reader = new PdfReader(reporteByte); + int n = reader.NumberOfPages; + int page = 0; + while (page < n) + { + page++; + copy.AddPage(copy.GetImportedPage(reader, page)); + } + } + } + + } + all = ms.ToArray(); + } + //ImprimirbytesPDF(all, "RepSolicitudesAnticipo"); + + ZipFile zip = new ZipFile(); + zip.AddEntry("RepSolicitudesAnticipo", all); + zip.Save(Response.OutputStream); + Response.AddHeader("content-Disposition", "attachment; filename=RepSolicitudesAnticipo.zip"); + Response.ContentType = "application/zip"; + Response.End(); + } } \ No newline at end of file From 2517b2ae2cc088f721d0625c1e5ea6261bc7b161 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 4 Jun 2020 21:55:03 -0700 Subject: [PATCH 04/18] nuevo parametro al reporte de oc para la 13 y 83 --- App_Code/ClsPaginas.vb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7ae8d56ae..624d8771e 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7247,6 +7247,19 @@ Public Class ClsPaginas params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) End If + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + Dim ObjCuentasBancos As New ClsGenerales() + If ObjCuentasBancos.GetCuentasDepositos(ObjOC.CveProveedor) Then + Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'") + Dim CuentasStr As New StringBuilder("") + For Each CuentasBancarios As DataRow In CuentasActivas.Rows + Dim infoCuenta As String = String.Format("{0}-{1}-{2}-{3}-{4}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Sucursal").ToString, CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString, CuentasBancarios.Item("Referencia").ToString) + CuentasStr.AppendFormat(infoCuenta) + Next + params.Add(New ReportParameter("Cuentas", CuentasStr.ToString)) + End If + ObjCuentasBancos.Dispose() + End If 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString)) Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol) Dim RutaVirtuaSol As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={0}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaSol)) From cd75a8c0ccf6bb7621a3936807447896d96c9421 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 5 Jun 2020 10:22:08 -0700 Subject: [PATCH 05/18] =?UTF-8?q?faltaba=20una=20columna=20y=20una=20corre?= =?UTF-8?q?cci=C3=B3n=20con=20una=20expression?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Empresas/Grales/Formatos/RepFacturas.rdlc | 102 +++++++++++++++++++--- 1 file changed, 91 insertions(+), 11 deletions(-) diff --git a/Empresas/Grales/Formatos/RepFacturas.rdlc b/Empresas/Grales/Formatos/RepFacturas.rdlc index a93425a4d..63975247d 100644 --- a/Empresas/Grales/Formatos/RepFacturas.rdlc +++ b/Empresas/Grales/Formatos/RepFacturas.rdlc @@ -6,6 +6,41 @@ + + + + true + true + + + + + Tipo + + + + Textbox3 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -47,16 +82,16 @@ - 3.5579cm + 2.36727cm - 7.63463cm + 7.23964cm - 2.64509cm + 2.57894cm - 2.86998cm + 2.34081cm @@ -172,7 +207,10 @@ - =Switch(Fields!FueValidado.Value = "1","Validado", Fields!FueValidado.Value = "2","Cancelada", Fields!FueValidado.Value = "3","Omitida") + =Switch(Fields!FueValidado.Value = "1","Validado", +Fields!FueValidado.Value = "2","Cancelada", +Fields!FueValidado.Value = "3","Omitida", +1=1,"No validado") @@ -378,7 +419,7 @@ @@ -389,16 +430,51 @@ 2pt - true + + + + 2.33715cm + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + DataSet1 0.06614cm 1.2cm - 19.04475cm + 19.0265cm @@ -805,6 +881,10 @@ /* Local Query */ + + TipoComprobante + System.String + SerieFolio System.String From 6350098f5da351e0746ea47522c624fa685f78f0 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 5 Jun 2020 14:58:16 -0700 Subject: [PATCH 06/18] paramentro de cuentas modificado para reporte de OC --- App_Code/ClsPaginas.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 624d8771e..effb21dfd 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7253,7 +7253,8 @@ Public Class ClsPaginas Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'") Dim CuentasStr As New StringBuilder("") For Each CuentasBancarios As DataRow In CuentasActivas.Rows - Dim infoCuenta As String = String.Format("{0}-{1}-{2}-{3}-{4}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Sucursal").ToString, CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString, CuentasBancarios.Item("Referencia").ToString) + Dim CuentaClabe As String = If(CuentasBancarios.Item("BancoNombre").ToString.Contains("BBVA") Or CuentasBancarios.Item("BancoNombre").ToString.Contains("BANCOMER"), CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString) + Dim infoCuenta As String = String.Format("
    {0} {1}: {2}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Abreviatura").ToString, CuentaClabe) CuentasStr.AppendFormat(infoCuenta) Next params.Add(New ReportParameter("Cuentas", CuentasStr.ToString)) From e95970fc41a3fd9fd6b938b3ad7d7598b789d171 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 5 Jun 2020 16:31:22 -0700 Subject: [PATCH 07/18] -cambios varios --- Bancos/ProveedoresAbonar.aspx.vb | 2 +- Compras/ReembolsosComprobaciones.aspx.vb | 4 ++-- Inventarios/EntregasPorRealizar.aspx | 4 +--- Inventarios/RepMovimientosSalida.aspx | 14 +++++++++++++- Ventas/RepIngresos.aspx.vb | 2 +- asmx/WSSIGApp.asmx | 4 ++-- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 1cc586d2c..67a28c29a 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -2292,7 +2292,7 @@ Partial Class Bancos_ProveedoresAbonar 'If Archivo.Exists Then Msg.AppendFormat("
  • Imprimir movimiento
  • ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE))) 'End If - Msg.AppendFormat("
  • Listado
  • ", CveIE) + Msg.AppendFormat("
  • Listado
  • ", Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIE))) If IDPoliza > 0 Then Msg.AppendFormat("
  • Póliza
  • ", IDPoliza) Dim Mensaje As String = String.Format("
    El Documento se generó correctamente.


    Descargas:
      {0}
    ", Msg.ToString) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 6b3f13f29..87e301517 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -1432,11 +1432,11 @@ Partial Class Compras_ReembolsosComprobaciones Dim Mensaje As New StringBuilder If CvePrePolizaExcedente > 0 Then - Mensaje.AppendFormat("Abono Registrado Correctamente.

    Cheque: {1}

    Imprimir", CveIEExcedente, TxtFolio.Text) + Mensaje.AppendFormat("Abono Registrado Correctamente.

    Cheque: {1}

    Imprimir", CveIEExcedente, TxtFolio.Text, Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIEExcedente))) Mensaje.AppendFormat("

    Póliza: {1}
    ", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) Alert(Mensaje.ToString, TipoMensaje.MsgInformacion) Else - Mensaje.AppendFormat("Abono Registrado Correctamente.

    Imprimir", CveIERegistrado) + Mensaje.AppendFormat("Abono Registrado Correctamente.

    Imprimir", Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIERegistrado))) If CvePrePolizaIERegistrado > 0 Then Mensaje.AppendFormat("

    Póliza: {1}
    ", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) End If diff --git a/Inventarios/EntregasPorRealizar.aspx b/Inventarios/EntregasPorRealizar.aspx index 97be17592..98b35e26b 100644 --- a/Inventarios/EntregasPorRealizar.aspx +++ b/Inventarios/EntregasPorRealizar.aspx @@ -18,9 +18,7 @@ Entregas por Realizar -
  • - PDF -
  • +
    diff --git a/Inventarios/RepMovimientosSalida.aspx b/Inventarios/RepMovimientosSalida.aspx index c1e270942..5a5fe95da 100644 --- a/Inventarios/RepMovimientosSalida.aspx +++ b/Inventarios/RepMovimientosSalida.aspx @@ -103,11 +103,23 @@ - + +
    +
    +
    +
    + + Información: + +
    +
    +
    + +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> diff --git a/Ventas/RepIngresos.aspx.vb b/Ventas/RepIngresos.aspx.vb index e82b64b60..8e5a5f6af 100644 --- a/Ventas/RepIngresos.aspx.vb +++ b/Ventas/RepIngresos.aspx.vb @@ -94,7 +94,7 @@ Partial Class Ventas_RepIngresos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then TCEspecifico = -1 - TipoCambio = 2 + TipoCambio = 1 CveSubProyecto = -1 TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year) DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) diff --git a/asmx/WSSIGApp.asmx b/asmx/WSSIGApp.asmx index 71c1f2945..1a6b79d95 100644 --- a/asmx/WSSIGApp.asmx +++ b/asmx/WSSIGApp.asmx @@ -2049,7 +2049,7 @@ Public Class WSSIGApp Return TmpDT End Function Private Function AgregarProductoServicioRem(TmpDT As DataTable, PS As MVentaProductos, CveEmpresa As Integer, CveSubProyecto As Integer, - Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, + Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0) As DataRow @@ -2083,7 +2083,7 @@ Public Class WSSIGApp Row("Proyecto") = DrSubProyecto("Proyecto").ToString() Row("CveSubProyecto") = CveSubProyecto Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString() - Row("SerieLote") = SerieLote + Row("Serie") = Serie Row("TiempoEntrega") = TiempoEntrega Row("Orden") = TmpDT.Rows.Count + 1 Row("Cantidad") = PS.Cantidad From 537a9e6e986bca6a033eaeab06a1f67148d1e4ba Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 5 Jun 2020 16:37:25 -0700 Subject: [PATCH 08/18] -- cambios de sesion a cache, en el guardado de viewstate --- App_Code/ClsPaginas.vb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7ae8d56ae..2fe4aab5d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5045,8 +5045,8 @@ Public Class ClsPaginas Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object) 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) - 'Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache - Session.Add(VSKey, pviewState) 'Store the ViewState on Cache + Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache + 'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) End Sub @@ -5056,11 +5056,11 @@ Public Class ClsPaginas If Not VSKey.StartsWith("VIEWSTATE_") Then 'Request the Key from the page and validade it. Throw New Exception(String.Format("Invalid VIEWSTATE Key: {0}", VSKey)) End If - If Session(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío + If Cache(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío Response.Redirect(Request.RawUrl) Return Nothing Else - Return Session(VSKey) + Return Cache(VSKey) End If End Function @@ -5268,6 +5268,8 @@ Public Class ClsPaginas params.Add(param) Next Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) + wsreport = Nothing + params = Nothing Else If IsNothing(MR) Then MR = New ReportViewer Try @@ -5340,6 +5342,7 @@ Public Class ClsPaginas End If sw.Stop() + If sw.Elapsed.TotalSeconds > 5 Then GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ") End If @@ -5592,7 +5595,7 @@ Public Class ClsPaginas HttpContext.Current.Response.SuppressContent = True HttpContext.Current.ApplicationInstance.CompleteRequest() HttpContext.Current.Response.End() - + bytes = Nothing Catch ex As Exception If UsuarioActual.CveRol = 1 Then From 99a4ab1d163347d08cd3282f31c794fe7e8ff680 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 5 Jun 2020 16:59:23 -0700 Subject: [PATCH 09/18] cambios en pop up --- Compras/PopUpBuscarFolioC.aspx.vb | 3 ++- OC/PopUpBuscarReq.aspx.vb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Compras/PopUpBuscarFolioC.aspx.vb b/Compras/PopUpBuscarFolioC.aspx.vb index 07f3e27be..62f560242 100644 --- a/Compras/PopUpBuscarFolioC.aspx.vb +++ b/Compras/PopUpBuscarFolioC.aspx.vb @@ -111,7 +111,8 @@ Partial Class Compras_PopUpBuscarFolioC If TxtFolioFiscal.Text.Trim.Length > 0 Then Return True If TxtDescripcion.Text.Trim.Length > 0 Then Return True If TxtObservaciones.Text.Trim.Length > 0 Then Return True - If DdlTipoDocto.SelectedValue.ToEntero > 0 Then Return True + If DdlTipoDocto.SelectedValue <> "-1" Then Return True + If DdlProveedor.SelectedValue.ToEntero <> 0 Then Return True Return False End Function End Class diff --git a/OC/PopUpBuscarReq.aspx.vb b/OC/PopUpBuscarReq.aspx.vb index e10ef7db4..118f8aa6a 100644 --- a/OC/PopUpBuscarReq.aspx.vb +++ b/OC/PopUpBuscarReq.aspx.vb @@ -253,7 +253,7 @@ Partial Class OC_PopUpBuscarReq End Sub Private Function ValidarFiltrosSeleccionado() As Boolean - If DdlTipo.SelectedValue.ToEntero > 0 Then Return True + If DdlTipo.SelectedValue = "REQ" OrElse DdlTipo.SelectedValue = "OC" Then Return True If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True If TxtFolio.Text.ToEntero > 0 Then Return True From 58aeb8b78a4c7b7ff0cd721d23deef1c576a0312 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 5 Jun 2020 18:13:22 -0700 Subject: [PATCH 10/18] =?UTF-8?q?se=20hacen=20visibles=20los=20rengloes=20?= =?UTF-8?q?de=20serie=20y=20seccion=20almac=C3=A9n=20al=20abrir=20el=20mod?= =?UTF-8?q?al=20de=20producto=20servicio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntradasSalidas.aspx | 5 +++-- Inventarios/EntradasSalidas.aspx.vb | 14 +++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 393d66ab9..996067e98 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -1325,7 +1325,7 @@ - +
    @@ -1342,6 +1342,7 @@
    +
    @@ -1350,7 +1351,7 @@
    diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 0013d4efd..977f91881 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -2165,6 +2165,10 @@ Partial Class Inventarios_EntradasSalidas 'TrLote2.Visible = True End If + If CBool(dr("AplicaSeccion")) Then + divSeccionAlmacen.Visible = True + + End If End If End If @@ -2370,6 +2374,9 @@ Partial Class Inventarios_EntradasSalidas TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) LkAgregarDetalle.Text = "Actualizar" + Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero + divPrecio.Visible = Origen = 1 + txtPrecio.Visible = Origen = 1 UpAgregar.Update() RegistraScript("$('#ModalAgregar').modal()") CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) @@ -2392,6 +2399,9 @@ Partial Class Inventarios_EntradasSalidas TxtnSerie.Text = GvRow.DataKey("Serie") TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) + Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero + divPrecio.Visible = Origen = 1 + txtPrecio.Visible = Origen = 1 LkAgregarDetalle.Text = "Actualizar" UpAgregar.Update() RegistraScript("$('#ModalAgregar').modal()") @@ -4198,7 +4208,9 @@ Partial Class Inventarios_EntradasSalidas Else VisualizaPUExtranjero(False) End If - + Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero + divPrecio.Visible = Origen = 1 + txtPrecio.Visible = Origen = 1 UpAgregar.Update() End Sub From aef21c9409c9ec3e632bf2874cce6a0241b3a6e1 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 5 Jun 2020 19:01:13 -0700 Subject: [PATCH 11/18] conexion --- App_Code/ClsClientes.vb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 0904a892b..ef09f2a2c 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -23,11 +23,13 @@ Public Class ClsClientes 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'REGISTRAR CONEXIÓN - Private CveConexion As Integer = 0 + Private CveConexion As Integer = 0 + Private EsTransaccionCompartida As Boolean = False + #End Region - + #Region "Propiedades" - + Public Property CveCliente As Integer Public Property Nombre As String Public Property NombreComercial As String @@ -186,7 +188,8 @@ Public Class ClsClientes End Try Else SqlConexion = TransaccionCompartida.Connection - SqlTransacc = TransaccionCompartida + SqlTransacc = TransaccionCompartida + EsTransaccionCompartida = True End If SqlCommand = New SqlCommand("", SqlConexion) @@ -201,11 +204,11 @@ Public Class ClsClientes End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try DataAdapter("PA_Sis_RegistrarConexion") With SqlAdapter.SelectCommand.Parameters From 38621e19615257796102be60777630050b09a64d Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 5 Jun 2020 21:03:48 -0700 Subject: [PATCH 12/18] =?UTF-8?q?reportes=20de=20oc=20con=20un=20par=C3=A1?= =?UTF-8?q?metro=20m=C3=A1s=20con=20la=20info=20de=20las=20cuentas=20banca?= =?UTF-8?q?rias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Empresas/13/Formatos/OC.rdlc | 46 ++++++++++++++++++++++++++++++++++ Empresas/83/Formatos/OC.rdlc | 48 +++++++++++++++++++++++++++++++++++- 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/Empresas/13/Formatos/OC.rdlc b/Empresas/13/Formatos/OC.rdlc index 281ecf1a6..d4506917f 100644 --- a/Empresas/13/Formatos/OC.rdlc +++ b/Empresas/13/Formatos/OC.rdlc @@ -3089,6 +3089,46 @@ 2pt + + true + true + + + + + Cuentas Bancarias: + + + + =Parameters!Cuentas.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + 5.19589in + + true + true + + + + + Cuentas Bancarias: + + + + =Parameters!Cuentas.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + 5.1933in
    Ventas Movimientos