From 4d6d7b3e0cb0193b8a21d9e82d2f71d34f2c6c8c Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 20 May 2024 19:39:05 -0700 Subject: [PATCH 01/15] -- limpia de imports --- App_Code/ClsInventarios.vb | 2 -- 1 file changed, 2 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index cb986fc36..fd013534f 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -3,8 +3,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports Microsoft.Web.XmlTransform -Imports Telerik.Web.UI.ComboBox.ComboBoxStyles Public Class ClsInventarios Implements IDisposable From 55d070df286e4ed809e41e9c039a7ce3dc22cf21 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 20 May 2024 19:39:17 -0700 Subject: [PATCH 02/15] -- prespuestos resumen --- App_Code/ClsContratos.vb | 4 +++- OC/OC.aspx.vb | 38 +++++++++++--------------------------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 3c0f7b656..52d3826f9 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -3201,7 +3201,7 @@ Public Class ClsContratos End Function - Public Function GetPresupuestosResumen(CveEmpresa As Integer, CveSubProyecto As Integer, Opcion As Integer) As Boolean + Public Function GetPresupuestosResumen(CveEmpresa As Integer, CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, Opcion As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_PresupuestosResumenGet") @@ -3209,6 +3209,8 @@ Public Class ClsContratos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin End With Try diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 9793c9c20..620f20dba 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -9056,54 +9056,46 @@ Partial Class OC_OC Dim ObjCon As New ClsContratos Dim CvePresupuesto As Integer = 0 - Dim Autorizado As Double = 0 - Dim Ejercido As Double = 0 - - If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, 2) Then - - Dim FechaCompra As Date = TxtFecha.Text.ToDate + Dim Autorizado As Decimal = 0 + Dim Ejercido As Decimal = 0 + Dim FechaCompra As Date = TxtFecha.Text.ToDate + If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, FechaCompra.FirstDayOfMonth, FechaCompra.LastDayOfMonth, 2) Then + Dim ColumnaSaldo As String = "Saldo" + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then ColumnaSaldo = "SalodComprometido" Dim resultadosFiltrados = From row In ObjCon.DtResultados.AsEnumerable() - Where FechaCompra >= row.Field(Of Date)("FechaInicio") AndAlso - FechaCompra <= row.Field(Of Date)("FechaFin") Select row - - If resultadosFiltrados.Count > 0 Then + If ObjCon.DtResultados.Rows.Count > 0 Then If Opcion = 1 Then - Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = ValCveSubProyecto) If tieneRegistrosConCveSubProyecto Then Dim saldoTotal As Decimal = (From row In resultadosFiltrados Where row.Field(Of Integer)("CveSubProyecto") = ValCveSubProyecto AndAlso row.Field(Of Integer)("CveClasificacion") = ValCveClasificacion - Select row.Field(Of Decimal)("Saldo")).Sum() + Select row.Field(Of Decimal)(ColumnaSaldo)).Sum() If saldoTotal > 0 Then Dim TotalAcumuladoTabla As Decimal = (DtDetalle.SUM("Total", $" CveSubProyecto = {ValCveSubProyecto} AND CveClasificacion = {ValCveClasificacion} ")) Dim Diferencia As Decimal = saldoTotal - TotalAcumuladoTabla - ValImporte If (Diferencia) < 0 Then - Alert($"No hay presupuesto disponible en el subproyecto {ValSubProyecto} con la clasificación {ValClasificacion}. Se excede por { Math.Abs(Diferencia).FormatoNumero}", TipoMensaje.MsgAdvertencia) + Alert($"No hay presupuesto disponible en:
Subproyecto: {ValSubProyecto} Clasificación: {ValClasificacion}. Se excede por { Math.Abs(Diferencia).FormatoNumero}", TipoMensaje.MsgAdvertencia) respuesta = False - Else respuesta = True End If - Else - Alert($"No hay presupuesto disponible en el subproyecto {ValSubProyecto} con la clasificación {ValClasificacion}.", TipoMensaje.MsgAdvertencia) + Alert($"No hay presupuesto disponible en:
Subproyecto: {ValSubProyecto} Clasificación: {ValClasificacion}.", TipoMensaje.MsgAdvertencia) respuesta = False End If Else respuesta = True End If - Else - Dim EnumAgrupado = (From row In DtDetalle.AsEnumerable() Group row By SubProyecto = row.Field(Of String)("SubProyecto"), @@ -9127,7 +9119,7 @@ Partial Class OC_OC Dim saldoTotal As Decimal = (From row In resultadosFiltrados Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso row.Field(Of Integer)("CveClasificacion") = item.CveClasificacion - Select row.Field(Of Decimal)("Saldo")).Sum() + Select row.Field(Of Decimal)(ColumnaSaldo)).Sum() If saldoTotal > 0 Then Dim Diferencia As Decimal = saldoTotal - item.TotalSum @@ -9139,7 +9131,6 @@ Partial Class OC_OC Else respuesta = True End If - Else Alert($"No hay presupuesto disponible en el subproyecto {item.SubProyecto} con la clasificación {item.Clasificacion}.", TipoMensaje.MsgAdvertencia) respuesta = False @@ -9149,7 +9140,6 @@ Partial Class OC_OC respuesta = True End If Next - End If Else @@ -9160,16 +9150,10 @@ Partial Class OC_OC 'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia) respuesta = False End If - ObjCon.Dispose() - - - Else respuesta = True End If - - Return respuesta End Function From e6c8e17b76dc392222d13c33b4bc1f47fc3d72ab Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 21 May 2024 13:31:24 -0700 Subject: [PATCH 03/15] =?UTF-8?q?-=20cambio=20de=20columnas,=20ahora=20se?= =?UTF-8?q?=20muestra=20tipo=20transacci=C3=B3n=20completo,=20sin=20la=20a?= =?UTF-8?q?breviatura?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/RepSaldosDetalle.aspx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Bancos/RepSaldosDetalle.aspx b/Bancos/RepSaldosDetalle.aspx index 9b1f0539e..6cf7d727c 100644 --- a/Bancos/RepSaldosDetalle.aspx +++ b/Bancos/RepSaldosDetalle.aspx @@ -55,11 +55,10 @@ - - - + + From 7e8b361932ad38c2243516fa3414aac79ddfb0be Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 21 May 2024 15:48:58 -0700 Subject: [PATCH 04/15] -- rutadb para accesos de portal prov/clientes --- App_Code/ClsSisUsuarios.vb | 4 +- Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb | 21 +++++++++- Sistemas/PopUpSeleccionarEmpresa.aspx.vb | 46 ++++++++++++++++++---- 3 files changed, 60 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index be5aa595a..7633e20d4 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -481,7 +481,7 @@ Public Class ClsSisUsuarios Retorno.Portal = True Retorno.Referencia = Data.Rows(0)("Referencia").ToString Retorno.EsSupervisorRH = If(Data.Rows(0)("EsSupervisorRH").ToString = "1", True, False) - 'Retorno.Liga = Data.Rows(0)("Liga").ToString + Retorno.RutaDB = ConnStr 'cargo los modulos del usuario y genero el menú Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveCliente) @@ -538,7 +538,7 @@ Public Class ClsSisUsuarios Retorno.Portal = True Retorno.Referencia = Data.Rows(0)("Referencia").ToString Retorno.EsSupervisorRH = If(Data.Rows(0)("EsSupervisorRH").ToString = "1", True, False) - 'Retorno.Liga = Data.Rows(0)("Liga").ToString + Retorno.RutaDB = ConnStr 'cargo los modulos del usuario y genero el menú Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveProveedor) diff --git a/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb index 19491bfbc..289e587a1 100644 --- a/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb +++ b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb @@ -27,7 +27,7 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa 'Dim DtEmp As DataTable = GlobalDTEmpresas.Copy Dim NombreEmp As String = UsuarioActual.Empresa.Empresa - '''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)" + ''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)" ''If UsuarioActual.CveUsuario = 100 Then '' Dim customerRow() As Data.DataRow @@ -92,8 +92,25 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa tUsuario = gvr.DataKey("Usuario").ToString tContraseña = gvr.DataKey("Contraseña").ToString tCveEmpresa = gvr.DataKey("CveEmpresa").ToString.ToEntero + Dim tGrupoEmpresa As String = "" + Dim NombreCadena As String = "Conexion" - Dim ObjUsuario As New ClsSisUsuarios + If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tGrupoEmpresa = "EMD" + If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tGrupoEmpresa = "BDH" + If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tGrupoEmpresa = "ECONOLLANTAS" : NombreCadena = "Conexion" + If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tGrupoEmpresa = "JAM" + If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tGrupoEmpresa = "CITRUS" + If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tGrupoEmpresa = "KINO" + If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tGrupoEmpresa = "VSH" + If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tGrupoEmpresa = "AJAM" + If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tGrupoEmpresa = "ALATEL" + If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tGrupoEmpresa = "SERVEC" + If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tGrupoEmpresa = "SMS" + If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tGrupoEmpresa = "VYA" + If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tGrupoEmpresa = "GRUPODIAZ" + If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA" + + Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena) Dim Usuario As Usuario 'Dim UsuarioAsignaciones As Usuario diff --git a/Sistemas/PopUpSeleccionarEmpresa.aspx.vb b/Sistemas/PopUpSeleccionarEmpresa.aspx.vb index c0868b5c7..1271f6e3d 100644 --- a/Sistemas/PopUpSeleccionarEmpresa.aspx.vb +++ b/Sistemas/PopUpSeleccionarEmpresa.aspx.vb @@ -59,10 +59,26 @@ Partial Class PopUpSeleccionarEmpresa Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow) - If gvr IsNot Nothing Then - - Dim ObjUsuario As New ClsSisUsuarios - Dim Usuario As Usuario = Nothing + If gvr IsNot Nothing Then + Dim tGrupoEmpresa As String = "" + Dim NombreCadena As String = "Conexion" + Dim Usuario As Usuario = Nothing + If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tGrupoEmpresa = "EMD" + If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tGrupoEmpresa = "BDH" + If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tGrupoEmpresa = "ECONOLLANTAS" : NombreCadena = "Conexion" + If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tGrupoEmpresa = "JAM" + If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tGrupoEmpresa = "CITRUS" + If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tGrupoEmpresa = "KINO" + If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tGrupoEmpresa = "VSH" + If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tGrupoEmpresa = "AJAM" + If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tGrupoEmpresa = "ALATEL" + If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tGrupoEmpresa = "SERVEC" + If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tGrupoEmpresa = "SMS" + If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tGrupoEmpresa = "VYA" + If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tGrupoEmpresa = "GRUPODIAZ" + If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA" + + Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena) Usuario = ObjUsuario.ValidaUsuario(gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"), CveEmpresa:=gvr.DataKey("CveEmpresa").ToEntero) ObjUsuario.Dispose() @@ -138,9 +154,25 @@ Partial Class PopUpSeleccionarEmpresa Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow) If gvr IsNot Nothing Then - - Dim ObjUsuario As New ClsSisUsuarios - Dim Usuario As Usuario = Nothing + Dim tGrupoEmpresa As String = "" + Dim NombreCadena As String = "Conexion" + Dim Usuario As Usuario = Nothing + If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tGrupoEmpresa = "EMD" + If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tGrupoEmpresa = "BDH" + If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tGrupoEmpresa = "ECONOLLANTAS" : NombreCadena = "Conexion" + If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tGrupoEmpresa = "JAM" + If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tGrupoEmpresa = "CITRUS" + If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tGrupoEmpresa = "KINO" + If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tGrupoEmpresa = "VSH" + If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tGrupoEmpresa = "AJAM" + If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tGrupoEmpresa = "ALATEL" + If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tGrupoEmpresa = "SERVEC" + If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tGrupoEmpresa = "SMS" + If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tGrupoEmpresa = "VYA" + If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tGrupoEmpresa = "GRUPODIAZ" + If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA" + + Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena) Usuario = ObjUsuario.ValidaUsuarioPortalProveedor(gvr.DataKey("CveProveedor").ToEntero(), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña")) ObjUsuario.Dispose() From eae9a967a2e5e8283bdf3c7690dc261ee53d976e Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 21 May 2024 15:49:21 -0700 Subject: [PATCH 05/15] - cambio a global --- PortalProveedor/PortalProveedor.aspx.vb | 38 ++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb index 8772990de..d1ae59790 100644 --- a/PortalProveedor/PortalProveedor.aspx.vb +++ b/PortalProveedor/PortalProveedor.aspx.vb @@ -302,21 +302,27 @@ Partial Class Portal_PortalProveedor #Region "C A R G A - D A T O S" Protected Sub CargaDatos() - GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimero($"CveProveedor = {CveProveedor}") - Dim ObjProveedor As New ClsCompProveedores() - If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", 1, UsuarioActual.CveEmpresa) Then - If ObjProveedor.DtResultados.Rows.Count > 0 Then + Dim drp As DataRow = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimero($"CveProveedor = {CveProveedor}") - 'CxP - LtlProveedor.Text = ObjProveedor.RazonSocial - lblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString - lblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString - - Else - Alert("Ocurrió un error al cargar los datos.", TipoMensaje.MsgError) - End If + If drp IsNot Nothing Then + LtlProveedor.Text = drp("RazonSocial").ToString + lblLimiteCredito.Text = drp("LimiteCredito").ToString.ToDecimal.FormatoNumero + lblPlazoCobranza.Text = drp("PlazoPago").ToString End If - ObjProveedor.Dispose() + 'Dim ObjProveedor As New ClsCompProveedores() + 'If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", 1, UsuarioActual.CveEmpresa) Then + ' If ObjProveedor.DtResultados.Rows.Count > 0 Then + + ' 'CxP + ' LtlProveedor.Text = ObjProveedor.RazonSocial + ' lblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString + ' lblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString + + ' Else + ' Alert("Ocurrió un error al cargar los datos.", TipoMensaje.MsgError) + ' End If + 'End If + 'ObjProveedor.Dispose() End Sub @@ -357,9 +363,9 @@ Partial Class Portal_PortalProveedor If ObjMovtos.GetCxPProveedor(CveProveedor, "-1", "-1", -1, -1, -1, -1, -1, -1, DdlProveedorSucursalCxCSucursal.SelectedValue.ToEntero, -1) Then - GvCxP.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda,OrdenVencimiento, FechaVencimiento") - - 'solo tomo los 10 ultimos mas el totalizador general + GvCxP.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda,OrdenVencimiento, FechaVencimiento") + + 'solo tomo los 10 ultimos mas el totalizador general Dim dt As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'") If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then From 642df02a5abf14b55c3ebf14793521f72edf4d75 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 22 May 2024 05:33:06 -0700 Subject: [PATCH 06/15] -- cambio en presupuesto --- Compras/Compras.aspx.vb | 93 +++++++++++------------------------------ 1 file changed, 24 insertions(+), 69 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index a2177e891..708287133 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4193,10 +4193,21 @@ Partial Class Compras_Compras '------------------ INICIA VALIDACIONES ------------------ - If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 AndAlso LblSaldoFactura.Text.ToDecimal > 0 Then - Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + 'comentado RMF.2024.05.21. en anticipos parciales, está bloquenado + 'If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then + + ' Dim ImporteAnticipoComision As Decimal = 0 + ' If ArrAnticipos.Count > 0 Then + ' For Each Ant As Compras_Compras.Anticipos In ArrAnticipos + ' ImporteAnticipoComision += Ant.ImporteComision + ' Next + ' End If + + ' If (LblSaldoFactura.Text.ToDecimal - ImporteAnticipoComision) > 0 Then + ' Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + ' End If + 'End If Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal() @@ -13096,11 +13107,15 @@ Partial Class Compras_Compras Dim objcompras As New ClsCompras() If objcompras.GetCompraParaDevolucion(CveProveedor, UsuarioActual.CveEmpresa, SubTotal) Then DDLDevolucion.Items.Clear() - DDLDevolucion.DataSource = objcompras.DtResultados - DDLDevolucion.DataBind() + Dim dtt As DataTable = objcompras.DtResultados + If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then 'solo los últimos 3 meses + dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-3).ToString("yyyy/MM/dd")}#") + End If + DDLDevolucion.DataSource = dtt DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1")) End If objcompras.Dispose() + DDLDevolucion.DataBind() UPDevolucion.Update() End Sub @@ -13113,9 +13128,9 @@ Partial Class Compras_Compras Dim objcompras As New ClsCompras() If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then GVDevolucion.DataSource = objcompras.DtResultados - GVDevolucion.DataBind() End If objcompras.Dispose() + GVDevolucion.DataBind() Dim CveAlmacen As Integer = -1 For Each GvRow As GridViewRow In GVDevolucion.Rows If GvRow.RowType = DataControlRowType.DataRow Then @@ -20678,8 +20693,6 @@ Partial Class Compras_Compras Return True End If - - If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then Dim ObjCon As New ClsContratos @@ -20687,7 +20700,7 @@ Partial Class Compras_Compras Dim Autorizado As Double = 0 Dim Ejercido As Double = 0 - If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, 1) Then + If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, TxtFecha.Text.ToDate.FirstDayOfMonth, TxtFecha.Text.ToDate.LastDayOfMonth, 1) Then Dim FechaCompra As Date = TxtFecha.Text.ToDate @@ -20696,27 +20709,8 @@ Partial Class Compras_Compras FechaCompra <= row.Field(Of Date)("FechaFin") Select row - - - - - 'Dim dataTable As New DataTable - 'Dim rowFilter As String = "" - 'Dim orderby As String = "" - 'Dim groupByColumns As String()() = {New String() {"SubProyecto", "CveSubProyecto", "Clasificacion", "CveClasificacion", "TipoGasto", "CveTipoGasto"}} - 'Dim sumColumns As String() = {"Total"} - - - 'Dim resultDataTable As DataTable = GroupByDT(TmpDT, rowFilter, orderby, groupByColumns, sumColumns) - - - - - If resultadosFiltrados.Count > 0 Then - - ''.TotalSum = Group.Sum(Function(r) r.Field(Of Decimal)("Total")) If Opcion = 1 Then @@ -20749,29 +20743,8 @@ Partial Class Compras_Compras Else respuesta = True End If - - Else - 'Dim EnumAgrupado = (From row In TmpDT.AsEnumerable() - ' Group row By - ' SubProyecto = row.Field(Of String)("SubProyecto"), - ' CveSubProyecto = row.Field(Of Integer)("CveSubProyecto"), - ' Clasificacion = row.Field(Of String)("Clasificacion"), - ' CveClasificacion = row.Field(Of Integer)("CveClasificacion"), - ' TipoGasto = row.Field(Of String)("TipoGasto"), - ' CveTipoGasto = row.Field(Of Integer)("CveTipoGasto") - ' Into Group - ' Select New With { - ' .SubProyecto = SubProyecto, - ' .CveSubProyecto = CveSubProyecto, - ' .Clasificacion = Clasificacion, - ' .CveClasificacion = CveClasificacion, - ' .CveTipoGasto = CveTipoGasto, - ' .TipoGasto = TipoGasto, - ' .TotalSum = Group.Sum(Function(r) If(IsDBNull(r("Total")), 0D, Convert.ToDecimal(r("Total")))) - ' }).ToList() - Dim EnumAgrupado = ( From row In TmpDT.AsEnumerable() Group row By @@ -20793,22 +20766,15 @@ Partial Class Compras_Compras } ).ToList() - For Each item In EnumAgrupado - Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = item.CveSubProyecto) If tieneRegistrosConCveSubProyecto Then - 'Dim saldoTotal As Decimal = (From row In resultadosFiltrados - ' Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso - ' row.Field(Of Integer)("CveClasificacion") = item.CveClasificacion - ' Select row.Field(Of Decimal)("Saldo")).Sum() Dim saldoTotal As Decimal = (From row In resultadosFiltrados.AsEnumerable() Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso - If(row.IsNull("CveClasificacion"), - 0, + If(row.IsNull("CveClasificacion"), 0, row.Field(Of Integer?)("CveClasificacion").GetValueOrDefault()) = item.CveClasificacion Select row.Field(Of Decimal)("Saldo")).Sum() @@ -20835,29 +20801,18 @@ Partial Class Compras_Compras Next End If - - - Else 'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia) respuesta = True End If - - Else 'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia) respuesta = False End If - ObjCon.Dispose() - - - Else respuesta = True End If - - Return respuesta End Function From 0c06b3efd39763ba1862d8f41d1db329b71fa747 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 22 May 2024 05:33:50 -0700 Subject: [PATCH 07/15] -- simpre mostrar todos los almacenes --- Ashx/SIGWeb.ashx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 498665467..e606c32b5 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -930,19 +930,23 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim CveAlmacen = IfNull(context.Request("cvealmacen"), "-1").ToString.ToEntero Dim UsaGlobal As Boolean = True - Dim MostrarTodosAlmacenes As Boolean = False + Dim MostrarTodosAlmacenes As Boolean = True 'verifica existencias If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso usuario.Empresa.Funcionalidad(141) = "1" Then UsaGlobal = False + If usuario.CveEmpresa = 119 Then MostrarTodosAlmacenes = False + 'If (usuario.Empresa.Funcionalidad(558) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then + ' MostrarTodosAlmacenes = True + 'End If - If (usuario.Empresa.Funcionalidad(558) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then - MostrarTodosAlmacenes = True - End If + 'If (usuario.Empresa.Funcionalidad(578) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then 'sms + ' MostrarTodosAlmacenes = True + 'End If - If (usuario.Empresa.Funcionalidad(578) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then 'sms - MostrarTodosAlmacenes = True - End If + 'If (usuario.Empresa.CveEmpresa.Contiene(189, 193, 195, 197)) AndAlso Pagina.Contiene("ventas/ventas") Then 'sms + ' MostrarTodosAlmacenes = True + 'End If Dim objInv As New ClsInventarios Try From 2b1c5246a4421ee96a66b7d46abe1bb3d95a4e96 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 22 May 2024 05:34:14 -0700 Subject: [PATCH 08/15] -- mejora para recargar globalusuarios, por si se registra en otras empresas. --- Sistemas/UsuarioDetalle.aspx.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index a67afdb37..d4e4b6413 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -1384,8 +1384,10 @@ Partial Class Sistemas_UsuarioDetalle GlobalDTAlmacenUsuarios(-1, tCveEmpresa) = Nothing GlobalDTUsuarioResponsable(tCveEmpresa) = Nothing GlobalDTUsuarios(CveEmpresa:=tCveEmpresa) = Nothing - GlobalDTUsuarios(CveEmpresa:=-1) = Nothing + GlobalDTUsuarios(CveEmpresa:=tCveEmpresa) = Nothing + 'si hay diferencia en la empresa asignada y la asociada. + If tCveEmpresa <> DdlEmpresa.SelectedValue.ToEntero Then GlobalDTUsuarios(CveEmpresa:=DdlEmpresa.SelectedValue.ToEntero) = Nothing 'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados From 26004e02b3a664fe384bc719451ce883f7718b8c Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 22 May 2024 05:34:35 -0700 Subject: [PATCH 09/15] =?UTF-8?q?--=20cambio=20de=20prep=C3=B3liza=20a=20p?= =?UTF-8?q?=C3=B3liza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 92e446f0c..840131979 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -27,7 +27,7 @@
  • - PrePoliza + Póliza
  • From 2914fe04e03f9ad34187969117c6ff46cca18dca Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 22 May 2024 05:35:01 -0700 Subject: [PATCH 10/15] -- utilizar la FNC 532 --- OC/OC.aspx.vb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 620f20dba..b2fb377a3 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -9051,8 +9051,7 @@ Partial Class OC_OC Dim respuesta As Boolean = False - 'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then - If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then Dim ObjCon As New ClsContratos Dim CvePresupuesto As Integer = 0 @@ -9062,7 +9061,7 @@ Partial Class OC_OC If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, FechaCompra.FirstDayOfMonth, FechaCompra.LastDayOfMonth, 2) Then Dim ColumnaSaldo As String = "Saldo" - If UsuarioActual.CveEmpresa.Contiene(13, 83) Then ColumnaSaldo = "SalodComprometido" + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then ColumnaSaldo = "SaldoComprometido" Dim resultadosFiltrados = From row In ObjCon.DtResultados.AsEnumerable() Select row @@ -9125,14 +9124,14 @@ Partial Class OC_OC Dim Diferencia As Decimal = saldoTotal - item.TotalSum If (Diferencia) < 0 Then - Alert($"No hay presupuesto disponible en el subproyecto {item.SubProyecto} con la clasificación {item.Clasificacion}. Se excede por {Math.Abs(Diferencia).FormatoNumero}", TipoMensaje.MsgAdvertencia) + Alert($"No hay presupuesto disponible en:
    Subproyecto {item.SubProyecto} con la clasificación {item.Clasificacion}. Se excede por {Math.Abs(Diferencia).FormatoNumero}", TipoMensaje.MsgAdvertencia) respuesta = False Exit For Else respuesta = True End If Else - Alert($"No hay presupuesto disponible en el subproyecto {item.SubProyecto} con la clasificación {item.Clasificacion}.", TipoMensaje.MsgAdvertencia) + Alert($"No hay presupuesto disponible en:
    Subproyecto {item.SubProyecto} con la clasificación {item.Clasificacion}.", TipoMensaje.MsgAdvertencia) respuesta = False Exit For End If From 17782af1f48a096c9bf2eb8d34d30506f5009f6f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 23 May 2024 11:39:03 -0700 Subject: [PATCH 11/15] -- mejora en error div0 --- Contratos/RepPresupuestos.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Contratos/RepPresupuestos.aspx.vb b/Contratos/RepPresupuestos.aspx.vb index b7a05c96d..4d909e102 100644 --- a/Contratos/RepPresupuestos.aspx.vb +++ b/Contratos/RepPresupuestos.aspx.vb @@ -310,8 +310,8 @@ Partial Class Contratos_RepPresupuestos If UsaComprometido Then Ejercido = DrPresupuesto("Comprometido").ToString.ToDecimal PorEjercer = Autorizado - Ejercido - EjercidoPorcentaje = Ejercido / Autorizado * 100 - PorEjercerPorcentaje = PorEjercer / Autorizado * 100 + EjercidoPorcentaje = If(Autorizado > 0, Ejercido / Autorizado * 100, 0) + PorEjercerPorcentaje = If(Autorizado > 0, PorEjercer / Autorizado * 100, 0) thComprometido.Visible = True GvDatos.Columns(2).Visible = True End If From de7e2fc49fa1d708b72fe3190f797ac3781133c7 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 23 May 2024 19:13:51 -0700 Subject: [PATCH 12/15] -- filtro de Reporte PS ECono --- App_Code/ClsVentas.vb | 4 ++-- Ventas/RepPS.aspx | 2 +- Ventas/RepPS.aspx.vb | 26 ++++++++++++++------------ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 844dbb8db..d99ea6bc6 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1961,14 +1961,14 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1, + Public Function GetRepPSEcono(CveSubProyectos As String, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1", Optional orden As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepPSEconoGet") With SqlAdapter.SelectCommand.Parameters - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveSubProyectos", SqlDbType.VarChar).Value = CveSubProyectos .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF diff --git a/Ventas/RepPS.aspx b/Ventas/RepPS.aspx index 05a9045a4..f8f5baef0 100644 --- a/Ventas/RepPS.aspx +++ b/Ventas/RepPS.aspx @@ -88,7 +88,7 @@
    SubProyecto:
    - +
    Fecha Inicio: diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb index 43fb8e8ac..8a6227ec3 100644 --- a/Ventas/RepPS.aspx.vb +++ b/Ventas/RepPS.aspx.vb @@ -54,7 +54,7 @@ Partial Class Ventas_RepPS End Sub Private Sub CargaCombos() - CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) + CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto) DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlClasificacion.DataBind() @@ -75,14 +75,15 @@ Partial Class Ventas_RepPS DivMarca.Visible = True LblMarca.Visible = True LblLinea.Visible = True - DivLinea.Visible = True - - Using ObjMarcas As New ClsProductosServicios - If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then - DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados - DdlMarcaPSDes.DataBind() - End If - End Using + DivLinea.Visible = True + + DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) + 'Using ObjMarcas As New ClsProductosServicios + ' If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then + ' DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados + ' DdlMarcaPSDes.DataBind() + ' End If + 'End Using End If DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa) @@ -95,7 +96,8 @@ Partial Class Ventas_RepPS Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM) Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM) Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.GetSelectedValuesM) - Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero() + 'Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero() + Dim CveSubProyectos As String = If(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM) Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero() Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero() Dim CveMoneda As Integer = -1 @@ -106,7 +108,7 @@ Partial Class Ventas_RepPS FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha) Dim ObjVentas As New ClsVentas() - If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then + If ObjVentas.GetRepPSEcono(CveSubProyectos, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then DtReporte = ObjVentas.DtResultados.Copy() GvDatos.DataSource = DtReporte Else @@ -167,7 +169,7 @@ Partial Class Ventas_RepPS FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha) If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then Dim SbParametros As New StringBuilder - SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text) + SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyectos.GetSelectedText) SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text) Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") From b1e1f326dbf7dc315b5a251f53ffa480800a849d Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 23 May 2024 19:14:23 -0700 Subject: [PATCH 13/15] - mejora --- Ventas/Ventas.aspx.vb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ee5f66057..659aff5ba 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5576,7 +5576,6 @@ Partial Class Ventas HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString() End If - TxtOrdenCompra.Text = DbRowVenta("OrdenCompra").ToString() TxtOrdenCompra.Enabled = False @@ -25651,7 +25650,7 @@ Partial Class Ventas Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000 SegundosRespuesta = SegundosRespuesta.ToEntero - If SegundosRespuesta >= 5 Then + If SegundosRespuesta >= 5 AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Ant", "Dev", "Egs") Then Alert($"Los servicios de cancelación del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "") End If @@ -32513,11 +32512,11 @@ Partial Class Ventas For Each Dr As DataRow In dtSeleccionadas.Rows - If Dr("Medico").ToString.Length > 0 Then - MensajeRemisionesMedicas.Append($"Dr. {Dr("MEdico").ToString}{vbCrLf}") + If Dr("Medico").ToString.Trim.Length > 0 Then + MensajeRemisionesMedicas.Append($"Dr. {Dr("Medico").ToString}{vbCrLf}") EsRemisionMedica = True End If - If Dr("Medico").ToString.Length > 0 Then + If Dr("Procedimiento").ToString.Trim.Length > 0 Then MensajeRemisionesMedicas.Append($"Procedimiento {Dr("Procedimiento")}{vbCrLf}") EsRemisionMedica = True End If @@ -32540,7 +32539,6 @@ Partial Class Ventas TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "") End If - TxtOrdenCompra.Text = If(ObsOC.ToString().Length > 0, ObsOC.ToString().Substring(0, ObsOC.ToString().Length - 2), "") TxtPedidoContrato.Text = If(ObsPedido.ToString().Length > 0, ObsPedido.ToString().Substring(0, ObsPedido.ToString().Length - 2), "") TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "") @@ -36978,7 +36976,6 @@ Partial Class Ventas If CveVenta <= 0 Then TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToString("dd/MM/yyyy") - TxtOrdenCompra.Text = "" 'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO If HabilitoFacturacionIngresoLineaAdicional Then From 21aa7dbfd99fe34742d033d5477e2e056b47d9ba Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 24 May 2024 09:13:57 -0700 Subject: [PATCH 14/15] =?UTF-8?q?--=20correcci=C3=B3n=20visual=20de=20limp?= =?UTF-8?q?ieza=20de=20ceros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contratos/RepPresupuestos.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contratos/RepPresupuestos.aspx.vb b/Contratos/RepPresupuestos.aspx.vb index 4d909e102..24714de4d 100644 --- a/Contratos/RepPresupuestos.aspx.vb +++ b/Contratos/RepPresupuestos.aspx.vb @@ -366,7 +366,7 @@ Partial Class Contratos_RepPresupuestos e.Row.Cells(1).Text = "-" End If If e.Row.DBCampo("Comprometido").ToDecimal = 0 Then - e.Row.Cells(1).Text = "-" + e.Row.Cells(2).Text = "-" End If If e.Row.DBCampo("Ejercido").ToDecimal = 0 Then e.Row.Cells(3).Text = "-" From 1ad0dc9f132ce23117951bb33ad3a2406f93846d Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 24 May 2024 17:39:15 -0700 Subject: [PATCH 15/15] =?UTF-8?q?-=20cargar=20informaci=C3=B3n=20para=20SM?= =?UTF-8?q?S?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 0001c1355..045c8bec6 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -12172,6 +12172,11 @@ Partial Class Ventas ObjFactura.Alfa1 = TxtAlfa1.Text.Trim End If + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then + ObjFactura.Medico = DdlMedico.SelectedItem.Text + ObjFactura.Procedimiento = DdlProcedimiento.SelectedItem.Text + End If + 'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS If (ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True AndAlso ObjFactura.TipodeComprobante = "Ingresos" AndAlso RemisionesLista.Count > 0) Then Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal