This commit is contained in:
2023-01-23 14:57:45 -07:00
11 changed files with 259 additions and 234 deletions

View File

@@ -1650,25 +1650,22 @@ Namespace Extensiones
End Function End Function
<Runtime.CompilerServices.Extension()> <Runtime.CompilerServices.Extension()>
Public Function GetColumn(ByVal gv As GridView, ByVal name As String) As Integer Public Function FBColumn(gv As GridView, name As String) As DataControlField
Dim index As Integer = 0 name = name.ToLower
Dim found As Boolean = False For Each col As DataControlField In gv.Columns
If TypeOf col Is BoundField Then
For Each c As DataControlField In gv.Columns Dim field As BoundField = CType(col, BoundField)
If field.DataField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then
If TypeOf c Is BoundField Then Return col
Dim field As BoundField = CType(c, BoundField) End If
ElseIf TypeOf col Is HyperLinkField Then
If name = field.DataField OrElse name = field.SortExpression OrElse name = field.HeaderText Then Dim field As HyperLinkField = CType(col, HyperLinkField)
found = True If field.DataTextField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then
Exit For Return col
End If End If
End If End If
index += 1
Next Next
Return Nothing
Return If(found, index, -1)
End Function End Function
<Runtime.CompilerServices.Extension()> <Runtime.CompilerServices.Extension()>

View File

@@ -292,10 +292,16 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CargarTiposEventos(); CargarTiposEventos();
LimitaFechasAcercamiento(); LimitaFechasAcercamiento();
CargaDatos(); CargaDatos();
if (CveEncuestaCRM > 0)
{ //if( Request["CveEmpresaCRM"] != null)
CargaDatosTecnicos(); //{
} if (CveEncuestaCRM > 0)
{
CargaDatosTecnicos();
}
// }
VerificaPermisos(); VerificaPermisos();
CargaClasificaciones(); CargaClasificaciones();
DdlPS.setEsWebService(true); DdlPS.setEsWebService(true);
@@ -1476,8 +1482,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas
var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa, CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1 }); var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa, CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1 });
if (responseGenericGetDatosTecnicosEmpresaCRM.IsSuccess) if (responseGenericGetDatosTecnicosEmpresaCRM.IsSuccess)
{ {
GvDatosTecnicos.DataSource = responseGenericGetDatosTecnicosEmpresaCRM.Result;
if (responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0)
var DTTemp = responseGenericGetDatosTecnicosEmpresaCRM.Result.ToDataTable();
GvDatosTecnicos.DataSource = DTTemp;
if (DTTemp.Rows.Count > 0)
{ {
GvDatosTecnicos.Visible = true; GvDatosTecnicos.Visible = true;
} }

View File

@@ -8,6 +8,9 @@
max-width:600px; max-width:600px;
width:600px; width:600px;
} }
.margenbound {
text-align: right;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
@@ -16,12 +19,20 @@
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li> <asp:UpdatePanel ID="UPAcciones" runat="server" UpdateMode="Conditional">
<asp:LinkButton ID="LinkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton> <ContentTemplate>
</li> <li>
<li> <asp:LinkButton ID="LinkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton> </li>
</li> <li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkExcelPersonalizado" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
</li>
<li> <li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink> <asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li> </li>
@@ -29,6 +40,13 @@
<%-- <a target="_blank" href="../Documentacion/DocumentacionCompras.aspx#RepComprasAF2"><i class="fa fa-question-circle" aria-hidden="true">&nbsp;Ayuda</i></a>--%> <%-- <a target="_blank" href="../Documentacion/DocumentacionCompras.aspx#RepComprasAF2"><i class="fa fa-question-circle" aria-hidden="true">&nbsp;Ayuda</i></a>--%>
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionCompras.aspx#RepComprasAF2">&nbsp</a> <a target="_blank" class="ayuda" href="../Documentacion/DocumentacionCompras.aspx#RepComprasAF2">&nbsp</a>
</li> </li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LinkPDF" />
<asp:PostBackTrigger ControlID="LnkExportar" />
<asp:PostBackTrigger ControlID="LnkExcelPersonalizado" />
</Triggers>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content> </asp:Content>
@@ -150,13 +168,9 @@
<div class="row "> <div class="row ">
<div class="col-md-1"><asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label></div> <div class="col-md-1"><asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label></div>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%"> <asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -164,7 +178,6 @@
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label> <asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True"> <asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -212,153 +225,31 @@
<div class="col-md-12"> <div class="col-md-12">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" data-sort="true" DataKeyNames="Cantidad,Total,Moneda" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" data-sort="true" DataKeyNames="Cantidad,Total,Moneda" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
<HeaderTemplate> <asp:BoundField DataField="SubProyecto" ItemStyle-CssClass="ML Truncate" HeaderText="SubProyecto" />
Factura <asp:BoundField DataField="CodigoAF" ItemStyle-CssClass="ML Truncate" HeaderText="Activo Fijo" />
</HeaderTemplate> <asp:BoundField DataField="NoSerie" ItemStyle-CssClass="ML Truncate" HeaderText="No. Serie" Visible="false"/>
<ItemTemplate> <asp:BoundField DataField="CodigoPS" ItemStyle-CssClass="ML Truncate" HeaderText="Producto" />
<asp:Label ID="LblFactura" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Label> <asp:BoundField DataField="NombreCompleto" ItemStyle-CssClass="ML Truncate" HeaderText="Responsable" />
</ItemTemplate> <asp:BoundField DataField="AFMedida" ItemStyle-CssClass="ML Truncate" HeaderText="Horómetro/Odómetro" />
</asp:TemplateField> <asp:BoundField DataField="AFTipoMantenimientoStr" ItemStyle-CssClass="ML Truncate" HeaderText="Tipo Mantenimiento" />
<asp:BoundField DataField="TipoActivoFijo" ItemStyle-CssClass="ML Truncate" HeaderText="Tipo AF" />
<asp:BoundField DataField="SubTipoActivoFijo" ItemStyle-CssClass="ML Truncate" HeaderText="SubTipo AF" />
<asp:TemplateField> <asp:BoundField DataField="Clasificacion" ItemStyle-CssClass="ML Truncate" HeaderText="Clasificación" />
<HeaderTemplate> <asp:BoundField DataField="Clasificacion2" ItemStyle-CssClass="ML Truncate" HeaderText="Clasificación 2" />
SubProyecto <asp:BoundField DataField="UnidadMedida" HeaderText="Unidad de Medida" />
</HeaderTemplate> <asp:BoundField DataFormatString="{0:N0}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<ItemTemplate> <asp:BoundField DataFormatString="{0:C2}" DataField="PU" ItemStyle-CssClass="margenbound" HeaderText="PU" />
<asp:Label ID="LblSubProyecto" CssClass="ML Truncate" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Label> <asp:BoundField DataFormatString="{0:C2}" DataField="Total" ItemStyle-CssClass="margenbound" HeaderText="Total" />
</ItemTemplate> <asp:BoundField DataField="CuentaContable" HeaderText="Cuenta" ItemStyle-Width="100px" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
ActivoFijo
</HeaderTemplate>
<ItemTemplate>
<%--<asp:Label ID="LblActivoFijo" CssClass="ML Truncate" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Label>--%>
<asp:Label ID="LblActivoFijo" CssClass="ML Truncate" runat="server" Text='<%# Eval("CodigoAF") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>
No. Serie
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblNoSerie" CssClass="ML Truncate" runat="server" Text='<%# Eval("NoSerie") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Producto
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblPS" runat="server" CssClass="ML Truncate" Text='<%# Eval("CodigoPS") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Responsable
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblResponsable" runat="server" CssClass="ML Truncate" Text='<%# Eval("NombreCompleto") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Horometro/Odometro
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblHorometroOdometro" runat="server" CssClass="ML Truncate" Text='<%# Eval("AFMedida") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Tipo Mantenimiento
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblAFTipoMantenimientoStr" runat="server" CssClass="ML Truncate" Text='<%# Eval("AFTipoMantenimientoStr") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Clasificación 2
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblClasificacion2" runat="server" CssClass="ML Truncate" Text='<%# Eval("Clasificacion2") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Unidad de Medida
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlPU" runat="server" Text='<%# Eval("UnidadMedida") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
Cantidad
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
PU
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlPU" runat="server" Text='<%# Eval("PU", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
Total
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblCantidad" style="margin-right:15px" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px">
<HeaderTemplate>
Cuenta
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlPU" runat="server" Text='<%# Eval("CuentaContable") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
<%--<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />--%>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div id="DivTipoCambio" class="modal fade" role="dialog"> <div id="DivTipoCambio" class="modal fade" role="dialog">
@@ -397,6 +288,80 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivPersonalizar" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
</div>
<div class="modal-body">
<table style="width: 100%" class="table table-striped table-advance table-hover">
<tr>
<td>
<asp:CheckBox ID="ChkFactura" runat="server" Text="Factura" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkSubProyecto" runat="server" Text="SubProyecto" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkAF" runat="server" Text="Activo Fijo" Checked="true"/></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkPS" runat="server" Text="Producto" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkResp" runat="server" Text="Responsable" Checked="true"/></td>
<td><td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkNS" runat="server" Text="No. Serie"/></td>
<td>
<asp:CheckBox ID="ChkTipoAF" runat="server" Text="Tipo"/></td>
<td>
<asp:CheckBox ID="ChkSubTipoAF" runat="server" Text="SubTipo"/></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkClasif" runat="server" Text="Clasificación"/></td>
<td>
<asp:CheckBox ID="ChkClasif2" runat="server" Text="Clasificación 2" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkUM" runat="server" Text="Unidad de Medida" Checked="true"/></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkCant" runat="server" Text="Cantidad" Checked="true" /></td>
<td>
<asp:CheckBox ID="ChkPU" runat="server" Text="Precio Unitario" Checked="true" /></td>
<td>
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" Checked="true" /></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkCuenta" runat="server" Text="Cuenta" Checked="true" /></td>
<td>
<asp:CheckBox ID="ChkMedidaAF" runat="server" Text="Tipo de Medida" /></td>
<td>
<asp:CheckBox ID="ChkTipoMant" runat="server" Text="Tipo de Mantenimiento" /></td>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">

View File

@@ -82,12 +82,13 @@ Partial Class Compras_RepComprasAFDetalle
#End Region #End Region
Private Personalizado As Boolean = False
Private Sub Compras_RepComprasAFDetalle_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Compras_RepComprasAFDetalle_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
CargaCombos() CargaCombos()
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');") 'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
GvDatos.DataBind(True)
Try Try
Dim Fecha, FechaI, FechaF As String Dim Fecha, FechaI, FechaF As String
@@ -163,9 +164,11 @@ Partial Class Compras_RepComprasAFDetalle
End If End If
If UsuarioActual.CveEmpresa = 72 Then If UsuarioActual.CveEmpresa = 72 Then
GvDatos.Columns(3).Visible = True GvDatos.FBColumn("NoSerie").Visible = True
End If End If
UPDatos.Update()
End If End If
End Sub End Sub
@@ -226,31 +229,7 @@ Partial Class Compras_RepComprasAFDetalle
DdlPS.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2")) DdlPS.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
End If End If
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
DdlProyecto.Visible = False
LblSubProyecto.Text = "Sucursal"
LblProyecto.Visible = False
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
DdlProyecto.Visible = False
LblSubProyecto.Text = "Proyecto"
LblProyecto.Visible = False
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Or UsuarioActual.Empresa.Tipo_CentroCosto = 0 Then
LblProyecto.Text = "Proyecto"
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
LblProyecto.Text = "Sucursal"
LblSubProyecto.Text = "Proyecto"
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
LblProyecto.Text = "Proyecto"
LblSubProyecto.Text = "Sucursal"
End If
End Sub End Sub
@@ -264,15 +243,19 @@ Partial Class Compras_RepComprasAFDetalle
End Sub End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargaSubProyecto() If DdlProyecto.SelectedValue = "-1" Then
DdlProyecto.Items.Clear()
DdlSubProyecto.Items.Clear()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
Else
CargaSubProyecto()
End If
End Sub End Sub
Private Sub CargaSubProyecto() Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear() DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue), "SubProyecto")
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos() CargaDatos()
@@ -304,18 +287,12 @@ Partial Class Compras_RepComprasAFDetalle
CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then
DTDatos = ObjCompras.DtResultados DTDatos = ObjCompras.DtResultados
GvDatos.DataSource = ObjCompras.DtResultados GvDatos.DataSource = DTDatos
Else
GvDatos.DataSource = Nothing
DTDatos = Nothing
End If End If
ObjCompras.Dispose() ObjCompras.Dispose()
GvDatos.DataBind() GvDatos.DataBind(True)
UPDatos.Update()
End Sub End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
@@ -360,6 +337,9 @@ Partial Class Compras_RepComprasAFDetalle
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click
GenerarPDF() GenerarPDF()
End Sub End Sub
Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click
GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + Now.ToShortDateString)
End Sub
Private Sub GenerarPDF(Optional Formato As String = "PDF") Private Sub GenerarPDF(Optional Formato As String = "PDF")
Dim ObjTareas As New ClsOIEventos Dim ObjTareas As New ClsOIEventos
@@ -372,12 +352,8 @@ Partial Class Compras_RepComprasAFDetalle
End If End If
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim FechaI, FechaF As String Dim FechaI, FechaF As String
FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
@@ -390,7 +366,6 @@ Partial Class Compras_RepComprasAFDetalle
params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("FechaFin", FechaF))
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("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato)
@@ -502,4 +477,38 @@ Partial Class Compras_RepComprasAFDetalle
End If End If
End Sub End Sub
Protected Sub PersonalizarColumnas()
GvDatos.FBColumn("SerieFolio").Visible = ChkFactura.Checked
GvDatos.FBColumn("SubProyecto").Visible = ChkSubProyecto.Checked
GvDatos.FBColumn("CodigoAF").Visible = ChkAF.Checked
GvDatos.FBColumn("NoSerie").Visible = ChkNS.Checked
GvDatos.FBColumn("CodigoPS").Visible = ChkPS.Checked
GvDatos.FBColumn("NombreCompleto").Visible = ChkResp.Checked
GvDatos.FBColumn("AFMedida").Visible = ChkMedidaAF.Checked
GvDatos.FBColumn("AFTipoMantenimientoStr").Visible = ChkTipoMant.Checked
GvDatos.FBColumn("TipoActivoFijo").Visible = ChkTipoAF.Checked
GvDatos.FBColumn("SubTipoActivoFijo").Visible = ChkSubTipoAF.Checked
GvDatos.FBColumn("Clasificacion").Visible = ChkClasif.Checked
GvDatos.FBColumn("Clasificacion2").Visible = ChkClasif2.Checked
GvDatos.FBColumn("UnidadMedida").Visible = ChkUM.Checked
GvDatos.FBColumn("Cantidad").Visible = ChkCant.Checked
GvDatos.FBColumn("PU").Visible = ChkPU.Checked
GvDatos.FBColumn("Total").Visible = ChkTotal.Checked
GvDatos.FBColumn("Cuenta").Visible = ChkCuenta.Checked
UPDatos.Update()
If Personalizado Then
LnkExcelPersonalizado.Visible = True
Else
LnkExcelPersonalizado.Visible = False
End If
UPAcciones.Update()
End Sub
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
Personalizado = True
PersonalizarColumnas()
End Sub
End Class End Class

View File

@@ -3228,6 +3228,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim Bytes As Byte() = Nothing Dim Bytes As Byte() = Nothing
Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
Dim ConceptoPoliza As String = TxtConcepto.Text
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta)) Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
@@ -3257,6 +3258,10 @@ Partial Class ContabilidadC_RegPrePolizaS
params.Add(New ReportParameter("CodigoPostal", "")) params.Add(New ReportParameter("CodigoPostal", ""))
params.Add(New ReportParameter("UsuarioRegistro", TxtUsuarioElaboro.Text)) params.Add(New ReportParameter("UsuarioRegistro", TxtUsuarioElaboro.Text))
params.Add(New ReportParameter("ConceptoPoliza", ConceptoPoliza))
If Logo.Exists Then If Logo.Exists Then

View File

@@ -50,10 +50,11 @@ Partial Class General_RepIndicadorResumen
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
Dim ObjMovtos As New ClsMovimientos Dim ObjMovtos As New ClsMovimientos
Dim ObjCitrus As New ClsCGame Dim ObjCitrus As New ClsCGame
Dim Grupo As Integer = 28 'Clasificación - PS
If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1, If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1,
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", TipoCambio:=1) Then -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", TipoCambio:=1) Then
GvVxP.DataSource = ObjVentas.DtResultados.FiltraParametros("", "CveMoneda,SubTotal DESC") GvVxP.DataSource = ObjVentas.DtResultados
End If End If
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then
@@ -88,8 +89,8 @@ Partial Class General_RepIndicadorResumen
'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla 'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla
If GvVxP.Rows.Count > 0 Then If GvVxP.Rows.Count > 0 Then
UPGraficaVxP.Visible = True UPGraficaVxP.Visible = True
PLVxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Cantidad: " + "</span>" + String.Format("{0:n} Kg", CType(GvVxP.DataSource, DataTable).SUM("Cantidad", "Orden IS NOT NULL")) _ PLVxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Cantidad: " + "</span>" + String.Format("{0:n} Kg", CType(GvVxP.DataSource, DataTable).SUM("Cantidad", "CodigoPS <> ''")) _
+ "<span style=""font-weight:800; margin-left:1em"">" + "Total: " + "</span>" + String.Format("{0:c} MXN", CType(GvVxP.DataSource, DataTable).SUM("SubTotalMN", "Orden IS NOT NULL")) + "<span style=""font-weight:800; margin-left:1em"">" + "Total: " + "</span>" + String.Format("{0:c} MXN", CType(GvVxP.DataSource, DataTable).SUM("SubTotalMN", "CodigoPS <> ''"))
Else Else
UPGraficaVxP.Visible = False UPGraficaVxP.Visible = False
PLVxPTot.InnerHtml = Nothing PLVxPTot.InnerHtml = Nothing
@@ -159,6 +160,10 @@ Partial Class General_RepIndicadorResumen
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Orden") = "" Then If e.Row.DBCampo("Orden") = "" Then
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
Else
If e.Row.DBCampo("CodigoPS") = "" Then
e.Row.CssClass = "SubTotales"
End If
End If End If
End If End If
End Sub End Sub
@@ -253,7 +258,7 @@ Partial Class General_RepIndicadorResumen
DtVxP.Columns.Add("Unidad") DtVxP.Columns.Add("Unidad")
'RowColorIndex = 0 'RowColorIndex = 0
For Each Dr As DataRow In CType(GvVxP.DataSource, DataTable).FiltraParametros("", "SubTotalMN DESC").Rows For Each Dr As DataRow In CType(GvVxP.DataSource, DataTable).FiltraParametros("", "SubTotalMN DESC").Rows
If Not Dr("Orden").ToString = "" Then If Not Dr("CodigoPS").ToString = "" Then
Dim Row = DtVxP.NewRow() Dim Row = DtVxP.NewRow()
Row("Texto") = Dr("GPO").ToString Row("Texto") = Dr("GPO").ToString
Row("Valor") = Dr("SubTotalMN").ToString.FormatoNumero Row("Valor") = Dr("SubTotalMN").ToString.FormatoNumero

View File

@@ -345,7 +345,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
ImprimiReporte("EXCEL") ImprimiReporte("EXCEL")
End Sub End Sub
Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click
GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString + ".xls") GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString)
End Sub End Sub
Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
ImprimiReporte() ImprimiReporte()

View File

@@ -325,7 +325,8 @@
</div> </div>
<asp:UpdatePanel runat="server" ID="UpGvBancos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpGvBancos" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvBancos" ViewStateMode="Enabled" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial" CssClass="ScrollAD table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None"> <asp:GridView ID="GvBancos" ViewStateMode="Enabled" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial" CssClass="ScrollAD table table-striped table-advance table-hover Widthall"
Style="text-align: center;" GridLines="None" DataKeyNames="Comprobante" >
<Columns> <Columns>
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" /> <asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha Venta" /> <asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha Venta" />

View File

@@ -592,16 +592,17 @@ Partial Class Portal_PortalProveedor
Protected Sub GvBancos_comprobante(sender As Object, e As EventArgs) Protected Sub GvBancos_comprobante(sender As Object, e As EventArgs)
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Path As String = String.Format("{0}{1}{2}{3}", UsuarioActual.Empresa.Ruta, "IE\", Gvr.FCHiddenField("CveIe").Value, ".png") Dim Path As String = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, Gvr.DataKey("Comprobante"))
Dim Archivo As New System.IO.FileInfo(Path) Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then If Archivo.Exists Then
HttpContext.Current.Response.Clear() HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent() HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = "application/png" HttpContext.Current.Response.ContentType = "application/png"
HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=comprobante.png") HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString()) HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path) HttpContext.Current.Response.TransmitFile(Path)
'HttpContext.Current.Response.Flush() 'HttpContext.Current.Response.Flush()

View File

@@ -1111,7 +1111,8 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMetodoPago33" CssClass="form-control select2me" runat="server" Width="250" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlMetodoPago33" CssClass="form-control select2me" runat="server" Width="250" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar" AutoPostBack="true"
OnSelectedIndexChanged="DdlMetodoPago33_SelectedIndexChanged" >
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlMetodoPago33.ClientID.ToString()%>">Método de Pago:</label> <label for="<%= DdlMetodoPago33.ClientID.ToString()%>">Método de Pago:</label>

View File

@@ -1656,7 +1656,8 @@ Partial Class Clientes
DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString()) DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString())
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString()) DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString())
DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) 'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
CargaFormaDePago(ObjClientes.CveFormaPago33)
If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
@@ -10583,5 +10584,36 @@ Partial Class Clientes
UpLineaAdicionalmodal.Update() UpLineaAdicionalmodal.Update()
End Sub End Sub
Protected Sub DdlMetodoPago33_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaFormaDePago(-1)
End Sub
Private Sub CargaFormaDePago(Optional CveFormaPago As Integer = -1)
DdlFormaPago33.Items.Clear()
If DdlMetodoPago33.SelectedValue.ToEntero = 3 Then
DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20")
Else
DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20")
End If
DdlFormaPago33.DataBind()
If Not DdlMetodoPago33.SelectedValue.ToEntero = 3 Then
DdlFormaPago33.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
End If
If CveFormaPago > 0 Then
DdlFormaPago33.SelectedValueExist(CveFormaPago)
End If
UpFiscalContable.Update()
End Sub
End Class End Class