This commit is contained in:
2023-09-11 10:13:35 -07:00
12 changed files with 1260 additions and 241 deletions

View File

@@ -240,7 +240,7 @@ Public Class LogicNominas
End If
Next
hasfiniquito = False 'objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) ") > 0 'OR (Tipo = 'D' AND SATCveConcepto = '101')
hasfiniquito = objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) ") > 0 'OR (Tipo = 'D' AND SATCveConcepto = '101')
TotalPercepciones = DtPercepciones.SUM("Importe").ToString().ToDecimal()
@@ -251,15 +251,15 @@ Public Class LogicNominas
If continuar Then GetError = "No se pudo obtener el detalle de la nomina" 'si continuar= true el error se origino en este nodo y le asigno el error
continuar = False
End If
If Not TimbreIndemnizacion Then
'If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
' DtHorasExtras = objNomina.DtResultados
'Else
' continuar = False
'End If
Else
'DtHorasExtras = New DataTable()
End If
'If Not TimbreIndemnizacion Then
' 'If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
' ' DtHorasExtras = objNomina.DtResultados
' 'Else
' ' continuar = False
' 'End If
'Else
' 'DtHorasExtras = New DataTable()
'End If
If continuar AndAlso objNomina.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodo) AndAlso objNomina.DtResultados.Rows().Count > 0 Then
Dim DrPeriodo As DataRow = objNomina.DtResultados.Rows(0)
@@ -446,7 +446,7 @@ Public Class LogicNominas
Next
End If
If CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
If Not hasfiniquito AndAlso CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
.Clave = "D051", .Concepto = "Subs al Empleo acreditado", .Importe = 0D, .Subsidiocausado = 0D})
@@ -464,6 +464,7 @@ Public Class LogicNominas
cfdi.Comprobante.Serie = Serie
cfdi.Comprobante.Folio = Folio
cfdi.Comprobante.Fecha = Now
cfdi.Comprobante.SubTotal = subTotalDb 'cfdi.Nomina.TotalPercepciones.ToString().ToDecimal() + cfdi.Nomina.TotalOtrosPagos.ToString().ToDecimal()
cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()
cfdi.Comprobante.Total = totalDb 'cfdi.Comprobante.SubTotal - cfdi.Comprobante.Descuentos 'cfdi.Nomina.TotalPercepciones + cfdi.Nomina.TotalOtrosPagos - cfdi.Nomina.TotalDeducciones
@@ -479,15 +480,15 @@ Public Class LogicNominas
'4.0
cfdi.Receptor.DomicilioFiscalReceptor = CodigoPostal
cfdi.Receptor.RegimenFiscalReceptor = "605"
cfdi.IStimbreFiniquito = hasfiniquito
cfdi.Nomina.Receptor.CURP = CURP
cfdi.Nomina.Receptor.NSS = NumeroSS
cfdi.Nomina.Receptor.FechaInicioContrato = FechaInicioContrato
cfdi.Nomina.Receptor.Antiguedad = AntiguedadSemanas '$"P{AntiguedadSemanas}W"
cfdi.Nomina.Receptor.TipoContrato = If(TimbreIndemnizacion, "99", CodigoTipoContrato)
cfdi.Nomina.Receptor.TipoContrato = If(hasfiniquito, "99", CodigoTipoContrato)
cfdi.Nomina.Receptor.CodigoTipoJornada = ClaveTipoJornada
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(TimbreIndemnizacion, "13", CveRegimenContratacion)
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(hasfiniquito, "13", CveRegimenContratacion)
cfdi.Nomina.Receptor.CodigoEmpleado = Codigo
cfdi.Nomina.Receptor.Departamento = Departamento
cfdi.Nomina.Receptor.Puesto = Puesto
@@ -502,6 +503,7 @@ Public Class LogicNominas
cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.SubTotal, .Importe = cfdi.Comprobante.SubTotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal(), .ObjetoImpuesto = "01"})
hasfiniquito = False
If continuar Then
Return cfdi

View File

@@ -197,7 +197,9 @@
</div>
</div>
<div class="portlet-body">
<div class="row">
<%-- <div class="row">
<div class="col-md-4">
<span>Número de Tarjeta:</span>
</div>
@@ -222,9 +224,7 @@
<asp:CompareValidator ID="CVFechaVencimiento" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpAgregarTarjeta" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Vencimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha2Cancelacion" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
<%-- <asp:CompareValidator ID="CVFechaVencimientoMin" runat="server" ControlToCompare="Date.Now" ControlToValidate="TxtFechaVencimiento" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacionMin" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div>
</div>
</div>
@@ -242,13 +242,21 @@
<asp:LinkButton ID="LkbAgregarTarjera" CssClass="Texto" runat="server" ValidationGroup="GrpAgregarTarjeta">Agregar</asp:LinkButton></td>
</div>
</div>
</div>
</div>--%>
<div class="row" style="margin-top: 5px;">
<div class="col-md-12">
<asp:GridView ID="GvTarjetas" runat="server" GridLines="None" AutoGenerateColumns="false" CssClass="table table-striped table-hover mysmallbtn" data-height="400px" DataKeyNames="CveCuentaTarjeta, CveCuenta">
<asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField DataField="NumCuenta" HeaderText="Num. Cuenta" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
</Columns>
</asp:GridView>
<%--<asp:GridView ID="GvTarjetas" runat="server" GridLines="None" AutoGenerateColumns="false" CssClass="table table-striped table-hover mysmallbtn" data-height="400px" DataKeyNames="CveCuentaTarjeta, CveCuenta">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
@@ -317,7 +325,9 @@
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</asp:GridView>--%>
</div>
</div>
</div>

View File

@@ -682,112 +682,124 @@ Partial Class Bancos_CuentasBancariasDetalle
Else
DivTarjeta.Visible = False
End If
End Sub
End Sub
#End Region
#Region "D A T O S T A R J E TA - C R E D I T O"
Private Sub LkbAgregarTarjera_Click(sender As Object, e As EventArgs) Handles LkbAgregarTarjera.Click
Dim ObjTarjeta As New ClsBancos()
Dim TieneError = False
If Not ObjTarjeta.AddTarjetaCredito(CveCuenta, TxtNumTarjeta.Text, TxtNombreResponsable.Text, TxtFechaVencimiento.Text.ToDate, UsuarioActual.CveUsuario) Then
TieneError = True
End If
If Not TieneError Then
Alert("Se guardo la tarjeta de credito correctamente", TipoMensaje.MsgInformacion)
TxtNumTarjeta.Text = ""
TxtNombreResponsable.Text = ""
TxtFechaVencimiento.Text = ""
CargaDatosTarjeta()
Else
Alert("Ocurrio un Error al Guardar la tarjeta de credito", TipoMensaje.MsgError)
End If
ObjTarjeta.Dispose()
UpDatos.Update()
End Sub
'Private Sub LkbAgregarTarjera_Click(sender As Object, e As EventArgs) Handles LkbAgregarTarjera.Click
' Dim ObjTarjeta As New ClsBancos()
' Dim TieneError = False
' If Not ObjTarjeta.AddTarjetaCredito(CveCuenta, TxtNumTarjeta.Text, TxtNombreResponsable.Text, TxtFechaVencimiento.Text.ToDate, UsuarioActual.CveUsuario) Then
' TieneError = True
' End If
' If Not TieneError Then
' Alert("Se guardo la tarjeta de credito correctamente", TipoMensaje.MsgInformacion)
' TxtNumTarjeta.Text = ""
' TxtNombreResponsable.Text = ""
' TxtFechaVencimiento.Text = ""
' CargaDatosTarjeta()
' Else
' Alert("Ocurrio un Error al Guardar la tarjeta de credito", TipoMensaje.MsgError)
' End If
' ObjTarjeta.Dispose()
' UpDatos.Update()
'End Sub
Private Sub CargaDatosTarjeta()
Dim ObjTarjeta As New ClsBancos()
'Dim ObjTarjeta As New ClsBancos()
'If ObjTarjeta.GetTarjetaCredito(-1, CveCuenta, -1) Then
' GvTarjetas.DataSource = ObjTarjeta.DtResultados()
'Else
' GvTarjetas.DataSource = Nothing
'End If
'GvTarjetas.DataBind()
'ObjTarjeta.Dispose()
Dim ObjCreditos As New ClsBancos
If ObjCreditos.GetTarjetasCreditos(CveCuenta) Then
If ObjCreditos.DtResultados.Rows.Count > 0 Then
GvTC.DataSource = ObjCreditos.DtResultados
End If
GvTC.Visible = True
End If
ObjCreditos.Dispose()
GvTC.DataBind()
If ObjTarjeta.GetTarjetaCredito(-1, CveCuenta, -1) Then
GvTarjetas.DataSource = ObjTarjeta.DtResultados()
Else
GvTarjetas.DataSource = Nothing
End If
GvTarjetas.DataBind()
ObjTarjeta.Dispose()
UpDatos.Update()
End Sub
Private Sub GvTarjetas_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvTarjetas.RowEditing
GvTarjetas.EditIndex = e.NewEditIndex
CargaDatosTarjeta()
End Sub
'Private Sub GvTarjetas_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvTarjetas.RowEditing
' GvTarjetas.EditIndex = e.NewEditIndex
' CargaDatosTarjeta()
'End Sub
Private Sub GvTarjetas_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvTarjetas.RowCancelingEdit
GvTarjetas.EditIndex = -1
CargaDatosTarjeta()
End Sub
'Private Sub GvTarjetas_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvTarjetas.RowCancelingEdit
' GvTarjetas.EditIndex = -1
' CargaDatosTarjeta()
'End Sub
Private Sub GvTarjetas_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvTarjetas.RowUpdating
Dim ObjTarjeta As New ClsBancos()
Dim TieneError = False
'Private Sub GvTarjetas_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvTarjetas.RowUpdating
' Dim ObjTarjeta As New ClsBancos()
' Dim TieneError = False
Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
Dim CveCuenta As Integer = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuenta").ToEntero
Dim Numero = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtNumeroEdit"), TextBox).Text.Trim
Dim Responsable = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtResponsableEdit"), TextBox).Text.Trim
Dim Vencimiento = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtFechaVencimientoEdit"), TextBox).Text.ToDate
' Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
' Dim CveCuenta As Integer = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuenta").ToEntero
' Dim Numero = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtNumeroEdit"), TextBox).Text.Trim
' Dim Responsable = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtResponsableEdit"), TextBox).Text.Trim
' Dim Vencimiento = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtFechaVencimientoEdit"), TextBox).Text.ToDate
If Not ObjTarjeta.UpdateTarjetaCredito(CveCuentaTarjeta, CveCuenta, Numero, Responsable, Vencimiento, UsuarioActual.CveUsuario) Then
TieneError = True
Else
GvTarjetas.EditIndex = -1
End If
' If Not ObjTarjeta.UpdateTarjetaCredito(CveCuentaTarjeta, CveCuenta, Numero, Responsable, Vencimiento, UsuarioActual.CveUsuario) Then
' TieneError = True
' Else
' GvTarjetas.EditIndex = -1
' End If
If Not TieneError Then
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
CargaDatosTarjeta()
Else
Alert("Error al actualizar los cambios.", TipoMensaje.MsgError)
End If
' If Not TieneError Then
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
' CargaDatosTarjeta()
' Else
' Alert("Error al actualizar los cambios.", TipoMensaje.MsgError)
' End If
ObjTarjeta.Dispose()
UpDatos.Update()
End Sub
' ObjTarjeta.Dispose()
' UpDatos.Update()
'End Sub
Private Sub GvTarjetas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvTarjetas.RowDeleting
Dim ObjTarjeta As New ClsBancos()
Dim TieneError = False
'Private Sub GvTarjetas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvTarjetas.RowDeleting
' Dim ObjTarjeta As New ClsBancos()
' Dim TieneError = False
Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
' Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
If ObjTarjeta.RemoveTarjetaCredito(CveCuentaTarjeta, UsuarioActual.CveUsuario) Then
CargaDatosTarjeta()
Alert("Se eliminaron datos correctamente", TipoMensaje.MsgInformacion)
Else
Alert("Error al eliminar", TipoMensaje.MsgError)
End If
' If ObjTarjeta.RemoveTarjetaCredito(CveCuentaTarjeta, UsuarioActual.CveUsuario) Then
' CargaDatosTarjeta()
' Alert("Se eliminaron datos correctamente", TipoMensaje.MsgInformacion)
' Else
' Alert("Error al eliminar", TipoMensaje.MsgError)
' End If
ObjTarjeta.Dispose()
UpDatos.Update()
End Sub
' ObjTarjeta.Dispose()
' UpDatos.Update()
'End Sub
Private Sub GvTarjetas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTarjetas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(100)
e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(200)
e.Row.Cells(3).Width = Unit.Pixel(20)
e.Row.Cells(4).Width = Unit.Pixel(20)
End If
End If
End Sub
'Private Sub GvTarjetas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTarjetas.RowDataBound
' If e.Row.RowType = DataControlRowType.DataRow Then
' If e.Row.RowIndex = 0 Then
' e.Row.Cells(0).Width = Unit.Pixel(100)
' e.Row.Cells(1).Width = Unit.Pixel(100)
' e.Row.Cells(2).Width = Unit.Pixel(200)
' e.Row.Cells(3).Width = Unit.Pixel(20)
' e.Row.Cells(4).Width = Unit.Pixel(20)
' End If
' End If
'End Sub
Private Function CargarDdlUsuarios(UsuariosGlobal As DataTable) As DataTable
Dim tablaUsuariosFormateada As DataTable = New DataTable("Usuarios")

View File

@@ -181,6 +181,7 @@
<div>
<asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Right">
@@ -202,6 +203,7 @@
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" Height="50px" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>

View File

@@ -380,7 +380,6 @@ Partial Class Bancos_Transferencias
Exit For
Else
AlertaGlobal.AppendFormat("<a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/>", CveIEDestino, FolioDestino)
'FolioDestino = (FolioDestino.ToLong + 1).ToString
End If
Next

Binary file not shown.

BIN
Imagenes/SinImagenB.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -235,9 +235,17 @@ public partial class Nomina_Finiquito : ClsPaginas
if (TxtFechaBaja.Text.Length > 9)
{
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
DateTime fechaalta = LblFechaAlta.Text.ToDateTime();
int diasanio = fechafin.DayOfYear;
if (fechafin.Year == fechaalta.Year)
{
diasanio = diasanio - fechaalta.DayOfYear;
}
decimal antiguedad = getyearsresult(fechafin, FechaInicio);
TxtAntiguedad.Text = string.Format("{0:##0.00###}", antiguedad);
TxtDiasTransAnio.Text = string.Format("{0}", fechafin.DayOfYear);
TxtDiasTransAnio.Text = string.Format("{0}", diasanio);
}
else
{

View File

@@ -295,6 +295,9 @@
<li>
<asp:HyperLink ID="HypPDFSTimbrados" Visible="false" onclick="GETPDF(-1,0)" NavigateUrl="#" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Recibos timbrados</asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkProcesarModal" OnClick="LnkProcesarModal_Click" runat="server"><i class="fa fa-check"></i> Procesar archivo SUA EBA PDF</asp:LinkButton>
</li>
<li>
<%--<asp:LinkButton ID="LnkOpenCancelarTimbre" OnClick="LnkOpenCancelarTimbre_Click" runat="server"><i class="fa fa-download"></i> CancelarTimbre</asp:LinkButton>--%>
</li>
@@ -835,9 +838,9 @@
<div class="portlet-body " style="padding: 0px;">
<div class="row">
<div class="col-sm-1 bold">Salario</div>
<div class="col-sm-2 text-right" >
<div class="col-sm-2 text-right">
<asp:Label ID="LblSRSalarioDiario" runat="server"></asp:Label>
</div>
<div class="col-sm-2 bold">Afi IMSS </div>
<div class="col-sm-2">
@@ -852,7 +855,7 @@
<div class="col-sm-1 bold">SDI</div>
<div class="col-sm-2 text-right">
<asp:Label ID="LblSRSalarioDiarioIntegrado" runat="server"></asp:Label>
</div>
</div>
<div class="col-sm-2 bold">CURP</div>
<div class="col-sm-2">
<asp:Label ID="LblCURP" runat="server"></asp:Label>
@@ -870,7 +873,7 @@
<div class="col-sm-2 bold">R.F.C.</div>
<div class="col-sm-2 ">
<asp:Label ID="LblRFC" runat="server"></asp:Label>
</div>
</div>
<div class="col-sm-2 bold">Días Incapacidad</div>
<div class="col-sm-2 text-right">
<asp:Label ID="LblDiasIncapacidad" runat="server"></asp:Label>
@@ -890,10 +893,10 @@
<div class="col-sm-2 bold">Faltas</div>
<div class="col-sm-2 text-right">
<asp:Label ID="LblDiasFaltados" runat="server"></asp:Label>
</div>
</div>
<div class="row" style="display:none">
</div>
</div>
<div class="row" style="display: none">
<div class="col-sm-3 bold">Fecha de Pago</div>
<div class="col-sm-3">
<asp:Label ID="LblFechaPagosrb" runat="server"></asp:Label>
@@ -903,7 +906,7 @@
<asp:Label ID="LblTipoPeriodo" runat="server"></asp:Label>
</div>
</div>
</div>
</div>
@@ -917,7 +920,8 @@
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Nomina del <asp:Label ID="LblFecha" runat="server"></asp:Label></span>
<span class="caption-subject font-yellow-gold bold uppercase">Nomina del
<asp:Label ID="LblFecha" runat="server"></asp:Label></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
@@ -1013,7 +1017,7 @@
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' data-toggle="tooltip" title='<%# Eval("ImporteGravadoP", "${0:N}") %>' Style="word-break: break-all; display: inline-block;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" data-toggle="tooltip" title='<%# Eval("ImporteGravadoP", "${0:N}") %>'></asp:LinkButton>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" data-toggle="tooltip" title='<%# Eval("ImporteGravadoP", "${0:N}") %>'></asp:LinkButton>
<div style="display: inline-block; width: 29px;">
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
</div>
@@ -3306,6 +3310,47 @@
</asp:UpdatePanel>
</div>
<div id="DmodalArchivoEBASUAPDFToExceL" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel4" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Procesa PDF</h4>
</div>
<div class="modal-body">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-upload font-green"></i>
<span class="caption-subject bold uppercase">cargar Archivos PDF </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body rowpadding ">
<asp:TextBox ID="TxtArchivoPDFSUAEBA" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkProcesaPDFSUAEBA" OnClick="LnkProcesaPDFSUAEBA_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkProcesaPDFSUAEBA" />
</Triggers>
</asp:UpdatePanel>
</div>
<div id="DModalAsistenciaTabular" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel3" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
@@ -3362,77 +3407,75 @@
<div class="row">
<div class="col-md-8">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-download font-green"></i>
<span class="caption-subject bold uppercase">Paso 1: Descargar plantilla Conceptos</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-download font-green"></i>
<span class="caption-subject bold uppercase">Paso 1: Descargar plantilla Conceptos</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div style="text-align: right;">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVConceptosPlantilla.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVConceptosPlantilla.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="portlet-body">
<asp:GridView ID="GVConceptosPlantilla" runat="server" GridLines="None" DataKeyNames="CveConcepto,Codigo,Concepto,Tipo" data-heigth="100"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" BorderWidth="0" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
EmptyDataText="No se encontraron registros">
<Columns>
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Tipo" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<div style="width: 50px;">
<asp:CheckBox runat="server" ID="chkCon" />
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div class="portlet-footer text-center">
<asp:LinkButton ID="LnkFormato" OnClick="LnkFormato_Click" CssClass="btn btn-success" runat="server"><i class="fa fa-download"></i> Descargar Plantilla</asp:LinkButton>
<div style="text-align: right;">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVConceptosPlantilla.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVConceptosPlantilla.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="portlet-body">
<asp:GridView ID="GVConceptosPlantilla" runat="server" GridLines="None" DataKeyNames="CveConcepto,Codigo,Concepto,Tipo" data-heigth="100"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" BorderWidth="0" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
EmptyDataText="No se encontraron registros">
<Columns>
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Tipo" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<div style="width: 50px;">
<asp:CheckBox runat="server" ID="chkCon" />
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div class="portlet-footer text-center">
<asp:LinkButton ID="LnkFormato" OnClick="LnkFormato_Click" CssClass="btn btn-success" runat="server"><i class="fa fa-download"></i> Descargar Plantilla</asp:LinkButton>
</div>
</div>
<div class="col-md-4">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-upload font-green"></i>
<span class="caption-subject bold uppercase">Paso 2: cargar plantilla </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="col-md-4">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-upload font-green"></i>
<span class="caption-subject bold uppercase">Paso 2: cargar plantilla </span>
</div>
<div class="portlet-body rowpadding ">
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class=" text-right">
<asp:CheckBox ID="ChkRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />
<div class="portlet-body rowpadding ">
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class=" text-right">
<asp:CheckBox ID="ChkRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />
</div>
</div>
</div>
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
-No se debe editar el nombre de la hoja 'Nómina'.<br />
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.<br />
-si no desea insertar un concepto puede borrar la columna.<br />
-no se debe borrar la columna código.<br />--%>
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -49,10 +49,19 @@
<li>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style=" font-weight: bold;"></i> Expediente de personal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LbGafete" runat="server" CssClass=""><i class="fa fa-list-alt"></i> Gafete</asp:LinkButton>
</li>
<%-- <asp:UpdatePanel runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="LbGafete" runat="server" CssClass=""><i class="fa fa-list-alt"></i> Gafete</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LbGafete" />
</Triggers>
</asp:UpdatePanel>--%>
<li>
<asp:LinkButton ID="Lnkopenaddcuentabancaria" OnClick="Lnkopenaddcuentabancaria_Click" Visible="true" runat="server"> <i class="fa fa-plus"></i> Agregar cuenta bancaria</asp:LinkButton>
</li>
@@ -80,7 +89,7 @@
<asp:UpdatePanel ID="UpDescargaConsumos" runat="server" Visible="false">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkImprimirPDFConsumo" runat="server" OnClick="LnkImprimirPDFConsumo_Click"> <i class="fa fa-file-pdf-o" style=" font-weight: bold;"></i> PDF consumo</asp:LinkButton>
<asp:LinkButton ID="LnkImprimirPDFConsumo" runat="server" OnClick="LnkImprimirPDFConsumo_Click"> <i class="fa fa-file-pdf-o" style="font-weight: bold;"></i> PDF consumo</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>

View File

@@ -10,6 +10,8 @@ Imports Microsoft.Reporting.WebForms
Imports System.Globalization
Imports System.Xml
Imports System.Web.Script.Services
Imports System.Linq
Partial Class RH_Personal
Inherits ClsPaginas
@@ -3897,40 +3899,95 @@ Partial Class RH_Personal
End If
ObjPersonal.Dispose()
End Sub
Private Sub LbGafete_Click(sender As Object, e As EventArgs) Handles LbGafete.Click
Dim params As New List(Of ReportParameter)
Dim ObjPersonal As New ClsRH()
If ObjPersonal.GetPersonal(CvePersonal, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
If ObjPersonal.DtResultados.Rows.Count > 0 Then
'Eliminar hasta 15 de septiembre 2023
'Private Sub LbGafete_Click(sender As Object, e As EventArgs) Handles LbGafete.Click
params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim)))
params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text))
params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
params.Add(New ReportParameter("CURP", TxtCURP.Text))
params.Add(New ReportParameter("NoRegistro", ""))
params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
params.Add(New ReportParameter("FechaIngreso", TxtFechaIngreso.Text))
params.Add(New ReportParameter("DomPart", String.Format("{0} NoExt:{1} NoInt:{2} {3}", TxtCalle.Text, TxtNumExt.Text, TxtNumInt.Text, TxtColonia.Text)))
params.Add(New ReportParameter("Emergencia", ""))
params.Add(New ReportParameter("CUIP", ""))
params.Add(New ReportParameter("TipoSangre", ""))
params.Add(New ReportParameter("RFC", TxtRFC.Text))
params.Add(New ReportParameter("Denominacion", TxtRFC.Text))
' Dim PathSource As String = UsuarioActual.Empresa.Ruta & "Formatos\Gafete.docx"
' If File.Exists(PathSource) Then
' Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
' Dim pathDesti As String
' PathSource = UsuarioActual.Empresa.Ruta & "Formatos\Gafete.docx"
' pathDesti = PathRoot & "Temp\" & CvePersonal & "Gafete.docx"
' If File.Exists(pathDesti) Then
' File.Delete(pathDesti)
' End If
' File.Copy(PathSource, pathDesti)
' Dim objDoc As New clsGemBoxDocument(pathDesti)
' Dim objRH As New ClsRH
' Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString()
' objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa))
' objRH.Dispose()
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
Else
params.Add(New ReportParameter("LogoUri", ""))
End If
' objDoc.Guardar(pathDesti)
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
End If
End If
ObjPersonal.Dispose()
End Sub
' Dim fileinfo As New FileInfo(pathDesti)
' If fileinfo.Exists Then
' Response.ContentType = "application/docx"
' Response.AppendHeader("Content-Disposition", $"attachment; filename=Gafete_{CvePersonal}.docx")
' Response.TransmitFile(pathDesti)
' Response.End()
' End If
' 'Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
' 'baseUrl = baseUrl & "/temp/" & fileinfo.Name
' 'RegistraDescargaJavaScript(baseUrl)
' Else
' Dim params As New List(Of ReportParameter)
' Dim ObjPersonal As New ClsRH()
' If ObjPersonal.GetPersonal(CvePersonal, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
' If ObjPersonal.DtResultados.Rows.Count > 0 Then
' params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim)))
' params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text))
' params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
' params.Add(New ReportParameter("CURP", TxtCURP.Text))
' params.Add(New ReportParameter("NoRegistro", ""))
' params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
' params.Add(New ReportParameter("FechaIngreso", TxtFechaIngreso.Text))
' params.Add(New ReportParameter("DomPart", String.Format("{0} NoExt:{1} NoInt:{2} {3}", TxtCalle.Text, TxtNumExt.Text, TxtNumInt.Text, TxtColonia.Text)))
' params.Add(New ReportParameter("Emergencia", TxtTelefonoEmergencia.Text))
' params.Add(New ReportParameter("CUIP", ""))
' params.Add(New ReportParameter("TipoSangre", DdlTipoSangre.SelectedItem.Text))
' params.Add(New ReportParameter("RFC", TxtRFC.Text))
' params.Add(New ReportParameter("Denominacion", TxtRFC.Text))
' If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
' params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
' Else
' params.Add(New ReportParameter("LogoUri", ""))
' End If
' ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
' End If
' End If
' ObjPersonal.Dispose()
' End If
'End Sub
Private Sub GenerarPDFGastosXComp(Optional Formato As String = "PDF")
If CvePersonal > 0 Then
If RBLTipoGastos.SelectedValue = "1" Then
@@ -4367,10 +4424,94 @@ Partial Class RH_Personal
objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa))
objRH.Dispose()
objDoc.Guardar(pathDesti)
If pathDesti.ToUpper.Contains("GAFETTE") Or pathDesti.ToUpper.Contains("GAFETE") Then
GemBox.Document.ComponentInfo.SetLicense(SerialGemBoxDocument)
Dim document = GemBox.Document.DocumentModel.Load(pathDesti)
Dim imgPersonalURL As String = ""
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg"
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png"
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp"
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg"
End If
'imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png"
If imgPersonalURL.Trim.Length = 0 Then
imgPersonalURL = ModExtensiones.DirectorioBaseEmpresas & "\wwwSIG\Imagenes\SinImagenB.jpg"
End If
'Dim document As New GemBox.Document.DocumentModel()
'Dim section As New GemBox.Document.Section(document)
'Dim paragraph As New GemBox.Document.Paragraph(document)
'section.Blocks.Add(paragraph)
'Dim picture1 As New GemBox.Document.Picture(document, imgPersonalURL, 61, 53, GemBox.Document.LengthUnit.Pixel)
'paragraph.Inlines.Add(picture1)
'Dim Zahnrad As String = UsuarioActual.Empresa.Ruta & "RH\Personal\Zahnrad.gif"
'Dim Dices As String = UsuarioActual.Empresa.Ruta & "RH\Personal\Dices.png"
'Dim Graphics1 As String = UsuarioActual.Empresa.Ruta & "RH\Personal\Graphics1.svg"
'Dim section As New GemBox.Document.Section(document)
'document.Sections.Add(section)
'Dim paragraph As New GemBox.Document.Paragraph(document)
'section.Blocks.Add(paragraph)
'Dim picture1 As New GemBox.Document.Picture(document, imgPersonalURL, 61, 53, GemBox.Document.LengthUnit.Pixel)
'paragraph.Inlines.Add(picture1)
' Get the first section and the first paragraph (or create them if necessary)
'**************************************************************
Dim firstSection As GemBox.Document.Section = document.Sections.FirstOrDefault()
If firstSection Is Nothing Then
firstSection = New GemBox.Document.Section(document)
document.Sections.Add(firstSection)
End If
Dim firstParagraph As GemBox.Document.Paragraph = firstSection.Blocks.OfType(Of GemBox.Document.Paragraph)().FirstOrDefault()
If firstParagraph Is Nothing Then
firstParagraph = New GemBox.Document.Paragraph(document)
firstSection.Blocks.Add(firstParagraph)
End If
Dim imageParagraph As New GemBox.Document.Paragraph(document)
Dim picture1 As New GemBox.Document.Picture(document, imgPersonalURL, 83, 100, GemBox.Document.LengthUnit.Pixel)
Dim layout3 As New GemBox.Document.FloatingLayout(
New GemBox.Document.HorizontalPosition(1.79, GemBox.Document.LengthUnit.Inch, GemBox.Document.HorizontalPositionAnchor.LeftMargin),
New GemBox.Document.VerticalPosition(2.55, GemBox.Document.LengthUnit.Inch, GemBox.Document.VerticalPositionAnchor.TopMargin),
picture1.Layout.Size)
'layout3.WrappingStyle = GemBox.Document.TextWrappingStyle.Through
picture1.Layout = layout3
imageParagraph.Inlines.Add(picture1)
firstSection.Blocks.Insert(0, imageParagraph)
document.Sections(0).Blocks.RemoveAt(9)
document.Save(pathDesti)
End If
Dim fileinfo As New FileInfo(pathDesti)
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)