Permiso para solo ver el vendedor
This commit is contained in:
@@ -4168,6 +4168,11 @@ Partial Class PopUpVerFactura
|
|||||||
'ImprimirPDF(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72), DtMovimientos, params, "ReporteSalidas", RDSName:="DsInventarios")
|
'ImprimirPDF(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72), DtMovimientos, params, "ReporteSalidas", RDSName:="DsInventarios")
|
||||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
Else
|
Else
|
||||||
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
params.Add(New ReportParameter("Concepto", ConceptoReporte))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||||
|
params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro))
|
||||||
|
End If
|
||||||
params.Add(New ReportParameter("Folio", Folio))
|
params.Add(New ReportParameter("Folio", Folio))
|
||||||
params.Add(New ReportParameter("Fecha", Fecha))
|
params.Add(New ReportParameter("Fecha", Fecha))
|
||||||
params.Add(New ReportParameter("Almacen", Almacen))
|
params.Add(New ReportParameter("Almacen", Almacen))
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||||
CargarMarcas()
|
CargarMarcas()
|
||||||
SetValues()
|
SetValues()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
|
||||||
LblLitraje.Visible = True
|
LblLitraje.Visible = True
|
||||||
DvLitraje.Visible = True
|
DvLitraje.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -243,6 +243,11 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
|
||||||
|
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||||
|
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||||
|
DdlVendedor.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -274,7 +279,7 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente,
|
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente,
|
||||||
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
||||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
||||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
||||||
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
DtVentas = ObjVentas.DtResultados
|
DtVentas = ObjVentas.DtResultados
|
||||||
@@ -297,11 +302,11 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
DivMarca.Visible = True
|
DivMarca.Visible = True
|
||||||
LblMarca.Visible = True
|
LblMarca.Visible = True
|
||||||
|
|
||||||
Using ObjMarcas As New ClsProductosServicios
|
Using ObjMarcas As New ClsProductosServicios
|
||||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||||
DdlMarcaPSDes.DataBind()
|
DdlMarcaPSDes.DataBind()
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
End If
|
End If
|
||||||
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
||||||
@@ -315,37 +320,37 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
Dim Css As String = "Texto"
|
Dim Css As String = "Texto"
|
||||||
Dim CveClasificacionDetalle As String = "-1"
|
Dim CveClasificacionDetalle As String = "-1"
|
||||||
Dim cveMarca As String = DdlMarcaPSDes.SelectedValue
|
Dim cveMarca As String = DdlMarcaPSDes.SelectedValue
|
||||||
If DdlGrupo.SelectedValue.ToEntero = 22 Then
|
If DdlGrupo.SelectedValue.ToEntero = 22 Then
|
||||||
Dim tipo As Integer = If(e.Row.DBCampo("CveClasificacionDetalle").ToEntero() > 0, 4, If(e.Row.DBCampo("CveMarca").ToEntero() > 0, 3, If(e.Row.DBCampo("CveClasificacion").ToEntero() > 0, 2, 1)))
|
Dim tipo As Integer = If(e.Row.DBCampo("CveClasificacionDetalle").ToEntero() > 0, 4, If(e.Row.DBCampo("CveMarca").ToEntero() > 0, 3, If(e.Row.DBCampo("CveClasificacion").ToEntero() > 0, 2, 1)))
|
||||||
Select Case tipo
|
Select Case tipo
|
||||||
Case 4
|
Case 4
|
||||||
CveClasificacionDetalle = e.Row.DBCampo("CveClasificacionDetalle").ToString() ' String.Format("{0}&CveClasificacionDetalle={1}&CveMarca={2}", squery, e.Row.DBCampo("CveClasificacionDetalle").ToEntero(), e.Row.DBCampo("CveMarca").ToEntero())
|
CveClasificacionDetalle = e.Row.DBCampo("CveClasificacionDetalle").ToString() ' String.Format("{0}&CveClasificacionDetalle={1}&CveMarca={2}", squery, e.Row.DBCampo("CveClasificacionDetalle").ToEntero(), e.Row.DBCampo("CveMarca").ToEntero())
|
||||||
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
||||||
Case 3
|
Case 3
|
||||||
'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero())
|
'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero())
|
||||||
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
||||||
e.Row.CssClass = "SubTotalesB"
|
e.Row.CssClass = "SubTotalesB"
|
||||||
Case 2
|
Case 2
|
||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales"
|
||||||
Case 1
|
Case 1
|
||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If e.Row.DBCampo("Orden") = "" Then
|
If e.Row.DBCampo("Orden") = "" Then
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(200)
|
e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(1).Width = Unit.Pixel(60)
|
e.Row.Cells(1).Width = Unit.Pixel(60)
|
||||||
e.Row.Cells(2).Width = Unit.Pixel(90)
|
e.Row.Cells(2).Width = Unit.Pixel(90)
|
||||||
e.Row.Cells(3).Width = Unit.Pixel(90)
|
e.Row.Cells(3).Width = Unit.Pixel(90)
|
||||||
e.Row.Cells(5).Width = Unit.Pixel(80)
|
e.Row.Cells(5).Width = Unit.Pixel(80)
|
||||||
e.Row.Cells(8).Width = Unit.Pixel(100)
|
e.Row.Cells(8).Width = Unit.Pixel(100)
|
||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
Css = "Totales"
|
Css = "Totales"
|
||||||
ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
|
ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
|
||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' PARA LIGA
|
' PARA LIGA
|
||||||
@@ -502,21 +507,21 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
|
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
|
||||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
|
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
Dim Cliente = If(DdlClientes.SelectedText = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
Dim Cliente = If(DdlClientes.SelectedText = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||||
Dim FechaInicio = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {txtFechaI.Text}")
|
Dim FechaInicio = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {txtFechaI.Text}")
|
||||||
Dim FechaFin = If(txtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {txtFechaF.Text}")
|
Dim FechaFin = If(txtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {txtFechaF.Text}")
|
||||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Agrupado por:</b> {DdlGrupo.SelectedItem.Text}")
|
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Agrupado por:</b> {DdlGrupo.SelectedItem.Text}")
|
||||||
Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text }")
|
Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text }")
|
||||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||||
Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||||
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||||
Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Usuario:</b> {DdlUsuario.SelectedItem.Text}")
|
Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Usuario:</b> {DdlUsuario.SelectedItem.Text}")
|
||||||
|
|
||||||
|
|
||||||
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
@@ -526,7 +531,7 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
params.Add(New ReportParameter("Filtros", $"{Grupo}{Cliente}{FechaInicio}{FechaFin}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{Proveedor}"))
|
params.Add(New ReportParameter("Filtros", $"{Grupo}{Cliente}{FechaInicio}{FechaFin}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{Proveedor}"))
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
|
|||||||
Reference in New Issue
Block a user