280 lines
16 KiB
Plaintext
280 lines
16 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegIngresosModificaciones.aspx.vb" Inherits="AC_RegIngresosModificaciones" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
<%--<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />--%>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
Registro de Modificaciones al Presupuestos de Ingresos
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
<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="">
|
|
<div class="titlefiltros caption ">
|
|
<ul class="list-inline">
|
|
<li>Tipo de Modificación:
|
|
<asp:DropDownList ID="DdlAccion" runat="server" Width="150px" AutoPostBack="true" OnSelectedIndexChanged="TipoModificacion">
|
|
<asp:ListItem Text="Ampliación" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Reducción" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Transferencia" Value="0"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<%-- <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
|
<tr class="SubTotales2">
|
|
<td width="200px">Tipo de Modificación:</td>
|
|
<td width="150px">
|
|
<asp:DropDownList ID="DdlAccion" runat="server" Width="150px" AutoPostBack="true" OnSelectedIndexChanged="TipoModificacion">
|
|
<asp:ListItem Text="Ampliación" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Reducción" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Transferencia" Value="0"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>--%>
|
|
|
|
<asp:UpdatePanel ID="UpEncabezado" UpdateMode="Conditional" runat="server">
|
|
<ContentTemplate>
|
|
<table style="width: 100%;" >
|
|
<tr>
|
|
<td style="width: 100px;">Fecha:</td>
|
|
<td>
|
|
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 130px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</td>
|
|
<td align="right">
|
|
<h4>Ejercicio: <asp:Literal Text="" ID="LtEjercicio" runat="server" /></h4>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Concepto:</td>
|
|
<td>
|
|
<asp:TextBox ID="TxtConcepto" runat="server" CausesValidation="true" ValidationGroup="GrpGuardar" Width="400px"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<br />
|
|
|
|
|
|
<asp:UpdatePanel ID="UPPDetalle" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<%--<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
|
<thead>
|
|
<tr class="Titulos TextTab">
|
|
<th scope="col" style="width: 250px">Fuente Recaudación</th>
|
|
<th scope="col" style="width: 100px">Código</th>
|
|
<th scope="col" style="width: 250px">Rubro Ingreso</th>
|
|
<th scope="col" style="width: 90px">Saldo</th>
|
|
<asp:Label runat="server" ID="AmpliacionTitulo" ClientIDMode="Static">
|
|
<th scope="col" style="width: 90px">Ampliación</th>
|
|
</asp:Label>
|
|
<asp:Label runat="server" ID="ReduccionTitulo" ClientIDMode="Static" Visible="false">
|
|
<th scope="col" style="width: 90px">Reducción</th>
|
|
</asp:Label>
|
|
<th scope="col">Saldo Final</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tr>
|
|
<td colspan="10">--%>
|
|
|
|
<asp:GridView ID="GvD" runat="server" OnRowDataBound="GvD_RowDataBound" AutoGenerateColumns="False" DataKeyNames="IdCuentaPorEjecutar, IdCuentaModificado" Width="100%" CssClass="table table-striped table-hover" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="FuenteRecaudación">
|
|
<ItemTemplate>
|
|
<asp:Literal ID="FuenteRecaudacion" runat="server" Text='<%# Eval("FuenteRecaudacion")%>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="20%" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Codigo">
|
|
<ItemTemplate>
|
|
<asp:Literal ID="Codigo" runat="server" Text='<%# Eval("CodigoRubroIngreso")%>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="10%" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="RubroIngreso">
|
|
<ItemTemplate>
|
|
<asp:Literal ID="RubroIngreso" runat="server" Text='<%# Eval("RubroIngreso")%>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="20%" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Saldo">
|
|
<ItemTemplate>
|
|
<asp:Literal ID="Saldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}")%>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="15%" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Ampliación">
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtAmpliacion" runat="server" Width="90%" CssClass="alineanum"></asp:TextBox>
|
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtAmpliacion" FilterType="Custom, Numbers" ValidChars="." />
|
|
</ItemTemplate>
|
|
<ItemStyle Width="10%" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Reducción" Visible="False">
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtReduccion" runat="server" Width="90%" CssClass="alineanum"></asp:TextBox>
|
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtReduccion" FilterType="Custom, Numbers" ValidChars="." />
|
|
<asp:RangeValidator ID="RV" Enabled="False" Display="Dynamic" ControlToValidate="TxtReduccion" runat="server" MinimumValue="0" MaximumValue="0" Type="Currency" ErrorMessage="*"></asp:RangeValidator>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="10%" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="SaldoFinal">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LBSF" runat="server"></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right" Width="15%" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
|
|
<%-- </td>
|
|
</tr>
|
|
</table>--%>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<asp:UpdatePanel ID="UPTotales" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
|
<tr class="SubTotales">
|
|
<td style="width: 50%"></td>
|
|
<td style="width: 15%; text-align:right;">
|
|
<asp:Label runat="server" ID="LbTotalSaldo" ClientIDMode="Static" CssClass="alineanum" Width="95px" Text="0.00"></asp:Label>
|
|
</td>
|
|
<td style="width: 10%; text-align:right;" runat="server" id="TdAmpliacion">
|
|
<asp:Label runat="server" ID="LbTotalAmpliacion" ClientIDMode="Static" Width="90px" Text="0.00"></asp:Label>
|
|
</td>
|
|
<td style="width: 10%; text-align:right;" runat="server" id="TdReduccion" visible="false">
|
|
<asp:Label runat="server" ID="LbTotalReduccion" ClientIDMode="Static" Width="90px" Text="0.00" Visible="false"></asp:Label>
|
|
</td>
|
|
<td style="width: 15%; text-align:right;">
|
|
<asp:Label runat="server" ID="LbTotalSaldoFinal" ClientIDMode="Static" Text="0.00"></asp:Label>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<asp:UpdatePanel ID="UPComandos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
|
<tr class="SubTotales">
|
|
<td style="float: right; padding-top: 3px; padding-bottom: 3px; padding-right: 20px;">
|
|
<asp:Button ID="BtnGuardar" runat="server" ClientIDMode="Static" Text="Guardar Modificaciones" ValidationGroup="GrpGuardar" OnClick="BtnGuardar_click" class="btn btn-primary" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
|
|
|
|
function pageLoad() {
|
|
$(document).ready(function () {
|
|
//gridviewScroll();
|
|
});
|
|
}
|
|
|
|
|
|
<%-- function gridviewScroll() {
|
|
var Tam = TamañoVentana();
|
|
var Alto = Tam.height - 300;
|
|
if (Alto < 100) {
|
|
Alto = 100;
|
|
}
|
|
$('#<%=GvD.ClientID%>').gridviewScroll({
|
|
width: 995,
|
|
height: Alto
|
|
|
|
});
|
|
}--%>
|
|
|
|
|
|
function CalculaSaldo(s, t, f, Opc, limpia) {
|
|
|
|
var Imp = parseFloat(t.value);
|
|
if (Imp > 0) {
|
|
if (Opc == 'R') {
|
|
if (parseFloat(t.value) > s) {
|
|
t.value = s;
|
|
}
|
|
if (Imp > 0 && limpia != '') { //si hay valor en el campo actual, debe de limpiar el otro
|
|
$get(limpia).value = '';
|
|
}
|
|
Imp = parseFloat(-t.value);
|
|
|
|
|
|
}
|
|
else {
|
|
if (Imp > 0 && limpia != '') { //si hay valor en el campo actual, debe de limpiar el otro
|
|
$get(limpia).value = '';
|
|
}
|
|
}
|
|
if (parseFloat(t.value) > 0) $get(f).innerText = FormatoNumero(s + Imp, 2); // si el importe inicial es mayor a cero, hubo cambios
|
|
}
|
|
else {
|
|
$get(f).innerText = FormatoNumero(s, 2);
|
|
}
|
|
SumaValores();
|
|
}
|
|
function SumaValores() {
|
|
var Importe = 0;
|
|
var ImpReduccion = 0;
|
|
|
|
var topLevelElem = document.getElementById("form1");
|
|
var textBoxes = topLevelElem.getElementsByTagName("input");
|
|
for (var i = 0; i < textBoxes.length; i++) {
|
|
if (textBoxes[i].type == "text") {
|
|
if (textBoxes[i].id.indexOf('TxtAmpliacion') >= 0 && textBoxes[i].readOnly == false && textBoxes[i].value != '') {
|
|
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
|
}
|
|
if (textBoxes[i].id.indexOf('TxtReduccion') >= 0 && textBoxes[i].readOnly == false && textBoxes[i].value != '') {
|
|
ImpReduccion = parseFloat(ImpReduccion) + parseFloat(textBoxes[i].value.split(',').join(''));
|
|
}
|
|
}
|
|
}
|
|
debugger;
|
|
if ($get('LbTotalAmpliacion')) $get('LbTotalAmpliacion').innerText = FormatoNumero(Importe, 2);
|
|
if ($get('LbTotalReduccion')) $get('LbTotalReduccion').innerText = FormatoNumero(ImpReduccion, 2);
|
|
if ($get('LbTotalSaldoFinal')) $get('LbTotalSaldoFinal').innerText = FormatoNumero(parseFloat($get('LbTotalSaldo').innerText.replace(/,/g, '')) + Importe - ImpReduccion, 2);
|
|
|
|
|
|
}
|
|
</script>
|
|
</asp:Content>
|