| | | 1 | | using FAU.Entidades; |
| | | 2 | | using FAU.Logica.DTOs; |
| | | 3 | | |
| | | 4 | | namespace FAU.Logica.Services; |
| | | 5 | | |
| | | 6 | | public interface IMotorAcumuladoresService |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Crea una nueva instancia de acumulador inicializado en cero. |
| | | 10 | | /// </summary> |
| | | 11 | | Acumuladores CrearAcumulador(); |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Sin efecto. Mantenido por compatibilidad. El bucket SIIF se deriva de Tipo en AgregarItem. |
| | | 15 | | /// </summary> |
| | | 16 | | void ValidarConfiguracion(IEnumerable<CatalogoItem> catalogo); |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Obtiene un DTO con los subtotales SIIF del acumulador para reporting. |
| | | 20 | | /// </summary> |
| | | 21 | | ReporteSiifDto ObtenerReporteSiif(Acumuladores acumuladores); |
| | | 22 | | } |
| | | 23 | | |
| | | 24 | | public class MotorAcumuladoresService : IMotorAcumuladoresService |
| | | 25 | | { |
| | | 26 | | /// <summary> |
| | | 27 | | /// Crea una nueva instancia de acumulador inicializado en cero. |
| | | 28 | | /// </summary> |
| | | 29 | | public Acumuladores CrearAcumulador() |
| | | 30 | | { |
| | 2 | 31 | | return new Acumuladores(); |
| | | 32 | | } |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// Sin efecto. El bucket SIIF se deriva del campo Tipo de cada item en Acumuladores.AgregarItem. |
| | | 36 | | /// ClasificacionSiif almacena el codigo de rubro, no el nombre del bucket. |
| | | 37 | | /// </summary> |
| | 4 | 38 | | public void ValidarConfiguracion(IEnumerable<CatalogoItem> catalogo) { } |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// Obtiene un DTO con los subtotales SIIF del acumulador para reporting. |
| | | 42 | | /// </summary> |
| | | 43 | | public ReporteSiifDto ObtenerReporteSiif(Acumuladores acumuladores) |
| | | 44 | | { |
| | 2 | 45 | | return new ReporteSiifDto |
| | 2 | 46 | | { |
| | 2 | 47 | | HabNorGrav = acumuladores.HabNorGrav, |
| | 2 | 48 | | HabsAnGrav = acumuladores.HabsAnGrav, |
| | 2 | 49 | | HabsNoGrav = acumuladores.HabsNoGrav, |
| | 2 | 50 | | BenSocGrav = acumuladores.BenSocGrav, |
| | 2 | 51 | | BenSocNoGrav = acumuladores.BenSocNoGrav, |
| | 2 | 52 | | DtoLegGrav = acumuladores.DtoLegGrav, |
| | 2 | 53 | | DtoLegNoGrav = acumuladores.DtoLegNoGrav, |
| | 2 | 54 | | DtoPerGrav = acumuladores.DtoPerGrav, |
| | 2 | 55 | | Liquido = acumuladores.Liquido |
| | 2 | 56 | | }; |
| | | 57 | | } |
| | | 58 | | } |