This commit is contained in:
Oscar Irigoyen
2023-02-10 16:50:23 -07:00
9 changed files with 82 additions and 1525 deletions

View File

@@ -1304,7 +1304,7 @@ Public Class ClsOC
DataAdapter("PA_OC_EstatusGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@_CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try

View File

@@ -2756,6 +2756,8 @@ Namespace Modelos
End If
ImporteAcumulado91 += (ImporteMN91).RoundSQL
Dim tCveConcepto As Integer = 251
If Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then tCveConcepto = 301
If UsaComplementariaClientes = True AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
Dim ImporteComplementarioNC As Decimal = ((Importe251 * Dr("TCCambioValuacion").ToString.ToDecimal) - Importe251).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, 207, Concepto, FechaMovimiento, IdCtaContableClienteComplementaria, -1, CveVenta:=Dr("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteComplementarioNC, ImporteME:=If(Dr("TCCambioValuacion").ToString.ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString.ToDecimal) Then
@@ -2763,7 +2765,7 @@ Namespace Modelos
Exit For
End If
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, ImporteMX:=Importe251, ImporteME:=If(Dr("TCCambioValuacion").ToString.ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString.ToDecimal, TipoCambioPago:=tipoCambio) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, tCveConcepto, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, ImporteMX:=Importe251, ImporteME:=If(Dr("TCCambioValuacion").ToString.ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString.ToDecimal, TipoCambioPago:=tipoCambio) Then
ErrorPrepoliza = True
Exit For
End If
@@ -8916,13 +8918,6 @@ Namespace Modelos
Public Property CuentaInventario As String
Public Property IdCuentaIngresos As Integer?
Public Property CuentaIngresos As String
Public Property IdCuentaContableSIG As Integer?
Public Property IdCuentaCostosSIG As Integer?
Public Property IdCuentaGastoSIG As Integer?
Public Property IdCuentaIngresosSIG As Integer?
Public Property IdCuentaInventarioSIG As Integer?
Public Property IdCuentaRetIVASIG As Integer?
Public Property IdCuentaRetISRSIG As Integer?
Public Property Estado As Boolean
Public Property Estatus As String
Public Property RequiereSerieLote As Boolean?

View File

@@ -48,6 +48,7 @@ Partial Class Bancos_DepositosCaja
DdlCajaChica.Items.Add(New ListItem("Todas", "-1"))
DdlCuentaDeposito.Items.Add(New ListItem("Cuadre Solidaridad", "7850"))
DdlCuentaDeposito.Items.Add(New ListItem("Cuadre Obregón", "7853"))
DdlCuentaDeposito.Items.Add(New ListItem("Cuadre Matriz", "7861"))
divFolio.Visible = True
End If

View File

@@ -1,516 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="FiniquitoOld.aspx.cs" Inherits="Nomina_Finiquito" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GvConceptos.table > tbody > tr > th {
border-top: 1px solid #E87E04;
color: #fff;
font-size: 15px;
background-color: #E87E04;
}
}
.portlet > .portlet-title {
min-height: 30px;
}
.portlet > .portlet-title > .caption {
font-size: 13px;
padding: 5px 0 5px 0;
}
.portlet > .portlet-title > .tools {
padding: 5px 0 5px 0;
}
.GvConceptos.table > tbody > tr.thTituloConcepto > th:nth-child(1),
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(2),
.GvConceptos.table > tbody > tr > td:nth-child(2) {
border-right: 1px solid #E87E04;
}
.dtosEmpleado {
font-size: 15px;
font-weight: 600;
}
.dtosEmpleado a {
color: #2196f3;
}
.dtosEmpleado .row {
padding-top: 10px;
padding-bottom: 10px;
}
.GvConceptos.table > tbody > tr > td span {
display: block;
min-height: 12px;
}
.GvConceptos.table > tbody > tr.ConceptosTotales {
font-weight: bold;
font-size: 15px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Finiquito
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:HyperLink ID="HypCambiarEmpleado" onclick="$('#ModalEmpleados').modal();" runat="server"><i class="fa fa-exchange" aria-hidden="true"></i>Cambiar Empleado</asp:HyperLink></li>
<li>
<asp:LinkButton ID="LnkReCalcular" OnClick="LnkCalcular_Click" runat="server"><i class="fa fa-pencil"></i>ReCalcular </asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkAutorizar" OnClick="LnkAutorizar_Click" runat="server"><i class='material-icons'>done_all</i>Autorizar</asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkTimbrar" OnClick="LnkTimbrar_Click" runat="server"><i class="fa fa-bell"></i>Timbrar</asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Renuncia</asp:LinkButton></li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row ">
<div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
<div class="portlet box yellow-gold smallpadding" id="pnldl">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin "></i>
<span class="caption-subject bold uppercase">Datos del Empleado</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body dtosEmpleado">
<div class="row ">
<div class="col-sm-4 col-lg-3">Empleado: </div>
<div class="col-sm-8 col-lg-9">
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado" runat="server"></asp:HyperLink>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Estatus</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Motivo Baja</div>
<div class="col-sm-8 col-lg-9 ">
<asp:Label ID="LblMotivoBaja" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Fecha Baja</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblFechaBaja" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Perido Finiquito</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblPerido" runat="server" Text=""></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
<ajax:TabPanel ID="TabSobreRecibo" runat="server" HeaderText="Sobre Recibo">
<ContentTemplate>
<div class="portlet box yellow-gold smallpadding" id="pnlSobreRecivo">
<div class="portlet-title" style="display: none;">
<div class="caption ">
<i class="icon-pin "></i>
<span class="caption-subject bold uppercase ">Sobre Recibo</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body " style="padding: 0px;">
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabAguinaldo" runat="server" HeaderText="Aguinaldo">
<ContentTemplate>
<div class="portlet light xspadding bordered" id="pnlAguinaldo">
<div class="portlet-title" style="display: none;">
<div class="caption ">
<i class="icon-pin font-yellow-gold "></i>
<span class="caption-subject bold uppercase font-yellow-gold ">Aguinaldo</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body " style="padding: 0px;">
<div class="row">
<div class="col-md-3 ">
<div class="indicador2 red">
<div class="visual">$</div>
<div class="value"> <asp:Label ID="LblAguinaldoCompleto" runat="server" Text="$ ##,###.##"></asp:Label>
</div>
<div class="details">Aguinaldo ejercicio completo </div>
</div>
</div>
<div class="col-md-3">
<div class="indicador2 red">
<div class="visual">$</div>
<div class="value"> <asp:Label ID="LblAguinaldo" runat="server" Text="$ ##,###.##"></asp:Label>
</div>
<div class="details">Aguinaldo </div>
</div>
</div>
<div class="col-md-3">
<div class="indicador2 red">
<div class="visual"><i class="fa fa-money"></i></div>
<div class="value"> <asp:Label ID="LblAguinaldoPagado" runat="server" Text="$ ##,###.##"></asp:Label>
</div>
<div class="details">Aguinaldo Pagado</div>
</div>
</div>
<div class="col-md-3">
<div class="indicador2 bluesky">
<div class="visual"><i class="fa fa-money"></i></div>
<div class="value"> <asp:Label ID="LblAguinaldoporPagar" runat="server" Text="$ ##,###.##"></asp:Label>
</div>
<div class="details">Aguinaldo por pagar</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 ">
<div class="indicador2 green">
<div class="visual"><i class="fa fa-cubes"></i></div>
<div class="value"> <asp:Label ID="Label1" runat="server" Text="###"></asp:Label>
</div>
<div class="details">Dias Ejercicio </div>
</div>
</div>
<div class="col-md-3">
<div class="indicador2 green">
<div class="visual"><i class="fa fa-cubes"></i></div>
<div class="value"> <asp:Label ID="Label2" runat="server" Text="###"></asp:Label>
</div>
<div class="details">Dias Laborados </div>
</div>
</div>
<div class="col-md-3">
<div class="indicador2 green">
<div class="visual"><i class="fa fa-cubes"></i></div>
<div class="value"> <asp:Label ID="Label3" runat="server" Text="###"></asp:Label>
</div>
<div class="details">Dias pago Aguinaldo</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabVacaciones" runat="server" HeaderText="Vacaciones">
<ContentTemplate>
<div class="portlet light xspadding bordered" id="pnlVacaciones">
<div class="portlet-title" style="display: none;">
<div class="caption ">
<i class="icon-pin font-yellow-gold "></i>
<span class="caption-subject bold uppercase font-yellow-gold ">Vacaciones</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body " style="padding: 0px;">
<div class="row">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAntiguedad" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Antiguedad" AssociatedControlID="TxtAntiguedad"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtdiasVacaciones" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Días Vacaciones(ejercicio)" AssociatedControlID="TxtdiasVacaciones"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasLaborados" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Días Laborados " AssociatedControlID="TxtDiasLaborados"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasProporcion" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Días Proporcional" AssociatedControlID="TxtDiasProporcion"></asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVaciones" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Vacaciones" AssociatedControlID="TxtVaciones"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasPago" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Días Pagados" AssociatedControlID="TxtDiasPago"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasPendientes" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Días pendientes " AssociatedControlID="TxtDiasPendientes"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacacionesporPagar" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Vacaciones por pagar" AssociatedControlID="TxtVacacionesporPagar"></asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPorcentjePrima" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Porcentaje Prima" AssociatedControlID="TxtPrimaPagada"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrimaVacacional" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Prima Vacacional" AssociatedControlID="TxtPrimaPagada"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrimaPagada" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Prima Vac. Pagada" AssociatedControlID="TxtPrimaPagada"></asp:Label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrimaPorPagar" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Prima vac. por Pagar" AssociatedControlID="TxtPrimaPorPagar"></asp:Label>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
<div id="ModalConceptos" class="modal ADS fade " role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">LtlTituloConcepto</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlConcepto" runat="server" AppendDataBoundItems="true" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkAceptarConceptos" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkAceptarConceptos_Click"> Aceptar</asp:LinkButton>
<asp:Literal ID="Literal1" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">Seleccione un Empleado</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
</div>
<asp:Panel ID="pnlupValoresFiniquito" runat="server" Visible="false">
<h4>Debe llenar los siguientes valores para continuar</h4>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" Width="100%"
CssClass="form-control select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
</div>
<div class="">
</div>
<div class="row">
<div class="col-md-6" style="padding-right: 0px">
<div class="form-group form-md-line-input input-iconright" style="width: 120px; display: inline-block">
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
</div>
<span class="input-group-btn " style="display: inline-block">
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<div class="col-md-6" style="padding-left: 0px">
¿es Liquidación?
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Ordinario" Value="-1"></asp:ListItem>
<asp:ListItem Text="Extraordinario" Value="6"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
</div>
</asp:Panel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkCampiarEmpleado" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkCampiarEmpleado_Click"> Aceptar</asp:LinkButton>
<asp:Literal ID="LtlEmpleadoCancelar" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<%--"<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>"--%>
<script>
function insertParam(key, value) {
key = encodeURIComponent(key); value = encodeURIComponent(value);
var s = document.location.search;
var kvp = key + "=" + value;
var r = new RegExp("(&|\\?)" + key + "=[^\&]*");
s = s.replace(r, "$1" + kvp);
if (!RegExp.$1) { s += (s.length > 0 ? '&' : '?') + kvp; };
//again, do what you will here
document.location.search = s;
}
function ADSBegin() {
if ($('.thTituloConcepto').length == 0) {
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>");
}
}
</script>
</asp:Content>

View File

@@ -1,515 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualBasic;
using System.Data;
using Extensiones;
using System.Web.UI.WebControls;
partial class Nomina_Finiquito : ClsPaginas
{
private class NConcepto
{
//Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
public string NoConceptoP { get; set; }
public string ConceptoP { get; set; }
public string LabelValorP { get; set; }
public int CveConceptoP { get; set; }
public double ImporteP { get; set; }
public double ValorP { get; set; }
public int EstatusP { get; set; }
public bool isEditedP { get; set; }
public string NoConceptoD { get; set; }
public string ConceptoD { get; set; }
public string LabelValorD { get; set; }
public int CveConceptoD { get; set; }
public double ImporteD { get; set; }
public double ValorD { get; set; }
public int EstatusD { get; set; }
public bool isEditedD { get; set; }
}
private class ConceptosPersonal
{
public ConceptosPersonal()
{
Concepto = "";
ConceptoD = "";
CveConcepto = 0;
CveConceptoD = 0;
Estatus = 0;
Estatus = 0;
}
public string Concepto { get; set; }
public int CveConcepto { get; set; }
public decimal Importe { get; set; }
public int Estatus { get; set; }
public string ConceptoD { get; set; }
public int CveConceptoD { get; set; }
public decimal ImporteD { get; set; }
public int EstatusD { get; set; }
}
#region Propiedades
private int CvePersonal
{
get { return ViewState["CvePersonal"] != null ? ViewState["CvePersonal"].ToString().ToEntero() : 0; }
set { ViewState["CvePersonal"] = value; }
}
private int CveTipoPeriodo
{
get { return ViewState["CveTipoPeriodo"] != null ? ViewState["CveTipoPeriodo"].ToString().ToEntero() : 0; }
set
{
ViewState["CveTipoPeriodo"] = value;
}
}
private int CvePeriodoFiniquito
{
get { return ViewState["CvePeriodoFiniquito"] != null ? ViewState["CvePeriodoFiniquito"].ToString().ToEntero() : 0; }
set { ViewState["CvePeriodoFiniquito"] = value; }
}
private int GCEstatus
{
get { return ViewState["GCEstatus"] != null ? ViewState["GCEstatus"].ToString().ToEntero() : 0; }
set { ViewState["GCEstatus"] = value; }
}
private int GCCveConcepto
{
get { return ViewState["GCCveConcepto"] != null ? ViewState["GCCveConcepto"].ToString().ToEntero() : 0; }
set { ViewState["GCCveConcepto"] = value; }
}
private decimal GCImporte
{
get { return ViewState["GCImporte"] != null ? ViewState["GCImporte"].ToString().ToDecimal() : 0; }
set { ViewState["GCImporte"] = value; }
}
private DataTable DTConceptosPersonal
{
get { return ViewState["DTConceptosPersonal"] != null ? (DataTable)ViewState["DTConceptosPersonal"] : null; }
set { ViewState["DTConceptosPersonal"] = value; }
}
private DataTable DTConceptos
{
get { return ViewState["DTConceptos"] != null ? (DataTable)ViewState["DTConceptos"] : null; }
set { ViewState["DTConceptos"] = value; }
}
private bool esLiquidacion
{
get { return ViewState["esLiquidacion"] != null ? System.Convert.ToBoolean(ViewState["esLiquidacion"]) : false; }
set { ViewState["esLiquidacion"] = value; }
}
#endregion
private List<ConceptosPersonal> ConceptsPersonas
{
get
{
List<ConceptosPersonal> listaconceptos = new List<ConceptosPersonal>();
decimal TotalP = 0;
decimal TotalD = 0;
if ((!Information.IsNothing(DTConceptosPersonal) && DTConceptosPersonal.Rows.Count > 0))
{
DataTable dtP = DTConceptosPersonal.FiltraParametros("Tipo=1");
DataTable dtD = DTConceptosPersonal.FiltraParametros("Tipo=2");
var noP = dtP.Rows.Count;
var noD = dtD.Rows.Count;
var max = noP > noD ? noP : noD;
TotalP = dtP.SUM("Importe").ToString().ToDecimal();
TotalD = dtD.SUM("Importe").ToString().ToDecimal();
for (int index = 0; index <= max; index++)
{
ConceptosPersonal obj = new ConceptosPersonal();
if (index < noP)
{
obj.Importe = dtP.Rows[index]["Importe"].ToString().ToDecimal();
obj.CveConcepto = dtP.Rows[index]["CveConcepto"].ToString().ToEntero();
obj.Concepto = dtP.Rows[index]["Concepto"].ToString();
obj.Estatus = dtP.Rows[index]["Estatus"].ToString().ToEntero();
}
else if (index == noP)
{
obj.Estatus = -1;
obj.Concepto = "Agregar";
}
if (index < noD)
{
obj.ImporteD = dtD.Rows[index]["Importe"].ToString().ToDecimal();
obj.CveConceptoD = dtD.Rows[index]["CveConcepto"].ToString().ToEntero();
obj.ConceptoD = dtD.Rows[index]["Concepto"].ToString();
obj.EstatusD = dtD.Rows[index]["Estatus"].ToString().ToEntero();
}
else if (index == noD)
{
obj.EstatusD = -1;
obj.ConceptoD = "Agregar";
}
listaconceptos.Add(obj);
}
}
listaconceptos.Add(new ConceptosPersonal());
ConceptosPersonal objST = new ConceptosPersonal();
objST.Importe = TotalP;
objST.CveConcepto = 0;
objST.Concepto = "Total Percepciones";
objST.Estatus = -2;
objST.ImporteD = TotalD;
objST.CveConceptoD = 0;
objST.ConceptoD = "Total Deducciones";
objST.EstatusD = -2;
listaconceptos.Add(objST);
ConceptosPersonal objT = new ConceptosPersonal();
objT.CveConcepto = 0;
objT.Concepto = "";
objT.Estatus = -3;
objT.ImporteD = objST.Importe + objST.ImporteD;
objT.CveConceptoD = 0;
objT.ConceptoD = "Total";
objT.EstatusD = -3;
listaconceptos.Add(objT);
return listaconceptos;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
CargaDdlPersonal();
CargaMotivoBaja();
CvePeriodoFiniquito = 0;
if (Request["CvePersonal"] != null && Request["CvePersonal"].ToString().ToEntero() > 0)
{
CvePersonal = Request["CvePersonal"].ToString().ToEntero();
}
else
{
CvePersonal = -1;
}
if (!CargaDatosFiniquito())
{
}
RegistraScript("$('#ModalEmpleados').modal();");
}
if (CvePersonal > 0 & CvePeriodoFiniquito > 0)
{
LtlEmpleadoCancelar.Visible = true;
}
}
private void CargaMotivoBaja()
{
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
DdlMotivoBaja.DataBind();
}
private void CargaDdlPersonal()
{
ClsRH ObjPersonal = new ClsRH();
if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
{
DdlPersonal.DataSource = ObjPersonal.DtResultados;
DdlPersonal.DataBind();
}
ObjPersonal.Dispose();
}
private bool CargaDatosFiniquito()
{
bool retorno = true;
if (CvePersonal > 0)
{
DdlPersonal.SelectedValueExist(CvePersonal.ToString());
string Nombre = "";
string FechaBaja = "";
string EstatusPersonal = "";
CvePeriodoFiniquito = 0;
CveTipoPeriodo = 0;
esLiquidacion = false;
pnlupValoresFiniquito.Visible = false;
DdlMotivoBaja.SelectedValue = "-1";
using (ClsRH ObjPersonal = new ClsRH())
{
if (ObjPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && ObjPersonal.DtResultados.Rows.Count > 0)
{
DataRow prow = ObjPersonal.DtResultados.Rows[0];
Nombre = prow["Nombre"].ToString();
FechaBaja = string.Format("{0:dd/MM/yyyy}", ObjPersonal.FechaBaja);
EstatusPersonal = string.Format("{0}", prow["EstatusPersonal"]);
CveTipoPeriodo = prow["CveTipoPeriodo"].ToString().ToEntero();
}
if (ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
{
DataRow prow = ObjPersonal.DtResultados.Rows[0];
CvePeriodoFiniquito = prow["CvePeriodoFiniquito"].ToString().ToEntero();
FechaBaja = string.Format("{0:dd/MM/yyyy}", prow["FechaFin"]);
DdlMotivoBaja.SelectedValueExist(prow["CveMotivoBaja"].ToString().ToEntero());
var stringesliquidacion = prow["esLiquidacion"].ToString();
esLiquidacion = (stringesliquidacion == "True" || stringesliquidacion == "1");
ChkesLiquidacion.Checked = esLiquidacion;
}
}
Timbrado tr;
if (DdlMotivoBaja.SelectedValue.ToEntero() > 0)
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text;
else
LblMotivoBaja.Text = "";
HypEmpleado.Text = Nombre;
HypEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", CvePersonal);
LblFechaBaja.Text = FechaBaja;
LblEstatus.Text = EstatusPersonal;
TxtFechaBaja.Text = FechaBaja;
DdlTipoPeriodo_SelectedIndexChanged(null, null);
LblPerido.Text = DdlPeriodo.SelectedItem.Text;
if (CvePeriodoFiniquito <= 0)
retorno = false;
pnlupValoresFiniquito.Visible = true;
using (ClsNominas ObjNom = new ClsNominas())
{
if (ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa))
{
DataRow finrow = ObjNom.DtResultados.Rows[0];
TxtAntiguedad.Text = $"{finrow["Antiguedad"]}";
TxtdiasVacaciones.Text = $"{finrow["Diasvacaciones"]}";
TxtDiasLaborados.Text = $"{finrow["diaslaborados"]}";
TxtDiasProporcion.Text = $"{finrow["diasProporcion"]}";
TxtVaciones.Text = $"{finrow["Vacaciones"]}";
TxtDiasPago.Text = $"{finrow["Diasvacaciones"]}";
TxtDiasPendientes.Text = $"{finrow["diasporpagar"]}";
TxtVacacionesporPagar.Text = $"{finrow["VacacionesporPagar"]}";
TxtPorcentjePrima.Text = $"{finrow["PrimaPorcentaje"]}";
TxtPrimaVacacional.Text = $"{finrow["PrimaVacacional"]}";
TxtPrimaPagada.Text = $"{finrow["PrimaPagada"]}";
TxtPrimaPorPagar.Text = $"{finrow["PrimaVacacionalPorPagar"]}";
}
if (ObjNom.DTSetResultados.Tables.Count > 5)
{
DataTable dtconceptos = ObjNom.DTSetResultados.Tables[1];
DataTable dtconpersonal = ObjNom.DTSetResultados.Tables[5];
int maxFila = dtconpersonal.MAX("Fila", "Tipo<3").ToEntero();
List<NConcepto> lfin = new List<NConcepto>();
if (maxFila > 0)
{
DataRow conPerrow;
DataRow conrow;
NConcepto sr;
for (int i = 1; i <= maxFila; i++)
{
sr = new NConcepto();
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=1 AND Fila ={0}", i));
if (conPerrow != null)
{
sr.CveConceptoP = conPerrow["CveConcepto"].ToString().ToEntero();
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoP));
sr.ConceptoP = conrow["Concepto"].ToString();
sr.ValorP = conPerrow["Valor"].ToString().ToDouble();
sr.ImporteP = conPerrow["Importe"].ToString().ToDouble();
sr.NoConceptoP = conrow["Codigo"].ToString();
}
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=2 AND Fila ={0}", i));
if (conPerrow != null)
{
sr.CveConceptoD = conPerrow["CveConcepto"].ToString().ToEntero();
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoD));
sr.ConceptoD = conrow["Concepto"].ToString();
sr.ValorD= conPerrow["Valor"].ToString().ToDouble();
sr.ImporteD = conPerrow["Importe"].ToString().ToDouble();
sr.NoConceptoD = conrow["Codigo"].ToString();
}
lfin.Add(sr);
}
}
GvConceptos.DataSource = lfin;
GvConceptos.DataBind();
}
}
//GvConceptos.DataSource = ConceptsPersonas;
//GvConceptos.DataBind();
}
else
retorno = false;
return retorno;
}
protected void LnkCampiarEmpleado_Click(object sender, EventArgs e)
{
CvePersonal = DdlPersonal.SelectedValue.ToEntero();
using (ClsRH ObjPersonal = new ClsRH())
{
if (ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.DtResultados.Rows.Count > 0)
{
}
}
if (pnlupValoresFiniquito.Visible)
{
}
if (!CargaDatosFiniquito())
RegistraScript("$('#ModalEmpleados').modal('hide');");
upDatos.Update();
}
protected void LnkCalcular_Click(object sender, EventArgs e)
{
}
protected void LnkAutorizar_Click(object sender, EventArgs e)
{
}
protected void LnkTimbrar_Click(object sender, EventArgs e)
{
}
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
{
}
protected void DdlPersonal_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect($"/Nomina/Finiquito.aspx?CvePersonal={DdlPersonal.SelectedValue}");
}
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
{
int CveTipoPeriodoactual = DdlTipoPeriodo.SelectedValue.ToEntero() > 0 ? DdlTipoPeriodo.SelectedValue.ToEntero() : CveTipoPeriodo;
string fechabaja = TxtFechaBaja.Text;
DataTable dtperiodos = new DataTable();
ClsNominas ObjPeriodos = new ClsNominas();
if (ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, -1))
{
dtperiodos = ObjPeriodos.DtResultados;
if (Information.IsNothing(sender) && CvePeriodoFiniquito > 0)
{
DataRow row = dtperiodos.FiltroPrimero(string.Format("CvePeriodo={0} ", CvePeriodoFiniquito));
if (!Information.IsNothing(row))
{
CveTipoPeriodoactual = row["CveTipoPeriodo"].ToString().ToEntero();
DdlTipoPeriodo.SelectedValueExist(CveTipoPeriodoactual == 6 ? "6" : "-1");
}
}
dtperiodos = ObjPeriodos.DtResultados.FiltraParametros(string.Format("(Estatus IN (1,2,3,4) AND CveTipoPeriodo={0}) ", CveTipoPeriodoactual));
// FechaInicio, P.FechaFin
DdlPeriodo.Items.Clear();
DdlPeriodo.Items.Add(new ListItem("Seleccione", "-1"));
DdlPeriodo.SelectedValue = "-1";
DdlPeriodo.DataSource = dtperiodos;
}
else
DdlPeriodo.DataSource = null;
ObjPeriodos.Dispose();
DdlPeriodo.DataBind();
if (fechabaja.Length > 0 && dtperiodos.Rows.Count > 0)
{
if ((CvePeriodoFiniquito > 0) && Information.IsNothing(sender))
DdlPeriodo.SelectedValueExist(CvePeriodoFiniquito);
else
{
DataRow row = dtperiodos.FiltroPrimero(string.Format("(FechaInicio<='{0:yyyy/MM/dd}' AND FechaFin>='{0:yyyy/MM/dd}') ", fechabaja.ToDate()));
if (!Information.IsNothing(row))
DdlPeriodo.SelectedValueExist(row["CvePeriodo"]);
}
}
}
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
// Datakeys
// Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
int CveConcepto = e.Row.DataKey("CveConceptoP").ToEntero();
int CveConceptoD = e.Row.DataKey("CveConceptoD").ToEntero();
// Dim Importe As Decimal = e.Row.DataKey("Importe").ToDecimal()
// Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
int Estatus = e.Row.DataKey("EstatusP").ToEntero();
int EstatusD = e.Row.DataKey("EstatusD").ToEntero();
// Controles
Label LtlConcepto = e.Row.FCLabel("LtlConcepto");
LinkButton LnkConcepto = e.Row.FCLinkButton("LnkConcepto");
Label LtlConceptoD = e.Row.FCLabel("LtlConceptoD");
LinkButton LnkConceptoD = e.Row.FCLinkButton("LnkConceptod");
Label LtlImporte = e.Row.FCLabel("LtlImporte");
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
if (Estatus < -1 | EstatusD < -1)
e.Row.CssClass = "ConceptosTotales";
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3))
LtlImporte.Text = "";
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1))
LtlImporteD.Text = "";
if (Estatus == -1)
LtlConcepto.Visible = false;
else if (Estatus > 0)
LtlImporte.Visible = false;
if (EstatusD == -1)
LtlConceptoD.Visible = false;
else if (EstatusD > 0)
LtlImporteD.Visible = false;
LnkConcepto.Visible = !LtlConcepto.Visible;
LnkConceptoD.Visible = !LtlConceptoD.Visible;
LnkImporte.Visible = !LtlImporte.Visible;
LnkImporteD.Visible = !LtlImporteD.Visible;
}
}
protected void LnkConcepto_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
GCImporte = gvRow.DataKey("Importe").ToDecimal();
OpenModalConceptos(1);
}
protected void LnkConceptoD_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
GCImporte = gvRow.DataKey("Importe").ToDecimal();
OpenModalConceptos(2);
}
private void OpenModalConceptos(int Tipo)
{
if (GCEstatus == -1)
{
}
else
{
}
RegistraScript("$('#ModalConceptos').modal();");
}
protected void LnkAceptarConceptos_Click(object sender, EventArgs e)
{
RegistraScript("$('#ModalConceptos').modal('hide');");
}
}

View File

@@ -1,462 +0,0 @@
Option Strict On
Imports System.Data
Imports Extensiones
Partial Class Nomina_FiniquitoVB
Inherits ClsPaginas
Private Class ConceptosPersonal
Public Sub New()
Concepto = ""
ConceptoD = ""
CveConcepto = 0
CveConceptoD = 0
Estatus = 0
Estatus = 0
End Sub
Public Property Concepto As String
Public Property CveConcepto As Integer
Public Property Importe As Decimal
Public Property Estatus As Integer
Public Property ConceptoD As String
Public Property CveConceptoD As Integer
Public Property ImporteD As Decimal
Public Property EstatusD As Integer
End Class
#Region "Propiedades"
Private Property CvePersonal As Integer
Get
If Not IsNothing(ViewState("CvePersonal")) Then
Return ViewState("CvePersonal").ToString().ToEntero()
Else
Return 0
End If
End Get
Set(value As Integer)
ViewState("CvePersonal") = value
End Set
End Property
Private Property CveTipoPeriodo As Integer
Get
If Not IsNothing(ViewState("CveTipoPeriodo")) Then
Return ViewState("CveTipoPeriodo").ToString().ToEntero()
Else
Return 0
End If
End Get
Set(value As Integer)
ViewState("CveTipoPeriodo") = value
End Set
End Property
Private Property CvePeriodoFiniquito As Integer
Get
If Not IsNothing(ViewState("CvePeriodoFiniquito")) Then
Return ViewState("CvePeriodoFiniquito").ToString().ToEntero()
Else
Return 0
End If
End Get
Set(value As Integer)
ViewState("CvePeriodoFiniquito") = value
End Set
End Property
Private Property GCEstatus As Integer
Get
If Not IsNothing(ViewState("GCEstatus")) Then
Return ViewState("GCEstatus").ToString().ToEntero()
Else
Return 0
End If
End Get
Set
ViewState("GCEstatus") = Value
End Set
End Property
Private Property GCCveConcepto As Integer
Get
If Not IsNothing(ViewState("GCCveConcepto")) Then
Return ViewState("GCCveConcepto").ToString().ToEntero()
Else
Return 0
End If
End Get
Set
ViewState("GCCveConcepto") = Value
End Set
End Property
Private Property GCImporte As Decimal
Get
If Not IsNothing(ViewState("GCImporte")) Then
Return ViewState("GCImporte").ToString().ToDecimal()
Else
Return 0
End If
End Get
Set
ViewState("GCImporte") = Value
End Set
End Property
Private ReadOnly Property ConceptsPersonas As List(Of ConceptosPersonal)
Get
Dim listaconceptos As New List(Of ConceptosPersonal)
Dim TotalP As Decimal = 0
Dim TotalD As Decimal = 0
If (Not IsNothing(DTConceptosPersonal) AndAlso DTConceptosPersonal.Rows.Count > 0) Then
Dim dtP As DataTable = DTConceptosPersonal.FiltraParametros("Tipo=1")
Dim dtD As DataTable = DTConceptosPersonal.FiltraParametros("Tipo=2")
Dim noP = dtP.Rows.Count()
Dim noD = dtD.Rows.Count()
Dim max = If(noP > noD, noP, noD)
TotalP = dtP.SUM("Importe").ToString().ToDecimal()
TotalD = dtD.SUM("Importe").ToString().ToDecimal()
For index = 0 To max
Dim obj As New ConceptosPersonal()
If index < noP Then
obj.Importe = dtP.Rows(index)("Importe").ToString().ToDecimal()
obj.CveConcepto = dtP.Rows(index)("CveConcepto").ToString().ToEntero()
obj.Concepto = dtP.Rows(index)("Concepto").ToString()
obj.Estatus = dtP.Rows(index)("Estatus").ToString().ToEntero()
ElseIf index = noP Then
obj.Estatus = -1
obj.Concepto = "Agregar"
End If
If index < noD Then
obj.ImporteD = dtD.Rows(index)("Importe").ToString().ToDecimal()
obj.CveConceptoD = dtD.Rows(index)("CveConcepto").ToString().ToEntero()
obj.ConceptoD = dtD.Rows(index)("Concepto").ToString()
obj.EstatusD = dtD.Rows(index)("Estatus").ToString().ToEntero()
ElseIf index = noD Then
obj.EstatusD = -1
obj.ConceptoD = "Agregar"
End If
listaconceptos.Add(obj)
Next
End If
listaconceptos.Add(New ConceptosPersonal())
Dim objST As New ConceptosPersonal()
objST.Importe = TotalP
objST.CveConcepto = 0
objST.Concepto = "Total Percepciones"
objST.Estatus = -2
objST.ImporteD = TotalD
objST.CveConceptoD = 0
objST.ConceptoD = "Total Deducciones"
objST.EstatusD = -2
listaconceptos.Add(objST)
Dim objT As New ConceptosPersonal()
objT.CveConcepto = 0
objT.Concepto = ""
objT.Estatus = -3
objT.ImporteD = objST.Importe + objST.ImporteD
objT.CveConceptoD = 0
objT.ConceptoD = "Total"
objT.EstatusD = -3
listaconceptos.Add(objT)
Return listaconceptos
End Get
End Property
Private Property DTConceptosPersonal As DataTable
Get
If Not IsNothing(ViewState("DTConceptosPersonal")) Then
Return DirectCast(ViewState("DTConceptosPersonal"), DataTable)
Else
Return Nothing
End If
End Get
Set
ViewState("DTConceptosPersonal") = Value
End Set
End Property
Private Property DTConceptos As DataTable
Get
If Not IsNothing(ViewState("DTConceptos")) Then
Return DirectCast(ViewState("DTConceptos"), DataTable)
Else
Return Nothing
End If
End Get
Set
ViewState("DTConceptos") = Value
End Set
End Property
Private Property esLiquidacion As Boolean
Get
If Not IsNothing(ViewState("esLiquidacion")) Then
Return CBool(ViewState("esLiquidacion"))
Else
Return False
End If
End Get
Set
ViewState("esLiquidacion") = Value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDdlPersonal()
CargaMotivoBaja()
CvePeriodoFiniquito = 0
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
Else
CvePersonal = -1
End If
If Not CargaDatosFiniquito() Then
End If
RegistraScript("$('#ModalEmpleados').modal();")
End If
If CvePersonal > 0 And CvePeriodoFiniquito > 0 Then
LtlEmpleadoCancelar.Visible = True
End If
End Sub
Private Sub CargaMotivoBaja()
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlMotivoBaja.DataBind()
End Sub
Private Sub CargaDdlPersonal()
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
DdlPersonal.DataSource = ObjPersonal.DtResultados
DdlPersonal.DataBind()
End If
ObjPersonal.Dispose()
End Sub
Private Function CargaDatosFiniquito() As Boolean
Dim retorno As Boolean = True
If CvePersonal > 0 Then
DdlPersonal.SelectedValueExist(CvePersonal.ToString())
Dim Nombre As String = ""
Dim FechaBaja As String = ""
Dim EstatusPersonal As String = ""
CvePeriodoFiniquito = 0
CveTipoPeriodo = 0
esLiquidacion = False
pnlupValoresFiniquito.Visible = False
DdlMotivoBaja.SelectedValue = "-1"
Using ObjPersonal As New ClsRH()
If ObjPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
Nombre = ObjPersonal.DtResultados.Rows(0)("Nombre").ToString()
FechaBaja = String.Format("{0:dd/MM/yyyy}", ObjPersonal.FechaBaja)
EstatusPersonal = String.Format("{0}", ObjPersonal.DtResultados.Rows(0)("EstatusPersonal"))
CveTipoPeriodo = ObjPersonal.DtResultados.Rows(0)("CveTipoPeriodo").ToString().ToEntero()
End If
If ObjPersonal.GetPersonalAltas(CvePersonal) AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
CvePeriodoFiniquito = ObjPersonal.DtResultados.Rows(0)("CvePeriodoFiniquito").ToString().ToEntero()
FechaBaja = String.Format("{0:dd/MM/yyyy}", ObjPersonal.DtResultados.Rows(0)("FechaFin"))
DdlMotivoBaja.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CveMotivoBaja").ToString().ToEntero())
Dim stringesliquidacion = ObjPersonal.DtResultados.Rows(0)("esLiquidacion").ToString()
esLiquidacion = (stringesliquidacion = "True" OrElse stringesliquidacion = "1")
ChkesLiquidacion.Checked = esLiquidacion
End If
End Using
If DdlMotivoBaja.SelectedValue.ToEntero() > 0 Then
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text
Else
LblMotivoBaja.Text = ""
End If
HypEmpleado.Text = Nombre
HypEmpleado.NavigateUrl = String.Format("/RH/Personal.aspx?CvePersonal={0}", CvePersonal)
LblFechaBaja.Text = FechaBaja
LblEstatus.Text = EstatusPersonal
TxtFechaBaja.Text = FechaBaja
DdlTipoPeriodo_SelectedIndexChanged(Nothing, Nothing)
LblPerido.Text = DdlPeriodo.SelectedItem.Text
If CvePeriodoFiniquito <= 0 Then
retorno = False
End If
pnlupValoresFiniquito.Visible = True
Using ObjNom As New ClsNominas()
'If ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa) Then
' DTConceptosPersonal = ObjNom.DtResultados
'Autoriza nomina
'Finiquita Liquidación
'Rep Nomina
'RepInversion de nomina
'Alertas Altas /Bajas
'
'End If
End Using
GvConceptos.DataSource = ConceptsPersonas
GvConceptos.DataBind()
Else
retorno = False
End If
Return retorno
End Function
Protected Sub LnkCampiarEmpleado_Click(sender As Object, e As EventArgs)
CvePersonal = DdlPersonal.SelectedValue.ToEntero()
Using ObjPersonal As New ClsRH()
If ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
End If
End Using
If pnlupValoresFiniquito.Visible Then
End If
If Not CargaDatosFiniquito() Then
RegistraScript("$('#ModalEmpleados').modal('hide');")
End If
upDatos.Update()
End Sub
Protected Sub LnkCalcular_Click(sender As Object, e As EventArgs)
End Sub
Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs)
End Sub
Protected Sub LnkTimbrar_Click(sender As Object, e As EventArgs)
End Sub
Protected Sub LnkFormatoRenuncia_Click(sender As Object, e As EventArgs)
End Sub
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs)
Response.Redirect($"/Nomina/Finiquito.aspx?CvePersonal={DdlPersonal.SelectedValue}")
'Alert($"insertParam('CvePersonal','{DdlPersonal.SelectedValue}')")
'RegistraScript($"insertParam('CvePersonal','{DdlPersonal.SelectedValue}')")
End Sub
Protected Sub DdlTipoPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim CveTipoPeriodoactual As Integer = If(DdlTipoPeriodo.SelectedValue.ToEntero() > 0, DdlTipoPeriodo.SelectedValue.ToEntero(), CveTipoPeriodo)
Dim fechabaja As String = TxtFechaBaja.Text
Dim dtperiodos As New DataTable
Dim ObjPeriodos As New ClsNominas
If ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, -1) Then
dtperiodos = ObjPeriodos.DtResultados
If IsNothing(sender) AndAlso CvePeriodoFiniquito > 0 Then
Dim row As DataRow = dtperiodos.FiltroPrimero(String.Format("CvePeriodo={0} ", CvePeriodoFiniquito))
If Not IsNothing(row) Then
CveTipoPeriodoactual = row("CveTipoPeriodo").ToString().ToEntero()
DdlTipoPeriodo.SelectedValueExist(If(CveTipoPeriodoactual = 6, "6", "-1"))
End If
End If
dtperiodos = ObjPeriodos.DtResultados.FiltraParametros(String.Format("(Estatus IN (1,2,3,4) AND CveTipoPeriodo={0}) ", CveTipoPeriodoactual))
'FechaInicio, P.FechaFin
DdlPeriodo.Items.Clear()
DdlPeriodo.Items.Add(New ListItem("Seleccione", "-1"))
DdlPeriodo.SelectedValue = "-1"
DdlPeriodo.DataSource = dtperiodos
Else
DdlPeriodo.DataSource = Nothing
End If
ObjPeriodos.Dispose()
DdlPeriodo.DataBind()
If fechabaja.Length > 0 AndAlso dtperiodos.Rows.Count > 0 Then
If (CvePeriodoFiniquito > 0) AndAlso IsNothing(sender) Then
DdlPeriodo.SelectedValueExist(CvePeriodoFiniquito)
Else
Dim row As DataRow = dtperiodos.FiltroPrimero(String.Format("(FechaInicio<='{0:yyyy/MM/dd}' AND FechaFin>='{0:yyyy/MM/dd}') ", fechabaja.ToDate()))
If Not IsNothing(row) Then
DdlPeriodo.SelectedValueExist(row("CvePeriodo"))
End If
End If
End If
End Sub
#Region "Conceptos"
Protected Sub GvConceptos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
'Datakeys
'Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
Dim CveConcepto As Integer = e.Row.DataKey("CveConcepto").ToEntero()
Dim CveConceptoD As Integer = e.Row.DataKey("CveConceptoD").ToEntero()
'Dim Importe As Decimal = e.Row.DataKey("Importe").ToDecimal()
'Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
Dim Estatus As Integer = e.Row.DataKey("Estatus").ToEntero()
Dim EstatusD As Integer = e.Row.DataKey("EstatusD").ToEntero()
'Controles
Dim LtlConcepto As Label = e.Row.FCLabel("LtlConcepto")
Dim LnkConcepto As LinkButton = e.Row.FCLinkButton("LnkConcepto")
Dim LtlConceptoD As Label = e.Row.FCLabel("LtlConceptoD")
Dim LnkConceptoD As LinkButton = e.Row.FCLinkButton("LnkConceptod")
Dim LtlImporte As Label = e.Row.FCLabel("LtlImporte")
Dim LnkImporte As LinkButton = e.Row.FCLinkButton("LnkImporte")
Dim LtlImporteD As Label = e.Row.FCLabel("LtlImporteD")
Dim LnkImporteD As LinkButton = e.Row.FCLinkButton("LnkImporteD")
If Estatus < -1 Or EstatusD < -1 Then
e.Row.CssClass = "ConceptosTotales"
End If
If CveConcepto = 0 AndAlso (Estatus = 0 OrElse Estatus = -1 OrElse Estatus = -3) Then
LtlImporte.Text = ""
End If
If CveConceptoD = 0 AndAlso (EstatusD = 0 OrElse EstatusD = -1) Then
LtlImporteD.Text = ""
End If
If Estatus = -1 Then
LtlConcepto.Visible = False
ElseIf Estatus > 0 Then
LtlImporte.Visible = False
End If
If EstatusD = -1 Then
LtlConceptoD.Visible = False
ElseIf EstatusD > 0 Then
LtlImporteD.Visible = False
End If
LnkConcepto.Visible = Not LtlConcepto.Visible
LnkConceptoD.Visible = Not LtlConceptoD.Visible
LnkImporte.Visible = Not LtlImporte.Visible
LnkImporteD.Visible = Not LtlImporteD.Visible
End If
End Sub
Protected Sub LnkConcepto_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
GCEstatus = gvRow.DataKey("Estatus").ToEntero()
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero()
GCImporte = gvRow.DataKey("Importe").ToDecimal()
OpenModalConceptos(1)
End Sub
Protected Sub LnkConceptoD_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
GCEstatus = gvRow.DataKey("Estatus").ToEntero()
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero()
GCImporte = gvRow.DataKey("Importe").ToDecimal()
OpenModalConceptos(2)
End Sub
Private Sub OpenModalConceptos(Tipo As Integer)
If GCEstatus = -1 Then
Else
End If
RegistraScript("$('#ModalConceptos').modal();")
End Sub
Protected Sub LnkAceptarConceptos_Click(sender As Object, e As EventArgs)
RegistraScript("$('#ModalConceptos').modal('hide');")
End Sub
#End Region
End Class

View File

@@ -2,13 +2,14 @@
Option Strict On
Imports System.Data
Imports System.Diagnostics
Imports Extensiones
Partial Class OC_CatEstatus
Inherits ClsPaginas
Inherits ClsPaginas
#Region "Propiedades"
'Local
'Local
Private Property DTEstatusUsuarios As DataTable
Get
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
@@ -56,9 +57,9 @@ Partial Class OC_CatEstatus
Set(value As Integer)
ViewState("CveEstatus") = value
End Set
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CreaGrid("Req")
@@ -70,13 +71,14 @@ Partial Class OC_CatEstatus
CargaEstatus()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargaUsuarios()
sssss()
'SOLO MUESTRA SUBPROYECTO
'TdProyecto.Visible = False
'TdSubProyectoTitulo.Visible = False
'DivProyecto.Visible = False
'DivProyecto.Visible = False
'LblSubProyecto.Visible = False
DdlSubProyecto_SelectedIndexChanged(DdlSubProyecto, EventArgs.Empty)
@@ -87,11 +89,61 @@ Partial Class OC_CatEstatus
End If
End Sub
Private Sub sssss()
Dim length = 200000
Dim concatString = ""
Dim aaa As New StringBuilder
Dim stopWatch = New Stopwatch()
stopWatch.Start()
For i As Integer = 0 To length - 1
concatString = concatString & i
Next
stopWatch.[Stop]()
aaa.Append($"String Concat took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset()
concatString = String.Empty
stopWatch.Start()
For i As Integer = 0 To length - 1
concatString = $"{concatString}a"
Next
stopWatch.[Stop]()
aaa.Append($"String Interpolation took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset()
concatString = String.Empty
Dim stringBuilder = New StringBuilder()
stopWatch.Start()
For i As Integer = 0 To length - 1
stringBuilder.Append("a")
Next
concatString = stringBuilder.ToString()
stopWatch.[Stop]()
aaa.Append($"String Builder took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset()
concatString = String.Empty
stopWatch.Start()
For i As Integer = 0 To length - 1
concatString = String.Format("a{0}", i)
Next
stopWatch.[Stop]()
aaa.Append($"String.Format took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
Alert(aaa.ToString)
End Sub
#Region "C A T A L O G O "
Public Sub CargaDatos()
Dim ObjEstatus As New ClsOC
If ObjEstatus.GetEstatus() Then
If ObjEstatus.GetEstatus(UsuarioActual.CveEmpresa) Then
ViewState("DTOCEstatus") = ObjEstatus.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
GlobalDTOCEstatus(UsuarioActual.CveEmpresa) = ObjEstatus.DtResultados
Else
@@ -682,10 +734,13 @@ Partial Class OC_CatEstatus
objEstatusOC.Dispose()
CargaGridEstatusUsuarios("OC")
End Sub
End Sub
#End Region
#End Region
End Class

View File

@@ -526,13 +526,13 @@ Partial Class Clientes
Set(value As DateTime)
ViewState("FechaIngLineaAdicional") = value
End Set
End Property
End Property
#End Region
#Region "Documentacion"
Private Property DTDocumentacion As DataTable
Get
@@ -881,8 +881,8 @@ Partial Class Clientes
Else
'Configuración de Modalidad Insert
CargaEstados()
'Configuración de Modalidad Insert
CargaEstados()
BtnGuardar.Visible = PermiteGuardar()
If UsuarioActual.Empresa.Funcionalidad(525) = "1" Then
@@ -1301,7 +1301,6 @@ Partial Class Clientes
Private Sub CargaCombos()
CargaSubProyectoss()
CargaMetodosPago()
CargaPrecioLista()
CargaVendedores()
@@ -9853,7 +9852,7 @@ Partial Class Clientes
Alert("Puntuación Inicializada")
End If
Acum.Dispose()
End Sub
End Sub
#End Region
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then

View File

@@ -824,7 +824,7 @@ Partial Class Ventas_ClientesAbonar
If DdlCuenta.SelectedValue > 0 Then
CveMoneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero
Else
CveMoneda = If(Request("CveMoneda").ToString.ToEntero > 0, Request("CveMoneda").ToString.ToEntero, 1)
CveMoneda = IfNull(Request("CveMoneda"), "1").ToString.ToEntero
End If
CvePrePoliza = ObjMov.AddPrePolizas("Ventas/ClientesAbonar", 11, TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -1151,7 +1151,7 @@ Partial Class Ventas_ClientesAbonar
Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioPago).RoundSQL
Dim IdCtaContable As Integer = 0
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, VentaActual.SerieFolio, 134, VentaActual.SerieFolio, IdCtaContable, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 134, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza"
End If
End If