diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 0ec920570..d0899a35a 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -4168,6 +4168,11 @@ Partial Class PopUpVerFactura
'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")
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("Fecha", Fecha))
params.Add(New ReportParameter("Almacen", Almacen))
diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb
index a77f55a8a..99eaf6369 100644
--- a/Ventas/RepProductosServicios.aspx.vb
+++ b/Ventas/RepProductosServicios.aspx.vb
@@ -60,13 +60,13 @@ Partial Class Ventas_RepProductosServicios
If Not IsPostBack Then
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargarMarcas()
- SetValues()
-
- If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
- LblLitraje.Visible = True
- DvLitraje.Visible = True
- End If
-
+ SetValues()
+
+ If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
+ LblLitraje.Visible = True
+ DvLitraje.Visible = True
+ End If
+
End If
End Sub
@@ -243,6 +243,11 @@ Partial Class Ventas_RepProductosServicios
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
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 Region
@@ -274,7 +279,7 @@ Partial Class Ventas_RepProductosServicios
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente,
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
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
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
@@ -297,11 +302,11 @@ Partial Class Ventas_RepProductosServicios
DivMarca.Visible = True
LblMarca.Visible = True
- Using ObjMarcas As New ClsProductosServicios
- If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
- DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
- DdlMarcaPSDes.DataBind()
- End If
+ Using ObjMarcas As New ClsProductosServicios
+ If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
+ DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
+ DdlMarcaPSDes.DataBind()
+ End If
End Using
End If
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
@@ -315,37 +320,37 @@ Partial Class Ventas_RepProductosServicios
Dim Css As String = "Texto"
Dim CveClasificacionDetalle As String = "-1"
Dim cveMarca As String = DdlMarcaPSDes.SelectedValue
- 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)))
- Select Case tipo
- 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())
- cveMarca = e.Row.DBCampo("CveMarca").ToString()
- Case 3
- 'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero())
- cveMarca = e.Row.DBCampo("CveMarca").ToString()
- e.Row.CssClass = "SubTotalesB"
- Case 2
- e.Row.CssClass = "SubTotales"
- Case 1
- e.Row.CssClass = "Totales"
- End Select
-
- Else
- If e.Row.DBCampo("Orden") = "" Then
- e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
- e.Row.Cells(0).Width = Unit.Pixel(200)
- e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
- e.Row.Cells(1).Width = Unit.Pixel(60)
- e.Row.Cells(2).Width = Unit.Pixel(90)
- e.Row.Cells(3).Width = Unit.Pixel(90)
- e.Row.Cells(5).Width = Unit.Pixel(80)
- e.Row.Cells(8).Width = Unit.Pixel(100)
- e.Row.CssClass = "Totales"
- Css = "Totales"
- ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
- e.Row.CssClass = "SubTotales"
- End If
+ 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)))
+ Select Case tipo
+ 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())
+ cveMarca = e.Row.DBCampo("CveMarca").ToString()
+ Case 3
+ 'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero())
+ cveMarca = e.Row.DBCampo("CveMarca").ToString()
+ e.Row.CssClass = "SubTotalesB"
+ Case 2
+ e.Row.CssClass = "SubTotales"
+ Case 1
+ e.Row.CssClass = "Totales"
+ End Select
+
+ Else
+ If e.Row.DBCampo("Orden") = "" Then
+ e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
+ e.Row.Cells(0).Width = Unit.Pixel(200)
+ e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
+ e.Row.Cells(1).Width = Unit.Pixel(60)
+ e.Row.Cells(2).Width = Unit.Pixel(90)
+ e.Row.Cells(3).Width = Unit.Pixel(90)
+ e.Row.Cells(5).Width = Unit.Pixel(80)
+ e.Row.Cells(8).Width = Unit.Pixel(100)
+ e.Row.CssClass = "Totales"
+ Css = "Totales"
+ ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
+ e.Row.CssClass = "SubTotales"
+ End If
End If
' PARA LIGA
@@ -502,21 +507,21 @@ Partial Class Ventas_RepProductosServicios
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
- FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
-
- Dim Cliente = If(DdlClientes.SelectedText = "", "", $" Cliente: {DdlClientes.SelectedText}")
- Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" Proveedor: {DdlProveedor.SelectedText}")
- Dim FechaInicio = If(txtFechaI.Text = "", "", $" Fecha Inicio: {txtFechaI.Text}")
- Dim FechaFin = If(txtFechaF.Text = "", "", $" Fecha Fin: {txtFechaF.Text}")
- Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" Agrupado por: {DdlGrupo.SelectedItem.Text}")
- Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" Categoria: {DdlCategoria.SelectedItem.Text }")
- Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" Clasificación: {DdlClasificacion.SelectedItem.Text}")
- Dim PS = If(DdlPS.SelectedValue = "-1", "", $" P.S.: {DdlPS.SelectedText}")
- Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" Proyecto: {DdlSubProyecto.SelectedItem.Text}")
- Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" Estatus: {DdlEstatus.SelectedItem.Text}")
- Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" Usuario: {DdlUsuario.SelectedItem.Text}")
-
-
+ FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
+
+ Dim Cliente = If(DdlClientes.SelectedText = "", "", $" Cliente: {DdlClientes.SelectedText}")
+ Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" Proveedor: {DdlProveedor.SelectedText}")
+ Dim FechaInicio = If(txtFechaI.Text = "", "", $" Fecha Inicio: {txtFechaI.Text}")
+ Dim FechaFin = If(txtFechaF.Text = "", "", $" Fecha Fin: {txtFechaF.Text}")
+ Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" Agrupado por: {DdlGrupo.SelectedItem.Text}")
+ Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" Categoria: {DdlCategoria.SelectedItem.Text }")
+ Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" Clasificación: {DdlClasificacion.SelectedItem.Text}")
+ Dim PS = If(DdlPS.SelectedValue = "-1", "", $" P.S.: {DdlPS.SelectedText}")
+ Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" Proyecto: {DdlSubProyecto.SelectedItem.Text}")
+ Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" Estatus: {DdlEstatus.SelectedItem.Text}")
+ Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" Usuario: {DdlUsuario.SelectedItem.Text}")
+
+
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 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("NombreEmpresa", UsuarioActual.Empresa.Empresa))
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}"))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))