280 lines
14 KiB
Plaintext
280 lines
14 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepDepreciacion.aspx.vb" Inherits="AF_RepDepreciacion" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.Widthall {
|
|
width: 100% !important;
|
|
}
|
|
|
|
.dataTables_scrollHeadInner {
|
|
width: 100% !important;
|
|
background-color: #dddddd;
|
|
padding-left: 0px !important;
|
|
}
|
|
|
|
.dataTables_scrollFoot {
|
|
display: none;
|
|
position:static;
|
|
}
|
|
|
|
.table-scrollable {
|
|
margin: 0px !important;
|
|
}
|
|
|
|
.dataTables_scroll {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.table.dataTable {
|
|
margin-top: 0px !important;
|
|
}
|
|
|
|
.dataTables_scrollBody table th {
|
|
padding: 0px !important;
|
|
padding-right: 4px !important;
|
|
padding-left: 4px !important;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
<li>
|
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
|
</li>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
<asp:Label ID="LblTitulo" runat="server" Text="Catálogo de Ingreso / Egreso"></asp:Label>
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
|
|
|
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="btn-group pull-right btn-separete">
|
|
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>--%>
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
|
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
|
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
</div>
|
|
<div class="titlefiltros caption magindate">
|
|
<div class="row">
|
|
<div class="col-md-1 truncate" style="max-width: 60px">Fecha:</div>
|
|
<div class="col-md-1" style="min-width: 120px">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 105px !important; padding: 0px;">
|
|
<asp:TextBox Style="width: 80px !important;" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<br />
|
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciacion" DataKeyNames="CveActivoFijo, TipoActivoFijo" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="Descripcion" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="Fecha Adquisicion" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaCompra", "{0:d}") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="MOI" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlMOI" runat="server" Text='<%# Eval("MOI", "{0:N2}") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="Tasa de Depn" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlDepreciacion" runat="server" Text='<%# Eval("TasaDepreciacion", "{0:0.##}") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="Meses Vida" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlMesesVida" runat="server" Text='<%# Eval("MesesVida", "{0:0}") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="Depn Mensual" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlDepreciacionMensual" runat="server" Text='<%# Eval("DepreciacionMensual", "{0:N2}") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="Depn Acumulada" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlDepAcumulada" runat="server" Text='<%# Eval("DepreciacionAcumulada", "{0:N2}") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>
|
|
<asp:Label Text="Saldo x Deducir" runat="server" CausesValidation="false"> </asp:Label>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlSaldoxDeducir" runat="server" Text='<%# Eval("SaldoXDeducir", "{0:N2}") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<HeaderStyle CssClass="Titulos" />
|
|
<RowStyle CssClass="Texto" />
|
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
</asp:GridView>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
|
|
function Scroll() {
|
|
$(document).ready(function () {
|
|
var Tam = TamañoVentana();
|
|
var Alto = Tam.height - 300;
|
|
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
|
width: 995,
|
|
height: Alto
|
|
});
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function GetSelectedRow(lnk, txtf, txtoi) {
|
|
|
|
|
|
//var row = lnk.parentNode.parentNode;
|
|
//var txtoi = row.cells[10].getElementsByTagName("input")[1];
|
|
if (lnk.checked) {
|
|
debugger;
|
|
if (txtf) { txtf.style.display = ""; }
|
|
if (txtoi) { txtoi.style.display = ""; }
|
|
// try {
|
|
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
|
// if (txtoi) { txtoi.style.display = ""; }
|
|
// }
|
|
// catch (err) {
|
|
// row = row.parentNode;
|
|
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
|
// }
|
|
} else {
|
|
if (txtf) { txtf.style.display = "none"; }
|
|
if (txtoi) { txtoi.style.display = "none"; }
|
|
// try {
|
|
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
|
// }
|
|
// catch (err) {
|
|
// row = row.parentNode;
|
|
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
|
// }
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function PlaySound() {
|
|
var sound = document.getElementById("audio");
|
|
sound.play()
|
|
}
|
|
|
|
function FechaGeneral(lnk, FechaDocumento) {
|
|
debugger;
|
|
var row = lnk.parentNode.parentNode;
|
|
|
|
var parts = FechaDocumento.split("/");
|
|
var F1 = new Date(parts[2], parts[1], parts[0]);
|
|
|
|
|
|
if (lnk.checked) {
|
|
try {
|
|
parts = $get("TxtFechaAplicadoHeader").value.split("/");
|
|
var F2 = new Date(parts[2], parts[1], parts[0]);
|
|
|
|
if (F1 < F2) {
|
|
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
|
} else {
|
|
row.cells[10].getElementsByTagName("input")[0].value = FechaDocumento;
|
|
}
|
|
}
|
|
catch (err) {
|
|
row = row.parentNode;
|
|
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function OnClientShown(sender, args) {
|
|
sender._popupBehavior._element.style.zIndex = 10005;
|
|
sender._popupBehavior._element.style.position = "absolute";
|
|
sender._popupBehavior._element.style.top = "0px";
|
|
document.getElementById("C_GvDatosPanelItem").style.overflow = "initial";
|
|
}
|
|
</script>
|
|
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
|
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
|
<script type="text/javascript">
|
|
var OrdenarGV = function () {
|
|
var Tam = TamañoVentana();
|
|
var Alto = Tam.height - 330;
|
|
if (Alto < 100) {
|
|
Alto = 100;
|
|
}
|
|
$('#C_GvDatos').DataTable({ scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false, });
|
|
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|