256 lines
12 KiB
Plaintext
256 lines
12 KiB
Plaintext
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad_CatCuentas" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
#treeviewarbolmiarbol, .catcuentascontarbol .catcuentasarbol {
|
|
width: 100%;
|
|
}
|
|
|
|
#listviewbuscar {
|
|
width: 50%;
|
|
}
|
|
|
|
.aradd {
|
|
margin-left: 15px;
|
|
background-color: #1caf9a;
|
|
color: #ffffff;
|
|
font-weight: 300;
|
|
padding: 2px 7px 3px 8px;
|
|
text-align: center;
|
|
height: 15px;
|
|
border-radius: 18px !important;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.aradd::before {
|
|
font: normal normal normal 14px/1 FontAwesome;
|
|
font-size: 9px !important;
|
|
content: "\f067";
|
|
}
|
|
|
|
.aredit {
|
|
margin-left: 15px;
|
|
background-color: #E87E04;
|
|
color: #ffffff;
|
|
font-weight: 300;
|
|
padding: 2px 7px 3px 8px;
|
|
text-align: center;
|
|
height: 15px;
|
|
border-radius: 18px !important;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.aredit::before {
|
|
font: normal normal normal 14px/1 FontAwesome;
|
|
font-size: 9px !important;
|
|
content: "\f040";
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
<li>
|
|
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
|
</li>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
Catálogo de Cuentas Contables
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
|
|
<asp:UpdatePanel ID="upcuentas" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<asp:UpdatePanel ID="updatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="catcuentascontarbol">
|
|
<fieldset>
|
|
<legend>Cuentas</legend>
|
|
<div class="catcuentasarbol">
|
|
<div id="treeviewarbolmiarbol">
|
|
<asp:Literal ID="Literal1" Visible="false" runat="server"></asp:Literal>
|
|
<ADS:Arbol runat="server" ID="ArbolCuentas"></ADS:Arbol>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="catcuentasform">
|
|
|
|
|
|
<asp:TextBox ID="Textbuscar" Style="display: none;" runat="server"></asp:TextBox>
|
|
<asp:HiddenField ID="HdnID" runat="server" Value="" ClientIDMode="Static" />
|
|
<asp:Button ID="editar" runat="server" Style="display: none;" Text="Buscar" />
|
|
<asp:Button ID="agregar" Style="display: none;" runat="server" Text="Buscar" />
|
|
<asp:Button ID="borrar" Style="display: none;" runat="server" Text="borrar" />
|
|
<fieldset>
|
|
<legend>Información de la cuenta</legend>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Cuenta</div>
|
|
<div class="catcuentas right">
|
|
<asp:TextBox ID="Tcuenta" runat="server" Enabled="False" MaxLength="30" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
|
<ajax:MaskedEditExtender TargetControlID="Tcuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
|
</div>
|
|
</div>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Nombre</div>
|
|
<div class="catcuentas right">
|
|
<asp:TextBox ID="Tnombre" Style="width: 100%;" runat="server" MaxLength="50"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<hr />
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Subcuenta de</div>
|
|
<div class="catcuentas right">
|
|
<asp:TextBox ID="Tsubcuenta" runat="server" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
|
<br />
|
|
<asp:Label ID="LblSubCuenta" runat="server" Text="" Font-Italic="True" Font-Size="7pt" ClientIDMode="Static"></asp:Label>
|
|
<asp:HiddenField ID="HdnSubCuentaDe" ClientIDMode="Static" Value="0" runat="server" />
|
|
</div>
|
|
</div>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Tipo de Cuenta</div>
|
|
<div class="catcuentas right">
|
|
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" runat="server">
|
|
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
|
|
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
|
|
<asp:ListItem Text="Pasivo Deudora " Value="C"></asp:ListItem>
|
|
<asp:ListItem Text="Pasivo Acreedora " Value="D"></asp:ListItem>
|
|
<asp:ListItem Text="Capital Deudora " Value="E"></asp:ListItem>
|
|
<asp:ListItem Text="Capital Acreedora " Value="F"></asp:ListItem>
|
|
<asp:ListItem Text="Resultados Deudora " Value="G"></asp:ListItem>
|
|
<asp:ListItem Text="Resultados Acreedora" Value="H"></asp:ListItem>
|
|
<asp:ListItem Text="Estadisticas Deudora" Value="I"></asp:ListItem>
|
|
<asp:ListItem Text="Estadisticas Acredora " Value="J"></asp:ListItem>
|
|
<asp:ListItem Text="Orden Deudora " Value="K"></asp:ListItem>
|
|
<asp:ListItem Text="Orden Acreedora " Value="L"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Cuenta Mayor</div>
|
|
<div class="catcuentas right">
|
|
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" runat="server">
|
|
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="No " Value="2"></asp:ListItem>
|
|
<asp:ListItem Text="Titulo " Value="3"></asp:ListItem>
|
|
<asp:ListItem Text="SubTitulo " Value="4"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Agrupador SAT</div>
|
|
<div class="catcuentas right">
|
|
<asp:DropDownList ID="DdlAgrupadorSAT" DataTextField="CodigoNombre" DataValueField="Id" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Moneda</div>
|
|
<div class="catcuentas right">
|
|
<asp:DropDownList ID="DdlMoneda" DataTextField="Nombre" DataValueField="Id" CssClass="form-control input-sm input-small select2me" runat="server">
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Dígito agrupador</div>
|
|
<div class="catcuentas right">
|
|
<asp:TextBox ID="TxtDigAgrup" Style="width: 40px;" runat="server"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
<div class="form-line">
|
|
<div class="catcuentas left">Nombre en inglés</div>
|
|
<div class="catcuentas right">
|
|
<asp:TextBox ID="TxtNomIngles" Style="width: 100%;" runat="server"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" tit runat="server" Text="Guardar" />
|
|
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
|
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
|
|
</fieldset>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
|
|
|
|
<asp:Content ID="content7" ContentPlaceHolderID="JS" runat="server">
|
|
<script>
|
|
function buscararbolito(inputid, ulid) {
|
|
|
|
var texto = $("input#" + inputid).val();
|
|
if ((texto == '') && ($('ul#' + ulid))) {
|
|
$('ul#' + ulid + '').removeClass("listainvicible");
|
|
}
|
|
else {
|
|
if ($('ul#' + ulid).hasClass('listainvicible') == false) {
|
|
$('ul#' + ulid).addClass("listainvicible");
|
|
}
|
|
if ($('ul#' + ulid + ' li.livisible')) {
|
|
$('ul#' + ulid + ' li.livisible').removeClass("livisible");
|
|
}
|
|
if ($('ul#' + ulid + ' input:checked')) {
|
|
$('ul#' + ulid + ' input:checked').prop('checked', false);
|
|
}
|
|
if ($('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]')) {
|
|
$('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]').prop('checked', true);
|
|
}
|
|
if ($('ul#' + ulid + ' li:contains("' + texto + '")')) {
|
|
$('ul#' + ulid + ' li:contains("' + texto + '")').addClass("livisible");
|
|
}
|
|
if ($('ul#' + ulid + ' label:contains("' + texto + '") ~ ul li')) {
|
|
$('ul#' + ulid + ' label:contains(""' + texto + '"") ~ ul li').addClass("livisible");
|
|
}
|
|
}
|
|
}
|
|
|
|
jQuery(document).ready(function () {
|
|
Sys.Application.add_load(function (s, e) {
|
|
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
|
|
});
|
|
});
|
|
|
|
function ValidaGuardar(SubCuentaAnterior) {
|
|
$('.popover').remove();
|
|
$("#C_Guardar").removeAttr("aria-describedby");
|
|
|
|
|
|
|
|
if ($get('HdnSubCuentaDe').value != $get('Tsubcuenta').value) {
|
|
|
|
setTimeout(
|
|
function () {
|
|
;
|
|
var Text = '';
|
|
|
|
debugger;
|
|
if ($("#Tsubcuenta").length) {
|
|
Text += 'La cuenta sera reasignada a la cuenta padre: <b>' + $get('Tsubcuenta').value + '</b> con sus respectivos saldos <br/>';
|
|
}
|
|
|
|
$('.popover-title').html(Text);
|
|
}, 10);
|
|
}
|
|
else {
|
|
|
|
$('.popover-title').html('¿Esta seguro de guardar?');
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|