From ada9cbb203cc485dd463f7124d8c73e8152950af Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Thu, 23 Jan 2020 12:35:21 -0700 Subject: [PATCH] -getpersonal ashx --- Ashx/SIGWeb.ashx | 14 ++++++------- Compras/Compras.aspx.vb | 45 ++++++++++++++++++++++------------------- vwd.webinfo | 10 +++++++++ 3 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 vwd.webinfo diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index b4e505574..ec5a98394 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -701,14 +701,14 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Else CveEmpresa = usuario.CveEmpresa Dim Name = IfNull(context.Request("Name"), "-1").ToString - Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa) + Dim AppNombre As String = String.Format("GlobalDTRHPersonal{0}", CveEmpresa) 'sino existe, recarga los datos If context.Application(AppNombre) Is Nothing Then - Dim ObjProveedores As New ClsRH - If ObjProveedores.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, usuario.CveEmpresa) Then - context.Application(AppNombre) = ObjProveedores.DtResultados + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveEmpresa) Then + context.Application(AppNombre) = ObjPersonal.DtResultados End If - ObjProveedores.Dispose() + ObjPersonal.Dispose() End If 'Dim ObjProveedores As New ClsCompProveedores @@ -718,13 +718,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState 'ObjProveedores.Dispose() Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}") If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then - DtRetorno = dt.FiltraParametros($"Nombre like '%{Name}%'") + DtRetorno = dt.FiltraParametros($"NombreCompleto like '%{Name}%'") End If End If If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then DtRetorno.Columns("CvePersonal").ColumnName = "id" - DtRetorno.Columns("Nombre").ColumnName = "text" + DtRetorno.Columns("NombreCompleto").ColumnName = "text" retorno = JsonConvert.SerializeObject(DtRetorno).ToString context.Response.Write(retorno) Else diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index d7784b57e..0f55c081a 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6622,33 +6622,36 @@ Partial Class Compras_Compras IdCtaContable = 0 CveCuenta = 0 End If - Case 5 'Proveedores + Case 5 'Proveedores + If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then importeMovimiento = importeProv importeMN = importeMovimiento * tipoCambioActual * Multiplicador If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - - If tipoCambioActual = 1 Then - IdCtaContable = CtaProveedor - CveCuenta = CveCuentaProveedor - Else - IdCtaContable = CtaProveedorComplementaria - CveCuenta = CveCuentaProveedorComplementaria - If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then - importeMN = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then - ErrorPrepoliza = True - End If - End If - IdCtaContable = CtaProveedorExtranjera - CveCuenta = CveCuentaProveedorExtranjera - End If - End If - If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor - - Case 59 'Documentos + Dim CveConceptoComplementario As Integer = 201 + If CveTipoConcepto = 2 Then CveConceptoComplementario = 310 + + If tipoCambioActual = 1 Then + IdCtaContable = CtaProveedor + CveCuenta = CveCuentaProveedor + Else + IdCtaContable = CtaProveedorComplementaria + CveCuenta = CveCuentaProveedorComplementaria + If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then + importeMN = importeMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoComplementario, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + ErrorPrepoliza = True + End If + End If + IdCtaContable = CtaProveedorExtranjera + CveCuenta = CveCuentaProveedorExtranjera + End If + End If + + + Case 59 'Documentos importeMovimiento = importeCreditos importeMN = importeMovimiento * tipoCambioActual * Multiplicador If ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then diff --git a/vwd.webinfo b/vwd.webinfo new file mode 100644 index 000000000..07746b18a --- /dev/null +++ b/vwd.webinfo @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file