diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 69f64de00..2b82c5a1b 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -2410,7 +2410,7 @@ Public Class ClsGenerales
Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer,
CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer,
CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1,
- Optional IdPoliza As Integer = -1) As Boolean
+ Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_HistorialBitacoraGet")
@@ -2422,6 +2422,7 @@ Public Class ClsGenerales
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@CveIE", SqlDbType.Int).Value = CveIE
+ .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 845ac3d6b..836be534b 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -319,7 +319,7 @@ Public Class ClsMovimientos
End Function
Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer,
- AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
+ AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
@@ -361,10 +361,10 @@ Public Class ClsMovimientos
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
- .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
- .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
- .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
-
+ .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
+ .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
+ .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
+
End With
Try
@@ -545,7 +545,7 @@ Public Class ClsMovimientos
- Try
+ Try
SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
@@ -863,8 +863,8 @@ Public Class ClsMovimientos
DataAdapter("PA_Banc_ReporteChequesFYEGet")
With SqlAdapter.SelectCommand.Parameters
- .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With
@@ -1190,9 +1190,9 @@ Public Class ClsMovimientos
Public Function GetCxPDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveProveedorClasificacion As Integer, CveProveedorSucursal As Integer, CveUsuario As Integer,
CveUsuarioResponsable As Integer, Anio As Integer, Mes As Integer, AnioMes As String, CveMoneda As Integer, CveSubProyecto As Integer,
- CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
- TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
- Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
+ CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
+ TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
+ Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1292,8 +1292,8 @@ Public Class ClsMovimientos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveCajaChica", SqlDbType.Int).Value = CveCajaChica
- .Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
- .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
+ .Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
+ .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index e124244e4..c8384b872 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3786,6 +3786,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Prospectos/PopUpBuscarProspectos.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/PopUpCambiaUsuario.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/PopUpCambiaUsuarioEmpresa.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/CatDistribuidores.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/CatPlataformas.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/PopUpAddUsuario.aspx".ToUpper(), -1)
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 0ca3ae809..a654c7650 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1620,7 +1620,7 @@ Public Class ClsVentas
Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
- Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1") As Boolean
+ Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1", Optional orden As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepPSEconoGet")
@@ -1638,6 +1638,7 @@ Public Class ClsVentas
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
.Add("@Linea", SqlDbType.VarChar).Value = Linea
.Add("@Marca", SqlDbType.VarChar).Value = Marca
+ .Add("@Orden", SqlDbType.VarChar).Value = orden
End With
Try
diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb
index 76c8a15e6..3a6066805 100644
--- a/App_Code/Usuario.vb
+++ b/App_Code/Usuario.vb
@@ -71,6 +71,16 @@ Public Class Usuario
End If
End Get
End Property
+ Private _modoSimulacionXEmpresa As Boolean = False
+ Public Property ModoSimulacionXEmpresa As Boolean
+ Get
+ Return Not ModoSimulacion AndAlso (_modoSimulacionXEmpresa OrElse TienePermisoProceso(308))
+ End Get
+ Set(value As Boolean)
+
+ _modoSimulacionXEmpresa = value
+ End Set
+ End Property
Public Property Sesion(Campo As String) As String
Get
diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx
index 691ac28d4..734a5ec1a 100644
--- a/Contabilidad/RegPrePoliza.aspx
+++ b/Contabilidad/RegPrePoliza.aspx
@@ -497,6 +497,42 @@
+
+
+
+
+
+
+
+
+ Historial de Modificación
+
+
+
+
+
+
+
+
+
+
+ Fecha
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index 8286d7e17..09254260e 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -209,6 +209,7 @@ Partial Class ContabilidadC_RegPrePoliza
ViewState("CvePrePoliza") = Request("CvePrePoliza").ToEntero
CreaDT()
CargaPrePoliza()
+ CargaGvBitacora()
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
GvPrePoliza.Columns(4).Visible = False
GvConcepto.Columns(4).Visible = False
@@ -1643,5 +1644,15 @@ Partial Class ContabilidadC_RegPrePoliza
End If
ObjCompras.Dispose()
End Sub
+
+ Private Sub CargaGvBitacora()
+ ' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017
+ Dim ObjGral As New ClsGenerales()
+ If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
+ GvBitacora.DataSource = ObjGral.DtResultados
+ GvBitacora.DataBind()
+ End If
+ ObjGral.Dispose()
+ End Sub
End Class
diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb
index 460a99f76..320899cee 100644
--- a/Inventarios/ResguardoMaterial.aspx.vb
+++ b/Inventarios/ResguardoMaterial.aspx.vb
@@ -346,6 +346,11 @@ Partial Class Inventarios_ResguardoMaterial
ThSerie.Visible = True
TrSerie.Visible = True
TxtnSerie.Visible = True
+ Else
+ ThSerie.Visible = False
+ TrSerie.Visible = False
+ TxtnSerie.Visible = False
+ TxtnSerie.Text = ""
End If
'activa seccion
@@ -368,13 +373,19 @@ Partial Class Inventarios_ResguardoMaterial
If CBool(drp("AplicaLote")) Then
ThLote.Visible = True
TrLote.Visible = True
- 'TxtLote.Visible = True
+ Else
+ ThLote.Visible = False
+ TrLote.Visible = False
+ TxtLote.Text = ""
End If
'activa caducidad
If CBool(drp("AplicaCaducidad")) Then
ThCaducidad.Visible = True
TrCaducidad.Visible = True
- 'TxtCaducidad.Visible = True
+ Else
+ ThCaducidad.Visible = False
+ TrCaducidad.Visible = False
+ TxtCaducidad.Text = ""
End If
Else
diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx
index 3e5c523e2..a77d05f1b 100644
--- a/Nomina/Nomina2.aspx
+++ b/Nomina/Nomina2.aspx
@@ -253,19 +253,19 @@
+
+
+
+
+
+
+
+
+
diff --git a/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb
new file mode 100644
index 000000000..25c34bee9
--- /dev/null
+++ b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb
@@ -0,0 +1,187 @@
+Imports ADSSession
+Imports Extensiones
+Imports System.Data
+
+Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
+ Inherits ClsPaginas
+
+ Property DTUsuarios() As Data.DataTable
+ Get
+ Return CType(ViewState("DTUsuarios"), DataTable)
+ End Get
+ Set(value As Data.DataTable)
+ ViewState("DTUsuarios") = value
+ End Set
+ End Property
+
+
+ Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
+ If Not Page.IsPostBack Then
+
+ ViewState("Orden") = ""
+
+ If Not (UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacionXEmpresa) Then
+ PnlGral.Visible = False
+ RegistraScript("window.close();")
+ End If
+
+ 'Dim DtEmp As DataTable = GlobalDTEmpresas.Copy
+ Dim NombreEmp As String = UsuarioActual.Empresa.Empresa
+ '''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)"
+ ''If UsuarioActual.CveUsuario = 100 Then
+
+ '' Dim customerRow() As Data.DataRow
+ '' customerRow = DtEmp.Select("")
+
+ '' For Each drt As DataRow In customerRow
+ '' drt("Empresa") = "Mi Empresa de ventas (" & drt("CveEmpresa") & ")"
+ '' Next
+
+
+ ''End If
+
+ CType(Me.Master, BaseMasterPage).EsPopup = True
+ LblUsuario.Text = String.Format("{0} - {1}", UsuarioActual.Nombre, UsuarioActual.Empresa.Empresa)
+
+
+ 'DdlEmpresa.DataSource = DtEmp '.FiltraParametros(If(UsuarioActual.CveRol = 1, "CvePlataforma IN (1,2)", $"CvePlataforma={UsuarioActual.Empresa.CvePlataforma}"))
+ Dim CveEmpresa As String = UsuarioActual.CveEmpresa.ToString()
+
+ Dim splitedtext As String() = Request.Url.AbsoluteUri.Replace("http://", "").Replace("https://", "").Split("."c)
+ If Request.Url.AbsoluteUri.Contains("sig.agrojam.com.mx") Then
+ CveEmpresa = 119
+ End If
+
+ If splitedtext.Length > 0 Then
+ Select Case splitedtext(0).ToUpper()
+ Case "VSH" : CveEmpresa = "7"
+ Case "JAM" : CveEmpresa = "119"
+ Case "COMPUPROVEEDORES" : CveEmpresa = "72"
+ Case "DNDIFUSA" : CveEmpresa = "80"
+ Case "SOGO" : CveEmpresa = "8"
+ Case "BDH" : CveEmpresa = "140"
+ Case "ECONOLLANTAS" : CveEmpresa = "141"
+ End Select
+ End If
+ 'DdlEmpresa.DataBind()
+ 'DdlEmpresa.SelectedValue = CveEmpresa
+
+ 'DdlRol.DataSource = GlobalDTRoles(DdlEmpresa.SelectedValue.ToEntero)
+ 'DdlRol.DataBind()
+ 'DdlRol.Items.Insert(0, New ListItem("Todos", "-1"))
+
+ TxtBusqueda.Attributes.Add("data-table", gvUsuarios.ClientID)
+
+ CargaUsuarios()
+ 'LblUsuario.Text = usuarioactual.
+
+ End If
+ End Sub
+
+
+ Protected Sub gvUsuarios_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles gvUsuarios.RowCommand
+ If e.CommandName = "Usuarios" Then
+ Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
+ 'Dim Dt As DataTable = GlobalDTUsuarios(e.CommandArgument.ToString.ToEntero)
+ Dim multiempresa As Boolean = ADSSessionConfig.sessionUser.MultipleEmpresa
+ Dim objempresa As Empresa = ADSSessionConfig.sessionUser.Empresa
+ If gvr IsNot Nothing Then
+
+ Dim tUsuario, tContraseña As String
+ Dim tCveEmpresa As Integer
+ tUsuario = gvr.DataKey("Usuario").ToString
+ tContraseña = gvr.DataKey("Contraseña").ToString
+ tCveEmpresa = gvr.DataKey("CveEmpresa").ToString.ToEntero
+
+ Dim ObjUsuario As New ClsSisUsuarios
+ Dim Usuario As Usuario
+ 'Dim UsuarioAsignaciones As Usuario
+
+ Usuario = ObjUsuario.ValidaUsuario(tUsuario, tContraseña, IMEI, tCveEmpresa)
+ 'UsuarioAsignaciones = ObjUsuario.ValidaUsuarioAsignacion(Usuario.CveUsuario, Usuario.CveEmpresa)
+ ObjUsuario.Dispose()
+
+ If Usuario IsNot Nothing Then
+ Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
+ ADSSessionConfig.sessionUser = Usuario
+ ADSSessionConfig.sessionUser.CvePlataforma = 1
+ If Usuario.CveRol = 1200 Then
+ ADSSessionConfig.sessionUser.CvePlataforma = 3
+ End If
+ ADSSessionConfig.sessionDpage = False
+ ADSSessionConfig.sessionUser.MultipleEmpresa = multiempresa
+ ADSSessionConfig.sessionUser.ModoSimulacion = False
+ ADSSessionConfig.sessionUser.ModoSimulacionXEmpresa = True
+
+ UsuarioActual.Empresa = objempresa
+ dt.Dispose()
+
+ If UsuarioActual.CveCliente > 0 Then
+ CargaZonasHorarias(UsuarioActual)
+ End If
+ End If
+
+ RegistraScript("gotourl();")
+
+ End If
+
+ End If
+ End Sub
+ Private Sub CargaZonasHorarias(ByRef UsuarioActual As Usuario)
+ Dim ObjClientes As New ClsClientes
+ Try
+ If ObjClientes.GetClientes(UsuarioActual.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=1) Then
+ If ObjClientes.DtResultados.Rows.Count = 1 Then
+ UsuarioActual.UTCOffset = ObjClientes.DtResultados(0)("UTCOffset").ToString().ToEntero()
+ End If
+ End If
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener la zona horaria.", ex)
+ Finally
+ ObjClientes.Dispose()
+ End Try
+ End Sub
+
+ Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs) Handles BtnFiltrar.Click
+ CargaUsuarios()
+ End Sub
+
+#Region "O R D E N A M I E N T O"
+ Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
+ Dim Orden As String = ""
+ Dim Campo As String = ""
+ Dim Literal As Literal = Nothing
+ Const OrdenInicial As String = ""
+ Dim Arg(2) As String
+
+ Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
+ Campo = Arg(0)
+ Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
+
+ If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
+ ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
+ Literal.Text = String.Format("")
+ Else
+ ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
+ Literal.Text = String.Format("")
+ End If
+ Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
+ ViewState("Orden") = Orden
+ CargaUsuarios(Orden)
+ End Sub
+
+ Private Sub CargaUsuarios(Optional Orden As String = "Nombre")
+ Dim dtt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("CveRol <> 1")
+ dtt = dtt.FiltraParametros("Estatus = 1", Orden, {"CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol"})
+ gvUsuarios.DataSource = dtt
+ gvUsuarios.DataBind()
+
+ If (gvUsuarios.Rows.Count > 0) Then
+ gvUsuarios.UseAccessibleHeader = True
+ gvUsuarios.HeaderRow.TableSection = TableRowSection.TableHeader
+ End If
+ TxtBusqueda.Focus()
+ End Sub
+
+#End Region
+End Class
diff --git a/Site.master b/Site.master
index ac198d1a4..5c6489dad 100644
--- a/Site.master
+++ b/Site.master
@@ -267,6 +267,7 @@
diff --git a/Site.master.vb b/Site.master.vb
index 42789c4a8..a2c4eb732 100644
--- a/Site.master.vb
+++ b/Site.master.vb
@@ -168,6 +168,10 @@ Partial Class Site
DivCambiarUsuario.Visible = True
BtnCambiarUsuario.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuario.aspx');")
End If
+ If UsuarioActual.ModoSimulacionXEmpresa Then '.TienePermisoProceso(ADSSession.ADSSessionConfig.procesomodosimulacion) Then
+ DivCambiarUsuarioEmpresa.Visible = True
+ BtnCambiarUsuarioEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuarioEmpresa.aspx');")
+ End If
If UsuarioActual.MultipleEmpresa Then
BtnCambiarEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpSeleccionarEmpresa.aspx');")
DivCambiarEmpresa.Visible = True
diff --git a/Ventas/RepPS.aspx b/Ventas/RepPS.aspx
index b3f9052f4..1d4e762d4 100644
--- a/Ventas/RepPS.aspx
+++ b/Ventas/RepPS.aspx
@@ -159,6 +159,28 @@
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
+
+
+
+
+
+
+
+
--%>
+
diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb
index 00101529a..66fb8aea5 100644
--- a/Ventas/RepPS.aspx.vb
+++ b/Ventas/RepPS.aspx.vb
@@ -21,6 +21,20 @@ Partial Class Ventas_RepPS
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
+ pnlOrden.Visible = False
+ If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
+ pnlOrden.Visible = True
+ DdlOrden.SelectedValue = "2"
+ 'Using ObjPS As New ClsProductosServicios
+ ' If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
+ ' DdlMarca.DataSource = ObjPS.DtResultados.Copy()
+ ' End If
+ 'End Using
+ 'DdlMarca.DataBind()
+ 'DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
+ End If
+
+
CargaDatosIniciales()
CargaCombos()
CargaDatos()
@@ -69,6 +83,7 @@ Partial Class Ventas_RepPS
End Sub
Private Sub CargaTipoCentroCosto()
+ Dim index As Integer = 17
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
DdlSubProyecto.Items.Clear()
@@ -88,13 +103,19 @@ Partial Class Ventas_RepPS
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
- DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
+ If DdlGrupo.Items.Count < 17 Then
+ index = DdlGrupo.Items.Count
+ End If
+ DdlGrupo.Items.Insert(index, New ListItem("SubProyecto Ejec.", "19"))
DdlGrupo.DataBind()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
LblSubProyecto.InnerText = "Proyecto:"
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
- DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
+ If DdlGrupo.Items.Count < 17 Then
+ index = DdlGrupo.Items.Count
+ End If
+ DdlGrupo.Items.Insert(index, New ListItem("SubProyecto Ejec.", "19"))
DdlGrupo.DataBind()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
LblSubProyecto.InnerText = "Sucursal:"
@@ -117,7 +138,7 @@ Partial Class Ventas_RepPS
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
Dim ObjVentas As New ClsVentas()
- If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca) Then
+ If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
DtReporte = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtReporte
Else
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 40314494c..e7a4fe5e6 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -5297,6 +5297,7 @@ Partial Class Ventas
' RegistraScript("$('#DivDocsClienteUpload').modal({ backdrop: 'static', keyboard: false});", "modalOC")
End If
BloqueaCondiconesPago()
+ DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
End Sub
Private Sub CargaRestriccionesCreditoCliente(Optional Alertas As Boolean = False, Optional CveVenta As Integer = -1)
@@ -26249,6 +26250,15 @@ Partial Class Ventas
ObjVentas.Dispose()
End Sub
+ Private Sub DeshabilitarAplicarNotaDeCredito(RFC As String)
+
+ If UsuarioActual.CveEmpresa = 119 AndAlso RFC.Contiene("XAXX010101000", "XEXX010101000") Then
+ LBNotaCredito.Visible = False
+ UpnTools.Update()
+ End If
+
+ End Sub
+
#Region "Auxiliar"
Private Sub CargarSaldoAuxiliar(CveCliente As Integer)
diff --git a/vwd.webinfo b/vwd.webinfo
index a5848e16b..10e72764b 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -108,6 +108,8 @@
+
+