From f802842c1fdda18058be8e4497b16a2f0128a870 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Mon, 21 Sep 2026 12:38:04 +0200 Subject: [PATCH] =?UTF-8?q?-=20En=20el=20listado=20de=20nominas=20por=20a?= =?UTF-8?q?=C3=B1o,=20dejar=20Total=20Devengado=20y=20Total=20liquido=20y?= =?UTF-8?q?=20meter=20un=20desplegable=20de=20acciones.=20COMENTAR=20COMO?= =?UTF-8?q?=20TRASLADAR=20ALGUNAS=20DE=20LAS=20FUNCIONES=20-=20La=20genera?= =?UTF-8?q?ci=C3=B3n=20de=20nominas=20la=20lista=20de=20personas=20viene?= =?UTF-8?q?=20vac=C3=ADa=20y=20de=20error.=20YA=20NO=20DA=20ERROR=20PERO?= =?UTF-8?q?=20NO=20TENGO=20CLARO=20SI=20DEBE=20DEVOLVER=20ALGO=20O=20APLIC?= =?UTF-8?q?A=20CAMBIOS=20A=20OTRAS=20COSAS=20-=20Por=20regla=20general=20s?= =?UTF-8?q?alvo=20lo=20que=20necesite=20mostrar=20hora,=20la=20fecha=20se?= =?UTF-8?q?=20muestra=20sin=20la=20hora,=20por=20el=20ejemplo=20en=20el=20?= =?UTF-8?q?grid=20de=20personas=20cuando=20muestras=20Ver=20todos,=20la=20?= =?UTF-8?q?fecha=20baja=20viene=20con=20la=20hora.=20-=20Las=20cantidades?= =?UTF-8?q?=20por=20defecto=20con=20punto=20de=20miles=20y=20coma=20de=20d?= =?UTF-8?q?ecimales.=20-=20Lo=20bolean,=20que=20sean=20una=20caja=20de=20c?= =?UTF-8?q?heck=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NominasEnfermedades.razor | 4 +- .../NominasIncidencias.razor | 4 +- .../ComponentesInfoNomina/NominasPers.razor | 4 +- .../Pages/FicherosMaestros/Bancos.razor | 8 +- .../Pages/FicherosMaestros/Fiestas.razor | 2 +- .../FicherosMaestros/TiposPuestoTrabajo.razor | 4 +- .../FicherosMaestros/TiposTramoSiltra.razor | 24 +++++- .../FicherosMaestros/ValoresNomina.razor | 4 +- .../Components/Pages/GenerarNominas.razor | 4 +- .../InfoPersComponents/DiferenciaGrid.razor | 4 +- .../InfoPersComponents/EnfermedadesGrid.razor | 2 +- .../InfoPersComponents/MaternidadesGrid.razor | 4 +- .../InfoPersComponents/NominaDetalle.razor | 43 +++++++--- .../Pages/InfoPersComponents/NominaGrid.razor | 86 ++++++++++++++++++- .../InfoPersComponents/PrestamosGrid.razor | 4 +- .../Components/Pages/ListTrabajadores.razor | 8 +- .../Components/Pages/NominaPersona.razor | 10 ++- .../Components/Pages/Nominas.razor | 10 +-- .../GestionPersonalWeb/Models/Utilidades.cs | 14 +++ .../bdAntifraude/clases/ParFicExcel.cs | 2 +- 20 files changed, 190 insertions(+), 55 deletions(-) diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasEnfermedades.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasEnfermedades.razor index 38cae90..8a82d5b 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasEnfermedades.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasEnfermedades.razor @@ -34,10 +34,10 @@ @context.IDPERSONANavigation?.APELLIDOSNOMBRE - @context.FECHAINICIO + @context.FECHAINICIO?.ToString("dd/MM/yyyy") - @context.FECHAFIN + @context.FECHAFIN?.ToString("dd/MM/yyyy") @context.BASE diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasIncidencias.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasIncidencias.razor index 06b4a14..0b1db0d 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasIncidencias.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasIncidencias.razor @@ -40,10 +40,10 @@ @context.IDPERSONANavigation?.NIF - @context.IDPERSONANavigation?.FECHABAJA + @context.IDPERSONANavigation?.FECHABAJA?.ToString("dd/MM/yyyy") - @context.IDPERSONANavigation?.FECHABAJA + @context.IDPERSONANavigation?.FECHABAJA?.ToString("dd/MM/yyyy") @if (context.SUSTITUYECONCEPTO == true) diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasPers.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasPers.razor index c80b1b5..5be7e5d 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasPers.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ComponentesInfoNomina/NominasPers.razor @@ -40,10 +40,10 @@ @context.IDTIPONavigation?.DESCRIPCION - @context.NOMINATRABAJADORCABECERA.FirstOrDefault(x => x.IDNOMINATRABAJADOR == idNom)?.TOTALDEVENGADO + @Utilidades.FormatearNumero(context.NOMINATRABAJADORCABECERA.FirstOrDefault(x => x.IDNOMINATRABAJADOR == idNom)?.TOTALDEVENGADO) - @context.NOMINATRABAJADORCABECERA.FirstOrDefault(x => x.IDNOMINATRABAJADOR == idNom)?.TOTALLIQUIDO + @Utilidades.FormatearNumero(context.NOMINATRABAJADORCABECERA.FirstOrDefault(x => x.IDNOMINATRABAJADOR == idNom)?.TOTALLIQUIDO) @context.IDGRUPOFUNCIONARIONavigation?.DESCRIPCION diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Bancos.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Bancos.razor index 284be94..dde2730 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Bancos.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Bancos.razor @@ -78,7 +78,7 @@ @if (context.FECHABAJA != null) { - @context.FECHABAJA + @context.FECHABAJA?.ToString("dd/MM/yyyy") } *@ @@ -107,7 +107,11 @@
@itm.BIC
Obsoleto
- @itm.OBSOLETO + @if (itm.OBSOLETO == true) + { + + } + else { } @* @if(itm.OBSOLETO) { diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Fiestas.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Fiestas.razor index e0feb69..006724a 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Fiestas.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/Fiestas.razor @@ -63,7 +63,7 @@ - @context.FECHA.Value.ToString().Substring(0,10) + @context.FECHA?.ToString("dd/MM/yyyy") @context.DESCRIPCION diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposPuestoTrabajo.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposPuestoTrabajo.razor index 2fd6864..21e55b9 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposPuestoTrabajo.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposPuestoTrabajo.razor @@ -79,7 +79,7 @@ @if(context.FECHABAJA != null){ - @context.FECHABAJA + @context.FECHABAJA?.ToString("dd/MM/yyyy") } @@ -111,7 +111,7 @@
Tipo
@itm.IDTIPOPERSONANavigation.DESCRIPCION
Fecha baja
-
@itm.FECHABAJA
+
@itm.FECHABAJA?.ToString("dd/MM/yyyy")
diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposTramoSiltra.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposTramoSiltra.razor index 982d282..6f4ce03 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposTramoSiltra.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/TiposTramoSiltra.razor @@ -134,7 +134,11 @@
Solicitado al usuario
- @itm.SOLICITADOALUSUARIO + @if (itm.SOLICITADOALUSUARIO == true) + { + + } + else { } @* @if(itm.OBSOLETO) { @@ -156,7 +160,11 @@
Se Manda Importe a Empresa
- @itm.SEMANDAIMPORTEEMPRESA + @if (itm.SEMANDAIMPORTEEMPRESA == true) + { + + } + else { } @* @if(itm.OBSOLETO) { @@ -169,7 +177,11 @@
Modificable
- @itm.MODIFICABLE + @if (itm.MODIFICABLE == true) + { + + } + else { } @* @if(itm.OBSOLETO) { @@ -182,7 +194,11 @@
Resta en Acumulado
- @itm.RESTAENACUMULADO + @if (itm.RESTAENACUMULADO == true) + { + + } + else { } @* @if(itm.OBSOLETO) { diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/ValoresNomina.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/ValoresNomina.razor index 1eff7b8..533dfec 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/ValoresNomina.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/FicherosMaestros/ValoresNomina.razor @@ -56,10 +56,10 @@ PaginationItemsTextFormat="{0} - {1} de {2} elementos"> - @context.FECHAINCIO + @context.FECHAINCIO?.ToString("dd/MM/yyyy") - @context.FECHAFIN + @context.FECHAFIN?.ToString("dd/MM/yyyy") diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/GenerarNominas.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/GenerarNominas.razor index 41307d3..0143397 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/GenerarNominas.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/GenerarNominas.razor @@ -70,10 +70,10 @@ @context.IDCUERPORPTNavigation?.DESCRIPCION - @context.FECHAALTAPAR + @context.FECHAALTAPAR?.ToString("dd/MM/yyyy") - @context.FECHABAJAPAR + @context.FECHABAJAPAR?.ToString("dd/MM/yyyy") diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/DiferenciaGrid.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/DiferenciaGrid.razor index 27c2ac3..52c4cec 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/DiferenciaGrid.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/DiferenciaGrid.razor @@ -43,10 +43,10 @@ @context.FECHAFIN?.ToString("dd/MM/yyyy") - @context.BASEDIARIASEGURIDADSOCIAL + @Utilidades.FormatearNumero(context.BASEDIARIASEGURIDADSOCIAL) - @context.BASEPAGODIRECTO + @Utilidades.FormatearNumero(context.BASEPAGODIRECTO) diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/EnfermedadesGrid.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/EnfermedadesGrid.razor index 0b2747c..be6d4a1 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/EnfermedadesGrid.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/EnfermedadesGrid.razor @@ -42,7 +42,7 @@ @context.FECHAFIN?.ToString("dd/MM/yyyy") - @context.BASE + @Utilidades.FormatearNumero(context.BASE) @if(@context.IDTIPONavigation != null){@context.IDTIPONavigation.DESCRIPCION} diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/MaternidadesGrid.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/MaternidadesGrid.razor index 32a5150..6ad5472 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/MaternidadesGrid.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/MaternidadesGrid.razor @@ -42,10 +42,10 @@ @context.FECHAFIN?.ToString("dd/MM/yyyy") - @context.BASECOTIZACIONSEGURIDADSOCIAL + @Utilidades.FormatearNumero(context.BASECOTIZACIONSEGURIDADSOCIAL) - @context.PORCENTAJEREDUCCIONJORNADA + @Utilidades.FormatearNumero(context.PORCENTAJEREDUCCIONJORNADA) @if (context.RIESGOEMBARAZO) diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaDetalle.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaDetalle.razor index f10f9e2..14de1cf 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaDetalle.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaDetalle.razor @@ -1,5 +1,6 @@ @using BlazorBootstrap @using bdAntifraude.db +@using GestionPersonalWeb.Models
@@ -19,19 +20,27 @@ - + - - - - - - + + + + + + - - - + + +
@Nomina.IDNOMINANavigation?.DESCRIPCION@Nomina.TOTALDEVENGADO@Nomina.TOTALLIQUIDO@Nomina.IDNOMINANavigation?.DESCRIPCION@Utilidades.FormatearNumero(Nomina.TOTALDEVENGADO)@Utilidades.FormatearNumero(Nomina.TOTALLIQUIDO) @Nomina.IDGRUPOFUNCIONARIONavigation?.DESCRIPCION@Nomina.NIVEL@Nomina.DIASEFECTIVOS @Nomina.DIASENFERMOS@Nomina.DIASACCIDENTES@Nomina.DIASFALTA@Nomina.DIASPERMISOSSINRETRIBUIR@Nomina.DIASMATERNIDAD@(Nomina.ACUMULADA == true ? "Sí" : "No")@(Nomina.PROTEGIDA == true ? "Sí" : "No")@Nomina.PLURIEMPLEO@Nomina.NUMEROPLURIEMPLEO@Nomina.TOTALSEGURIDADSOCIAL@Nomina.PRORRATAPAGAEXTRA@Nomina.PRORRATAPRODUCTIVIDAD@Nomina.TOTALDEDUCCIONES@Nomina.TOTALHABERES@Nomina.OTRASDEDUCCIONES@Nomina.TOTALSEGURIDADSOCIALPAGOENESPECIE@Nomina.TOTALEPIGRAFE126@Nomina.TOTALMATERNIDADPATERNIDAD@Nomina.TOTALPERMISOSINRETRIBUIR@Nomina.SINDICATO1@Nomina.REDUCCIONJORNADA@Nomina.DIASPERMISOSSINRETRIBUIR@Nomina.DIASMATERNIDAD + @if (Nomina.ACUMULADA == true) { } + + @if (Nomina.PROTEGIDA == true) { } + @Nomina.PLURIEMPLEO@Nomina.NUMEROPLURIEMPLEO@Utilidades.FormatearNumero(Nomina.TOTALSEGURIDADSOCIAL)@Utilidades.FormatearNumero(Nomina.PRORRATAPAGAEXTRA)@Utilidades.FormatearNumero(Nomina.PRORRATAPRODUCTIVIDAD)@Utilidades.FormatearNumero(Nomina.TOTALDEDUCCIONES)@Utilidades.FormatearNumero(Nomina.TOTALHABERES)@Utilidades.FormatearNumero(Nomina.OTRASDEDUCCIONES)@Utilidades.FormatearNumero(Nomina.TOTALSEGURIDADSOCIALPAGOENESPECIE)@Utilidades.FormatearNumero(Nomina.TOTALEPIGRAFE126)@Utilidades.FormatearNumero(Nomina.TOTALMATERNIDADPATERNIDAD)@Utilidades.FormatearNumero(Nomina.TOTALPERMISOSINRETRIBUIR)@Utilidades.FormatearNumero(Nomina.SINDICATO1)@Utilidades.FormatearNumero(Nomina.REDUCCIONJORNADA) @Nomina.TRABAJOTIEMPOPARCIAL@Nomina.MUTUA@Nomina.DIASENFERMEDADAL60@Nomina.BASEENFERMEDADAL60@Nomina.DIASENFERMEDADAL75@Nomina.BASEACCIDENTES@Nomina.DIASBASEPAGODIRECTO@Nomina.BASEPAGODIRECTO@(Nomina.VISIBLE == true ? "Sí" : "No")@(Nomina.MODIFICABLE == true ? "Sí" : "No")@Nomina.MESNOMINA@Utilidades.FormatearNumero(Nomina.BASEENFERMEDADAL60)@Nomina.DIASENFERMEDADAL75@Utilidades.FormatearNumero(Nomina.BASEACCIDENTES)@Nomina.DIASBASEPAGODIRECTO@Utilidades.FormatearNumero(Nomina.BASEPAGODIRECTO) + @if (Nomina.VISIBLE == true) { } + + @if (Nomina.MODIFICABLE == true) { } + @Nomina.MESNOMINA
@@ -47,9 +56,9 @@ @context.DESCRIPCIONCONCEPTO @context.CANTIDAD - @context.IMPORTE - @context.TOTALRETRIBUCIONES - @context.TOTALDEDUCCIONES + @Utilidades.FormatearNumero(context.IMPORTE) + @Utilidades.FormatearNumero(context.TOTALRETRIBUCIONES) + @Utilidades.FormatearNumero(context.TOTALDEDUCCIONES) @@ -61,7 +70,13 @@ @context.DESCRIPCION @context.IMPORTE @context.CUOTA - @context.SEGURIDADSOCIAL + + @if (context.SEGURIDADSOCIAL == true) + { + + } + else { } + diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaGrid.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaGrid.razor index ef79380..5113670 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaGrid.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/NominaGrid.razor @@ -1,7 +1,11 @@ @using GestionPersonalWeb.Models @using BlazorBootstrap @using bdAntifraude.db +@using bdAntifraude.clases +@using System.Net.Http.Json @rendermode InteractiveServer +@inject IHttpClientFactory HttpClientFactory +@inject UserState UserState
@@ -18,8 +22,20 @@ Nómina@nomina.IDNOMINANavigation?.DESCRIPCION Total devengado@nomina.TOTALDEVENGADO Total líquido@nomina.TOTALLIQUIDO - Grupo@nomina.IDGRUPOFUNCIONARIONavigation?.DESCRIPCION - Nivel@nomina.NIVEL + + + Acciones: + + Eliminar + Generar nómina + Ver PDF nómina + Generar incidencia de diferencia con seguridad social de otra nómina + + + + + @* Grupo@nomina.IDGRUPOFUNCIONARIONavigation?.DESCRIPCION + Nivel@nomina.NIVEL *@
@@ -31,11 +47,23 @@
+ + +

¿Está seguro de que desea eliminar la nómina @nominaPendiente?.IDNOMINANavigation?.DESCRIPCION?

+
+ + + + +
+ @code { [Parameter] public PERSONAS Persona { get; set; } = new(); [Parameter] public EventCallback OnPersonaActualizada { get; set; } private readonly List annos = new(); private readonly List itmList = new(); + private Modal popupConfirmacion = default!; + private NOMINATRABAJADORCABECERA? nominaPendiente; protected override void OnInitialized() { @@ -47,4 +75,58 @@ { return "/NomPers?cl=" + tsUtilidades.crypt.FEncS(Persona.NIF + "-" + nom.IDNOMINA, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.:/-*", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.:/-*", 875421649); } + + private async Task SolicitarEliminacion(NOMINATRABAJADORCABECERA nomina) + { + nominaPendiente = nomina; + await popupConfirmacion.ShowAsync(); + } + + private async Task CancelarEliminacion() + { + nominaPendiente = null; + await popupConfirmacion.HideAsync(); + } + + private async Task EliminarNomina() + { + if (nominaPendiente is null) + return; + + var nomina = nominaPendiente; + var cliente = Utilidades.ObtenerCliente(UserState.Token, HttpClientFactory); + var response = await cliente.DeleteAsync($"/api/NOMINATRABAJADORCABECERA/{nomina.IDNOMINATRABAJADOR}"); + + if (response.IsSuccessStatusCode) + { + itmList.Remove(nomina); + annos.Clear(); + annos.AddRange(itmList.Where(x => x.IDNOMINANavigation != null) + .Select(x => x.IDNOMINANavigation!.AÑO) + .Distinct() + .OrderDescending()); + await popupConfirmacion.HideAsync(); + nominaPendiente = null; + await OnPersonaActualizada.InvokeAsync(); + } + } + + private async Task GenerarNomina(NOMINATRABAJADORCABECERA nomina) + { + if (!nomina.IDNOMINA.HasValue) + return; + + var objetoConsulta = new DatGenNom + { + Personas = new List { Persona.IDPERSONA }, + Idnomina = nomina.IDNOMINA.Value + }; + + var cliente = HttpClientFactory.CreateClient(); + cliente.BaseAddress = new Uri(Utilidades.urlSwagger2()); + var response = await cliente.PostAsJsonAsync("/api/GeneraNominas", objetoConsulta); + + if (response.IsSuccessStatusCode) + await OnPersonaActualizada.InvokeAsync(); + } } diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/PrestamosGrid.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/PrestamosGrid.razor index 4757602..12b1da3 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/PrestamosGrid.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/InfoPersComponents/PrestamosGrid.razor @@ -45,7 +45,7 @@ @context.FECHAFIN.ToString("dd/MM/yyyy") - @context.IMPORTE + @Utilidades.FormatearNumero(context.IMPORTE) @context.MESES @@ -54,7 +54,7 @@ @context.AMORTIZACION - @context.SALDO + @Utilidades.FormatearNumero(context.SALDO) diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ListTrabajadores.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ListTrabajadores.razor index 52303b2..8c55017 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/ListTrabajadores.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/ListTrabajadores.razor @@ -90,10 +90,10 @@ @context.IDSITUACIONACTUALIRPFNavigation?.TIPODERETENCIONAAPLICAR - @context.FECHAALTA.ToString().Substring(0,10) + @context.FECHAALTA?.ToString("dd/MM/yyyy") - @context.FECHABAJA + @context.FECHABAJA?.ToString("dd/MM/yyyy") @context.DOMICILIO @@ -149,9 +149,9 @@
% IRPF
@itm.IDSITUACIONACTUALIRPFNavigation?.TIPODERETENCIONAAPLICAR
Fecha alta
-
@itm.FECHAALTA
+
@itm.FECHAALTA?.ToString("dd/MM/yyyy")
Fecha baja
-
@itm.FECHABAJA
+
@itm.FECHABAJA?.ToString("dd/MM/yyyy")
Domicilio
@itm.DOMICILIO
Código postal
diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/NominaPersona.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/NominaPersona.razor index 8f9df39..4916eee 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/NominaPersona.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/NominaPersona.razor @@ -496,7 +496,11 @@ @context.CUOTA
- @context.SEGURIDADSOCIAL + @if (context.SEGURIDADSOCIAL == true) + { + + } + else { } @@ -562,10 +566,10 @@ - @context.FECHAINICIO.ToString().Substring(0,10) + @context.FECHAINICIO?.ToString("dd/MM/yyyy") - @context.FECHAFIN + @context.FECHAFIN?.ToString("dd/MM/yyyy") @context.DIAS diff --git a/Antifraude.Net/GestionPersonalWeb/Components/Pages/Nominas.razor b/Antifraude.Net/GestionPersonalWeb/Components/Pages/Nominas.razor index 57634c5..b786e65 100644 --- a/Antifraude.Net/GestionPersonalWeb/Components/Pages/Nominas.razor +++ b/Antifraude.Net/GestionPersonalWeb/Components/Pages/Nominas.razor @@ -88,16 +88,16 @@ @context.IDTIPONavigation.DESCRIPCION - @context.FECHAINICIO?.ToShortDateString() + @context.FECHAINICIO?.ToString("dd/MM/yyyy") - @context.FECHAPAGO?.ToShortDateString() + @context.FECHAPAGO?.ToString("dd/MM/yyyy") - @context.NUMERODIASLABORABLES + @Utilidades.FormatearEntero(context.NUMERODIASLABORABLES) - @context.NUMERODIASFESTIVOS + @Utilidades.FormatearEntero(context.NUMERODIASFESTIVOS) @if (context.PAGAEXTRA== true) @@ -351,4 +351,4 @@ link.click(); document.body.removeChild(link); }; - \ No newline at end of file + diff --git a/Antifraude.Net/GestionPersonalWeb/Models/Utilidades.cs b/Antifraude.Net/GestionPersonalWeb/Models/Utilidades.cs index 78cc176..a747a02 100644 --- a/Antifraude.Net/GestionPersonalWeb/Models/Utilidades.cs +++ b/Antifraude.Net/GestionPersonalWeb/Models/Utilidades.cs @@ -20,6 +20,20 @@ namespace GestionPersonalWeb.Models public class Utilidades { private static IConfiguration Conf { get; set; } + + public static string FormatearNumero(object? valor) + { + return valor is IFormattable formateable + ? formateable.ToString("N2", CultureInfo.GetCultureInfo("es-ES")) + : string.Empty; + } + + public static string FormatearEntero(object? valor) + { + return valor is IFormattable formateable + ? formateable.ToString("N0", CultureInfo.GetCultureInfo("es-ES")) + : string.Empty; + } public static string RemoveDiacritics(string text) { var normalizedString = text.Normalize(NormalizationForm.FormD); diff --git a/Antifraude.Net/bdAntifraude/clases/ParFicExcel.cs b/Antifraude.Net/bdAntifraude/clases/ParFicExcel.cs index 2bc9f8c..012a809 100644 --- a/Antifraude.Net/bdAntifraude/clases/ParFicExcel.cs +++ b/Antifraude.Net/bdAntifraude/clases/ParFicExcel.cs @@ -25,7 +25,7 @@ namespace bdAntifraude.clases } public class DatGenNom { - public List Personas = new List(); + public List Personas { get; set; } = new List(); public int Idnomina { get; set; } } }