RegPrePolizasS Crar apartir de
This commit is contained in:
@@ -82,8 +82,12 @@
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -135,12 +139,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chequesie22" runat="server" id="divObservaciones">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
@@ -173,11 +174,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chequesie22">
|
||||
<div class="row" id="DivAgregarConceptos" runat="server" visible="true">
|
||||
<div class="col-md-12">
|
||||
@@ -243,15 +240,10 @@
|
||||
<asp:UpdatePanel ID="UpPoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row" visible="false" runat="server" id="DivDatosPoliza">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6" style="margin-top: 20px;">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="col-md-8" style="margin-top: 20px;">
|
||||
<div class="portlet light bordered xspadding ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-bookmark font-green"></i>
|
||||
@@ -265,48 +257,63 @@
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtFolio" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoPoliza.ClientID.ToString()%>">Tipo Póliza:</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group form-md-line-input input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
|
||||
<%--<div class="form-group form-md-line-input input-iconright">--%>
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioPoliza" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendarioPoliza" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtFechaDocumento.ClientID.ToString()%>">Fecha:</label>
|
||||
|
||||
<div class="form-group form-md-line-input input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<br />
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioPoliza" class="btn default" style="margin-top:15px!important"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendarioPoliza" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtFechaDocumento.ClientID.ToString()%>">Fecha:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<%--</div>--%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoPoliza.ClientID.ToString()%>">Tipo Póliza:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtFolio" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtConcepto.ClientID.ToString()%>">Concepto:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtConcepto.ClientID.ToString()%>">Concepto:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -314,7 +321,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6" style="margin-top: 20px;">
|
||||
<div class="col-md-4" style="margin-top: 20px;">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -328,22 +335,25 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtEstatus" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtEstatus.ClientID.ToString()%>">Estatus: </label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
</div>--%>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtFechaelaboracion" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFechaelaboracion.ClientID.ToString()%>">Fecha Elaboracion: </label>
|
||||
<label for="<%= TxtFechaelaboracion.ClientID.ToString()%>">Fecha Elaboración: </label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtUsuarioElaboro" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtUsuarioElaboro.ClientID.ToString()%>">Usuario Elaboro: </label>
|
||||
<label for="<%= TxtUsuarioElaboro.ClientID.ToString()%>">Usuario Elaboró: </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -553,18 +563,12 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
<%-- <asp:HiddenField ID="HdnConceptoContable" runat="server" Value='<%# Eval("CveConceptoContable") %>' />
|
||||
<asp:HiddenField ID="HdnProveedor" runat="server" Value='<%# Eval("CveProveedor") %>' />
|
||||
<asp:HiddenField ID="HdnCompra" runat="server" Value='<%# Eval("CveCompra") %>' />
|
||||
<asp:HiddenField ID="HdnPersonal" runat="server" Value='<%# Eval("CvePersonal") %>' />
|
||||
<asp:HiddenField ID="HdnCliente" runat="server" Value='<%# Eval("CveCliente") %>' />
|
||||
<asp:HiddenField ID="HdnVenta" runat="server" Value='<%# Eval("CveVenta") %>' />--%>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
@@ -649,11 +653,13 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEdit" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkGvPrePolizaEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="20px" />
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
@@ -722,6 +728,7 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<asp:Panel ID="PnlContado" runat="server" Visible="False">
|
||||
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
|
||||
<asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem>
|
||||
@@ -800,114 +807,254 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivEditConcepto" align="center" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Editar Concepto" />
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body" style="margin-left: 20px">
|
||||
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Concepto:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlConceptosContablesE" CssClass="form-control input-sm select2me" Width="405px" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlProveedoresE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="160px" Visible="false" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlComprasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPersonalE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPorcentajeIVAE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" VISIBLE="false" Width="160px" >
|
||||
<asp:ListItem Text="16%" Value="0.16"></asp:ListItem>
|
||||
<asp:ListItem Text="8%" Value="0.08"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog" style="width: 450px;" id="DvMoldalConceptoAncho" >
|
||||
|
||||
<asp:UpdatePanel ID="UpModalConcepto" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Editar Concepto" />
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="margin-left: 20px">
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlCuentaContableE" runat="server" Width="405px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Referencia:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtReferenciaE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Descripción:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtConceptoE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
SubProyecto:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:DropDownList ID="DdlSubProyectoE" runat="server" Width="220px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="DivTG" runat="server">
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Tipo Gasto:</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:DropDownList ID="DdlTipoGastoE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
<div class="col-md-12" runat="server" id="DvMoldalConceptoSeccion1">
|
||||
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Concepto:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlConceptosContablesE" CssClass="form-control input-sm select2me" Width="405px" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Cargo:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtCargoE" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-xs-1" style="text-align: left">
|
||||
Abono:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtAbonoE" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAceptar" runat="server" class="btn btn-success" Text="Aceptar" />
|
||||
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DvmodalconceptoProveddor" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Proveedor:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlProveedoresE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="405px" AutoPostBack="true"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DvModalconceptoCompra" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Compra:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlComprasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="405px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row " runat="server" id="DvModalconceptoPersonal" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Personal:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlPersonalE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="405px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DvModalconceptoCliente" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Cliente:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="405px" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DvModalconceptoVenta" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Venta:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="405px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DvModalconceptoClasificacion" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Clasificación:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="405px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DvModalconceptoProcentajeIVA" visible="false">
|
||||
|
||||
<div class="col-xs-2" style="text-align: left">Procentaje IVA:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlPorcentajeIVAE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Visible="false" Width="160px">
|
||||
<asp:ListItem Text="16%" Value="0.16"></asp:ListItem>
|
||||
<asp:ListItem Text="8%" Value="0.08"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlCuentaContableE" runat="server" Width="405px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Referencia:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtReferenciaE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Descripción:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtConceptoE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
SubProyecto:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:DropDownList ID="DdlSubProyectoE" runat="server" Width="220px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="DivTG" runat="server">
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Tipo Gasto:</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:DropDownList ID="DdlTipoGastoE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Cargo:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtCargoE" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpMocalConceptoGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-xs-1" style="text-align: left">
|
||||
Abono:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtAbonoE" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpMocalConceptoGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" visible="false" id="DVmodalConceptoTipoCambio">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Tipo de Cambio:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtModalConceptoTipoCambio" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="RfvTxtModalConceptoTipoCambio" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpMocalConceptoGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvTxtModalConceptoTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtModalConceptoTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="DvMoldalConceptoSeccion2" visible="false">
|
||||
|
||||
<div runat="server" id="Div1">
|
||||
|
||||
<asp:Panel ID="Panel1" CssClass="chequesie text-small" runat="server" Width="400px" Visible="true">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Movimiento:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlModalConceptoTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpMocalConceptoGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalConceptoTipoTransaccion" runat="server" ControlToValidate="DdlModalConceptoTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalConceptoTipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalConceptoTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Cuenta:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlModalConceptoCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpMocalConceptoGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalConceptoCuenta" runat="server" ControlToValidate="DdlModalConceptoCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalConceptoCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalConceptoCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
<asp:Label ID="Label1" runat="server" Text="Número:" class="col-md-2"></asp:Label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtModalConceptoDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtModalConceptoDocumentoFolio" runat="server" ControlToValidate="TxtDocumentoFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTxtModalConceptoDocumentoFolio" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtModalConceptoDocumentoFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-2" style="display: none">Importe</label>
|
||||
<div class="col-md-4 input-icon" style="display: none">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtModalConceptoDocumentoImporte" CssClass="form-control input-sm " Enabled="False" runat="server" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtModalConceptoDocumentoImporte" runat="server" TargetControlID="TxtModalConceptoDocumentoImporte" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label ID="Label2" runat="server" Text="Beneficiario:" class="col-md-2"></asp:Label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtModalConceptoDocumentoBeneficiario" runat="server" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtModalConceptoDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAceptar" runat="server" class="btn btn-success" Text="Aceptar" ValidationGroup="" />
|
||||
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DivCargaExcel" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -1113,5 +1260,9 @@
|
||||
}
|
||||
|
||||
|
||||
function valorIE() {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -204,6 +204,36 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ViewState("TipoPoliza") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CvePlantillaPoliza As Integer
|
||||
Get
|
||||
If ViewState("CvePlantillaPoliza") Is Nothing Then
|
||||
ViewState("CvePlantillaPoliza") = -1
|
||||
End If
|
||||
Return ViewState("CvePlantillaPoliza").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePlantillaPoliza") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Public Property CvePrePolizaOrigen As Integer
|
||||
Get
|
||||
If ViewState("CvePrePolizaOrigen") Is Nothing Then
|
||||
ViewState("CvePrePolizaOrigen") = -1
|
||||
End If
|
||||
Return ViewState("CvePrePolizaOrigen").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrePolizaOrigen") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -239,9 +269,21 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.Columns(5).Visible = False
|
||||
DivTG.Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
ValidaCrearAPartirDe()
|
||||
Exit Sub
|
||||
ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then
|
||||
|
||||
|
||||
CvePrePolizaOrigen = Request("CvePrePolizaOrigen").ToEntero
|
||||
CreaDT()
|
||||
CargaPrePolizaOrigen()
|
||||
|
||||
OcultarControlesCrearApartirDe()
|
||||
|
||||
|
||||
Exit Sub
|
||||
|
||||
Else
|
||||
CreaDT()
|
||||
BtnEliminar.Visible = False
|
||||
@@ -326,6 +368,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("IdCtaContable", Type.GetType("System.Int32"))
|
||||
.Add("ConceptoContable", Type.GetType("System.String"))
|
||||
.Add("CveCuenta", Type.GetType("System.Int32"))
|
||||
|
||||
.Add("ContadoTipoTransaccion", Type.GetType("System.Int32"))
|
||||
.Add("ContadoCuenta", Type.GetType("System.Int32"))
|
||||
.Add("ContadoNumeroFolio", Type.GetType("System.String"))
|
||||
@@ -335,6 +378,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Double"))
|
||||
.Add("Modificado", Type.GetType("System.Boolean"))
|
||||
.Add("EsComplementaria", Type.GetType("System.Boolean"))
|
||||
.Add("TC", Type.GetType("System.Decimal"))
|
||||
|
||||
|
||||
|
||||
End With
|
||||
@@ -434,9 +479,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
TxtFolio.Text = dr("FolioPoliza").ToString
|
||||
TxtUsuarioElaboro.Text = dr("Usuario").ToString
|
||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
|
||||
|
||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
|
||||
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
|
||||
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
||||
'DivAgregarConceptos.Visible = True
|
||||
@@ -448,7 +493,21 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
|
||||
|
||||
If Not DtMovimientos.Columns.Contains("ContadoCuenta") Then
|
||||
|
||||
DtMovimientos.Columns.Add("ContadoCuenta", GetType(Integer))
|
||||
DtMovimientos.Columns.Add("ContadoTipoTransaccion", GetType(Integer))
|
||||
DtMovimientos.Columns.Add("ContadoNumeroFolio", GetType(String))
|
||||
DtMovimientos.Columns.Add("ContadoBeneficiario", GetType(String))
|
||||
DtMovimientos.Columns.Add("ContadoObservaciones", GetType(String))
|
||||
DtMovimientos.Columns.Add("ContadoImporte", GetType(Decimal))
|
||||
|
||||
|
||||
End If
|
||||
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
|
||||
@@ -884,6 +943,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||
|
||||
|
||||
If CvePrePolizaOrigen > 0 Then
|
||||
CrarPrePolizaApartirDe()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim TotalCargos, TotalAbonos As Decimal
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
@@ -1156,9 +1222,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CargaSubProyectoE()
|
||||
CargaTipoGastoE()
|
||||
|
||||
UpdatePanel1.Update()
|
||||
UpModalConcepto.Update()
|
||||
End Sub
|
||||
Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
|
||||
|
||||
|
||||
Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto"))
|
||||
LtlTitulo.Text = "Editar Concepto"
|
||||
BtnAceptar.Text = "Aceptar"
|
||||
@@ -1182,9 +1251,31 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
|
||||
|
||||
CargaConceptosContablesE()
|
||||
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
||||
DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e)
|
||||
CargaModalConceptoCuentas()
|
||||
|
||||
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
||||
DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e)
|
||||
|
||||
TxtModalConceptoTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDouble.ToString("###,###,###.00")
|
||||
DdlModalConceptoTipoTransaccion.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoTipoTransaccion"))
|
||||
DdlModalConceptoCuenta.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoCuenta"))
|
||||
TxtModalConceptoDocumentoFolio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoNumeroFolio")
|
||||
TxtModalConceptoDocumentoBeneficiario.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoBeneficiario")
|
||||
TxtModalConceptoDocumentoObservaciones.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoObservaciones")
|
||||
TxtModalConceptoDocumentoImporte.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoImporte").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto)
|
||||
|
||||
'GvPrePoliza.Rows(IndiceGrid).DataKey("")
|
||||
|
||||
'dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
|
||||
'dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
|
||||
'dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
|
||||
'dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
|
||||
'dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
|
||||
'dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
||||
|
||||
|
||||
DdlProveedoresE.SelectedValueExist(CveProveedor)
|
||||
DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e)
|
||||
DdlComprasE.SelectedValueExist(CveCompra)
|
||||
@@ -1215,9 +1306,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If Abono <> 0 Then
|
||||
TxtAbonoE.Text = Abono
|
||||
End If
|
||||
|
||||
UpdatePanel1.Update()
|
||||
End If
|
||||
|
||||
If Abono = 0 Then
|
||||
CargaModalConceptoTipoTransaccion("Ing")
|
||||
Else
|
||||
CargaModalConceptoTipoTransaccion("Egs")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
UpModalConcepto.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiaCampos()
|
||||
@@ -1251,41 +1351,192 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlCuentaContableE.DataBind()
|
||||
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||
Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
|
||||
|
||||
'Aquii hay que consultar el concepto y determinar que es lo que se vba aplicar
|
||||
|
||||
Dim CveConceptoContableInsertar As Integer = DdlConceptosContablesE.SelectedValue.ToEntero
|
||||
Dim DT_Concepto As DataTable
|
||||
|
||||
If CveConceptoContableInsertar > 0 Then
|
||||
|
||||
DT_Concepto = GlobalDTContaConceptosContables(CveConceptoContableInsertar)
|
||||
|
||||
Dim AplicaActivoFijo As Boolean = False
|
||||
Dim AplicaAlmacen As Boolean = False
|
||||
Dim AplicaBancos As Boolean = False 'ok
|
||||
Dim AplicaClasificacion As Boolean = False 'ok
|
||||
Dim AplicaCliente As Boolean = False 'ok
|
||||
Dim AplicaCompra As Boolean = False
|
||||
Dim AplicaImpuesto As Boolean = False
|
||||
Dim AplicaNomina As Boolean = False
|
||||
Dim AplicaPersonal As Boolean = False
|
||||
Dim AplicaProveedor As Boolean = False
|
||||
Dim AplicaSubProyecto As Boolean = False
|
||||
Dim AplicaTC As Boolean = False 'ok
|
||||
Dim AplicaVenta As Boolean = False
|
||||
|
||||
AplicaActivoFijo = Boolean.Parse(DT_Concepto.Rows(0)("AplicaActivoFijo").ToString)
|
||||
AplicaAlmacen = Boolean.Parse(DT_Concepto.Rows(0)("AplicaAlmacen").ToString)
|
||||
AplicaBancos = Boolean.Parse(DT_Concepto.Rows(0)("AplicaBancos").ToString)
|
||||
AplicaClasificacion = Boolean.Parse(DT_Concepto.Rows(0)("AplicaClasificacion").ToString)
|
||||
AplicaCliente = Boolean.Parse(DT_Concepto.Rows(0)("AplicaCliente").ToString)
|
||||
AplicaCompra = Boolean.Parse(DT_Concepto.Rows(0)("AplicaCompra").ToString)
|
||||
AplicaImpuesto = Boolean.Parse(DT_Concepto.Rows(0)("AplicaImpuesto").ToString)
|
||||
AplicaNomina = Boolean.Parse(DT_Concepto.Rows(0)("AplicaNomina").ToString)
|
||||
AplicaPersonal = Boolean.Parse(DT_Concepto.Rows(0)("AplicaPersonal").ToString)
|
||||
AplicaProveedor = Boolean.Parse(DT_Concepto.Rows(0)("AplicaProveedor").ToString)
|
||||
AplicaSubProyecto = Boolean.Parse(DT_Concepto.Rows(0)("AplicaSubProyecto").ToString)
|
||||
AplicaTC = Boolean.Parse(DT_Concepto.Rows(0)("AplicaTC").ToString)
|
||||
AplicaVenta = Boolean.Parse(DT_Concepto.Rows(0)("AplicaVenta").ToString)
|
||||
|
||||
|
||||
|
||||
If AplicaImpuesto Then
|
||||
DdlPorcentajeIVAE.Visible = True
|
||||
Else
|
||||
DdlPorcentajeIVAE.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaProveedor Then
|
||||
CargaProveedoresE()
|
||||
DvmodalconceptoProveddor.Visible = True
|
||||
DvModalconceptoCompra.Visible = True
|
||||
|
||||
Else
|
||||
DvmodalconceptoProveddor.Visible = False
|
||||
DvModalconceptoCompra.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
If AplicaPersonal Then
|
||||
CargaPersonalE()
|
||||
DvModalconceptoPersonal.Visible = True
|
||||
|
||||
'DdlPersonalE.Visible = True
|
||||
Else
|
||||
DvModalconceptoPersonal.Visible = False
|
||||
|
||||
'DdlPersonalE.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If AplicaClasificacion Then
|
||||
CargaClasificacionesE()
|
||||
DvModalconceptoClasificacion.Visible = True
|
||||
'DdlClasificacionesE.Visible = True
|
||||
Else
|
||||
DvModalconceptoClasificacion.Visible = False
|
||||
'DdlClasificacionesE.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If AplicaCliente Then
|
||||
CargaClientesE()
|
||||
|
||||
DvModalconceptoCliente.Visible = True
|
||||
DvModalconceptoVenta.Visible = True
|
||||
|
||||
|
||||
'DdlClientesE.Visible = True
|
||||
'DdlVentasE.Visible = True
|
||||
Else
|
||||
|
||||
DvModalconceptoCliente.Visible = False
|
||||
DvModalconceptoVenta.Visible = False
|
||||
|
||||
'DdlClientesE.Visible = False
|
||||
'DdlVentasE.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If AplicaBancos Then
|
||||
'DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
|
||||
DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6")
|
||||
DvMoldalConceptoSeccion2.Visible = True
|
||||
RegistraScript("$('#DvMoldalConceptoAncho').attr('style','width:1000px');")
|
||||
Else
|
||||
' DvMoldalConceptoAncho.Attributes.Add("style", "width:450px")
|
||||
DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12")
|
||||
RegistraScript("$('#DvMoldalConceptoAncho').attr('style','width:450px');")
|
||||
DvMoldalConceptoSeccion2.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaTC Then
|
||||
DVmodalConceptoTipoCambio.Visible = True
|
||||
Else
|
||||
DVmodalConceptoTipoCambio.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||
CargaProveedoresE()
|
||||
DdlProveedoresE.Visible = True
|
||||
DdlComprasE.Visible = True
|
||||
Else
|
||||
DdlProveedoresE.Visible = False
|
||||
DdlComprasE.Visible = False
|
||||
End If
|
||||
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(28, 29) Then
|
||||
CargaPersonalE()
|
||||
DdlPersonalE.Visible = True
|
||||
Else
|
||||
DdlPersonalE.Visible = False
|
||||
End If
|
||||
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(51) Then
|
||||
CargaClasificacionesE()
|
||||
DdlClasificacionesE.Visible = True
|
||||
Else
|
||||
DdlClasificacionesE.Visible = False
|
||||
End If
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
|
||||
CargaClientesE()
|
||||
DdlClientesE.Visible = True
|
||||
DdlVentasE.Visible = True
|
||||
Else
|
||||
DdlClientesE.Visible = False
|
||||
DdlVentasE.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
'If dr IsNot Nothing Then
|
||||
' DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
|
||||
|
||||
'End If
|
||||
|
||||
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||
' CargaProveedoresE()
|
||||
' DdlProveedoresE.Visible = True
|
||||
' DdlComprasE.Visible = True
|
||||
'Else
|
||||
' DdlProveedoresE.Visible = False
|
||||
' DdlComprasE.Visible = False
|
||||
'End If
|
||||
|
||||
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(28, 29) Then
|
||||
' CargaPersonalE()
|
||||
' DdlPersonalE.Visible = True
|
||||
'Else
|
||||
' DdlPersonalE.Visible = False
|
||||
'End If
|
||||
|
||||
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(51) Then
|
||||
' CargaClasificacionesE()
|
||||
' DdlClasificacionesE.Visible = True
|
||||
'Else
|
||||
' DdlClasificacionesE.Visible = False
|
||||
'End If
|
||||
|
||||
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
|
||||
' CargaClientesE()
|
||||
' DdlClientesE.Visible = True
|
||||
' DdlVentasE.Visible = True
|
||||
'Else
|
||||
' DdlClientesE.Visible = False
|
||||
' DdlVentasE.Visible = False
|
||||
'End If
|
||||
|
||||
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(30) Then
|
||||
|
||||
' DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
|
||||
' DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6")
|
||||
' DvMoldalConceptoSeccion2.Visible = True
|
||||
'Else
|
||||
|
||||
' DvMoldalConceptoAncho.Attributes.Add("style", "width:450px")
|
||||
' DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12")
|
||||
' DvMoldalConceptoSeccion2.Visible = False
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UpModalConcepto.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaProveedoresE()
|
||||
DdlProveedoresE.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
@@ -1348,11 +1599,19 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange
|
||||
CargaVentasE(DdlClientesE.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
Protected Sub BtnAceptar_Click(sender As Object, e As EventArgs) Handles BtnAceptar.Click
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnAceptar_Click(sender As Object, e As EventArgs) Handles BtnAceptar.Click
|
||||
|
||||
'asdasdasd
|
||||
|
||||
If IndiceGrid = -1 Then
|
||||
|
||||
If DtMovimientos Is Nothing Then CreaDT()
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
dr("IdCtaContable") = IdCtaContable
|
||||
@@ -1380,18 +1639,21 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If DdlPorcentajeIVAE.Visible Then
|
||||
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
If CvePrePoliza > 0 Or CvePrePolizaOrigen Then
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
UpTotalCargo.Update()
|
||||
@@ -1468,6 +1730,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
||||
dr("Modificado") = True
|
||||
|
||||
dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
|
||||
dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
|
||||
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
|
||||
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
|
||||
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
|
||||
dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
||||
|
||||
dr("TC") = TxtModalConceptoTipoCambio.Text.ToDecimal
|
||||
|
||||
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToString.ToDecimal
|
||||
|
||||
|
||||
|
||||
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnConceptoContable").Value = DdlConceptosContablesE.SelectedValue.ToEntero
|
||||
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnProveedor").Value = DdlProveedoresE.SelectedValue.ToEntero
|
||||
@@ -1492,7 +1766,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DtMovimientos.AcceptChanges()
|
||||
GvPrePoliza.EditIndex = -1
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
@@ -2384,5 +2658,452 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Crear A Partier de"
|
||||
|
||||
|
||||
Private Sub OcultarControlesCrearApartirDe()
|
||||
|
||||
BtnEliminar.Visible = False
|
||||
BtnContabilizar.Visible = False
|
||||
GvPrePoliza.Columns(5).Visible = False
|
||||
DivTG.Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
|
||||
TxtConcepto.Enabled = True
|
||||
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
|
||||
TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ValidaCrearAPartirDe() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
|
||||
Dim TmpCvePlantillaPoliza As Integer = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePlantillaPoliza", $"CvePlantillaPoliza = {CvePlantillaPoliza}").ToEntero
|
||||
|
||||
If TmpCvePlantillaPoliza > 0 Then
|
||||
Respuesta = True
|
||||
LnkCrearAPartirDe.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub CargaPrePolizaOrigen()
|
||||
BtnEliminar.Visible = True
|
||||
LblEncabezado.Text = "Crear a partir de"
|
||||
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
If ObjContabilidad.GetPrePoliza(CvePrePolizaOrigen, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
DivAgregarConceptos.Visible = False
|
||||
DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza")
|
||||
TxtFechaDocumento.Text = dr("Fecha")
|
||||
TxtConcepto.Text = dr("Concepto")
|
||||
DivDatosPoliza.Visible = True
|
||||
TipoPoliza = DdlTipoPoliza.SelectedItem.Text
|
||||
Folio = dr("FolioPoliza").ToString
|
||||
|
||||
TxtFolio.Text = dr("FolioPoliza").ToString
|
||||
TxtUsuarioElaboro.Text = dr("Usuario").ToString
|
||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
|
||||
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
|
||||
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
||||
'DivAgregarConceptos.Visible = True
|
||||
LnkAddConcepto.Visible = True
|
||||
CargaConceptos()
|
||||
CargaSubProyectos()
|
||||
CargaCuentasContables()
|
||||
End If
|
||||
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen)
|
||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
|
||||
|
||||
If Not DtMovimientos.Columns.Contains("ContadoCuenta") Then
|
||||
|
||||
DtMovimientos.Columns.Add("ContadoCuenta", GetType(Integer))
|
||||
DtMovimientos.Columns.Add("ContadoTipoTransaccion", GetType(Integer))
|
||||
DtMovimientos.Columns.Add("ContadoNumeroFolio", GetType(String))
|
||||
DtMovimientos.Columns.Add("ContadoBeneficiario", GetType(String))
|
||||
DtMovimientos.Columns.Add("ContadoObservaciones", GetType(String))
|
||||
DtMovimientos.Columns.Add("ContadoImporte", GetType(Decimal))
|
||||
|
||||
|
||||
End If
|
||||
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
|
||||
GvPrePoliza.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,17)").Rows.Count > 0 Then
|
||||
LnkComplementoPago.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
BtnContabilizar.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
If dr("FolioPoliza").ToString.ToEntero > 0 Then
|
||||
divContabilizada.Visible = True
|
||||
LblFolio.Text = dr("FolioPoliza").ToString
|
||||
Folio = dr("FolioPoliza").ToString
|
||||
|
||||
End If
|
||||
Else
|
||||
If dr("IdPoliza").ToString.ToEntero > 0 Then
|
||||
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
||||
divContabilizada.Visible = True
|
||||
IdPoliza = dr("IdPoliza").ToString.ToEntero
|
||||
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
|
||||
'sino está contabilizada, se activa el botón
|
||||
BtnContabilizar.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
divDatosPrincipales.Visible = False
|
||||
divObservaciones.Visible = False
|
||||
UPMovs.Visible = False
|
||||
UPMovs.Update()
|
||||
UPPDocumento.Update()
|
||||
UpPrePoliza.Update()
|
||||
|
||||
RegistraScript("comparar();")
|
||||
|
||||
If Request("Tipo") IsNot Nothing AndAlso IsNumeric(Request("Tipo")) AndAlso Request("Tipo").ToEntero = 1 AndAlso UsuarioActual.CveUsuario <> 100 Then
|
||||
'For Each row As GridViewRow In GvPrePoliza.Rows
|
||||
' row.FCTextBox("TxtCargo").Enabled = False
|
||||
' row.FCTextBox("TxtAbono").Enabled = False
|
||||
'Next
|
||||
End If
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPDF.Visible = True
|
||||
Else
|
||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
BtnEliminar.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
UpPoliza.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkCrearAPartirDe_Click(sender As Object, e As EventArgs)
|
||||
Response.Redirect($"./RegPrePolizaS.aspx?CvePrePolizaOrigen={CvePrePoliza}")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CrarPrePolizaApartirDe()
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim FolioPoliza As Integer
|
||||
|
||||
Dim TotalCargos, TotalAbonos As Decimal
|
||||
|
||||
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||
TotalCargos += Gvr.FCLiteral("TxtCargo").Text.ToDecimal
|
||||
TotalAbonos += Gvr.FCLiteral("TxtAbono").Text.ToDecimal
|
||||
Next
|
||||
|
||||
|
||||
'validaciones
|
||||
If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0)) Then
|
||||
Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||
' If Gvr.DataKey("CveConceptoContable") = "30" AndAlso (Gvr.FCTextBox("TxtCargo").Text.ToDecimal <> 0 OrElse Gvr.FCTextBox("TxtAbono").Text.ToDecimal <> 0) Then 'si es movimietno de bancos, y tiene cantidad, deben de especificarse los datos del IE
|
||||
' If Gvr.DataKey("ContadoCuenta").ToEntero = 0 OrElse Gvr.DataKey("ContadoTipoTransaccion").ToEntero = 0 Then
|
||||
' Alert("No se han especificado las condiciones de pago ", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
|
||||
'terminan validaciones
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
ActualizarPrePoliza()
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
' Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
|
||||
Dim Conta As ClsContPAQi = Nothing
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim MsgError As String = ""
|
||||
Dim CveIE As Integer
|
||||
Dim FolioIE As String = ""
|
||||
|
||||
Try
|
||||
|
||||
Dim ConceptoPoliza As String = TxtConcepto.Text
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Contabilidad/RegPrePolizaCrear", CvePlantillaPoliza, TotalCargos, TotalAbonos, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=DdlTipoPoliza.SelectedValue.ToEntero, AgregarFolio:=True)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
FolioPoliza = ObjMov.FolioPoliza
|
||||
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
Dim Importe As Double = 0
|
||||
Dim ImporteME As Decimal = 0
|
||||
Dim TipoCambio As Decimal = 1
|
||||
Dim TipoMovto As Boolean = False
|
||||
Dim IdCtaContable As Integer = 0
|
||||
|
||||
|
||||
'inserto las compras que voy a pagarDdlSaldos
|
||||
For Each gvr As GridViewRow In GvPrePoliza.Rows
|
||||
|
||||
|
||||
|
||||
ImporteME = 0
|
||||
TipoCambio = 1
|
||||
|
||||
If Boolean.Parse(gvr.DataKey("TipoMovto")) Then
|
||||
|
||||
Importe = gvr.FCLiteral("TxtAbono").Text.ToDouble
|
||||
TipoMovto = True
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCLiteral("TxtAbono").Text.ToDecimal 'me
|
||||
TipoCambio = gvr.FCTextBox("TxtModalConceptoDocumentoImporte").Text.ToDecimal
|
||||
End If
|
||||
|
||||
Else
|
||||
Importe = gvr.FCLiteral("TxtCargo").Text.ToDouble
|
||||
TipoMovto = False
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCTextBox("TxtCargo").Text.ToDecimal 'me
|
||||
TipoCambio = gvr.FCTextBox("TxtModalConceptoDocumentoImporte").Text.ToDecimal
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
|
||||
gvr.DataKey("ContadoBeneficiario").ToString, Importe, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
|
||||
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
FolioIE = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||
If CveIE < 0 Then
|
||||
MsgError = "No se pudo registrar movimiento bancario"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero <> 30 Then
|
||||
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
|
||||
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
|
||||
Else
|
||||
CveIE = -1
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If Importe <> 0 Then
|
||||
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
|
||||
|
||||
'If gvr.datakey("CveConcepto") = "299" Then
|
||||
' tCveCuenta = gvr.DataKey("CveCuenta").ToEntero
|
||||
'End If
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.DataKey("Referencia"), gvr.DataKey("CveConceptoContable").ToEntero, gvr.DataKey("Concepto"),
|
||||
TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveIE:=CveIE,
|
||||
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
|
||||
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
|
||||
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio, CveTipoGasto:=gvr.DataKey("CveTipoGasto").ToEntero,
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
|
||||
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
|
||||
End If
|
||||
Next
|
||||
|
||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
''El movimiento 2 es el de Pago
|
||||
'If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
' If idCuentaContabilizacion > 0 Then
|
||||
' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
|
||||
' 'MENSAJE PRINCIPAL
|
||||
' MensajeAlert.AppendFormat("<br/><br/>Folio de Salida: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
|
||||
' 'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
' Else
|
||||
' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
' End If
|
||||
' Else
|
||||
' Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
|
||||
' End If
|
||||
'Else
|
||||
' MensajeAlert.AppendFormat("<br/><br/>Folio: <b><a href = ""/Contabilidad/RegPrepolizaS.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
|
||||
'End If
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgError = "Error"
|
||||
End Try
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
'MENSAJE IE
|
||||
'If CveIE > 0 Then
|
||||
' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
|
||||
'Else
|
||||
|
||||
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} <br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}""")
|
||||
|
||||
'End If
|
||||
|
||||
ObjIE.Commit()
|
||||
If Conta IsNot Nothing Then Conta.Commit()
|
||||
|
||||
UPPDocumento.Update()
|
||||
|
||||
TxtObservaciones.Text = ""
|
||||
GvMov.DataBind()
|
||||
TxtFecha.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
Else
|
||||
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
|
||||
ObjIE.RollBack()
|
||||
If Conta IsNot Nothing Then Conta.RollBack()
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
If Conta IsNot Nothing Then Conta.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvPrePolizaEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
DtMovimientos.Rows(GvRow.RowIndex).Delete()
|
||||
DtMovimientos.AcceptChanges()
|
||||
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
UpPrePoliza.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaModalConceptoTipoTransaccion(Tipo As String)
|
||||
DdlModalConceptoTipoTransaccion.Items.Clear()
|
||||
DdlModalConceptoTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo = '{Tipo}' AND Estatus = 1 ")
|
||||
DdlModalConceptoTipoTransaccion.DataBind()
|
||||
DdlModalConceptoTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaModalConceptoCuentas()
|
||||
DdlModalConceptoCuenta.Items.Clear()
|
||||
DdlModalConceptoCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) '.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", DdlMoneda.SelectedValue))
|
||||
DdlModalConceptoCuenta.DataBind()
|
||||
DdlModalConceptoCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function ValidaConceptoRow(DTRow As DataRow, GvRow As GridViewRow) As Boolean
|
||||
|
||||
Dim ResPuesta As Boolean = False
|
||||
Dim CveConCeptoValidar As Integer = -1
|
||||
' Dim
|
||||
|
||||
|
||||
If DTRow IsNot Nothing Then
|
||||
CveConCeptoValidar = DTRow("CveConceptoContable")
|
||||
End If
|
||||
|
||||
|
||||
If GvRow IsNot Nothing Then
|
||||
CveConCeptoValidar = DTRow("CveConceptoContable")
|
||||
End If
|
||||
|
||||
If CveConCeptoValidar > 0 Then
|
||||
' Aqui validar Row
|
||||
End If
|
||||
|
||||
|
||||
'AplicaActivoFijo,
|
||||
'AplicaAlmacen,
|
||||
'AplicaBancos,
|
||||
'AplicaClasificacion,
|
||||
'AplicaCliente,
|
||||
'AplicaCompra,
|
||||
'AplicaImpuesto,
|
||||
'AplicaNomina,
|
||||
'AplicaPersonal,
|
||||
'AplicaProveedor,
|
||||
'AplicaSubProyecto,
|
||||
'AplicaTC,
|
||||
'AplicaVenta
|
||||
|
||||
Return ResPuesta
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user