From 5ac0f2c907033262005b2a700fc43255bd7d4989 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 Mar 2021 18:41:25 -0700 Subject: [PATCH 01/17] =?UTF-8?q?correci=C3=B3n=20de=20texto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/CatPeriodosBloqueo.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/CatPeriodosBloqueo.aspx b/Contabilidad/CatPeriodosBloqueo.aspx index 80fa6e358..2ff3e254f 100644 --- a/Contabilidad/CatPeriodosBloqueo.aspx +++ b/Contabilidad/CatPeriodosBloqueo.aspx @@ -214,7 +214,7 @@ - + From 0d77883d189837d1e3ee783d9fd2372cc1346b9c Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 Mar 2021 19:32:07 -0700 Subject: [PATCH 02/17] =?UTF-8?q?--=20activaci=C3=B3n=20de=20eliminar=20--?= =?UTF-8?q?=20envio=20de=20parametro=20para=20aplicar=20devoluci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 7324ffd30..cc93a3b98 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -767,12 +767,12 @@ Partial Class Bancos_IE - If TabCancelacion.Visible Then - LnkCancelar.Visible = False - LnkCancelarComplemento.Visible = False - LnkEliminar.Visible = False - LnkCancelarComplementoImporte.Visible = False - End If + 'If TabCancelacion.Visible Then + ' LnkCancelar.Visible = False + ' LnkCancelarComplemento.Visible = False + ' 'LnkEliminar.Visible = False + ' LnkCancelarComplementoImporte.Visible = False + 'End If UppEliminarIE.Update() @@ -4490,14 +4490,17 @@ Partial Class Bancos_IE GeneraCancelacionEnCero = True End If + Dim TipoMovimiento As Integer = 1 + If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then GeneraCancelacionEnCero = False + TipoMovimiento = 2 End If Dim CvePrePolizaCancelacion As Integer = 0 If Not GeneraCancelacionEnCero Then 'CANCELA IE MES ANTERIOR - CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero) + CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, TipoMovimiento:=TipoMovimiento, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero) If CvePrePolizaCancelacion <= 0 Then ErrorCancelar = True MensajeError = "Error al cancelar IE MES ANTERIOR" From 15ad2e8f9fd7fa4b3803f5f7940c90e833a95a07 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 Mar 2021 19:35:49 -0700 Subject: [PATCH 03/17] cambio en globaldt --- AF/CatSubTipos.aspx.vb | 11 ++++++----- App_Code/ClsPaginas.vb | 40 ++++++++++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/AF/CatSubTipos.aspx.vb b/AF/CatSubTipos.aspx.vb index b5c9d5f6f..cc023e732 100644 --- a/AF/CatSubTipos.aspx.vb +++ b/AF/CatSubTipos.aspx.vb @@ -23,11 +23,12 @@ Partial Class AF_CatSubTipos End Sub Private Sub CargaGlobal() - Dim ObjSubTipos As New ClsAF - If ObjSubTipos.GetSubTiposActivosFijos(-1) Then - GlobalDTSubTipoActivoFijo(-1) = ObjSubTipos.DtResultados - End If - ObjSubTipos.Dispose() + 'Dim ObjSubTipos As New ClsAF + 'If ObjSubTipos.GetSubTiposActivosFijos(-1) Then + ' GlobalDTSubTipoActivoFijo(-1) = ObjSubTipos.DtResultados + 'End If + 'ObjSubTipos.Dispose() + GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa, -1) = Nothing End Sub Public Sub CargaDatos() diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 148b96b30..fb0c57bdf 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -2184,19 +2184,43 @@ Public Class ClsPaginas End Set End Property - Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer) As DataTable + Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer, Optional CveTipoActivoFijo As Integer = -1) As DataTable + Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSubTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSubTipoActivoFijo = DirectCast(Application("GlobalDTSubTipoActivoFijo"), DataTable) + Dim AppNombre As String = String.Format("GlobalDTSubTipoActivoFijo-{0}", CveEmpresa) + 'sino existe, recarga los datos + If Application(AppNombre) Is Nothing Then + Dim ObjSubTipos As New ClsAF + If ObjSubTipos.GetSubTiposActivosFijos(CveEmpresa) Then Application(AppNombre) = ObjSubTipos.DtResultados + ObjSubTipos.Dispose() End If + + Dim Str As New StringBuilder + + If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + If CveTipoActivoFijo > 0 Then Str.AppendFormat("AND CveTipoActivoFijo = {0}", CveTipoActivoFijo) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTSubTipoActivoFijo = Dv.ToTable + Dv.Dispose() + End Get Set(value As DataTable) - Application("GlobalDTSubTipoActivoFijo") = value + Dim AppNombre As String = String.Format("GlobalDTSubTipoActivoFijo-{0}", CveEmpresa) + Application(AppNombre) = value End Set + + 'Get + ' If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTSubTipoActivoFijo = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTSubTipoActivoFijo = DirectCast(Application("GlobalDTSubTipoActivoFijo"), DataTable) + ' End If + 'End Get + 'Set(value As DataTable) + ' Application("GlobalDTSubTipoActivoFijo") = value + 'End Set End Property Property GlobalDTTipoActivoFijo(CveEmpresa As Integer) As DataTable Get From e38acf75d4e2b474450756202485c92ebe0c3bd2 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 Mar 2021 19:40:07 -0700 Subject: [PATCH 04/17] cambio en globaldtsubtipo --- Compras/RepComprasAF.aspx | 2 +- Global.asax | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Compras/RepComprasAF.aspx b/Compras/RepComprasAF.aspx index 646011efb..b4f3c1258 100644 --- a/Compras/RepComprasAF.aspx +++ b/Compras/RepComprasAF.aspx @@ -153,7 +153,7 @@ -
Producto Servicio:
+
diff --git a/Global.asax b/Global.asax index 11258feff..a5425d84b 100644 --- a/Global.asax +++ b/Global.asax @@ -74,7 +74,7 @@ Using ObjActivosFijos As New ClsAF If ObjActivosFijos.GetCaracteristicasClasificaciones(-1) Then Application("GlobalDTAFCaracteristicasClasificaciones") = ObjActivosFijos.DtResultados Else Application("GlobalDTAFCaracteristicasClasificaciones") = Nothing If ObjActivosFijos.GetCaracteristicas(-1) Then Application("GlobalDTAFCaracteristicas") = ObjActivosFijos.DtResultados Else Application("GlobalDTAFCaracteristicas") = Nothing - If ObjActivosFijos.GetSubTiposActivosFijos(-1) Then Application("GlobalDTSubTipoActivoFijo") = ObjActivosFijos.DtResultados Else Application("GlobalDTSubTipoActivoFijo") = Nothing + 'If ObjActivosFijos.GetSubTiposActivosFijos(-1) Then Application("GlobalDTSubTipoActivoFijo") = ObjActivosFijos.DtResultados Else Application("GlobalDTSubTipoActivoFijo") = Nothing If ObjActivosFijos.GetTiposActivosFijos(-1) Then Application("GlobalDTTipoActivoFijo") = ObjActivosFijos.DtResultados Else Application("GlobalDTTipoActivoFijo") = Nothing If ObjActivosFijos.GetEstatusActivoFijo() Then Application("GlobalDTEstadoActivoFijo") = ObjActivosFijos.DtResultados Else Application("GlobalDTEstadoActivoFijo") = Nothing If ObjActivosFijos.GetMarcasActivosFijos(-1) Then Application(" GlobalDTMarcaActivoFijo") = ObjActivosFijos.DtResultados Else Application(" GlobalDTMarcaActivoFijo") = Nothing From e980d5a7985f51b4ed75e9f195a6d13e1720dec0 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 Mar 2021 19:57:05 -0700 Subject: [PATCH 05/17] mejoras productos por caducar --- Inventarios/RepProductosPorCaducar.aspx | 14 +++++++------- Inventarios/RepProductosPorCaducar.aspx.cs | 17 +++++++++++------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Inventarios/RepProductosPorCaducar.aspx b/Inventarios/RepProductosPorCaducar.aspx index 1b946e577..227052b96 100644 --- a/Inventarios/RepProductosPorCaducar.aspx +++ b/Inventarios/RepProductosPorCaducar.aspx @@ -90,7 +90,7 @@
- +
@@ -102,13 +102,13 @@ - + - - - - - + + + + + diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs index a9afbeb9b..59ae587ea 100644 --- a/Inventarios/RepProductosPorCaducar.aspx.cs +++ b/Inventarios/RepProductosPorCaducar.aspx.cs @@ -35,11 +35,16 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas private void CargarDatos() { + DateTime FI = ModExtensiones.MinFecha; + if (TxtFechaInicio.Text != "") FI = TxtFechaInicio.Text.ToDate(); + + + int CvePS = -1; + if (DdlPS.SelectedValue.ToEntero() > 0) CvePS = DdlPS.SelectedValue.ToEntero(); // aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad - //if (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147))) { GvDatos.Columns[4].HeaderText = UsuarioActual.Empresa.Funcionalidad(147); } - ClsInventarios ObjInventarios = new ClsInventarios(); - if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(),TxtFechaInicio.Text.ToDate(),TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(), - DdlClasificacion.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa)) + ClsInventarios ObjInventarios = new ClsInventarios(); + if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(), + DdlClasificacion.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa)) { GvDatos.DataSource = ObjInventarios.DtResultados; DTDatos = ObjInventarios.DtResultados; @@ -60,8 +65,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas private void CargarFechaText() { DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month,1); - TxtFechaInicio.Text = date.ToString("dd/MM/yyyy"); - TxtFechaFin.Text = date.AddMonths(3).AddDays(-1).ToString("dd/MM/yyyy"); + //TxtFechaInicio.Text = date.AddYears(-5).ToString("dd/MM/yyyy"); + TxtFechaFin.Text = date.AddMonths(6).AddDays(-1).ToString("dd/MM/yyyy"); DdlPS.setEsWebService(true); } From b42ba99dab3333a8902bd6bb24eaeba331cb742d Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 Mar 2021 20:12:25 -0700 Subject: [PATCH 06/17] ajustes en aplicar lote/caducidad --- Inventarios/TraspasoAlmacen.aspx | 3 +- Inventarios/TraspasoAlmacen.aspx.vb | 124 ++++++++++++++++++++++------ 2 files changed, 101 insertions(+), 26 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx index eaf48f3d2..205a68a17 100644 --- a/Inventarios/TraspasoAlmacen.aspx +++ b/Inventarios/TraspasoAlmacen.aspx @@ -443,6 +443,7 @@
EneroFeberoFebrero Marzo Abril Mayo + @@ -456,7 +457,7 @@ - + diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 35736ad6d..11fe12c31 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -526,19 +526,73 @@ Partial Class Inventarios_TraspasoAlmacen DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("") ' Estado = -1 - If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDecimal > 0 Then - 'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15... - If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then - Alert(String.Format("El producto se vende solo en cantidades de {0:#,###.####}", DrPS("VentaMinima"))) - Exit Sub + If DrPS IsNot Nothing Then + + If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDecimal > 0 Then + 'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15... + If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then + Alert(String.Format("El producto se vende solo en cantidades de {0:#,###.####}", DrPS("VentaMinima"))) + Exit Sub + End If End If - End If - Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1"), If(TxtnLote.Visible, TxtnLote.Text, "-1"), If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)) + 'codigo provisional. + Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.selectedvalue.toentero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero + + + If DrPS("AplicaCaducidad").ToString = "True" AndAlso ChkSugiereFechaCaducidad.checked And CveSubP.Contiene(10276) Then + + Dim ObjInventarios As New ClsInventarios + If ObjInventarios.GetExistenciasCaducidad(CveProducto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.selectedvalue) Then + Dim dtt As DataTable = ObjInventarios.DtResultados + + If Cantidad > dtt.SUMD("Cantidad") Then + Alert("No se cuenta con la cantidad requerida") + Else + 'recorro las existencias para tomar la cantidad + Dim i As Decimal = 0 + Dim CantidadRestante As Decimal = Cantidad + For Each drr As DataRow In dtt.Rows + If drr("Cantidad").ToString.ToDecimal < CantidadRestante Then + i = drr("Cantidad").ToString.ToDecimal + Else + i = CantidadRestante + End If + AgregarPS(i, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Lote:=drr("Lote").ToString, FechaCaducidad:=drr("FechaCaducidad").ToString.ToDate, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie) + CantidadRestante -= i + If CantidadRestante <= 0 Then Exit For + Next + End If + + End If + + ObjInventarios.Dispose() + + Else + + 'codigo temporal + Dim tLote As String + Dim tCaducidad As Date + + tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1") + tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha) + + If CveSubP <> 10276 Then + tLote = "-1" + tCaducidad = MinFecha + End If + + + Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1"), tLote, tCaducidad) + + If Valido Then + AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie) + End If + + End If + + End If - If Valido Then - AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(TxtnLote.Visible, TxtnLote.Text, ""), FechaCaducidad:=If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha), CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie) - End If End If End Sub @@ -550,26 +604,39 @@ Partial Class Inventarios_TraspasoAlmacen Dim Inv As New ClsInventarios Dim Existencia As Decimal = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1) - 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir - 'las segunda consulta, que tenga existencia, ya con los parametros especificos - If FechaCaducidad > MinFecha OrElse Serie <> "" OrElse Lote <> "" Then - ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1) - Else - ExistenciaEspecificada = Existencia - End If - Inv.Dispose() - If Existencia - Cantidad - CantidadEnGrid < 0 OrElse ExistenciaEspecificada - Cantidad - CantidadEnGrid < 0 Then - If Existencia < 0 OrElse ExistenciaEspecificada < 0 Then - Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia) - RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") + If Existencia > 0 Then + 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir + 'las segunda consulta, que tenga existencia, ya con los parametros especificos + If (FechaCaducidad > MinFecha OrElse Serie <> "" OrElse Lote <> "") Then + ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1) + Dim StrB As New stringbuilder + StrB.appendformat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida) + If Serie <> "" Then StrB.appendformat(" AND Serie = '{0}' ", Serie) + If Lote <> "" Then StrB.appendformat(" AND Lote = '{0}' ", Lote) + If FechaCaducidad.ToDate > MinFecha Then StrB.appendformat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString) + Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.tostring) + + If ExistenciaEspecificada - Cantidad - CantidadEspecificaEnGrid < 0 Then + Alert(String.Format("Solo hay en existencia: {0:#,###.##}", ExistenciaEspecificada), TipoMensaje.MsgAdvertencia) + RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") + Retorno = False + End If Else - Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia) - RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") + ExistenciaEspecificada = Existencia + If Existencia - Cantidad - CantidadEnGrid < 0 Then + Alert(String.Format("Solo hay en existencia: {0:#,###.##}", ExistenciaEspecificada), TipoMensaje.MsgAdvertencia) + RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") + Retorno = False + End If End If - Retorno = False + Else + Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia) + RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") End If + Inv.Dispose() + Return Retorno End Function Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1) @@ -1482,6 +1549,13 @@ Partial Class Inventarios_TraspasoAlmacen ' CargaGvDatos() 'End Sub + Protected Sub ChkSugiereFechaCaducidad_CheckedChanged(sender As Object, e As EventArgs) + + TxtnFechaCaducidad.visible = Not ChkSugiereFechaCaducidad.checked + TxtnLote.visible = Not ChkSugiereFechaCaducidad.checked + + End Sub + #End Region From b7f7298275e8292189604ae8c84d8b196015a12f Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 Mar 2021 20:13:04 -0700 Subject: [PATCH 07/17] =?UTF-8?q?par=C3=A1metro=20de=20cvecuenta,=20al=20c?= =?UTF-8?q?argar=20p=C3=B3liza=20de=20saldo=20incial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- General/SaldosIniciales.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 4191ec709..0afefdaef 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -2021,7 +2021,7 @@ Partial Class General_SaldosIniciales If YaExiste = False Then If IdCuenta > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 95, Concepto, Now.toDate, -1, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 95, Concepto, Now.toDate, -1, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then TieneError = True Exit For End If @@ -2035,7 +2035,7 @@ Partial Class General_SaldosIniciales If Not TieneError Then ObjConta.Commit() - Alert(String.Format("

Prepóliza: {1}", CvePrePoliza, ObjConta.ContaFolio)) + Alert(String.Format("

Prepóliza: Prepóliza", CvePrePoliza, ObjConta.ContaFolio)) Alert($"Se agregó la póliza {ObjConta.ContaFolio}") From c6e5ec3af76ed55d739d07252c9d10be513fd608 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 10 Mar 2021 13:23:11 -0700 Subject: [PATCH 08/17] aplica siempre complementaria en clientes. --- Ventas/Ventas.aspx.vb | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 61708bf2c..87a4fad1e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -11261,8 +11261,7 @@ Partial Class Ventas CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero() End If - Dim UsaComplementariaClientes As Boolean = False - If UsuarioActual.CveEmpresa.Contiene(1, 119) Then UsaComplementariaClientes = True + Dim UsaComplementariaClientes As Boolean = True If ObjConta.GetPlantillaConceptos(ObjFactura.CveEmpresa, CvePlantilaPoliza) Then Dim dtt As DataTable = ObjConta.DtResultados @@ -12971,8 +12970,8 @@ Partial Class Ventas 'If TotalCosto <> 0 Then If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then - OcurrioError = True - End If + OcurrioError = True + End If 'End If Else @@ -13800,8 +13799,8 @@ Partial Class Ventas Dim CuentasContablesInvalidasSIG As New StringBuilder Dim ContaIdPoliza As Integer = 0 Dim ConceptoAmortizacion As Integer = 0 - Dim UsaComplementariaClientes As Boolean = False - If UsuarioActual.CveEmpresa.Contiene(1, 119) Then UsaComplementariaClientes = True + Dim UsaComplementariaClientes As Boolean = True + 'If UsuarioActual.CveEmpresa.Contiene(1, 119) Then UsaComplementariaClientes = True 'Dim FechaMaxima As Date = MinFecha @@ -15085,7 +15084,7 @@ Partial Class Ventas Dim ValorInventario As Decimal = 0 For Each RowInv As DataRow In tmpCostos.Rows - ValorInventario = DTMovimientosDetalles.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString().ToDecimal.RoundSQL() + ValorInventario = DTMovimientosDetalles.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD() IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() @@ -15109,7 +15108,7 @@ Partial Class Ventas End If IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {ddlAlmacen.SelectedValue}").ToEntero() - ValorInventario = DTMovimientosDetalles.SUMD("Total", $"CveMovimiento = {Mov("CveMovimiento")}").RoundSQL() + ValorInventario = DTMovimientosDetalles.SUMD("Total", $"CveMovimiento = {Mov("CveMovimiento")}").RoundAD() If ValorInventario <> 0 Then 'Entrada @@ -18411,7 +18410,7 @@ Partial Class Ventas Return Not OcurrioError End If - Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL + Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD If CvePrePoliza <= 0 Then GenerarPrePolizaNueva = True @@ -18424,7 +18423,7 @@ Partial Class Ventas End If For Each RowInv As DataRow In DtCostosDistinct.Rows - ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL + ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() TotalCostoAcumulado += ValorInventario @@ -18565,10 +18564,10 @@ Partial Class Ventas Dim ValorInventario As Decimal Dim TotalCostoAcumulado As Decimal = 0D Dim Cont As Integer = 1 - Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL + Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD For Each RowInv As DataRow In DtCostosDistinct.Rows - ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL + ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() TotalCostoAcumulado += ValorInventario @@ -18682,10 +18681,10 @@ Partial Class Ventas Dim ValorInventario As Decimal Dim TotalCostoAcumulado As Decimal = 0D Dim Cont As Integer = 1 - Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL + Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD For Each RowInv As DataRow In DtCostosDistinct.Rows - ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL + ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() TotalCostoAcumulado += ValorInventario @@ -23637,11 +23636,7 @@ Partial Class Ventas IdCuentaContableNoDeducible = 3114 End If - Dim UsaComplementaria As Boolean = False - - If UsuarioActual.CveEmpresa = 119 Then - UsaComplementaria = True - End If + Dim UsaComplementaria As Boolean = True If MsgError = "" Then CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Saldarr", 47, SaldoVenta, SaldoVenta, tCveMoneda, TxtFechaSaldarVenta.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) From d54b067b56a07f12afd29cac0840f7c8e253f7ef Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 10 Mar 2021 16:24:28 -0700 Subject: [PATCH 09/17] ajustes en manejo de lote/caducidad --- Inventarios/EntregaAlmacen.aspx.vb | 159 +++++++++++++++++------------ 1 file changed, 93 insertions(+), 66 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index a46d77cd0..1ae07f4b1 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -263,6 +263,15 @@ Partial Class Inventarios_EntregaAlmacen End Set End Property + Private Property ValidaLoteCaducidad As Boolean + Get + Return CType(ViewState("ValidaLoteCaducidad"), Boolean) + End Get + Set(value As Boolean) + ViewState("ValidaLoteCaducidad") = value + End Set + End Property + #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -270,7 +279,7 @@ Partial Class Inventarios_EntregaAlmacen InicializaValores() CargaParametrosAD() - If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then DdlAlmacen.AutoPostBack = True + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146, 119) Then DdlAlmacen.AutoPostBack = True If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Then @@ -527,7 +536,7 @@ Partial Class Inventarios_EntregaAlmacen CveVentaAD = -2 CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero()) End Sub - Private Sub CargaVentaPorSurtir(CveVenta As Integer) + Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1) LbSurtida.Visible = False CveContrato = -1 CveSubProyecto = -1 @@ -544,14 +553,14 @@ Partial Class Inventarios_EntregaAlmacen Dim ObjInventario As New ClsInventarios - If ObjInventario.EntregaAlmacenGet(CveVenta) Then + If ObjInventario.EntregaAlmacenGet(CveVenta, CveAlmacen) Then If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then - DtDatos = ObjInventario.DtResultados - DtDatos.Columns.Add("Consec", GetType(Integer)) - DtDatos.Columns.Add("CantidadGV", GetType(Double)) - DtDatos.Columns.Add("CantidadTraspaso", GetType(Double)) + DtDatos = ObjInventario.DtResultados + If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer)) + If Not DtDatos.Columns.Contains("CantidadGV") Then DtDatos.Columns.Add("CantidadGV", GetType(Double)) + If Not DtDatos.Columns.Contains("CantidadTraspaso") Then DtDatos.Columns.Add("CantidadTraspaso", GetType(Double)) Dim Index = 1 For Each Dr As DataRow In DtDatos.Rows Dr("Consec") = Index @@ -605,43 +614,45 @@ Partial Class Inventarios_EntregaAlmacen If TipoMovimiento = 2 And TipoDocto = "Rem" And Not CveAlmacenTraspasoDestino > 0 Then Alert("La remisión que se intenta devolver presenta inconsistencias. Comuniquese con servicio tecnico SIG.", TipoMensaje.MsgError) BtnGuardar.Visible = False - End If - - DdlAlmacen.Items.Clear() - If CveAlmacenTraspasoOrigen > 0 Then 'Not (EsDevolucionVenta = 1 And DtDatos.Rows(0)("TipoDocto").ToString() = "Rem" And UsuarioActual.Empresa.Funcionalidad(145) = "1") - ESTO ES PARA CUANDO SEA REMISION DE ENTREGA POR ADELANTADO FUNCIONA LA DEVOLUCION - DdlAlmacen.Items.Insert(0, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoOrigen}"), CveAlmacenTraspasoOrigen.ToString())) - Else - '[IPP] PARCHE - Debe hacerse permiso proceso - 17Enero2018 - Dim RestriccionAlmacenSubProyecto = If(UsuarioActual.CveEmpresa.Contiene(72, 80), $" AND CveSubProyecto = {CveSubProyecto}", "") - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"{StrAlmacenes} {RestriccionAlmacenSubProyecto}") - End If - DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) - DdlAlmacen.SelectedValue = "-1" - DdlAlmacen.DataBind() - DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) - If CveAlmacenTraspasoOrigen > 0 Then - DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) - End If - - If Not DtDatos.Columns.Contains("Serie") Then - DtDatos.Columns.Add("Serie", GetType(String)) - End If - If Not DtDatos.Columns.Contains("Lote") Then - DtDatos.Columns.Add("Lote", GetType(String)) - End If - If Not DtDatos.Columns.Contains("CveSeccion") Then - DtDatos.Columns.Add("CveSeccion", GetType(Integer)) - End If - If Not DtDatos.Columns.Contains("FechaCaducidad") Then - DtDatos.Columns.Add("FechaCaducidad", GetType(Date)) - End If - If Not DtDatos.Columns.Contains("Seleccionado") Then - DtDatos.Columns.Add("Seleccionado", GetType(Boolean)) - End If - If Not DtDatos.Columns.Contains("CantidadSeleccionada") Then - DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double)) - End If - + End If + + + If CveAlmacen <= 0 Then + DdlAlmacen.Items.Clear() + If CveAlmacenTraspasoOrigen > 0 Then 'Not (EsDevolucionVenta = 1 And DtDatos.Rows(0)("TipoDocto").ToString() = "Rem" And UsuarioActual.Empresa.Funcionalidad(145) = "1") - ESTO ES PARA CUANDO SEA REMISION DE ENTREGA POR ADELANTADO FUNCIONA LA DEVOLUCION + DdlAlmacen.Items.Clear() + DdlAlmacen.Items.Insert(0, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoOrigen}"), CveAlmacenTraspasoOrigen.ToString())) + Else + '[IPP] PARCHE - Debe hacerse permiso proceso - 17Enero2018 + Dim RestriccionAlmacenSubProyecto = If(UsuarioActual.CveEmpresa.Contiene(72, 80), $" AND CveSubProyecto = {CveSubProyecto}", "") + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"{StrAlmacenes} {RestriccionAlmacenSubProyecto}") + End If + + DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) + DdlAlmacen.SelectedValue = "-1" + DdlAlmacen.DataBind() + DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + If CveAlmacenTraspasoOrigen > 0 Then + DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) + End If + End If + + If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyecto = 10276 Then + ValidaLoteCaducidad = True + End If + + If Not DtDatos.Columns.Contains("Serie") Then DtDatos.Columns.Add("Serie", GetType(String)) + + If Not DtDatos.Columns.Contains("Lote") Then DtDatos.Columns.Add("Lote", GetType(String)) + + If Not DtDatos.Columns.Contains("CveSeccion") Then DtDatos.Columns.Add("CveSeccion", GetType(Integer)) + + If Not DtDatos.Columns.Contains("FechaCaducidad") Then DtDatos.Columns.Add("FechaCaducidad", GetType(Date)) + + If Not DtDatos.Columns.Contains("Seleccionado") Then DtDatos.Columns.Add("Seleccionado", GetType(Boolean)) + + If Not DtDatos.Columns.Contains("CantidadSeleccionada") Then DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double)) + If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then FormaPaqueteria = DtDatos.Rows(0)("FormaPaqueteria").ToString().ToEntero() Dim FormaPaq As Integer = FormaPaqueteria @@ -692,7 +703,7 @@ Partial Class Inventarios_EntregaAlmacen If TipoDocto.Contiene("Ing") AndAlso TipoMovimiento = 2 Then Dim DtMov As DataTable = DtExistencias.FiltraParametros("CveConcepto = 40", "", {"CveAlmacen"}) - If DtMov.Rows.Count > 0 Then + If DtMov.Rows.Count > 0 AndAlso CveAlmacen <= 0 Then Dim CveAlmacenDev As Integer = DtMov.Rows(0)("CveAlmacen").ToString().ToEntero() DdlAlmacen.Items.Clear() DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveAlmacen = {CveAlmacenDev}") @@ -719,7 +730,7 @@ Partial Class Inventarios_EntregaAlmacen ObjInventario.Dispose() UpGenerales.Update() - CargaGvDatos() + If CveAlmacen <= 0 Then CargaGvDatos() End Sub Private Sub CargaTraspasoPorSurtir(CveTraspaso As Integer) @@ -853,8 +864,9 @@ Partial Class Inventarios_EntregaAlmacen 'GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "") 'SugerirFecha() - If DdlAlmacen.SelectedValue.ToEntero > 0 Then - SugiereLoteCaducidad(DdlAlmacen.SelectedValue.ToEntero) + If DdlAlmacen.SelectedValue.ToEntero > 0 And CveVentaSurtir > 0 Then + CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero) + ' SugiereLoteCaducidad(DdlAlmacen.SelectedValue.ToEntero) End If End If GvDatos.DataSource = DtDatos @@ -943,21 +955,25 @@ Partial Class Inventarios_EntregaAlmacen e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False End If - If CBool(e.Row.DBCampo("AplicaCaducidad")) Then - e.Row.FCTextBox("TxtCaducidad").Visible = True - e.Row.FCLinkButton("LnkCaducidad").Visible = True - - Else - e.Row.FCTextBox("TxtCaducidad").Visible = False - e.Row.FCLinkButton("LnkCaducidad").Visible = False - End If - - If CBool(e.Row.DBCampo("AplicaLote")) Then - e.Row.FCTextBox("TxtLote").Visible = True - Else - e.Row.FCTextBox("TxtLote").Visible = False - End If - + If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then + If CBool(e.Row.DBCampo("AplicaCaducidad")) Then + e.Row.FCTextBox("TxtCaducidad").Visible = True + e.Row.FCLinkButton("LnkCaducidad").Visible = True + e.Row.FCTextBox("TxtCaducidad").readonly = True + Else + e.Row.FCTextBox("TxtCaducidad").Visible = False + e.Row.FCLinkButton("LnkCaducidad").Visible = False + End If + + If CBool(e.Row.DBCampo("AplicaLote")) Then + e.Row.FCTextBox("TxtLote").Visible = True + e.Row.FCTextBox("TxtLote").readonly = True + Else + e.Row.FCTextBox("TxtLote").Visible = False + End If + + End If + e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID)) e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString() e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("CantidadF"), e.Row.FCButton("BtnDividir").ClientID)) @@ -1627,7 +1643,13 @@ Partial Class Inventarios_EntregaAlmacen Exit For End If - Next + Next + + If (Not ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then + ValidaSeccion = False + ValidaCaducidad = False + ValidaLote = False + End If If ValidaSeccion Then Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia) @@ -1769,6 +1791,11 @@ Partial Class Inventarios_EntregaAlmacen FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha) Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1") + If Not ValidaLoteCaducidad Then + FechaCaducidad = MinFecha + Lote = "-1" + End If + If Dr("CantidadGV").ToString().ToDecimal > 0 Then If CBool(Dr("AplicaSerie")) Then DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) @@ -2438,7 +2465,7 @@ Partial Class Inventarios_EntregaAlmacen PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") Exit For @@ -2450,7 +2477,7 @@ Partial Class Inventarios_EntregaAlmacen PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") Exit For From c5901f5a0c2298c4404b78a032e135d49520fdba Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 Mar 2021 12:11:41 -0700 Subject: [PATCH 10/17] seccion --- Inventarios/EntregaAlmacen.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 1ae07f4b1..6d6b9aa89 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2477,7 +2477,7 @@ Partial Class Inventarios_EntregaAlmacen PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") Exit For @@ -2488,7 +2488,7 @@ Partial Class Inventarios_EntregaAlmacen PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.") Exit For From 9d9178061738a827777300be921ee58c67feef9b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 Mar 2021 12:11:56 -0700 Subject: [PATCH 11/17] aplica para venta a todos --- Ventas/Ventas.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 87a4fad1e..d65958e1f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6373,6 +6373,7 @@ Partial Class Ventas Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString()) Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas") Objeto.ddlWS.Attributes.Add("data-Estatus", "1") + Objeto.ddlWS.Attributes.Add("data-AplicaparaVenta", "1") End If End Sub From 9e24a34f93c3968fda26872bc2f3537ad76756a5 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 Mar 2021 12:12:13 -0700 Subject: [PATCH 12/17] parametro estatus promociones --- Ventas/PV.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 5e4698a5b..8826d76a9 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -3064,7 +3064,7 @@ Partial Class PV 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, 1, UsuarioActual.CveEmpresa) Then DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -4523,7 +4523,7 @@ Partial Class PV 'VALIDA PROMOCIONES Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, 1, UsuarioActual.CveEmpresa) Then DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() From 09a5275e315c5be8efbc33cf86d297e2a7e181fe Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 Mar 2021 12:13:02 -0700 Subject: [PATCH 13/17] correccion en texto --- Compras/Compras.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 0809c0dc4..ab912d19b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6699,7 +6699,7 @@ Partial Class Compras_Compras Dim TCO As Decimal = 1 For Each Dr As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 2").Rows If ObjOC.OrdenesCompraDetalleCostoPP(Dr("CveOrdenCompraDetalle").ToString.ToEntero) AndAlso ObjOC.DtResultados.Rows.Count >= 1 Then - Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString} Inv{ObjOC.DtResultados.FiltroPrimeroValor("FolioAlmacen").ToString}" + Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString} Inv:{ObjOC.DtResultados.FiltroPrimeroValor("FolioAlmacen").ToString}" Importe176 = ObjOC.DtResultados.FiltroPrimeroValor("Importe176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN176").ToDecimal * Dr("Cantidad").ToString.ToDecimal Importe228 = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN228").ToDecimal * Dr("Cantidad").ToString.ToDecimal Importe229 = ObjOC.DtResultados.FiltroPrimeroValor("Importe229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN229").ToDecimal * Dr("Cantidad").ToString.ToDecimal @@ -20227,7 +20227,7 @@ Private Sub CargaNCINV() - If DiferenciaInvOC.RoundSQL() <> 0 Then + If DiferenciaInvOC.RoundAD() <> 0 Then @@ -20241,8 +20241,8 @@ Private Sub CargaNCINV() If CvePrePoliza > 0 Then If CveMoneda = 2 And UsuarioActual.CveEmpresa.Contiene(119) Then - ImporteME = (DiferenciaInvOC / TCInvOC).RoundSQL() - ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundSQL() + ImporteME = (DiferenciaInvOC / TCInvOC).RoundAD() + ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundAD() Dim DifImporte As Decimal = DiferenciaInvOC - (ImporteME + ImporteMEComp) From be331bcac5dc6d675cdfc49dbf6af6f444924614 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 Mar 2021 12:16:29 -0700 Subject: [PATCH 14/17] tipocontabilidad 2 --- Contabilidad2/CatCuentas.aspx.vb | 60 +++++++++++++++++--------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 40341986f..3b47bd41e 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -315,7 +315,7 @@ Partial Class Contabilidad2_CatCuentas Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") - If UsuarioActual.Empresa.TipoContabilidad <> 1 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 Then Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) @@ -371,7 +371,7 @@ Partial Class Contabilidad2_CatCuentas 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta2 As ClsContPAQi Dim CuentaEfectivo As Integer = 0 Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable @@ -388,41 +388,45 @@ Partial Class Contabilidad2_CatCuentas If idnew > 0 Then Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text - If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero - Dim IdAgrupador As Integer + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa) - If ObjConta2.GetAgrupadoresSAT() Then - IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero - End If + If ObjConta2.GetCuentas(-1, "-1", -1) Then + Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero + Dim IdAgrupador As Integer - If IdPadre > 0 Then - Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IdPadre, IdAgrupador) - - If idnew2 > 0 Then - If ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then - End If + If ObjConta2.GetAgrupadoresSAT() Then + IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero End If + If IdPadre > 0 Then + Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IdPadre, IdAgrupador) + + If idnew2 > 0 Then + If ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then + End If + End If + + End If End If End If Dim dr As DataRow = DtDatos.NewRow - dr("CveCuenta") = idnew - dr("CuentaFormato") = TxtCuenta.Text - 'dr("CuentaFormato") = Tcuenta.Text - dr("Nombre") = Tnombre.Text - dr("CtaCodigo") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) - 'dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text) - dr("Tipo") = DTcuenta.SelectedValue.ToString + dr("CveCuenta") = idnew + dr("CuentaFormato") = TxtCuenta.Text + 'dr("CuentaFormato") = Tcuenta.Text + dr("Nombre") = Tnombre.Text + dr("CtaCodigo") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) + 'dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text) + dr("Tipo") = DTcuenta.SelectedValue.ToString dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString dr("CvePadre") = IDSelected - dr("Codigo") = Tnombre.Text - dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero - dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero - dr("NomIdioma") = TxtNomIngles.Text.Trim - DtDatos.Rows.Add(dr) - ArbolCuentas.DataSource = DtDatos + dr("Codigo") = Tnombre.Text + dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero + dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero + dr("NomIdioma") = TxtNomIngles.Text.Trim + DtDatos.Rows.Add(dr) + ArbolCuentas.DataSource = DtDatos '.Attributes.Add("data-hijos","0"); Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 @@ -444,7 +448,7 @@ Partial Class Contabilidad2_CatCuentas End If ObjConta.Dispose() - ObjConta2.Dispose() + If ObjConta2 IsNot Nothing Then ObjConta2.Dispose() End Sub Private Sub LimpiarCampos() TxtCuenta.Text = "" From a96cbd51f7837252e728cf85ce99303ebb75d35c Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 11 Mar 2021 16:21:59 -0700 Subject: [PATCH 15/17] BDH. Filtro por Marca y bloqueo de pantalla en PV. --- App_Code/ClsInventarios.vb | 3 +- App_Code/ClsSisUsuarios.vb | 30 +- App_Code/Usuario.vb | 4 +- Ashx/SIGWeb.ashx | 4 +- Scripts/custom.js | 3 +- Sistemas/UsuarioDetalle.aspx | 5699 ++++++++++++++++--------------- Sistemas/UsuarioDetalle.aspx.vb | 336 +- Ventas/PV.aspx | 97 +- Ventas/PV.aspx.vb | 145 +- 9 files changed, 3302 insertions(+), 3019 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 45f22427f..691661c88 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2048,7 +2048,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer) As Boolean + Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ProductosServiciosInventario") @@ -2059,6 +2059,7 @@ Public Class ClsInventarios .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@AplicaParaVenta", SqlDbType.Int).Value = AplicaParaVenta .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca End With Try diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index d1ff35a2d..ed02a6324 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -416,7 +416,29 @@ Public Class ClsSisUsuarios Return Retorno End Function - + Public Function ValidaUsuarioCodigoAcceso(CodigoAcceso As String, CveEmpresa As Integer) As Integer + Dim Retorno As Integer = Nothing + + DataAdapter("PA_Sis_UsuariosCodigoAccesoGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + If Data.Rows.Count > 0 Then + Retorno = Data.Rows(0)("CveUsuario").ToString.ToEntero + End If + + Catch ex As SqlException + OnError("Ocurrió un error al obtener el usuario.", ex) + Retorno = Nothing + End Try + + Return Retorno + End Function Public Function ValidaUsuarioPortalCliente(CveCliente As Integer, Usuario As String, Password As String) As Usuario Dim Retorno As Usuario = Nothing @@ -799,7 +821,7 @@ Public Class ClsSisUsuarios Public Function AddUsuario(Usuario As String, Contraseña As String, Nombre As String, CveRol As Integer, Correo As String, CvePersonal As Integer, CveVendedor As Integer, CambiarContraseña As Boolean, CveUsuarioIng As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Optional Rol As String = "-1", Optional CveAlmacenAsignado As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False, - Optional CvePlataforma As Integer = -1, Optional CveClientePlataforma As Integer = -1, Optional CveProveedorPlataforma As Integer = -1, Optional DescuentoAutorizado As Double = 0) As Integer + Optional CvePlataforma As Integer = -1, Optional CveClientePlataforma As Integer = -1, Optional CveProveedorPlataforma As Integer = -1, Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1") As Integer Dim Retorno = -1 DataAdapter("PA_Sis_UsuarioAdd") With SqlAdapter.SelectCommand.Parameters @@ -819,6 +841,7 @@ Public Class ClsSisUsuarios .Add("@CveCliente", SqlDbType.Int).Value = CveClientePlataforma .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedorPlataforma .Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado + .Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso .Add("@CveUsuario", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -917,7 +940,7 @@ Public Class ClsSisUsuarios End Function Public Function UpdateUsuario(Usuario As String, Nombre As String, CveRol As Integer, Correo As String, CvePersonal As Integer, CveVendedor As Integer, CambiarContraseña As Boolean, Activo As Boolean, CveEmpresa As Integer, CveUsuario As Integer, CveAlmacenAsignado As Integer, CveSubProyecto As Integer, Optional CveUsuarioModifico As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False, - Optional DescuentoAutorizado As Double = 0) As Boolean + Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Sis_UsuarioUpdate") @@ -938,6 +961,7 @@ Public Class ClsSisUsuarios .Add("@AsignarSubProyecto", SqlDbType.Bit).Value = AsignarSubProyecto .Add("@AsignarOC", SqlDbType.Bit).Value = AsignarOC .Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado + .Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso End With Try diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb index 3a6066805..6ae6e14d1 100644 --- a/App_Code/Usuario.vb +++ b/App_Code/Usuario.vb @@ -60,7 +60,9 @@ Public Class Usuario Public Property UTCOffset As Integer - Public Property isLoginseted As Boolean = False + Public Property isLoginseted As Boolean = False + + Public Property SesionBloqueada As Boolean = False Public ReadOnly Property FechaActualCliente As DateTime Get diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 5b1f83c44..9b7356db4 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -694,10 +694,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "-1").ToString.ToEntero + Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero Dim UsaGlobal As Boolean = True - 'verifica existencias If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then UsaGlobal = False @@ -707,7 +707,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If Dim objInv As New ClsInventarios - If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then + If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca) Then ' limpio los almacenes donde no tiene ningun producto existencia diff --git a/Scripts/custom.js b/Scripts/custom.js index afe9649fa..74eac68b9 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1200,7 +1200,8 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) { metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'), Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'), ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'), - aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa') + aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'), + cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca') //Metodo: metodo }; diff --git a/Sistemas/UsuarioDetalle.aspx b/Sistemas/UsuarioDetalle.aspx index e8217723e..512355535 100644 --- a/Sistemas/UsuarioDetalle.aspx +++ b/Sistemas/UsuarioDetalle.aspx @@ -1,166 +1,167 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="UsuarioDetalle.aspx.vb" Inherits="Sistemas_UsuarioDetalle" %> - -<%@ PreviousPageType VirtualPath="Usuarios.aspx" %> - - - - - - - - - - - -
  • - - <%--Clonar Usuario --%> - - Clonar Usuario - -
  • -
  • - Actualizar Gestor Cobranza -
  • -
    -
    - -
    - -   - - - - - - - - - - - - - -
    -
    - - -
    -
    -
    - - Datos del Usuario -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - --%> + + + + + + + + + + + + + + + + + +
    Usuario: - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="UsuarioDetalle.aspx.vb" Inherits="Sistemas_UsuarioDetalle" %> + +<%@ PreviousPageType VirtualPath="Usuarios.aspx" %> + + + + + + + + + + + +
  • + + <%--Clonar Usuario --%> + + Clonar Usuario + +
  • +
  • + Actualizar Gestor Cobranza +
  • +
    +
    + +
    + +   + + + + + + + + + + + + + +
    +
    + + +
    +
    +
    + + Datos del Usuario +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + <%-- - --%> - - - - - - - - - - - - -
    Usuario: + + +   + vpn_lock - + lock - + email - + <%----%> -
    Contraseña: - - - -
    Nombre: - - - -
    Rol: - - - - - -
    Correo: - - - -
    Contraseña: + + + +
    Nombre: + + + +
    Rol: + + + + + +
    Correo: + + + +
    Supervisa: @@ -182,2324 +183,2343 @@
    Empresa: - - - - - - - - - -
    Sessión por equipo
    Autorizar equipo
    -
    -
    -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    - - General -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Empresa: - - - -
    Personal - -
    Documento Venta - -
    Vendedor - -
    Sucursal: - - - <%----%> - - - -
    Almacén: - - - - - -
    Descuento Autorizado: - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - Almacen -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - -
    AlmacénComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - +
    Empresa: + + + + + + + + + +
    Sessión por equipo
    Autorizar equipo
    Código Acceso: + + + + lock + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    + + General +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Empresa: + + + +
    Personal + +
    Documento Venta + +
    Vendedor + +
    Sucursal: + + + <%----%> + + + +
    Almacén: + + + + + +
    Descuento Autorizado: + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + Almacen +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    AlmacénComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + +   - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - SubProyectos -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - -
    Proyecto - Comandos
    - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + SubProyectos +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + +
    Proyecto + Comandos
    + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +   - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - Estatus de Órdenes de Compra -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - -
    - - - - - - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - -
    - - - - - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - Cuentas Bancarias -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - -
    No. Cuenta/ Resp. Caja ChicaComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - Estatus de Órdenes de Servicio -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - - - - - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - Clasificaciones -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - -
    ClasificaciónComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    - - - - -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    - - Asignación de Permisos -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - - - - - - - - - - - - - <%----%> - -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - Asignar Procesos -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - - - - - -
    -
    -
    -
    -
    - - Listado de Empresas -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - Restricciones -
    -
    -
    - -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    - -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    -
    -
    + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + Estatus de Órdenes de Compra +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + Cuentas Bancarias +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    No. Cuenta/ Resp. Caja ChicaComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + Estatus de Órdenes de Servicio +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + Clasificaciones +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    ClasificaciónComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    + + Asignación de Permisos +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + + + + + + + + <%----%> + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + + Asignar Procesos +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + +
    +
    +
    +
    +
    + + Listado de Empresas +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + + Restricciones +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    Empresa: -
    -
    - - - -
    -
    -
    - -
    -
    -
    -
    - -
    - <%--EMPRESAS--%> -
    -
    -
    -
    - - Empresas -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - -
    - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - <%--ROLES--%> -
    -
    -
    -
    - - ROLES -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    RolComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - - <%--INDICADORES--%> -
    -
    -
    -
    - - Indicadores -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - -
    - - - - - - - - - - -
    -
    -
    -
    -
    -
    - -
    - -
    - - <%--ALMACENES--%> -
    -
    -
    -
    - - Almacen -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    AlmacénComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - <%--SUBPROYECTOS--%> -
    -
    -
    -
    - - SubProyectos -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    ProyectoComandos
    - - - -
    - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - <%--CUENTAS BANCARIAS--%> -
    -
    -
    -
    - - Cuentas Bancarias -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    No. Cuenta/ Resp. Caja ChicaComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - -
    - - -
    -
    -
    -
    -
    - - ESTATUS DE ÓRDENES DE COMPRA -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    Tipo - Comandos
    - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - -
    -
    -
    -
    -
    - -
    -
    - -
    - - <%--MODULOS--%> -
    -
    -
    -
    - - Módulos -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    - - <%--PERMISOS--%> -
    -
    -
    -
    - - Permisos -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    - - Indicadores -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    - - Sistema -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Fecha último acceso: -
    Fecha último cambio de contraseña: -
    Política de cambio de contraseña -
    Fecha de captura: -
    Usuario capturó: -
    Estado: -
    -
    -
    -
    -
    -
    -
    -
    - - Bitácora de registro -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - - - - -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    - - Bitacora -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - - - - + + + +
    - - + <%--EMPRESAS--%> +
    +
    +
    +
    + + Empresas +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + +
    + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + <%--ROLES--%> +
    +
    +
    +
    + + ROLES +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    RolComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    + + <%--INDICADORES--%> +
    +
    +
    +
    + + Indicadores +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    + +
    + + <%--ALMACENES--%> +
    +
    +
    +
    + + Almacen +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    AlmacénComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + <%--SUBPROYECTOS--%> +
    +
    +
    +
    + + SubProyectos +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    ProyectoComandos
    + + + +
    + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + <%--CUENTAS BANCARIAS--%> +
    +
    +
    +
    + + Cuentas Bancarias +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    No. Cuenta/ Resp. Caja ChicaComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    +
    + + ESTATUS DE ÓRDENES DE COMPRA +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    Tipo + Comandos
    + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    + +
    + + <%--MODULOS--%> +
    +
    +
    +
    + + Módulos +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    + + <%--PERMISOS--%> +
    +
    +
    +
    + + Permisos +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + + + + + + + + +
    +
    +
    +
    +
    + + Indicadores +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    + + Sistema +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Fecha último acceso: +
    Fecha último cambio de contraseña: +
    Política de cambio de contraseña +
    Fecha de captura: +
    Usuario capturó: +
    Estado: +
    +
    +
    +
    +
    +
    +
    +
    + + Bitácora de registro +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    + + + + +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    + + Bitacora +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + - - - + + + + + + + - - -
    - - - + + +
    + + +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Día de la SemanaHora InicioHora Fin
    + + Todos +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Lunes +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Martes +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Miercoles +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Jueves +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Viernes +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Sabado +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Domingo +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + +
    + + + - + + diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index 3c125be18..89a9b347e 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -6,8 +6,8 @@ Imports System.Data Imports System.Threading Partial Class Sistemas_UsuarioDetalle - Inherits ClsPaginas - + Inherits ClsPaginas + #Region "P R O P I E D A D E S" Private Property DTEstatusSubProyectos As DataTable Get @@ -84,6 +84,11 @@ Partial Class Sistemas_UsuarioDetalle Get Return ViewState("Password").ToString End Get + End Property + Private ReadOnly Property CodigoAcceso As String + Get + Return ViewState("CodigoAcceso").ToString + End Get End Property Private Property DtClasificaciones As DataTable Get @@ -390,10 +395,10 @@ Partial Class Sistemas_UsuarioDetalle Set(value As Integer) ViewState("CveEmpresaAnterior") = value End Set - End Property + End Property #End Region - - + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -444,27 +449,30 @@ Partial Class Sistemas_UsuarioDetalle TrDescuentoAutorizado.Visible = True End If - - CargaDatos() - InicializaClonarUsuario() - InicializaRestricciones() - CargaGvBitacora() - CargaEmpresasAsignaciones() - CreaDtAsignacionesMultiEmpresa() - CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero - + If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then + TrCodigoAcceso.Visible = True End If - End Sub - - 'DOCUMENTACION - 'LOS CAMPOS DE DATATABLE "ACCION" SE REFIERE AL ESTATUS DE LOS CAMBIOS QUE OCURRIERON ANTES DE DARLE GUARDAR - ' 0/NULL/VACIO = ORIGINAL (SIN CAMBIO) - ' 1 = AGREGADO - ' 2 = ELIMINADO - ' 3 = NADA (AGREGADO Y ELIMINADO): CUANDO AGREGA UN REGISTRO Y LO ELIMINA, ES DECIR, NO SE GUARDA NADA - ' 4 = UPDATE - + CargaDatos() + InicializaClonarUsuario() + InicializaRestricciones() + CargaGvBitacora() + CargaEmpresasAsignaciones() + CreaDtAsignacionesMultiEmpresa() + CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero + + End If + End Sub + + 'DOCUMENTACION + 'LOS CAMPOS DE DATATABLE "ACCION" SE REFIERE AL ESTATUS DE LOS CAMBIOS QUE OCURRIERON ANTES DE DARLE GUARDAR + ' 0/NULL/VACIO = ORIGINAL (SIN CAMBIO) + ' 1 = AGREGADO + ' 2 = ELIMINADO + ' 3 = NADA (AGREGADO Y ELIMINADO): CUANDO AGREGA UN REGISTRO Y LO ELIMINA, ES DECIR, NO SE GUARDA NADA + ' 4 = UPDATE + + #Region " C A R G A R - D A T O S " Private Sub CargaDatos() @@ -518,10 +526,10 @@ Partial Class Sistemas_UsuarioDetalle CargarRol() CargaAsignaciones() - CargaUsuarioResponsable - - ' ValidaAccesoEstatusOC() - + CargaUsuarioResponsable() + + ' ValidaAccesoEstatusOC() + End Sub Public Sub CargaUsuarioResponsable() @@ -545,7 +553,7 @@ Partial Class Sistemas_UsuarioDetalle ViewState("CveRol") = ObjUsuario.CveRol.ToString DdlRol.SelectedValue = ObjUsuario.CveRol.ToString TxtCorreo.Text = ObjUsuario.Correo - + TxtCodigoAcceso.Text = ObjUsuario.DtResultados.Rows(0)("CodigoAcceso").ToString() Dim autoip As String = ObjUsuario.DtResultados.Rows(0)("AutorizadoxIP").ToString().ToUpper() 'chkSessionxEquipo.Checked = (autoip = "1" OrElse autoip = "TRUE") @@ -553,6 +561,7 @@ Partial Class Sistemas_UsuarioDetalle 'DdlAutoriza.SelectedValue = ObjUsuario.CveAutoriza.ToString ViewState("Password") = ObjUsuario.Contraseña + ViewState("CodigoAcceso") = ObjUsuario.DtResultados.Rows(0)("CodigoAcceso").ToString() ViewState("CveEmpresa") = ObjUsuario.CveEmpresaPredeterminada DdlEmpresa.SelectedValue = CveEmpresa.ToString @@ -749,23 +758,23 @@ Partial Class Sistemas_UsuarioDetalle If CveTipoDocumentoAsignado <> "-1" Then DdlTipoDocumento.SelectedValueExist(CveTipoDocumentoAsignado) UpFiltrosAsignarPermiso.Update() - End Sub + End Sub #End Region - - 'Private Sub CargaSucursal() - ' DtSubProyectos2 = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto =" & DdlSubProyectos.SelectedValue.ToEntero) - ' If DtSubProyectos2.Rows.Count > 0 Then - ' Dim dr As DataRow - ' dr = DtSubProyectos2(0) - ' CveSucursal = dr("CveSucursal").ToString.ToEntero - ' Else - ' CveSucursal = -1 - ' End If - - 'End Sub - + + 'Private Sub CargaSucursal() + ' DtSubProyectos2 = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto =" & DdlSubProyectos.SelectedValue.ToEntero) + ' If DtSubProyectos2.Rows.Count > 0 Then + ' Dim dr As DataRow + ' dr = DtSubProyectos2(0) + ' CveSucursal = dr("CveSucursal").ToString.ToEntero + ' Else + ' CveSucursal = -1 + ' End If + + 'End Sub + #Region " G U A R D A R - U P D A T E " - + Private Function ValidaUsername(Username As String, Correo As String) As Boolean Dim Retorno As Boolean = True 'If CveUsuario = -1 Then @@ -818,10 +827,11 @@ Partial Class Sistemas_UsuarioDetalle DtAsignacionesMultiEmpresa.Rows.Add(Row) End If + Dim CodigoAcceso As String = If(String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim), "-1", TxtCodigoAcceso.Text.Trim) 'REGISTRA O ACTUALIZA LOS DATOS GENERALES DEL USUARIO If CveUsuario = -1 Then - CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble) + CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) EsNuevoUsuario = True If CveUsuario = -1 Then TieneError = True @@ -833,7 +843,7 @@ Partial Class Sistemas_UsuarioDetalle End If Next Else - If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble) Then + If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) Then TieneError = True End If @@ -1398,10 +1408,10 @@ Partial Class Sistemas_UsuarioDetalle Catch ex As Exception OnError("Ocurrió error al mandar MAIL", ex) End Try - End Sub + End Sub #End Region - - + + #Region " E L I M I N A R - U S U A R I O " Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click ''DENTRO DEL PROCEDIMIENTO ELIMINA TODO LO RELACIONADO CON EL USUARIO (ALMACENES, SUBPROYECTOS, ACCESO A EMPRESAS...) @@ -1413,10 +1423,10 @@ Partial Class Sistemas_UsuarioDetalle Alert("Ocurrió un error al eliminar el usuario. Por favor vuelva a intentar", TipoMensaje.MsgError) End If ObjUsuario.Dispose() - End Sub + End Sub #End Region - - + + #Region " CONTRASEÑA " Protected Sub LnkRestablecer_Click(sender As Object, e As EventArgs) Handles LnkRestablecer.Click Dim Usuario As New ClsSisUsuarios @@ -1430,11 +1440,15 @@ Partial Class Sistemas_UsuarioDetalle Protected Sub LnkVerPass_Click(sender As Object, e As EventArgs) Handles LnkVerPass.Click Alert(Extensiones.Decripta(Password)) - End Sub - + End Sub + Protected Sub LnkVerCodigoAcceso_Click(sender As Object, e As EventArgs) Handles LnkVerCodigoAcceso.Click + Alert(CodigoAcceso) + End Sub + + #End Region - - + + #Region "TAB - ASIGNACIONES" Protected Sub DdlEmpresaAsignaciones_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignaciones.SelectedIndexChanged @@ -1496,8 +1510,8 @@ Partial Class Sistemas_UsuarioDetalle DtAsignacionesMultiEmpresa.Columns.Add("CveSucursal", GetType(Integer)) DtAsignacionesMultiEmpresa.Columns.Add("CveAlmacen", GetType(Integer)) DtAsignacionesMultiEmpresa.Columns.Add("CveTipoDocumento", GetType(String)) - End Sub - + End Sub + #Region " PROYECTOS-SUBPROYECTOS " Private Sub CargaProyectos() DdlProyecto.Items.Clear() @@ -1879,8 +1893,8 @@ Partial Class Sistemas_UsuarioDetalle End If End If ChkAsignarAllProyectos.Checked = False - End Sub - + End Sub + #Region "GV SUBPROYECTOS" Protected Sub GvSubProyectos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvSubProyectos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -1982,14 +1996,14 @@ Partial Class Sistemas_UsuarioDetalle GvSubProyectos.EditIndex = -1 CargaGvSubProyectos() - End Sub - + End Sub + #End Region - + #End Region - + #Region " ALMACENES " - + Private Function GetAlmacenesSinGV() As String Dim SB As New StringBuilder Dim prefix As String = "" @@ -2098,8 +2112,8 @@ Partial Class Sistemas_UsuarioDetalle Private Sub CargaGVAlmacen() GvAlmacenes.DataSource = DtAlmacenes.FiltraParametros(String.Format("CveEmpresa = {0} And (isnull(Accion,0) < 2 Or Accion = 4)", DdlEmpresaAsignaciones.SelectedValue.ToEntero)) GvAlmacenes.DataBind() - End Sub - + End Sub + #Region "GV ALMACENES" Protected Sub GvAlmacenes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAlmacenes.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -2186,11 +2200,11 @@ Partial Class Sistemas_UsuarioDetalle GvAlmacenes.EditIndex = -1 CargaGVAlmacen() - End Sub + End Sub #End Region - + #End Region - + #Region " CUENTAS BANCARIAS " Private Sub CargaCuentasBancarias() DdlCuentasBancarias.Items.Clear() @@ -2253,9 +2267,9 @@ Partial Class Sistemas_UsuarioDetalle DtCuentasBancarias.AcceptChanges() CargaGvCuentasBancarias() - End Sub + End Sub #End Region - + #Region " ESTATUS DE ÓRDENES DE COMPRA" Private Sub CargaEstatusOrdenesCompra() ' Exit Sub @@ -2449,9 +2463,9 @@ Partial Class Sistemas_UsuarioDetalle Else CargaGridEstatusUsuarioOC("OC") End If - End Sub + End Sub #Region "GRIDVIEW" - + Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString)) @@ -2706,13 +2720,13 @@ Partial Class Sistemas_UsuarioDetalle End If Next End If - End Sub - - + End Sub + + #End Region - + #End Region - + #Region "ESTATUS DE ORDENES DE SERVICIO" Private Sub CargaEstatusOS() CreaGridEstatusOS() @@ -2865,9 +2879,9 @@ Partial Class Sistemas_UsuarioDetalle End If Next Next - End Sub + End Sub #End Region - + #Region " ESTATUS ORDENES DE COMPRA - CLASIFICACIONES USUARIO OC " Private Sub InicializaEstasClasificacionesOC() @@ -2929,15 +2943,15 @@ Partial Class Sistemas_UsuarioDetalle ObjOC.Dispose() CargaGVOCClasificaciones() - End Sub - - - + End Sub + + + #End Region - + #End Region - - + + #Region "TAB - ACCESO MODULOS" Public Sub CargaModulosAcceso() Dim ObjPermisos As New ClsSisUsuarios @@ -3023,10 +3037,10 @@ Partial Class Sistemas_UsuarioDetalle Alert("Los Permisos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""") End If ObjUsuario.Dispose() - End Sub + End Sub #End Region - - + + #Region "TAB - PERMISO MODULOS" Public Sub CargaModulosPermisos() Dim ObjProcesos As New ClsSisUsuarios @@ -3126,10 +3140,10 @@ Partial Class Sistemas_UsuarioDetalle Alert("Los Procesos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""") End If ObjUsuario.Dispose() - End Sub + End Sub #End Region - - + + #Region "TAB - ACCESO EMPRESAS" Private Sub CargaEmpresas() Dim ClsUsuarios As New ClsSisUsuarios @@ -3319,10 +3333,10 @@ Partial Class Sistemas_UsuarioDetalle Private Sub LnkRenviaCorreo_Click(sender As Object, e As EventArgs) Handles LnkRenviaCorreo.Click EnviaCorreo() Alert("Correo enviado con exito.", TipoMensaje.MsgInformacion) - End Sub + End Sub #End Region - - + + #Region "TAB - RESTRICCIONES ACCESO " Private Sub InicializaRestricciones() CargaDtRestricciones() @@ -3535,8 +3549,8 @@ Partial Class Sistemas_UsuarioDetalle CargaGvRestricciones() RegistraScript("$('#DivAgregarRestricción').modal('hide')") - End Sub - + End Sub + #Region " GV " Private Sub GvRestricciones_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvRestricciones.RowCommand @@ -3626,13 +3640,13 @@ Partial Class Sistemas_UsuarioDetalle End If CargaGvRestricciones() - End Sub + End Sub #End Region - - + + #End Region - - + + #Region "TAB - INDICADORES" Public Sub CargaGridIndicadores() Dim Objeto As New ClsIndicadores @@ -3649,11 +3663,11 @@ Partial Class Sistemas_UsuarioDetalle e.Row.FCCheckBox("chkIndicador").Checked = True End If End If - End Sub - + End Sub + #End Region - - + + #Region " CLONAR USUARIO " Private Sub InicializaClonarUsuario() DdlUsuarioClonar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa) @@ -3739,12 +3753,12 @@ Partial Class Sistemas_UsuarioDetalle 'CargaDatos() Return Retorno - End Function - - + End Function + + #End Region - - + + #Region " MANDA CORREO " Private Sub MandaCorreo(Asunto As String, Para As String, Body As String) Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para) @@ -3752,13 +3766,13 @@ Partial Class Sistemas_UsuarioDetalle Dim Mail As New ClsSisMail() 'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, "", "", Nothing, Body) Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub - - - + End Sub + + + #End Region - - + + #Region " ASIGNACIONES DE PERMISOS " Protected Sub DdlEmpresaAsignarPermiso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignarPermiso.SelectedIndexChanged CargaAsignaciones() @@ -3782,8 +3796,8 @@ Partial Class Sistemas_UsuarioDetalle CargaDtEstatusOC() CargaGvEstatusOC() - End Sub - + End Sub + #Region " EMPRESAS " Public Sub CargaDTEmpresasAsignar() Dim ObjPermisos As New ClsSisUsuarios @@ -3842,10 +3856,10 @@ Partial Class Sistemas_UsuarioDetalle CargaAsignaciones() - End Sub - + End Sub + #End Region - + #Region " ROLES " Private Sub CargaDtRolesAsignar() Dim ClsUsuarios As New ClsSisUsuarios @@ -3934,9 +3948,9 @@ Partial Class Sistemas_UsuarioDetalle DTRolesAsignar.AcceptChanges() CargaGVRolesAsignar() - End Sub + End Sub #End Region - + #Region " ALMACENES " Private Sub CargaDtAlmacenAsignar() Dim ClsUsuarios As New ClsSisUsuarios @@ -4027,11 +4041,11 @@ Partial Class Sistemas_UsuarioDetalle DtAlmacenesAsignar.AcceptChanges() CargaGVAlmacenAsignar() - End Sub - - + End Sub + + #End Region - + #Region " PROYECTOS-SUBPROYECTOS " Private Sub CargaDtSubProyectosAsignar() Dim ClsUsuarios As New ClsSisUsuarios @@ -4142,10 +4156,10 @@ Partial Class Sistemas_UsuarioDetalle DtSubProyectosAsignar.AcceptChanges() CargarGvSubProyectosAsignar() - End Sub - + End Sub + #End Region - + #Region " CUENTAS BANCARIAS " Private Sub CargaCuentasBancariasAsignar() DdlCuentasBancariasAsignar.Items.Clear() @@ -4230,9 +4244,9 @@ Partial Class Sistemas_UsuarioDetalle DtCuentasBancariasAsignar.AcceptChanges() CargaGvCuentasBancariasAsignar() - End Sub + End Sub #End Region - + #Region " MODULOS " Public Sub CargaDTModulosAsignar() Dim ObjPermisos As New ClsSisUsuarios @@ -4267,10 +4281,10 @@ Partial Class Sistemas_UsuarioDetalle End If End If - End Sub - + End Sub + #End Region - + #Region " PERMISOS " Public Sub CargaDTPermisosAsignar() Dim ObjPermisos As New ClsSisUsuarios @@ -4305,9 +4319,9 @@ Partial Class Sistemas_UsuarioDetalle End If End If - End Sub + End Sub #End Region - + #Region " INDICADORES " Public Sub CargaDTIndicadoresAsignar() Dim ObjIndicadores As New ClsSisUsuarios @@ -4335,13 +4349,13 @@ Partial Class Sistemas_UsuarioDetalle End If End If - End Sub + End Sub #End Region - - + + #End Region - - + + #Region " USUARIO CONTROLADO " Private Sub InicializaUsuarioControlado() Dim ClsUsuarios As New ClsSisUsuarios @@ -4391,12 +4405,12 @@ Partial Class Sistemas_UsuarioDetalle End If ClsUsuarios.Dispose() - End Sub + End Sub #End Region - - + + #Region "C O N T O L E S DE U S U A R I O S" - + #Region "ESTATUS DE ÓRDENES DE COMPRA" Private Sub CargaDtEstatusOCPermisos() Dim ClsUsuarios As New ClsSisUsuarios @@ -4517,10 +4531,10 @@ Partial Class Sistemas_UsuarioDetalle DTEstatusOC = dt DTEstatusOCAsignar = dt - End Sub + End Sub #End Region - - + + #Region "GV ESTATUS DE OC" Protected Sub GvEstatusOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusOC.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -4631,11 +4645,11 @@ Partial Class Sistemas_UsuarioDetalle GvEstatusUsuariosOC.Columns(i).Visible = (dtValida IsNot Nothing AndAlso dtValida.Rows.Count = 1) End If Next - End Sub - + End Sub + #End Region #End Region - + Protected Sub LnkAgregarClasificacion_Click(sender As Object, e As EventArgs) If DtClasificaciones IsNot Nothing Then Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero @@ -4762,10 +4776,10 @@ Partial Class Sistemas_UsuarioDetalle - End Sub - + End Sub + #Region "USUARIO RESPONSABLE" - + Protected Sub BtnUpdateUsuarioResponsable_Click(sender As Object, e As EventArgs) Dim ObjUsuarios As New ClsSisUsuarios If ObjUsuarios.UpdateUsuarioResponsableMasivo(CveUsuario, DdlUsuarioResponsable.SelectedValue.ToEntero) Then @@ -4773,10 +4787,10 @@ Partial Class Sistemas_UsuarioDetalle RegistraScript("$('#DivUpdateUsuarioResponsable').modal('hide')") End If ObjUsuarios.Dispose() - End Sub - + End Sub + #End Region - + Protected Sub LnkAutorizarEquipo_Click(sender As Object, e As EventArgs) 'CveUsuario Dim AdsCodex As String = Encripta(String.Format("{0}_{1}_{2}", CveUsuario, DateTime.Now.Ticks, UsuarioActual.CveUsuario)) diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index b54300575..4de796386 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -585,6 +585,14 @@ + + + +
    + +
    +
    +
    @@ -833,7 +841,7 @@
    - + @@ -1917,6 +1925,45 @@ + + <%-- ******************************************** Bloqueo de Caja *************************************************************************************************************************************** --%> + +