Refinamiento de permisos y ajustes en controles. Añade gestión sobre saldos y visualización. Entre otros..
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GestionIntegral.Api.Dtos.Contables
|
||||
{
|
||||
public class AjusteSaldoRequestDto
|
||||
{
|
||||
[Required(ErrorMessage = "El tipo de destino es obligatorio ('Distribuidores' o 'Canillas').")]
|
||||
[RegularExpression("^(Distribuidores|Canillas)$", ErrorMessage = "Destino debe ser 'Distribuidores' o 'Canillas'.")]
|
||||
public string Destino { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "El ID del destinatario es obligatorio.")]
|
||||
[Range(1, int.MaxValue, ErrorMessage = "ID de Destinatario inválido.")]
|
||||
public int IdDestino { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "El ID de la empresa es obligatorio.")]
|
||||
[Range(1, int.MaxValue, ErrorMessage = "ID de Empresa inválido.")]
|
||||
public int IdEmpresa { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "El monto del ajuste es obligatorio.")]
|
||||
// Permitir montos negativos para disminuir deuda o positivos para aumentarla
|
||||
// No se usa Range aquí para permitir ambos signos. La validación de que no sea cero se puede hacer en el servicio.
|
||||
public decimal MontoAjuste { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "La justificación del ajuste es obligatoria.")]
|
||||
[StringLength(250, MinimumLength = 5, ErrorMessage = "La justificación debe tener entre 5 y 250 caracteres.")]
|
||||
public string Justificacion { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace GestionIntegral.Api.Dtos.Contables
|
||||
{
|
||||
public class SaldoGestionDto
|
||||
{
|
||||
public int IdSaldo { get; set; }
|
||||
public string Destino { get; set; } = string.Empty;
|
||||
public int IdDestino { get; set; }
|
||||
public string NombreDestinatario { get; set; } = string.Empty;
|
||||
public int IdEmpresa { get; set; }
|
||||
public string NombreEmpresa { get; set; } = string.Empty;
|
||||
public decimal Monto { get; set; }
|
||||
public DateTime FechaUltimaModificacion { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GestionIntegral.Api.Dtos.Distribucion
|
||||
{
|
||||
public class CreateNovedadCanillaDto
|
||||
{
|
||||
// IdCanilla se tomará de la ruta o de un campo oculto si el POST es a un endpoint genérico.
|
||||
// Por ahora, lo incluimos si el endpoint es /api/novedadescanilla
|
||||
[Required]
|
||||
public int IdCanilla { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime Fecha { get; set; }
|
||||
|
||||
[MaxLength(250)]
|
||||
public string? Detalle { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace GestionIntegral.Api.Dtos.Distribucion
|
||||
{
|
||||
public class DistribuidorDropdownDto
|
||||
{
|
||||
public int IdDistribuidor { get; set; }
|
||||
public string Nombre { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace GestionIntegral.Api.Dtos.Distribucion
|
||||
{
|
||||
public class DistribuidorLookupDto
|
||||
{
|
||||
public int IdDistribuidor { get; set; }
|
||||
public string Nombre { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace GestionIntegral.Api.Dtos.Empresas
|
||||
{
|
||||
public class EmpresaDropdownDto
|
||||
{
|
||||
public int IdEmpresa { get; set; }
|
||||
public string Nombre { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace GestionIntegral.Api.Dtos.Empresas
|
||||
{
|
||||
public class EmpresaLookupDto
|
||||
{
|
||||
public int IdEmpresa { get; set; }
|
||||
public string Nombre { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace GestionIntegral.Api.Dtos.Distribucion
|
||||
{
|
||||
public class NovedadCanillaDto
|
||||
{
|
||||
public int IdNovedad { get; set; }
|
||||
public int IdCanilla { get; set; }
|
||||
public string NombreCanilla { get; set; } = string.Empty; // Para mostrar en UI
|
||||
public DateTime Fecha { get; set; }
|
||||
public string? Detalle { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GestionIntegral.Api.Dtos.Distribucion
|
||||
{
|
||||
public class UpdateNovedadCanillaDto
|
||||
{
|
||||
// No se permite cambiar IdCanilla ni Fecha
|
||||
[MaxLength(250)]
|
||||
public string? Detalle { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace GestionIntegral.Api.Dtos.Reportes
|
||||
{
|
||||
public class CanillaGananciaReporteDto // Nuevo nombre para el DTO
|
||||
{
|
||||
public string Canilla { get; set; } = string.Empty; // NomApe del canillita
|
||||
public int? Legajo { get; set; }
|
||||
public int? Francos { get; set; }
|
||||
public int? Faltas { get; set; }
|
||||
public decimal? TotalRendir { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace GestionIntegral.Api.Dtos.Reportes
|
||||
{
|
||||
public class ListadoDistCanMensualDiariosDto
|
||||
{
|
||||
public string Canilla { get; set; } = string.Empty;
|
||||
public int? ElDia { get; set; } // Cantidad
|
||||
public int? ElPlata { get; set; } // Cantidad
|
||||
public int? Vendidos { get; set; } // Suma de ElDia y ElPlata (cantidades)
|
||||
public decimal? ImporteElDia { get; set; }
|
||||
public decimal? ImporteElPlata { get; set; }
|
||||
public decimal? ImporteTotal { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace GestionIntegral.Api.Dtos.Reportes
|
||||
{
|
||||
public class ListadoDistCanMensualPubDto
|
||||
{
|
||||
public string Publicacion { get; set; } = string.Empty;
|
||||
public string Canilla { get; set; } = string.Empty; // NomApe
|
||||
public int? TotalCantSalida { get; set; }
|
||||
public int? TotalCantEntrada { get; set; }
|
||||
public decimal? TotalRendir { get; set; }
|
||||
// No es necesario 'Vendidos' ya que el SP no lo devuelve directamente para esta variante,
|
||||
// pero se puede calcular en el frontend si es necesario (Llevados - Devueltos).
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace GestionIntegral.Api.Dtos.Reportes
|
||||
{
|
||||
public class NovedadesCanillasReporteDto
|
||||
{
|
||||
public string NomApe { get; set; } = string.Empty; // Nombre del Canillita
|
||||
public DateTime Fecha { get; set; }
|
||||
public string? Detalle { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user