From 725a72e7fa41eb609366a18707d722f214e65ab1 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 3 Feb 2024 09:55:04 -0700 Subject: [PATCH] SMS - 2024.02.02 --- Empresas/186/Formatos/Traslado.rdlc | 4 + Empresas/186/Formatos/TrasladoAngeles.rdlc | 7 +- Inventarios/EntradasSalidas.aspx | 5 +- Inventarios/EntradasSalidas.aspx.vb | 44 +++++ Inventarios/EntregaAlmacen.aspx.vb | 42 +++++ Inventarios/RepNotasSinAlmacen.aspx.vb | 12 +- OS/Asignaciones.aspx | 5 + OS/Asignaciones.aspx.vb | 32 +++- OS/OrdenesServicios.aspx | 4 +- asmx/WS_PuntoVenta.asmx | 189 +++++++++++++++------ 10 files changed, 275 insertions(+), 69 deletions(-) diff --git a/Empresas/186/Formatos/Traslado.rdlc b/Empresas/186/Formatos/Traslado.rdlc index 8f958a741..e28016a7d 100644 --- a/Empresas/186/Formatos/Traslado.rdlc +++ b/Empresas/186/Formatos/Traslado.rdlc @@ -21,6 +21,10 @@ Codigo System.String + + NumeroParte + System.String + PS System.String diff --git a/Empresas/186/Formatos/TrasladoAngeles.rdlc b/Empresas/186/Formatos/TrasladoAngeles.rdlc index c794d6897..5879f7fec 100644 --- a/Empresas/186/Formatos/TrasladoAngeles.rdlc +++ b/Empresas/186/Formatos/TrasladoAngeles.rdlc @@ -21,6 +21,10 @@ Codigo System.String + + NumeroParte + System.String + PS System.String @@ -754,7 +758,7 @@ - =Fields!Codigo.Value + =Fields!NumeroParte.Value @@ -776,6 +780,7 @@ =IIf(rownumber(nothing) = 1, "2pt", "0pt") + true diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 7cd33263d..f7ff4f447 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -62,6 +62,9 @@
  • PDF Resumen
  • +
  • + PDF Consola +
  • Descargar XML SAT
  • @@ -673,7 +676,7 @@ + DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" > diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 2db31e03e..2d72d8ab5 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -507,10 +507,51 @@ Partial Class Inventarios_EntradasSalidas 'ImgFecha.Visible = True End If + + If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + ValidaUsaConsola() + End If + End If End Sub + Property Consola As String + Get + If ViewState("Consola") Is Nothing Then + ViewState("Consola") = "" + End If + Return ViewState("Consola").ToString + End Get + Set(value As String) + ViewState("Consola") = value + End Set + End Property + + Private Function ValidaUsaConsola() As Boolean + + Dim Respuesta As Boolean = False + + For Each gvRow As GridViewRow In GvM.Rows + If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then + Consola = "ARS600" + Respuesta = True + HplImprimirConsola.Visible = True + Exit For + End If + If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then + Consola = "ARS800" + Respuesta = True + HplImprimirConsola.Visible = True + Exit For + End If + Next + + Return Respuesta + + + End Function + #Region " PERMISOS PAGINAS " Private Function PermiteGuardar() As Boolean Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False) @@ -909,9 +950,12 @@ Partial Class Inventarios_EntradasSalidas HplImprimirResumen.Visible = True HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento))) + CveCompra = Mov.CveCompra CveConcepto = Mov.CveConcepto + + If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then HplDescargaXml.Visible = True HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto")))) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index f0d83d50d..abb8ed213 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -4,6 +4,7 @@ Option Explicit On Imports System.Data Imports System.Data.SqlClient Imports System.IO +Imports System.Web.Management Imports Extensiones Imports Microsoft.Reporting.WebForms @@ -4408,6 +4409,47 @@ Partial Class Inventarios_EntregaAlmacen Return Cancelar + End Function + + Property Consola As String + Get + If ViewState("Consola") Is Nothing Then + ViewState("Consola") = "" + End If + Return ViewState("Consola").ToString + End Get + Set(value As String) + ViewState("Consola") = value + End Set + End Property + + Private Function UsaConsola() As Boolean + + Dim Respuesta As Boolean = False + + For Each gvRow As GridViewRow In GvDatos.Rows + + If gvRow.FCCheckBox("cbInv").Checked AndAlso gvRow.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then + + If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then + Consola = "ARS600" + Respuesta = True + Exit For + End If + + If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then + Consola = "ARS800" + Respuesta = True + Exit For + End If + + End If + + Next + + Return Respuesta + + End Function End Class diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index 65770e8de..55a9eb262 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -65,13 +65,16 @@ Partial Class RepNotasSinAlmacen #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - + If Not IsPostBack Then + CargaCombos() 'CargaDatos() CargaPermisos() End If - End Sub + End Sub + + + Private Sub CargaPermisos() Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201) Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278) @@ -88,6 +91,9 @@ Partial Class RepNotasSinAlmacen GvVentas.Columns(8).Visible = True TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString + GvVentas.Columns(4).Visible = False + GvCompras.Columns(4).Visible = False + GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120) 'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}" 'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120) diff --git a/OS/Asignaciones.aspx b/OS/Asignaciones.aspx index add8f193f..de229e14f 100644 --- a/OS/Asignaciones.aspx +++ b/OS/Asignaciones.aspx @@ -200,10 +200,15 @@ + + + + + > diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index bbee6bbff..19d9044ad 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -40,16 +40,13 @@ Partial Class OS_Asignaciones #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then + GvNA_ConfiguraColumnas() CargaEstatusOS() 'CargaUsuarios() CargaClientes() CargaSubProyecto() - If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then - GvNA.Columns(2).HeaderText = "Hospital" - GvNA.Columns(7).HeaderText = "Fecha Cirugía" - GvNA.Columns(8).HeaderText = "Hora Cirugía" - End If + If UsuarioActual.TienePermisoProceso(171) Then CargaOrdenesServiciosAsignadasXPersona() @@ -75,6 +72,9 @@ Partial Class OS_Asignaciones End If ObjEstatusPermisos.Dispose() + + + End If RegistraScript(" @@ -90,6 +90,26 @@ Partial Class OS_Asignaciones ") End Sub + Private Sub GvNA_ConfiguraColumnas() + + If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + GvNA.Columns(3).Visible = False + GvNA.Columns(4).Visible = False + GvNA.Columns(5).Visible = False + GvNA.Columns(6).Visible = False + + GvNA.Columns(7).Visible = True + GvNA.Columns(8).Visible = True + + + GvNA.Columns(2).HeaderText = "Hospital" + GvNA.Columns(9).HeaderText = "Fecha Cirugía" + GvNA.Columns(10).HeaderText = "Hora Cirugía" + End If + + + End Sub + #Region "C A R G A S " Private Sub CargaSubProyecto() DdlSubProyecto.Items.Clear() @@ -184,7 +204,7 @@ Partial Class OS_Asignaciones Dim TecnicosResultado As New DataTable If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then - TecnicosSubProyectos = ObjOS.DtResultados + TecnicosSubProyectos = ObjOS.DtResultados.FiltraParametros(" Estatus = 'True' ") End If If DtOSSubProyectos IsNot Nothing Then diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 3a694320d..98bab92bd 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -1308,9 +1308,7 @@
    - - +
    diff --git a/asmx/WS_PuntoVenta.asmx b/asmx/WS_PuntoVenta.asmx index dc43bc5de..4ca18c926 100644 --- a/asmx/WS_PuntoVenta.asmx +++ b/asmx/WS_PuntoVenta.asmx @@ -439,8 +439,30 @@ Public Class WS_PuntoVenta objProyecto.Dispose() Return Respuesta - End Function - + End Function + + + + Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS + Dim objProyecto As New ClsSubProyectos + Dim Respuesta As New RespuestaWS + + If objProyecto.GetSubProyectos(CveEmpresa) Then + Respuesta.Datos = objProyecto.DtResultados + + Respuesta.Datos.Columns(2).ColumnName = "CveSucursal" + Respuesta.Datos.Columns(3).ColumnName = "Sucursal" + Respuesta.Datos.TableName = "Resultados" + Respuesta.HuboError = False + Else + Respuesta.Descripcion = "HUBO UN ERROR" + End If + + objProyecto.Dispose() + Return Respuesta + End Function + + Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS Dim objClientes As New ClsClientes @@ -546,14 +568,15 @@ Public Class WS_PuntoVenta #Region "ProductosServicios" - Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSubProyecto As Integer) As RespuestaWS + Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSucursal As Integer) As RespuestaWS Dim objPS As New ClsProductosServicios Dim Respuesta As New RespuestaWS - If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS, CveSubProyecto:=CveSubProyecto, pAplicaParaVenta:=1, pEstado:=1) Then + If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS:=PS, CveSubProyecto:=CveSucursal, pAplicaParaVenta:=1, pEstado:=1) Then Respuesta.Datos = objPS.DtResultados Respuesta.Datos.TableName = "Resultados" - Respuesta.HuboError = False + Respuesta.HuboError = False + GuardaLog($"CvePS: {CvePS}, CveClasificacion: {CveClasificacion}, CveEmpresa: {CveEmpresa}, Codigo: {Codigo}, PS: {PS}, CveSubProyecto: {CveSucursal}, pAplicaParaVenta: {1}, pEstado: {1}") Else Respuesta.Descripcion = "HUBO UN ERROR" End If @@ -847,17 +870,35 @@ Public Class WS_PuntoVenta CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa) - If objVentas.DtResultados.Rows.Count = 0 Then + If objVentas.DtResultados.Rows.Count = 0 Then + + If objVenta.CveEmpresa = 1 Then + If objVenta.CveSubProyecto <= 0 Then + objVenta.CveSubProyecto = 10430 + End If + + If objVenta.FolioFact.ToString.Contiene("", "-1", "0") Then + objVenta.FolioFact = getFolio("Rem", objVenta.CveEmpresa, objVenta.CveSubProyecto).ToEntero + End If + End If + + + If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal, objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR, objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago, - objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion, + objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, If(objVenta.FechaEjecucion < MinFecha, Now, objVenta.FechaEjecucion), objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1, - objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then - objVenta.CveVenta = objVentas.CveVenta - 'Ingresar los detalles + objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, + objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto, Vigencia:=Now) Then + objVenta.CveVenta = objVentas.CveVenta + 'Ingresar los detalles + + If objVenta.CveEmpresa = 1 Then + GuardaLog($"objVenta.Detalle {objVenta.Detalle.Count}") + End If For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle - If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1) Then + If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1, IEPS:=0) Then 'Ingresar las caracteristicas del detalle de la venta For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas If objVentas.AddVentaDetalleCaracteristica(objVentas.CveVentaDetalle, Caracteristica.CvePS, Caracteristica.CveOpcion) = False Then @@ -954,50 +995,57 @@ Public Class WS_PuntoVenta 'Se agrega movimiento separado por la cuenta de ventas (ER) ' For Each Row As DataRow In DT.Rows ImporteMov = objVenta.SubTotal - Dim CveClasificacion_04 As Integer = -1 - If ImporteMov <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then - ErrorMovtosVentas = True - End If - End If - ' Next - - 'Se agregan los DSV DESCUENTOS - ImporteMov = objVenta.Descuento - If ImporteMov <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then - ErrorMovtosDSV = True - End If - End If - 'End If - - 'Se agregan las CxC - ImporteMov = objVenta.Total - TotalPagado - If ImporteMov <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then - ErrorMovtosCxC = True - End If - End If - - 'Si hubo un pago agregarlo - ImporteMov = TotalPagado - If ImporteMov <> 0 Then - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then - ErrorMovtosCxC = True - End If - End If - 'Se agregan el Traslado de IVA - ImporteMov = objVenta.IVA - If ImporteMov <> 0 Then - Dim PorcentajeImpuesto As Decimal = 0 - If objVenta.SubTotal > 0 Then - PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal) - End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then - ErrorMovtosTrasladoIVA = True - End If - End If + + + + + + ' FIXME OIC + 'Dim CveClasificacion_04 As Integer = -1 + 'If ImporteMov <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then + ' ErrorMovtosVentas = True + ' End If + 'End If + '' Next + + ''Se agregan los DSV DESCUENTOS + 'ImporteMov = objVenta.Descuento + 'If ImporteMov <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then + ' ErrorMovtosDSV = True + ' End If + 'End If + ''End If + + ''Se agregan las CxC + 'ImporteMov = objVenta.Total - TotalPagado + 'If ImporteMov <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then + ' ErrorMovtosCxC = True + ' End If + 'End If + + ''Si hubo un pago agregarlo + 'ImporteMov = TotalPagado + 'If ImporteMov <> 0 Then + + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then + ' ErrorMovtosCxC = True + ' End If + 'End If + ''Se agregan el Traslado de IVA + 'ImporteMov = objVenta.IVA + 'If ImporteMov <> 0 Then + ' Dim PorcentajeImpuesto As Decimal = 0 + ' If objVenta.SubTotal > 0 Then + ' PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal) + ' End If + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then + ' ErrorMovtosTrasladoIVA = True + ' End If + 'End If + End If End If Else @@ -1051,6 +1099,37 @@ Public Class WS_PuntoVenta Return CveVentas End Function + + + Private Function getFolio(TipoDoctoConsulta As String, CveEmpresa As Integer, CvesubProyecto As Integer) As String + Dim Respuesta As String = "-1" + Dim ObjFolios As New ClsGralFolios() + + + + + + If ObjFolios.GetFolios(TipoDoctoConsulta, CveEmpresa) Then + GuardaLog($" GetFolios ok {ObjFolios.DtResultados.Rows.Count} . CvesubProyecto = {CvesubProyecto} .") + Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", CvesubProyecto)) + If DT.Rows.Count > 0 Then + + Respuesta = DT.Rows(0)("FActual").ToString() + + + + End If + DT.Dispose() + + End If + + ObjFolios.Dispose() + + GuardaLog($" Folio Rem {Respuesta} .") + Return Respuesta + + End Function + #End Region