| | | 1 | | using System.Linq; |
| | | 2 | | using FAU.Entidades; |
| | | 3 | | |
| | | 4 | | namespace FAU.Logica.DTOs; |
| | | 5 | | |
| | | 6 | | public class AguinaldoBajaDto |
| | | 7 | | { |
| | 2 | 8 | | public long Id { get; set; } |
| | 2 | 9 | | public long PersonaId { get; set; } |
| | 4 | 10 | | public string Cedula { get; set; } = string.Empty; |
| | 4 | 11 | | public string NombreCompleto { get; set; } = string.Empty; |
| | 2 | 12 | | public DateTime FechaBaja { get; set; } |
| | 2 | 13 | | public string? MotivoBajaCodigo { get; set; } |
| | 2 | 14 | | public short Anio { get; set; } |
| | 2 | 15 | | public short Mes { get; set; } |
| | 2 | 16 | | public short Semestre { get; set; } |
| | 2 | 17 | | public decimal TotalHaberesGravados { get; set; } |
| | 2 | 18 | | public short MesesComputados { get; set; } |
| | 3 | 19 | | public decimal Nominal { get; set; } |
| | 3 | 20 | | public decimal Montepio { get; set; } |
| | 3 | 21 | | public decimal Sanidad { get; set; } |
| | 2 | 22 | | public decimal TotalDescuentos { get; set; } |
| | 3 | 23 | | public decimal Liquido { get; set; } |
| | 2 | 24 | | public decimal Redondeo { get; set; } |
| | 5 | 25 | | public string Estado { get; set; } = string.Empty; |
| | 4 | 26 | | public IEnumerable<AguinaldoBajaItemDto> Items { get; set; } = new List<AguinaldoBajaItemDto>(); |
| | | 27 | | |
| | | 28 | | public static AguinaldoBajaDto FromEntity(AguinaldoBaja entity) |
| | | 29 | | { |
| | 2 | 30 | | return new AguinaldoBajaDto |
| | 2 | 31 | | { |
| | 2 | 32 | | Id = entity.Id, |
| | 2 | 33 | | PersonaId = entity.PersonaId, |
| | 2 | 34 | | Cedula = entity.Cedula, |
| | 2 | 35 | | NombreCompleto = entity.NombreCompleto, |
| | 2 | 36 | | FechaBaja = entity.FechaBaja, |
| | 2 | 37 | | MotivoBajaCodigo = entity.MotivoBajaCodigo, |
| | 2 | 38 | | Anio = entity.Anio, |
| | 2 | 39 | | Mes = entity.Mes, |
| | 2 | 40 | | Semestre = entity.Semestre, |
| | 2 | 41 | | TotalHaberesGravados = entity.TotalHaberesGravados, |
| | 2 | 42 | | MesesComputados = entity.MesesComputados, |
| | 2 | 43 | | Nominal = entity.Nominal, |
| | 2 | 44 | | Montepio = entity.Montepio, |
| | 2 | 45 | | Sanidad = entity.Sanidad, |
| | 2 | 46 | | TotalDescuentos = entity.TotalDescuentos, |
| | 2 | 47 | | Liquido = entity.Liquido, |
| | 2 | 48 | | Redondeo = entity.Redondeo, |
| | 2 | 49 | | Estado = entity.Estado, |
| | 2 | 50 | | Items = entity.Items?.Select(AguinaldoBajaItemDto.FromEntity).ToList() ?? new List<AguinaldoBajaItemDto>() |
| | 2 | 51 | | }; |
| | | 52 | | } |
| | | 53 | | } |