Compare commits
154 Commits
b33dd4f94f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c27dc2a0ba | |||
| 24b1c07342 | |||
| cb64bbc1f5 | |||
| 057310ca47 | |||
| e95c851e5b | |||
| 038faefd35 | |||
| da50c052f1 | |||
| 5781713b13 | |||
| 9f8d577265 | |||
| b594a48fde | |||
| 2e7d1e36be | |||
| dd2277fce2 | |||
| 9412556fa8 | |||
| 8c194b8441 | |||
| 1a288fcfa5 | |||
| 7dc0940001 | |||
| 5a806eda38 | |||
| 21c5c1d7d9 | |||
| 899e0a173f | |||
| 9cfe9d012e | |||
| 9e248efc84 | |||
| 84187a66df | |||
| b14c5de1b4 | |||
| d62ca7feb3 | |||
| f09c795fb0 | |||
| 19e7192a16 | |||
| 7e4d3282fb | |||
| 28c1b88a92 | |||
| 052141a45b | |||
| 9e8ccf6cfb | |||
| 9c225845c2 | |||
| f46dd82e27 | |||
| c251a0adf4 | |||
| 3e1ac6f742 | |||
| a35a3a66ea | |||
| c96d259892 | |||
| 95aa09d62a | |||
| dc52c9aff2 | |||
| d60ec7ffd7 | |||
| 03cda5cdbe | |||
| c6aec21e70 | |||
| a1a185c7b6 | |||
| 6921effab0 | |||
| cea51ee93c | |||
| ea225d650e | |||
| ff02cef2ca | |||
| 3c522a33af | |||
| b553affe7f | |||
| ab232c481d | |||
| 6a1d935a61 | |||
| 68376291da | |||
| 26856f26bf | |||
| 230332568f | |||
| 99d3db68d9 | |||
| b5a68d1825 | |||
| de54e5e200 | |||
| 673fd55037 | |||
| edb8a5e56c | |||
| fd11ef9005 | |||
| 229eb937f5 | |||
| a5bcbefa52 | |||
| 1373bcf9ca | |||
| 3a0f0a4bf8 | |||
| 16f991e04b | |||
| 26ffc7c0b2 | |||
| 35f62c3322 | |||
| a80a6f964f | |||
| b4b4f8b322 | |||
| 60a27621c1 | |||
| 221c41dc7d | |||
| 8561c84d71 | |||
| d30a0033f7 | |||
| bf275c1cf2 | |||
| 716707cd9f | |||
| f97e8ead15 | |||
| 703b8766b1 | |||
| 4b94377827 | |||
| 975a1e6d26 | |||
| 8591945eb4 | |||
| 5da5a0edea | |||
| 88c0762962 | |||
| f4601b7520 | |||
| dc1be0a073 | |||
| b957a3ef5b | |||
| 5df3f661e0 | |||
| b4b596efd9 | |||
| c07a4aa0f4 | |||
| f0f3c2b771 | |||
| 373449ba48 | |||
| 6d6ec22258 | |||
| 19ea4b23a0 | |||
| d514864986 | |||
| 29ba94e425 | |||
| c7d75ce76d | |||
| 6a2729e25b | |||
| 41282b61cd | |||
| bf91f9dc7c | |||
| 673fde163d | |||
| 88c9f22108 | |||
| 2f5a159650 | |||
| 08a7c27e08 | |||
| 4448f02df0 | |||
| 7e84c3f74c | |||
| 662da26ce8 | |||
| 0ef4e2d8f0 | |||
| 55ec8b5612 | |||
| bdcf8c60b7 | |||
| 481fce8115 | |||
| 1d9e23cc66 | |||
| 5d2c577c5e | |||
| 9e268e7fd4 | |||
| ee9e125b17 | |||
| 722c6ee4b2 | |||
| 0ea909db23 | |||
| 5af737fdfe | |||
| cd7b51b29a | |||
| adef45c466 | |||
| 6bafe0541d | |||
| a544fd7438 | |||
| 20d04b947b | |||
| 34e98b283f | |||
| a7c8944e78 | |||
| e84a6fb531 | |||
| e39c8a9491 | |||
| 8da73278db | |||
| ea2ee0c2fa | |||
| 4c5d920021 | |||
| 84332c947c | |||
| 7b73bb3acf | |||
| c36a742c00 | |||
| 27edd88f63 | |||
| 3c8a66c09b | |||
| 906f73640c | |||
| 5bb3d064e4 | |||
| 55765f9846 | |||
| 66c091eb79 | |||
| 47b8b47265 | |||
| 47bc88a248 | |||
| 6941de5276 | |||
| f841252783 | |||
| 2febe9967b | |||
| 3b21890797 | |||
| ccf1647a3d | |||
| 3ff5197637 | |||
| 0bc455450a | |||
| 56eb65dbdf | |||
| ca729bd875 | |||
| b4a219795a | |||
| 4b95de9ba2 | |||
| 8f488405ee | |||
| 373766a415 | |||
| 1526579b66 | |||
| 72f55b72d8 | |||
| 21f4facb31 |
71
.gitea/workflows/deploy.yml
Normal file
71
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
name: Optimized Build and Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
remote-build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Run Optimized CI/CD Process on Host via SSH
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Configura SSH (sin cambios)
|
||||||
|
apt-get update -qq && apt-get install -y openssh-client git
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.PROD_SERVER_SSH_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
ssh-keyscan -H ${{ secrets.PROD_SERVER_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
# Ejecuta en el host remoto
|
||||||
|
ssh ${{ secrets.PROD_SERVER_USER }}@${{ secrets.PROD_SERVER_HOST }} << 'EOSSH'
|
||||||
|
set -e
|
||||||
|
echo "--- INICIO DEL DESPLIEGUE OPTIMIZADO ---"
|
||||||
|
|
||||||
|
# 1. Preparar entorno
|
||||||
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
REPO_OWNER="dmolinari"
|
||||||
|
REPO_NAME="gestionintegralweb"
|
||||||
|
GITEA_REPO_PATH="/var/lib/docker/volumes/gitea-stack_gitea-data/_data/git/repositories/${REPO_OWNER}/${REPO_NAME}.git"
|
||||||
|
|
||||||
|
echo "Clonando repositorio desde: $GITEA_REPO_PATH ..."
|
||||||
|
git clone "$GITEA_REPO_PATH" "$TEMP_DIR"
|
||||||
|
cd "$TEMP_DIR"
|
||||||
|
git checkout "${{ gitea.sha }}"
|
||||||
|
|
||||||
|
# 2. Construcción paralela
|
||||||
|
build_image() {
|
||||||
|
local dockerfile=$1
|
||||||
|
local image_name=$2
|
||||||
|
local context=$3
|
||||||
|
|
||||||
|
echo "Construyendo $image_name..."
|
||||||
|
docker build \
|
||||||
|
-t "$image_name" \
|
||||||
|
-f "$dockerfile" \
|
||||||
|
"$context"
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Construyendo imágenes en paralelo..."
|
||||||
|
(build_image "Backend/GestionIntegral.Api/Dockerfile" "dmolinari/gestionintegralweb-backend:latest" ".") &
|
||||||
|
(build_image "Frontend/Dockerfile" "dmolinari/gestionintegralweb-frontend:latest" ".") &
|
||||||
|
wait
|
||||||
|
|
||||||
|
# 3. Despliegue con Docker Compose
|
||||||
|
cd /opt/gestion-integral
|
||||||
|
export DB_SA_PASSWORD='${{ secrets.DB_SA_PASSWORD_SECRET }}'
|
||||||
|
|
||||||
|
echo "Recreando servicios de la aplicación..."
|
||||||
|
docker compose up -d --force-recreate
|
||||||
|
|
||||||
|
# 4. Limpieza
|
||||||
|
echo "Realizando limpieza..."
|
||||||
|
rm -rf "$TEMP_DIR"
|
||||||
|
docker image prune -f --filter "dangling=true"
|
||||||
|
|
||||||
|
echo "--- DESPLIEGUE COMPLETADO CON ÉXITO ---"
|
||||||
|
EOSSH
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -19,9 +19,6 @@ lerna-debug.log*
|
|||||||
|
|
||||||
# Variables de entorno
|
# Variables de entorno
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Nunca subas tus claves de API, contraseñas de BD, etc.
|
|
||||||
# Crea un archivo .env.example con las variables vacías para guiar a otros desarrolladores.
|
|
||||||
.env
|
|
||||||
.env.local
|
.env.local
|
||||||
.env.development.local
|
.env.development.local
|
||||||
.env.test.local
|
.env.test.local
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using GestionIntegral.Api.Dtos.Anomalia;
|
||||||
|
using GestionIntegral.Api.Services.Anomalia;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Anomalia
|
||||||
|
{
|
||||||
|
[Route("api/alertas")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class AlertasController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IAlertaService _alertaService;
|
||||||
|
|
||||||
|
public AlertasController(IAlertaService alertaService)
|
||||||
|
{
|
||||||
|
_alertaService = alertaService;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/alertas
|
||||||
|
[HttpGet]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<AlertaGenericaDto>), StatusCodes.Status200OK)]
|
||||||
|
public async Task<IActionResult> GetAlertasNoLeidas()
|
||||||
|
{
|
||||||
|
var alertas = await _alertaService.ObtenerAlertasNoLeidasAsync();
|
||||||
|
return Ok(alertas);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/alertas/{idAlerta}/marcar-leida
|
||||||
|
[HttpPost("{idAlerta:int}/marcar-leida")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> MarcarComoLeida(int idAlerta)
|
||||||
|
{
|
||||||
|
var (exito, error) = await _alertaService.MarcarComoLeidaAsync(idAlerta);
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
return NotFound(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/alertas/marcar-grupo-leido
|
||||||
|
[HttpPost("marcar-grupo-leido")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
public async Task<IActionResult> MarcarGrupoLeido([FromBody] MarcarGrupoLeidoRequestDto request)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid)
|
||||||
|
{
|
||||||
|
return BadRequest(ModelState);
|
||||||
|
}
|
||||||
|
var (exito, error) = await _alertaService.MarcarGrupoComoLeidoAsync(request.TipoAlerta, request.IdEntidad);
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DTO para el cuerpo del request de marcar grupo
|
||||||
|
public class MarcarGrupoLeidoRequestDto
|
||||||
|
{
|
||||||
|
[System.ComponentModel.DataAnnotations.Required]
|
||||||
|
public string TipoAlerta { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[System.ComponentModel.DataAnnotations.Required]
|
||||||
|
public int IdEntidad { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Comunicaciones;
|
||||||
|
using GestionIntegral.Api.Services.Comunicaciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Comunicaciones
|
||||||
|
{
|
||||||
|
[Route("api/lotes-envio")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class LotesEnvioController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IEmailLogService _emailLogService;
|
||||||
|
|
||||||
|
public LotesEnvioController(IEmailLogService emailLogService)
|
||||||
|
{
|
||||||
|
_emailLogService = emailLogService;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/lotes-envio/123/detalles
|
||||||
|
[HttpGet("{idLote:int}/detalles")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<EmailLogDto>), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> GetDetallesLote(int idLote)
|
||||||
|
{
|
||||||
|
// Reutilizamos un permiso existente, ya que esta es una función de auditoría relacionada.
|
||||||
|
var tienePermiso = User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == "SU006");
|
||||||
|
if (!tienePermiso)
|
||||||
|
{
|
||||||
|
return Forbid();
|
||||||
|
}
|
||||||
|
|
||||||
|
var detalles = await _emailLogService.ObtenerDetallesPorLoteId(idLote);
|
||||||
|
|
||||||
|
// Devolvemos OK con un array vacío si no hay resultados, el frontend lo manejará.
|
||||||
|
return Ok(detalles);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -50,10 +50,19 @@ namespace GestionIntegral.Api.Controllers.Distribucion
|
|||||||
public async Task<IActionResult> GetAllCanillas([FromQuery] string? nomApe, [FromQuery] int? legajo, [FromQuery] bool? esAccionista, [FromQuery] bool? soloActivos = true)
|
public async Task<IActionResult> GetAllCanillas([FromQuery] string? nomApe, [FromQuery] int? legajo, [FromQuery] bool? esAccionista, [FromQuery] bool? soloActivos = true)
|
||||||
{
|
{
|
||||||
if (!TienePermiso(PermisoVer)) return Forbid();
|
if (!TienePermiso(PermisoVer)) return Forbid();
|
||||||
var canillitas = await _canillaService.ObtenerTodosAsync(nomApe, legajo, soloActivos, esAccionista); // <<-- Pasa el parámetro
|
var canillitas = await _canillaService.ObtenerTodosAsync(nomApe, legajo, soloActivos, esAccionista);
|
||||||
return Ok(canillitas);
|
return Ok(canillitas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet("dropdown")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<CanillaDropdownDto>), StatusCodes.Status200OK)]
|
||||||
|
public async Task<IActionResult> GetAllDropdownCanillas([FromQuery] bool? esAccionista, [FromQuery] bool? soloActivos = true)
|
||||||
|
{
|
||||||
|
var canillitas = await _canillaService.ObtenerTodosDropdownAsync(esAccionista, soloActivos);
|
||||||
|
return Ok(canillitas);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// GET: api/canillas/{id}
|
// GET: api/canillas/{id}
|
||||||
[HttpGet("{id:int}", Name = "GetCanillaById")]
|
[HttpGet("{id:int}", Name = "GetCanillaById")]
|
||||||
[ProducesResponseType(typeof(CanillaDto), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(CanillaDto), StatusCodes.Status200OK)]
|
||||||
|
|||||||
@@ -64,6 +64,23 @@ namespace GestionIntegral.Api.Controllers.Distribucion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet("dropdown")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<OtroDestinoDropdownDto>), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<IActionResult> GetAllOtrosDestinosDropdown()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var destinos = await _otroDestinoService.ObtenerTodosDropdownAsync();
|
||||||
|
return Ok(destinos);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener Otros Destinos para dropdown.");
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError, "Error interno al obtener la lista de destinos.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// GET: api/otrosdestinos/{id}
|
// GET: api/otrosdestinos/{id}
|
||||||
[HttpGet("{id:int}", Name = "GetOtroDestinoById")]
|
[HttpGet("{id:int}", Name = "GetOtroDestinoById")]
|
||||||
[ProducesResponseType(typeof(OtroDestinoDto), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(OtroDestinoDto), StatusCodes.Status200OK)]
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace GestionIntegral.Api.Controllers.Distribucion
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
[ProducesResponseType(typeof(IEnumerable<PublicacionDto>), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(IEnumerable<PublicacionDto>), StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
public async Task<IActionResult> GetAllPublicaciones([FromQuery] string? nombre, [FromQuery] int? idEmpresa, [FromQuery] bool? soloHabilitadas = true)
|
public async Task<IActionResult> GetAllPublicaciones([FromQuery] string? nombre, [FromQuery] int? idEmpresa, [FromQuery] bool? soloHabilitadas)
|
||||||
{
|
{
|
||||||
if (!TienePermiso(PermisoVer)) return Forbid();
|
if (!TienePermiso(PermisoVer)) return Forbid();
|
||||||
var publicaciones = await _publicacionService.ObtenerTodasAsync(nombre, idEmpresa, soloHabilitadas);
|
var publicaciones = await _publicacionService.ObtenerTodasAsync(nombre, idEmpresa, soloHabilitadas);
|
||||||
@@ -54,7 +54,7 @@ namespace GestionIntegral.Api.Controllers.Distribucion
|
|||||||
[ProducesResponseType(typeof(IEnumerable<PublicacionDropdownDto>), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(IEnumerable<PublicacionDropdownDto>), StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
// No se verifica permiso DP001, solo requiere autenticación general ([Authorize] del controlador)
|
// No se verifica permiso DP001, solo requiere autenticación general ([Authorize] del controlador)
|
||||||
public async Task<IActionResult> GetPublicacionesForDropdown([FromQuery] bool soloHabilitadas = true)
|
public async Task<IActionResult> GetPublicacionesForDropdown([FromQuery] bool? soloHabilitadas)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,6 +67,23 @@ namespace GestionIntegral.Api.Controllers.Impresion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GET: api/estadosbobina/dropdown
|
||||||
|
[HttpGet("dropdown")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<EstadoBobinaDto>), StatusCodes.Status200OK)]
|
||||||
|
public async Task<IActionResult> GetAllDropdownEstadosBobina()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var estados = await _estadoBobinaService.ObtenerTodosDropdownAsync();
|
||||||
|
return Ok(estados);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener todos los Estados de Bobina.");
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError, "Error interno al obtener los estados de bobina.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// GET: api/estadosbobina/{id}
|
// GET: api/estadosbobina/{id}
|
||||||
[HttpGet("{id:int}", Name = "GetEstadoBobinaById")]
|
[HttpGet("{id:int}", Name = "GetEstadoBobinaById")]
|
||||||
[ProducesResponseType(typeof(EstadoBobinaDto), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(EstadoBobinaDto), StatusCodes.Status200OK)]
|
||||||
|
|||||||
@@ -62,6 +62,25 @@ namespace GestionIntegral.Api.Controllers.Impresion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GET: api/tiposbobina/dropdown
|
||||||
|
[HttpGet("dropdown")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<TipoBobinaDto>), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<IActionResult> GetAllTiposBobina()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var tiposBobina = await _tipoBobinaService.ObtenerTodosDropdownAsync();
|
||||||
|
return Ok(tiposBobina);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener todos los Tipos de Bobina.");
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError, "Error interno al obtener los tipos de bobina.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// GET: api/tiposbobina/{id}
|
// GET: api/tiposbobina/{id}
|
||||||
// Permiso: IB006 (Ver Tipos Bobinas)
|
// Permiso: IB006 (Ver Tipos Bobinas)
|
||||||
[HttpGet("{id:int}", Name = "GetTipoBobinaById")]
|
[HttpGet("{id:int}", Name = "GetTipoBobinaById")]
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ namespace GestionIntegral.Api.Controllers.Impresion
|
|||||||
// Permisos para Tiradas (IT001 a IT003)
|
// Permisos para Tiradas (IT001 a IT003)
|
||||||
private const string PermisoVerTiradas = "IT001";
|
private const string PermisoVerTiradas = "IT001";
|
||||||
private const string PermisoRegistrarTirada = "IT002";
|
private const string PermisoRegistrarTirada = "IT002";
|
||||||
private const string PermisoEliminarTirada = "IT003"; // Asumo que se refiere a eliminar una tirada completa (cabecera y detalles)
|
private const string PermisoEliminarTirada = "IT003";
|
||||||
|
private const string PermisoModificarTirada = "IT004";
|
||||||
|
|
||||||
public TiradasController(ITiradaService tiradaService, ILogger<TiradasController> logger)
|
public TiradasController(ITiradaService tiradaService, ILogger<TiradasController> logger)
|
||||||
{
|
{
|
||||||
@@ -83,6 +84,43 @@ namespace GestionIntegral.Api.Controllers.Impresion
|
|||||||
return StatusCode(StatusCodes.Status201Created, tiradaCreada);
|
return StatusCode(StatusCodes.Status201Created, tiradaCreada);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPut]
|
||||||
|
[ProducesResponseType(typeof(TiradaDto), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> ModificarTirada(
|
||||||
|
[FromQuery, BindRequired] DateTime fecha,
|
||||||
|
[FromQuery, BindRequired] int idPublicacion,
|
||||||
|
[FromQuery, BindRequired] int idPlanta,
|
||||||
|
[FromBody] UpdateTiradaRequestDto updateDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoModificarTirada)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (tiradaActualizada, error) = await _tiradaService.ModificarTiradaCompletaAsync(fecha, idPublicacion, idPlanta, updateDto, userId.Value);
|
||||||
|
|
||||||
|
if (error != null)
|
||||||
|
{
|
||||||
|
// Chequear si el error es porque no se encontró la tirada.
|
||||||
|
if (error.StartsWith("No se encontró la tirada"))
|
||||||
|
{
|
||||||
|
return NotFound(new { message = error });
|
||||||
|
}
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tiradaActualizada == null)
|
||||||
|
{
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError, "Error interno al modificar la tirada.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok(tiradaActualizada);
|
||||||
|
}
|
||||||
|
|
||||||
// DELETE: api/tiradas
|
// DELETE: api/tiradas
|
||||||
// Se identifica la tirada a eliminar por su combinación única de Fecha, IdPublicacion, IdPlanta
|
// Se identifica la tirada a eliminar por su combinación única de Fecha, IdPublicacion, IdPlanta
|
||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ComparativaConsumoBobinasDocument : IDocument
|
||||||
|
{
|
||||||
|
public ComparativaConsumoBobinasViewModel Model { get; }
|
||||||
|
|
||||||
|
public ComparativaConsumoBobinasDocument(ComparativaConsumoBobinasViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Consumo de Bobinas - Comparativa Mensual").SemiBold().FontSize(14);
|
||||||
|
|
||||||
|
string subTitle = Model.EsConsolidado ? "Consolidado" : $"Planta: {Model.NombrePlanta}";
|
||||||
|
column.Item().AlignCenter().Text(subTitle).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
// Le damos una proporción menor al texto de la izquierda (que es corto y fijo).
|
||||||
|
row.RelativeItem(1).Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha del Reporte: ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaReporte);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Le damos una proporción mayor al texto de la derecha (que es largo y variable).
|
||||||
|
// El factor "2" significa que tendrá el doble de espacio disponible que el item con factor "1".
|
||||||
|
row.RelativeItem(2).AlignRight().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Meses: ").SemiBold().FontSize(12);
|
||||||
|
text.Span($"{Model.MesA} (Mes A) contra {Model.MesB} (Mes B)").FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(3); // Tipo Bobina
|
||||||
|
columns.RelativeColumn(1); columns.RelativeColumn(1); columns.RelativeColumn(1); // Grupo Cantidad
|
||||||
|
columns.RelativeColumn(1); columns.RelativeColumn(1); columns.RelativeColumn(1); // Grupo Kilos
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
// Fila 1 del Encabezado
|
||||||
|
header.Cell().RowSpan(2).Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignMiddle().Text("Tipo Bobina").SemiBold();
|
||||||
|
header.Cell().ColumnSpan(3).Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignCenter().Text("Cantidad Bobinas").SemiBold();
|
||||||
|
header.Cell().ColumnSpan(3).Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignCenter().Text("Kilos Utilizados").SemiBold();
|
||||||
|
|
||||||
|
// Fila 2 del Encabezado
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Mes A").SemiBold();
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Mes B").SemiBold();
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Diferencia").SemiBold();
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Kg Mes A").SemiBold();
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Kg Mes B").SemiBold();
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Diferencia").SemiBold();
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Detalles.OrderBy(x => x.TipoBobina))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.TipoBobina);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.BobinasUtilizadasMesA.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.BobinasUtilizadasMesB.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.DiferenciaBobinasUtilizadas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.KilosUtilizadosMesA.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.KilosUtilizadosMesB.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.DiferenciaKilosUtilizados.ToString("N0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de Totales
|
||||||
|
var style = TextStyle.Default.SemiBold();
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span("Totales").Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.BobinasUtilizadasMesA).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.BobinasUtilizadasMesB).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.DiferenciaBobinasUtilizadas).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.KilosUtilizadosMesA).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.KilosUtilizadosMesB).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.DiferenciaKilosUtilizados).ToString("N0")).Style(style));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ConsumoBobinasPublicacionDocument : IDocument
|
||||||
|
{
|
||||||
|
public ConsumoBobinasPublicacionViewModel Model { get; }
|
||||||
|
|
||||||
|
public ConsumoBobinasPublicacionDocument(ConsumoBobinasPublicacionViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1.5f, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Consumo de Bobinas por Publicaciones").SemiBold().FontSize(14);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha del Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Periodo: ").SemiBold(); text.Span($"{Model.FechaDesde} - {Model.FechaHasta}"); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2); // Planta
|
||||||
|
columns.RelativeColumn(3); // Publicación
|
||||||
|
columns.RelativeColumn(1.5f); // Kilos
|
||||||
|
columns.RelativeColumn(1.5f); // Cant. Bobinas
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Planta");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Publicación");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Kilos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Cant. Bobinas");
|
||||||
|
});
|
||||||
|
|
||||||
|
var gruposPorPlanta = Model.Detalles.GroupBy(p => p.NombrePlanta);
|
||||||
|
|
||||||
|
foreach (var grupoPlanta in gruposPorPlanta)
|
||||||
|
{
|
||||||
|
var primeraFilaDePlanta = true;
|
||||||
|
foreach (var detalle in grupoPlanta.OrderBy(d => d.NombrePublicacion))
|
||||||
|
{
|
||||||
|
// Celda de Planta (solo en la primera fila del grupo)
|
||||||
|
if (primeraFilaDePlanta)
|
||||||
|
{
|
||||||
|
table.Cell().RowSpan((uint)grupoPlanta.Count()).Border(1).Padding(3).AlignTop().Text(grupoPlanta.Key).SemiBold();
|
||||||
|
primeraFilaDePlanta = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3).Text(detalle.NombrePublicacion);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(detalle.TotalKilos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(detalle.CantidadBobinas.ToString("N0"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de Totales Generales
|
||||||
|
var totalGeneralKilos = Model.Detalles.Sum(d => d.TotalKilos);
|
||||||
|
var totalGeneralBobinas = Model.Detalles.Sum(d => d.CantidadBobinas);
|
||||||
|
|
||||||
|
table.Cell().ColumnSpan(2).BorderTop(1.5f).BorderColor(Colors.Black).Padding(3).AlignRight().Text("Totales").ExtraBold();
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).Padding(3).AlignRight().Text(t => t.Span(totalGeneralKilos.ToString("N0")).ExtraBold());
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).Padding(3).AlignRight().Text(t => t.Span(totalGeneralBobinas.ToString("N0")).ExtraBold());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes;
|
||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ConsumoBobinasSeccionDocument : IDocument
|
||||||
|
{
|
||||||
|
public ConsumoBobinasSeccionViewModel Model { get; }
|
||||||
|
|
||||||
|
public ConsumoBobinasSeccionDocument(ConsumoBobinasSeccionViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1.5f, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Consumo de Bobinas por Secciones").SemiBold().FontSize(14);
|
||||||
|
|
||||||
|
string subTitle = Model.EsConsolidado ? "Consolidado" : $"Planta: {Model.NombrePlanta}";
|
||||||
|
column.Item().AlignCenter().Text(subTitle).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha del Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Periodo: ").SemiBold(); text.Span($"{Model.FechaDesde} - {Model.FechaHasta}"); });
|
||||||
|
});
|
||||||
|
|
||||||
|
// Encabezado de la tabla principal
|
||||||
|
column.Item().PaddingTop(10).BorderBottom(1.5f).BorderColor(Colors.Black).Padding(4).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem(1.5f).Text("Publicación").SemiBold();
|
||||||
|
row.RelativeItem(1.5f).Text("Sección").SemiBold();
|
||||||
|
row.RelativeItem(3).Text("Bobina").SemiBold();
|
||||||
|
row.RelativeItem(1).AlignRight().Text("Cant. Bobinas").SemiBold();
|
||||||
|
row.RelativeItem(1).AlignRight().Text("Kilos").SemiBold();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
var gruposPorPublicacion = Model.Detalles.GroupBy(p => p.NombrePublicacion);
|
||||||
|
|
||||||
|
foreach (var grupoPub in gruposPorPublicacion)
|
||||||
|
{
|
||||||
|
column.Item().Element(c => ComposePublicacionSection(c, grupoPub));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de Totales Generales al final
|
||||||
|
var totalGeneralBobinas = Model.Detalles.Sum(d => d.CantidadBobinas);
|
||||||
|
var totalGeneralKilos = Model.Detalles.Sum(d => d.TotalKilos);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(10).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem(6).AlignRight().Text("Total General").ExtraBold().FontSize(12);
|
||||||
|
row.RelativeItem(1).AlignRight().Text(totalGeneralBobinas.ToString("N0")).ExtraBold().FontSize(12);
|
||||||
|
row.RelativeItem(1).AlignRight().Text(totalGeneralKilos.ToString("N0")).ExtraBold().FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- COMPONENTE PARA UNA PUBLICACIÓN ENTERA ---
|
||||||
|
void ComposePublicacionSection(IContainer container, IGrouping<string, ConsumoBobinasSeccionDto> grupoPub)
|
||||||
|
{
|
||||||
|
container.Row(row =>
|
||||||
|
{
|
||||||
|
// Columna 1: Nombre de la Publicación
|
||||||
|
row.RelativeItem(1.5f).BorderBottom(1).BorderLeft(1).BorderRight(1).BorderColor(Colors.Grey.Medium).Padding(3).Text(grupoPub.Key).SemiBold();
|
||||||
|
|
||||||
|
// Columna 2: Contiene todas las sub-tablas de secciones
|
||||||
|
row.RelativeItem(6.5f).Column(seccionesColumn =>
|
||||||
|
{
|
||||||
|
var gruposPorSeccion = grupoPub.GroupBy(s => s.NombreSeccion);
|
||||||
|
foreach(var grupoSec in gruposPorSeccion)
|
||||||
|
{
|
||||||
|
seccionesColumn.Item().Element(c => ComposeSeccionTable(c, grupoSec));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- COMPONENTE PARA LA TABLA DE UNA SECCIÓN ---
|
||||||
|
void ComposeSeccionTable(IContainer container, IGrouping<string, ConsumoBobinasSeccionDto> grupoSec)
|
||||||
|
{
|
||||||
|
container.Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(1.5f); // Sección
|
||||||
|
columns.RelativeColumn(3); // Bobina
|
||||||
|
columns.RelativeColumn(1); // Cantidad
|
||||||
|
columns.RelativeColumn(1); // Kilos
|
||||||
|
});
|
||||||
|
|
||||||
|
// Filas de detalle
|
||||||
|
foreach (var detalle in grupoSec.OrderBy(d => d.NombreBobina))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Medium).Padding(3).Text(grupoSec.Key);
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Medium).Padding(3).Text(detalle.NombreBobina);
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Medium).Padding(3).AlignRight().Text(detalle.CantidadBobinas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Medium).Padding(3).AlignRight().Text(detalle.TotalKilos.ToString("N0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de total de la sección
|
||||||
|
var totalCantSeccion = grupoSec.Sum(d => d.CantidadBobinas);
|
||||||
|
var totalKilosSeccion = grupoSec.Sum(d => d.TotalKilos);
|
||||||
|
|
||||||
|
table.Cell().ColumnSpan(2).Border(1).BorderColor(Colors.Grey.Medium).AlignRight().Padding(3).Text("Total Sección").SemiBold();
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Medium).Padding(3).AlignRight().Text(t => t.Span(totalCantSeccion.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Medium).Padding(3).AlignRight().Text(t => t.Span(totalKilosSeccion.ToString("N0")).SemiBold());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ControlDevolucionesDocument : IDocument
|
||||||
|
{
|
||||||
|
public ControlDevolucionesViewModel Model { get; }
|
||||||
|
|
||||||
|
public ControlDevolucionesDocument(ControlDevolucionesViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
public DocumentSettings GetSettings() => DocumentSettings.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Roboto").FontSize(11));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("Control de Devoluciones").SemiBold().FontSize(16);
|
||||||
|
column.Item().AlignCenter().Text("Canillas / Accionistas").FontSize(13);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(15);
|
||||||
|
|
||||||
|
column.Item().Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha Consultada: ").SemiBold();
|
||||||
|
text.Span(Model.FechaConsultada);
|
||||||
|
});
|
||||||
|
row.RelativeItem().AlignRight().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Cantidad Canillas: ").SemiBold();
|
||||||
|
text.Span(Model.CantidadCanillas.ToString());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5).Border(1).Background(Colors.Grey.Lighten3).AlignCenter().Padding(2).Text(Model.NombreEmpresa).SemiBold();
|
||||||
|
|
||||||
|
column.Item().Border(1).Padding(10).Column(innerCol =>
|
||||||
|
{
|
||||||
|
innerCol.Spacing(5);
|
||||||
|
|
||||||
|
// Fila de "Ingresados por Remito" con borde inferior sólido.
|
||||||
|
innerCol.Item().BorderBottom(1, Unit.Point).BorderColor(Colors.Grey.Medium).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text("Ingresados por Remito:").SemiBold();
|
||||||
|
row.RelativeItem().AlignRight().Text(Model.TotalIngresadosPorRemito.ToString("N0"));
|
||||||
|
}); // <-- SOLUCIÓN: Borde sólido simple.
|
||||||
|
|
||||||
|
foreach (var item in Model.Detalles)
|
||||||
|
{
|
||||||
|
var totalSeccion = item.Devueltos - item.Llevados;
|
||||||
|
innerCol.Item().PaddingTop(5).Row(row =>
|
||||||
|
{
|
||||||
|
row.ConstantItem(100).Text(item.Tipo).SemiBold();
|
||||||
|
|
||||||
|
row.RelativeItem().Column(sub =>
|
||||||
|
{
|
||||||
|
sub.Spacing(2);
|
||||||
|
sub.Item().Row(r => {
|
||||||
|
r.RelativeItem().Text("Llevados");
|
||||||
|
r.RelativeItem().AlignRight().Text($"-{item.Llevados:N0}");
|
||||||
|
});
|
||||||
|
sub.Item().Row(r => {
|
||||||
|
r.RelativeItem().Text("Devueltos");
|
||||||
|
r.RelativeItem().AlignRight().Text($"{item.Devueltos:N0}");
|
||||||
|
});
|
||||||
|
sub.Item().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(2).Row(r => {
|
||||||
|
r.RelativeItem().Text(t => t.Span("Total").SemiBold());
|
||||||
|
r.RelativeItem().AlignRight().Text(t => t.Span(totalSeccion.ToString("N0")).SemiBold());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
column.Item().PaddingTop(10).Column(finalCol =>
|
||||||
|
{
|
||||||
|
finalCol.Spacing(2);
|
||||||
|
|
||||||
|
Action<RowDescriptor, string, string, bool> AddTotalRow = (row, label, value, isBold) =>
|
||||||
|
{
|
||||||
|
var text = row.RelativeItem().Text(label);
|
||||||
|
if (isBold) text.SemiBold();
|
||||||
|
|
||||||
|
var valueText = row.ConstantItem(80).AlignRight().Text(value);
|
||||||
|
if (isBold) valueText.SemiBold();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Usamos bordes superiores para separar las líneas de total
|
||||||
|
finalCol.Item().BorderTop(2f).BorderColor(Colors.Black).PaddingTop(2).Row(row => AddTotalRow(row, "Total Devolución a la Fecha", Model.TotalDevolucionALaFecha.ToString("N0"), false));
|
||||||
|
finalCol.Item().BorderTop(1).BorderColor(Colors.Grey.Lighten2).PaddingTop(2).Row(row => AddTotalRow(row, "Total Devolución Días Anteriores", Model.TotalDevolucionDiasAnteriores.ToString("N0"), false));
|
||||||
|
finalCol.Item().BorderTop(1).BorderColor(Colors.Grey.Lighten2).PaddingTop(2).Row(row => AddTotalRow(row, "Total Devolución", Model.TotalDevolucionGeneral.ToString("N0"), false));
|
||||||
|
finalCol.Item().BorderTop(2f).BorderColor(Colors.Black).PaddingTop(5).Row(row => AddTotalRow(row, "Sin Cargo", Model.TotalSinCargo.ToString("N0"), false));
|
||||||
|
finalCol.Item().BorderTop(1).BorderColor(Colors.Grey.Lighten2).PaddingTop(2).Row(row => AddTotalRow(row, "Sobrantes", $"-{Model.TotalSobrantes.ToString("N0")}", false));
|
||||||
|
finalCol.Item().BorderTop(1).BorderColor(Colors.Grey.Lighten2).BorderBottom(1).BorderColor(Colors.Grey.Lighten2).PaddingTop(5).Row(row => AddTotalRow(row, "Diferencia", Model.DiferenciaFinal.ToString("N0"), true));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,260 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class CuentasDistribuidorDocument : IDocument
|
||||||
|
{
|
||||||
|
public CuentasDistribuidorViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR", false)
|
||||||
|
{
|
||||||
|
NumberFormat = { CurrencySymbol = "$" }
|
||||||
|
};
|
||||||
|
|
||||||
|
public CuentasDistribuidorDocument(CuentasDistribuidorViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
public DocumentSettings GetSettings() => DocumentSettings.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); x.Span(" de "); x.TotalPages(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text($"Fecha de Reporte {Model.FechaReporte}");
|
||||||
|
row.RelativeItem().AlignCenter().Text("Cuenta De Distribuidor").SemiBold().FontSize(14);
|
||||||
|
row.RelativeItem();
|
||||||
|
});
|
||||||
|
|
||||||
|
column.Item().AlignCenter().Text(Model.NombreDistribuidor).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(2, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem(2);
|
||||||
|
row.RelativeItem(8).AlignCenter().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha Consultada: Desde ").SemiBold();
|
||||||
|
text.Span(Model.FechaDesde);
|
||||||
|
text.Span(" Hasta ").SemiBold();
|
||||||
|
text.Span(Model.FechaHasta);
|
||||||
|
});
|
||||||
|
row.RelativeItem(2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(20);
|
||||||
|
|
||||||
|
if (Model.Movimientos.Any()) column.Item().Element(ComposeMovimientosTable);
|
||||||
|
if (Model.Pagos.Any()) column.Item().Element(ComposePagosTable);
|
||||||
|
if (Model.DebitosCreditos.Any()) column.Item().Element(ComposeDebCredTable);
|
||||||
|
|
||||||
|
column.Item().Element(ComposeResumenPeriodo);
|
||||||
|
column.Item().Element(ComposeSaldoFinal);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeMovimientosTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(5).Text("Movimientos").SemiBold().FontSize(11);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(60);
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
columns.ConstantColumn(50);
|
||||||
|
columns.ConstantColumn(50);
|
||||||
|
columns.RelativeColumn(1.5f);
|
||||||
|
columns.RelativeColumn(1.5f);
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Fecha");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Publicacion");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Remito");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Cantidad");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Debe");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Haber");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Saldo");
|
||||||
|
});
|
||||||
|
|
||||||
|
decimal saldoAcumulado = 0; // Inicia en CERO
|
||||||
|
foreach (var item in Model.Movimientos.OrderBy(m => m.Fecha))
|
||||||
|
{
|
||||||
|
saldoAcumulado += (item.Debe - item.Haber);
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Fecha.ToString("dd/MM/yyyy"));
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Publicacion);
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Remito);
|
||||||
|
table.Cell().Border(1).Padding(2).AlignCenter().Text(item.Cantidad.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.Debe.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.Haber.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(saldoAcumulado.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Cell().ColumnSpan(4).Border(1).AlignRight().Padding(2).Text(t => t.Span("Totales").SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(Model.Movimientos.Sum(x => x.Debe).ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(Model.Movimientos.Sum(x => x.Haber).ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(saldoAcumulado.ToString("C", CultureAr)).SemiBold());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposePagosTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(5).Text("Pagos").SemiBold().FontSize(12);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(60);
|
||||||
|
columns.RelativeColumn(1.5f);
|
||||||
|
columns.ConstantColumn(50);
|
||||||
|
columns.RelativeColumn(1.5f);
|
||||||
|
columns.RelativeColumn(1.5f);
|
||||||
|
columns.RelativeColumn(1.5f);
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Fecha");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Recibo");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Tipo");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Debe");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Haber");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Saldo");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Detalle");
|
||||||
|
});
|
||||||
|
|
||||||
|
decimal saldoAcumulado = Model.TotalMovimientos;
|
||||||
|
foreach (var item in Model.Pagos.OrderBy(p => p.Fecha).ThenBy(p => p.Recibo))
|
||||||
|
{
|
||||||
|
saldoAcumulado += (item.Debe - item.Haber);
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Fecha.ToString("dd/MM/yyyy"));
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Recibo.ToString());
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Tipo);
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.Debe.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.Haber.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(saldoAcumulado.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Detalle);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Cell().ColumnSpan(3).Border(1).AlignRight().Padding(2).Text(t => t.Span("Totales").SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(Model.Pagos.Sum(x => x.Debe).ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(Model.Pagos.Sum(x => x.Haber).ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(saldoAcumulado.ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().Border(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeDebCredTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(5).Text("Débitos / Créditos").SemiBold().FontSize(12);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(65);
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
columns.RelativeColumn(1);
|
||||||
|
columns.RelativeColumn(1);
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Fecha");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Referencia");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Debe");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Haber");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Saldo");
|
||||||
|
});
|
||||||
|
|
||||||
|
decimal saldoAcumulado = Model.TotalMovimientos + Model.TotalPagos;
|
||||||
|
foreach (var item in Model.DebitosCreditos.OrderBy(dc => dc.Fecha))
|
||||||
|
{
|
||||||
|
saldoAcumulado += (item.Debe - item.Haber);
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Fecha.ToString("dd/MM/yyyy"));
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Referencia);
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.Debe.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.Haber.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(saldoAcumulado.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Cell().ColumnSpan(2).Border(1).AlignRight().Padding(2).Text(t => t.Span("Totales").SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(Model.DebitosCreditos.Sum(x => x.Debe).ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(Model.DebitosCreditos.Sum(x => x.Haber).ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().Border(1).AlignRight().Padding(2).Text(t => t.Span(saldoAcumulado.ToString("C", CultureAr)).SemiBold());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeResumenPeriodo(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).AlignLeft().Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().Border(1).Padding(5).Width(300, Unit.Point).Column(col =>
|
||||||
|
{
|
||||||
|
col.Spacing(5);
|
||||||
|
col.Item().Text("Datos totales del periodo consultado").SemiBold();
|
||||||
|
Action<RowDescriptor, string, decimal> AddResumenRow = (row, label, value) =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(label);
|
||||||
|
row.ConstantItem(120).AlignRight().Text(value.ToString("C", CultureAr));
|
||||||
|
};
|
||||||
|
col.Item().Row(row => AddResumenRow(row, "Movimientos", Model.TotalMovimientos));
|
||||||
|
col.Item().Row(row => AddResumenRow(row, "Débitos/Créditos", Model.TotalDebitosCreditos));
|
||||||
|
col.Item().Row(row => AddResumenRow(row, "Pagos", Model.TotalPagos));
|
||||||
|
col.Item().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(5).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text("Total").SemiBold();
|
||||||
|
row.ConstantItem(120).AlignRight().Text(t => t.Span(Model.TotalPeriodo.ToString("C", CultureAr)).SemiBold());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeSaldoFinal(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).AlignLeft().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span($"Saldo Total del Distribuidor al {Model.FechaReporte} ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.SaldoDeCuenta.ToString("C", CultureAr)).SemiBold().FontSize(12);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,240 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes;
|
||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class DistribucionCanillasDocument : IDocument
|
||||||
|
{
|
||||||
|
public DistribucionCanillasViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR");
|
||||||
|
|
||||||
|
public DistribucionCanillasDocument(DistribucionCanillasViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().Row(row => {
|
||||||
|
row.RelativeItem().Text("Listado de Distribución: Canillas / Accionistas").FontSize(12);
|
||||||
|
row.RelativeItem().AlignRight().Text(text => {
|
||||||
|
text.Span("Fecha Consultada ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaConsultada).FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
column.Item().PaddingTop(5).Row(row => {
|
||||||
|
row.RelativeItem().Text(text => {
|
||||||
|
text.Span("Fecha de Generación del Reporte ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaReporte);
|
||||||
|
});
|
||||||
|
row.RelativeItem().AlignRight().Text(text => {
|
||||||
|
text.Span("Empresa ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.Empresa).FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(15);
|
||||||
|
|
||||||
|
if(Model.Canillas.Any())
|
||||||
|
column.Item().Element(c => ComposeTablaDetallada(c, "Canillas", Model.Canillas));
|
||||||
|
|
||||||
|
if(Model.CanillasAccionistas.Any())
|
||||||
|
column.Item().Element(c => ComposeTablaDetallada(c, "Accionistas", Model.CanillasAccionistas));
|
||||||
|
|
||||||
|
if(Model.CanillasLiquidadasOtraFecha.Any())
|
||||||
|
column.Item().Element(c => ComposeTablaLiquidacion(c, "Liquidación de movimientos de otras fechas canillas", Model.CanillasLiquidadasOtraFecha));
|
||||||
|
|
||||||
|
if(Model.CanillasAccionistasLiquidadasOtraFecha.Any())
|
||||||
|
column.Item().Element(c => ComposeTablaLiquidacion(c, "Liquidación de movimientos de otras fechas accionistas", Model.CanillasAccionistasLiquidadasOtraFecha));
|
||||||
|
|
||||||
|
if(Model.CanillasTodos.Any())
|
||||||
|
column.Item().Element(c => ComposeTablaTotales(c, "Recuento de Publicaciones", Model.CanillasTodos));
|
||||||
|
|
||||||
|
if(Model.RemitoIngresado > 0)
|
||||||
|
column.Item().Element(ComposeResumenDevoluciones);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeTablaDetallada(IContainer container, string title, IEnumerable<DetalleDistribucionCanillaDto> data)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(4).Text(title).SemiBold().FontSize(11);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(3); columns.RelativeColumn(3);
|
||||||
|
columns.RelativeColumn(1); columns.RelativeColumn(1);
|
||||||
|
columns.RelativeColumn(1); columns.RelativeColumn(1.2f);
|
||||||
|
});
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Vendedor");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Publicación");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Vendidos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("A Rendir");
|
||||||
|
});
|
||||||
|
foreach (var grupoCanilla in data.GroupBy(c => c.Canilla))
|
||||||
|
{
|
||||||
|
var primeraFila = true;
|
||||||
|
// El RowSpan es el número de publicaciones + la fila de total
|
||||||
|
var totalFilasGrupo = grupoCanilla.Count() + 1;
|
||||||
|
foreach (var item in grupoCanilla.OrderBy(p => p.Publicacion))
|
||||||
|
{
|
||||||
|
if (primeraFila)
|
||||||
|
{
|
||||||
|
table.Cell().RowSpan((uint)totalFilasGrupo).Border(1).Padding(2).AlignTop().Text(item.Canilla);
|
||||||
|
primeraFila = false;
|
||||||
|
}
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Publicacion);
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantSalida.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantEntrada.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text((item.TotalCantSalida - item.TotalCantEntrada).ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalRendir.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
// Subtotal por canilla
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text("Totales").SemiBold();
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(t => t.Span(grupoCanilla.Sum(i => i.TotalCantSalida).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(t => t.Span(grupoCanilla.Sum(i => i.TotalCantEntrada).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(t => t.Span(grupoCanilla.Sum(i => i.TotalCantSalida - i.TotalCantEntrada).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(t => t.Span(grupoCanilla.Sum(i => i.TotalRendir).ToString("C", CultureAr)).SemiBold());
|
||||||
|
}
|
||||||
|
|
||||||
|
var boldStyle = TextStyle.Default.ExtraBold();
|
||||||
|
table.Cell().ColumnSpan(2).BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span("Total " + title).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantSalida).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantSalida - i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalRendir).ToString("C", CultureAr)).Style(boldStyle));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeTablaLiquidacion(IContainer container, string title, IEnumerable<DetalleDistribucionCanillaDto> data)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(4).Text(title).SemiBold().FontSize(11);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(3); columns.RelativeColumn(1.5f);
|
||||||
|
columns.RelativeColumn(3); columns.RelativeColumn(1);
|
||||||
|
columns.RelativeColumn(1); columns.RelativeColumn(1);
|
||||||
|
columns.RelativeColumn(1.2f);
|
||||||
|
});
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Vendedor");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Fecha");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Publicación");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Vendidos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("A Rendir");
|
||||||
|
});
|
||||||
|
foreach(var item in data.OrderBy(d => d.Canilla).ThenBy(d => d.Fecha))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Canilla);
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Fecha?.ToString("dd/MM/yyyy") ?? "");
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Publicacion);
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantSalida.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantEntrada.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text((item.TotalCantSalida - item.TotalCantEntrada).ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalRendir.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
var boldStyle = TextStyle.Default.ExtraBold();
|
||||||
|
table.Cell().ColumnSpan(3).BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span("Total").Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantSalida).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantSalida - i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalRendir).ToString("C", CultureAr)).Style(boldStyle));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeTablaTotales(IContainer container, string title, IEnumerable<DetalleDistribucionCanillaAllDto> data)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(4).Text(title).SemiBold().FontSize(11);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2); columns.RelativeColumn(3);
|
||||||
|
columns.RelativeColumn(1.2f); columns.RelativeColumn(1.2f);
|
||||||
|
columns.RelativeColumn(1.2f); columns.RelativeColumn(1.5f);
|
||||||
|
});
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Tipo Vendedor");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Publicación");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Vendidos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("A Rendir");
|
||||||
|
});
|
||||||
|
foreach(var item in data.OrderBy(d => d.TipoVendedor).ThenBy(d => d.Publicacion))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.TipoVendedor);
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Publicacion);
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantSalida.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantEntrada.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text((item.TotalCantSalida-item.TotalCantEntrada).ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalRendir.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
var boldStyle = TextStyle.Default.ExtraBold();
|
||||||
|
table.Cell().ColumnSpan(2).BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span("Total General").Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantSalida).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalCantSalida - i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(data.Sum(i => i.TotalRendir).ToString("C", CultureAr)).Style(boldStyle));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeResumenDevoluciones(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5).Column(column => {
|
||||||
|
column.Item().Row(row => {
|
||||||
|
row.Spacing(15);
|
||||||
|
row.AutoItem().Text(text => { text.Span("Remito: ").SemiBold().FontSize(11); text.Span(Model.RemitoIngresado.ToString("N0")).FontSize(11); });
|
||||||
|
row.AutoItem().Text(text => { text.Span("Devolución: ").SemiBold().FontSize(11); text.Span(Model.DevolucionTotal.ToString("N0")).FontSize(11); });
|
||||||
|
row.AutoItem().Text(text => { text.Span("Venta: ").SemiBold().FontSize(11); text.Span(Model.VentaTotal.ToString("N0")).FontSize(11); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class DistribucionCanillasTotalesDocument : IDocument
|
||||||
|
{
|
||||||
|
public DistribucionCanillasViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR");
|
||||||
|
|
||||||
|
public DistribucionCanillasTotalesDocument(DistribucionCanillasViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().Row(row => {
|
||||||
|
row.RelativeItem().Text("Listado de Distribución: Canillas / Accionistas (Totales)").FontSize(12);
|
||||||
|
row.RelativeItem().AlignRight().Text(text => {
|
||||||
|
text.Span("Fecha Consultada ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaConsultada).FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
column.Item().PaddingTop(5).Row(row => {
|
||||||
|
row.RelativeItem().Text(text => {
|
||||||
|
text.Span("Fecha de Generación del Reporte ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaReporte).FontSize(12);
|
||||||
|
});
|
||||||
|
row.RelativeItem().AlignRight().Text(text => {
|
||||||
|
text.Span("Empresa ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.Empresa).FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(15);
|
||||||
|
|
||||||
|
if(Model.CanillasTodos.Any())
|
||||||
|
column.Item().Element(ComposeTablaTotales);
|
||||||
|
|
||||||
|
if(Model.RemitoIngresado > 0)
|
||||||
|
column.Item().Element(ComposeResumenDevoluciones);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeTablaTotales(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(4).Text("Recuento de Publicaciones").SemiBold().FontSize(11);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2); columns.RelativeColumn(3);
|
||||||
|
columns.RelativeColumn(1.2f); columns.RelativeColumn(1.2f);
|
||||||
|
columns.RelativeColumn(1.2f); columns.RelativeColumn(1.5f);
|
||||||
|
});
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Tipo Vendedor");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).Text("Publicación");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Vendidos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("A Rendir");
|
||||||
|
});
|
||||||
|
foreach(var item in Model.CanillasTodos.OrderBy(d => d.TipoVendedor).ThenBy(d => d.Publicacion))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.TipoVendedor);
|
||||||
|
table.Cell().Border(1).Padding(2).Text(item.Publicacion);
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantSalida.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalCantEntrada.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text((item.TotalCantSalida-item.TotalCantEntrada).ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(2).AlignRight().Text(item.TotalRendir.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
var boldStyle = TextStyle.Default.ExtraBold();
|
||||||
|
table.Cell().ColumnSpan(2).BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span("Total General").Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(Model.CanillasTodos.Sum(i => i.TotalCantSalida).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(Model.CanillasTodos.Sum(i => i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(Model.CanillasTodos.Sum(i => i.TotalCantSalida - i.TotalCantEntrada).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).Padding(2).AlignRight().Text(t => t.Span(Model.CanillasTodos.Sum(i => i.TotalRendir).ToString("C", CultureAr)).Style(boldStyle));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeResumenDevoluciones(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(10).Column(column => {
|
||||||
|
column.Item().Row(row => {
|
||||||
|
row.Spacing(15);
|
||||||
|
row.AutoItem().Text(text => { text.Span("Remito: ").SemiBold(); text.Span(Model.RemitoIngresado.ToString("N0")); });
|
||||||
|
row.AutoItem().Text(text => { text.Span("Devolución: ").SemiBold(); text.Span(Model.DevolucionTotal.ToString("N0")); });
|
||||||
|
row.AutoItem().Text(text => { text.Span("Venta: ").SemiBold(); text.Span(Model.VentaTotal.ToString("N0")); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class DistribucionSuscripcionesDocument : IDocument
|
||||||
|
{
|
||||||
|
public DistribucionSuscripcionesViewModel Model { get; }
|
||||||
|
|
||||||
|
public DistribucionSuscripcionesDocument(DistribucionSuscripcionesViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Column(col =>
|
||||||
|
{
|
||||||
|
col.Item().Text("Reporte de Distribución de Suscripciones").SemiBold().FontSize(14);
|
||||||
|
col.Item().Text($"Período: {Model.FechaDesde} al {Model.FechaHasta}").FontSize(11);
|
||||||
|
});
|
||||||
|
row.ConstantItem(150).AlignRight().Text($"Generado: {Model.FechaGeneracion}");
|
||||||
|
});
|
||||||
|
column.Item().PaddingTop(5).BorderBottom(1).BorderColor(Colors.Grey.Lighten2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(10).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(20); // Espacio entre elementos principales (sección de altas y sección de bajas)
|
||||||
|
|
||||||
|
// --- Sección 1: Altas y Activas ---
|
||||||
|
column.Item().Column(colAltas =>
|
||||||
|
{
|
||||||
|
colAltas.Item().Text("Altas y Suscripciones Activas en el Período").Bold().FontSize(14).Underline();
|
||||||
|
colAltas.Item().PaddingBottom(10).Text("Listado de suscriptores que deben recibir entregas en el período seleccionado.");
|
||||||
|
|
||||||
|
if (!Model.DatosAgrupadosAltas.Any())
|
||||||
|
{
|
||||||
|
colAltas.Item().PaddingTop(10).Text("No se encontraron suscripciones activas para este período.").Italic();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var empresa in Model.DatosAgrupadosAltas)
|
||||||
|
{
|
||||||
|
colAltas.Item().Element(c => ComposeTablaEmpresa(c, empresa, esBaja: false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- Sección 2: Bajas ---
|
||||||
|
if (Model.DatosAgrupadosBajas.Any())
|
||||||
|
{
|
||||||
|
column.Item().PageBreak(); // Salto de página para separar las secciones
|
||||||
|
column.Item().Column(colBajas =>
|
||||||
|
{
|
||||||
|
colBajas.Item().Text("Bajas de Suscripciones en el Período").Bold().FontSize(14).Underline().FontColor(Colors.Red.Medium);
|
||||||
|
colBajas.Item().PaddingBottom(10).Text("Listado de suscriptores cuya suscripción finalizó. NO se les debe entregar a partir de su 'Fecha de Baja'.");
|
||||||
|
|
||||||
|
foreach (var empresa in Model.DatosAgrupadosBajas)
|
||||||
|
{
|
||||||
|
colBajas.Item().Element(c => ComposeTablaEmpresa(c, empresa, esBaja: true));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeTablaEmpresa(IContainer container, GrupoEmpresa empresa, bool esBaja)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
// Cabecera de la EMPRESA (ej. EL DIA)
|
||||||
|
column.Item().Background(Colors.Grey.Lighten2).Padding(5).Text(empresa.NombreEmpresa).Bold().FontSize(12);
|
||||||
|
|
||||||
|
// Contenedor para las tablas de las publicaciones de esta empresa
|
||||||
|
column.Item().PaddingTop(5).Column(colPub =>
|
||||||
|
{
|
||||||
|
colPub.Spacing(10); // Espacio entre cada tabla de publicación
|
||||||
|
foreach (var publicacion in empresa.Publicaciones)
|
||||||
|
{
|
||||||
|
colPub.Item().Element(c => ComposeTablaPublicacion(c, publicacion, esBaja));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeTablaPublicacion(IContainer container, GrupoPublicacion publicacion, bool esBaja)
|
||||||
|
{
|
||||||
|
// Se envuelve la tabla en una columna para poder ponerle un título simple arriba.
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingLeft(2).PaddingBottom(2).Text(publicacion.NombrePublicacion).SemiBold().FontSize(10);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2.5f); // Nombre
|
||||||
|
columns.RelativeColumn(3); // Dirección
|
||||||
|
columns.RelativeColumn(1.5f); // Teléfono
|
||||||
|
columns.ConstantColumn(65); // Fecha Inicio / Baja
|
||||||
|
columns.RelativeColumn(1.5f); // Días
|
||||||
|
columns.RelativeColumn(2.5f); // Observaciones
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().BorderBottom(1).Padding(2).Text("Suscriptor").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).Padding(2).Text("Dirección").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).Padding(2).Text("Teléfono").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).Padding(2).Text(esBaja ? "Fecha de Baja" : "Fecha Inicio").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).Padding(2).Text("Días Entrega").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).Padding(2).Text("Observaciones").SemiBold();
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in publicacion.Suscripciones)
|
||||||
|
{
|
||||||
|
table.Cell().Padding(2).Text(item.NombreSuscriptor);
|
||||||
|
table.Cell().Padding(2).Text(item.Direccion);
|
||||||
|
table.Cell().Padding(2).Text(item.Telefono ?? "-");
|
||||||
|
var fecha = esBaja ? item.FechaFin : item.FechaInicio;
|
||||||
|
table.Cell().Padding(2).Text(fecha?.ToString("dd/MM/yyyy") ?? "-");
|
||||||
|
table.Cell().Padding(2).Text(item.DiasEntrega);
|
||||||
|
table.Cell().Padding(2).Text(item.Observaciones ?? "-");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ExistenciaPapelConsolidadoDocument : IDocument
|
||||||
|
{
|
||||||
|
public ExistenciaPapelConsolidadoViewModel Model { get; }
|
||||||
|
|
||||||
|
public ExistenciaPapelConsolidadoDocument(ExistenciaPapelConsolidadoViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
public DocumentSettings GetSettings() => DocumentSettings.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container
|
||||||
|
.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.PageColor(Colors.White);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Roboto").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
|
||||||
|
page.Footer()
|
||||||
|
.AlignCenter()
|
||||||
|
.Text(x =>
|
||||||
|
{
|
||||||
|
x.Span("Página ");
|
||||||
|
x.CurrentPageNumber();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Existencias de Papel").SemiBold().FontSize(14);
|
||||||
|
// La versión consolidada no muestra la planta, sino el texto "Consolidado"
|
||||||
|
column.Item().AlignCenter().Text("Consolidado").FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(2, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Column(col =>
|
||||||
|
{
|
||||||
|
col.Item().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha del Reporte: ").SemiBold();
|
||||||
|
text.Span(Model.FechaReporte);
|
||||||
|
});
|
||||||
|
col.Item().Text($"Periodo Consultado: Desde {Model.FechaDesde} Hasta {Model.FechaHasta}");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.ConstantColumn(65);
|
||||||
|
columns.ConstantColumn(70);
|
||||||
|
columns.ConstantColumn(85);
|
||||||
|
columns.ConstantColumn(65);
|
||||||
|
columns.ConstantColumn(80);
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).Text("Tipo de Bobina");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Cant. Stock");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Kg. Stock");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Consumo (Kg)");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Días Disp.");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignCenter().Text("Fin Estimado");
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Existencias)
|
||||||
|
{
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).Text(item.TipoBobina);
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.BobinasEnStock?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.TotalKilosEnStock?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.ConsumoAcumulado?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.PromedioDiasDisponibles?.ToString("N0") ?? "N/A");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignCenter().Text(item.FechaEstimacionFinStock?.ToString("dd/MM/yyyy") ?? "N/A");
|
||||||
|
}
|
||||||
|
|
||||||
|
var totalBobinas = Model.Existencias.Sum(e => e.BobinasEnStock ?? 0);
|
||||||
|
var totalKilos = Model.Existencias.Sum(e => e.TotalKilosEnStock ?? 0);
|
||||||
|
var totalConsumo = Model.Existencias.Sum(e => e.ConsumoAcumulado ?? 0);
|
||||||
|
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span("Totales").SemiBold());
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span(totalBobinas.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span(totalKilos.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span(totalConsumo.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().ColumnSpan(2).BorderTop(1).BorderColor(Colors.Grey.Lighten2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
// Usamos una clase parcial para organizar mejor el código, aunque no es estrictamente necesario aquí.
|
||||||
|
public class ExistenciaPapelDocument : IDocument
|
||||||
|
{
|
||||||
|
// Usamos una propiedad pública con 'init' en lugar de un campo privado.
|
||||||
|
// Esto es más limpio y funciona mejor con el análisis de código.
|
||||||
|
public ExistenciaPapelViewModel Model { get; }
|
||||||
|
|
||||||
|
public ExistenciaPapelDocument(ExistenciaPapelViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
public DocumentSettings GetSettings() => DocumentSettings.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container
|
||||||
|
.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.PageColor(Colors.White);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Roboto").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
|
||||||
|
page.Footer()
|
||||||
|
.AlignCenter()
|
||||||
|
.Text(x =>
|
||||||
|
{
|
||||||
|
x.Span("Página ");
|
||||||
|
x.CurrentPageNumber();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ahora los métodos usan 'Model' (la propiedad pública) en lugar de '_model'.
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Existencias de Papel").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text($"Planta: {Model.NombrePlanta}").FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(2, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Column(col =>
|
||||||
|
{
|
||||||
|
col.Item().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha del Reporte: ").SemiBold();
|
||||||
|
text.Span(Model.FechaReporte);
|
||||||
|
});
|
||||||
|
col.Item().Text($"Periodo Consultado: Desde {Model.FechaDesde} Hasta {Model.FechaHasta}");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.ConstantColumn(65);
|
||||||
|
columns.ConstantColumn(70);
|
||||||
|
columns.ConstantColumn(85);
|
||||||
|
columns.ConstantColumn(65);
|
||||||
|
columns.ConstantColumn(80);
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).Text("Tipo de Bobina");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Cant. Stock");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Kg. Stock");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Consumo (Kg)");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Días Disp.");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignCenter().Text("Fin Estimado");
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Existencias)
|
||||||
|
{
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).Text(item.TipoBobina);
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.BobinasEnStock?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.TotalKilosEnStock?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.ConsumoAcumulado?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.PromedioDiasDisponibles?.ToString("N0") ?? "N/A");
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignCenter().Text(item.FechaEstimacionFinStock?.ToString("dd/MM/yyyy") ?? "N/A");
|
||||||
|
}
|
||||||
|
|
||||||
|
var totalBobinas = Model.Existencias.Sum(e => e.BobinasEnStock ?? 0);
|
||||||
|
var totalKilos = Model.Existencias.Sum(e => e.TotalKilosEnStock ?? 0);
|
||||||
|
var totalConsumo = Model.Existencias.Sum(e => e.ConsumoAcumulado ?? 0);
|
||||||
|
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span("Totales").SemiBold());
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span(totalBobinas.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span(totalKilos.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(t => t.Span(totalConsumo.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().ColumnSpan(2).BorderTop(1).BorderColor(Colors.Grey.Lighten2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class FacturasPublicidadDocument : IDocument
|
||||||
|
{
|
||||||
|
public FacturasPublicidadViewModel Model { get; }
|
||||||
|
|
||||||
|
public FacturasPublicidadDocument(FacturasPublicidadViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
// Se envuelve todo el contenido del header en una única Columna.
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
// El primer item de la columna es la fila con los títulos.
|
||||||
|
column.Item().Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Column(col =>
|
||||||
|
{
|
||||||
|
col.Item().Text($"Reporte de Suscripciones a Facturar").SemiBold().FontSize(14);
|
||||||
|
col.Item().Text($"Período: {Model.Periodo}").FontSize(11);
|
||||||
|
});
|
||||||
|
|
||||||
|
row.ConstantItem(150).AlignRight().Column(col => {
|
||||||
|
col.Item().AlignRight().Text($"Fecha de Generación:");
|
||||||
|
col.Item().AlignRight().Text(Model.FechaGeneracion);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// El segundo item de la columna es el separador.
|
||||||
|
column.Item().PaddingTop(5).BorderBottom(1).BorderColor(Colors.Grey.Lighten2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(10).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(20);
|
||||||
|
|
||||||
|
foreach (var empresaData in Model.DatosPorEmpresa)
|
||||||
|
{
|
||||||
|
column.Item().Element(c => ComposeTablaPorEmpresa(c, empresaData));
|
||||||
|
}
|
||||||
|
|
||||||
|
column.Item().AlignRight().PaddingTop(15).Text($"Total General a Facturar: {Model.TotalGeneral.ToString("C", new CultureInfo("es-AR"))}").Bold().FontSize(12);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeTablaPorEmpresa(IContainer container, DatosEmpresaViewModel empresaData)
|
||||||
|
{
|
||||||
|
container.Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(3); // Nombre Suscriptor
|
||||||
|
columns.ConstantColumn(100); // Documento
|
||||||
|
columns.ConstantColumn(100, Unit.Point); // Importe
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().ColumnSpan(3).Background(Colors.Grey.Lighten2)
|
||||||
|
.Padding(5).Text(empresaData.NombreEmpresa).Bold().FontSize(12);
|
||||||
|
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten3).Padding(2).Text("Suscriptor").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten3).Padding(2).Text("Documento").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten3).Padding(2).AlignRight().Text("Importe a Facturar").SemiBold();
|
||||||
|
});
|
||||||
|
|
||||||
|
var facturasPorSuscriptor = empresaData.Facturas.GroupBy(f => f.NombreSuscriptor);
|
||||||
|
|
||||||
|
foreach (var grupoSuscriptor in facturasPorSuscriptor.OrderBy(g => g.Key))
|
||||||
|
{
|
||||||
|
foreach(var item in grupoSuscriptor)
|
||||||
|
{
|
||||||
|
table.Cell().Padding(2).Text(item.NombreSuscriptor);
|
||||||
|
table.Cell().Padding(2).Text($"{item.TipoDocumento} {item.NroDocumento}");
|
||||||
|
table.Cell().Padding(2).AlignRight().Text(item.ImporteFinal.ToString("C", new CultureInfo("es-AR")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(grupoSuscriptor.Count() > 1)
|
||||||
|
{
|
||||||
|
var subtotal = grupoSuscriptor.Sum(i => i.ImporteFinal);
|
||||||
|
table.Cell().ColumnSpan(2).AlignRight().Padding(2).Text($"Subtotal {grupoSuscriptor.Key}:").Italic();
|
||||||
|
table.Cell().AlignRight().Padding(2).Text(subtotal.ToString("C", new CultureInfo("es-AR"))).Italic().SemiBold();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Cell().ColumnSpan(2).BorderTop(1).BorderColor(Colors.Grey.Darken1).AlignRight()
|
||||||
|
.PaddingTop(5).Text("Total Empresa:").Bold();
|
||||||
|
table.Cell().BorderTop(1).BorderColor(Colors.Grey.Darken1).AlignRight()
|
||||||
|
.PaddingTop(5).Text(empresaData.TotalEmpresa.ToString("C", new CultureInfo("es-AR"))).Bold();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class LiquidacionCanillaDocument : IDocument
|
||||||
|
{
|
||||||
|
public LiquidacionCanillaViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR");
|
||||||
|
|
||||||
|
public LiquidacionCanillaDocument(LiquidacionCanillaViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
// CORRECCIÓN: El método GetSettings ya no es necesario para este diseño.
|
||||||
|
// La configuración por defecto es suficiente.
|
||||||
|
// public DocumentSettings GetSettings() => DocumentSettings.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Size(PageSizes.A5);
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().Text("EL DIA S.A.I.C. y F.");
|
||||||
|
column.Item().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Liquidación venta de diarios del: ");
|
||||||
|
text.Span(Model.FechaLiquidacion);
|
||||||
|
});
|
||||||
|
column.Item().PaddingTop(5).Text($"Vendedor: {Model.NombreVendedor}").SemiBold();
|
||||||
|
column.Item().PaddingTop(10);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(15);
|
||||||
|
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
columns.RelativeColumn(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Detalles.OrderBy(d => d.Publicacion))
|
||||||
|
{
|
||||||
|
var vendidos = item.TotalCantSalida - item.TotalCantEntrada;
|
||||||
|
|
||||||
|
table.Cell().ColumnSpan(3).Text(item.Publicacion).SemiBold();
|
||||||
|
|
||||||
|
table.Cell();
|
||||||
|
table.Cell().Text("Retirados");
|
||||||
|
table.Cell().AlignRight().Text(item.TotalCantSalida.ToString("N0"));
|
||||||
|
|
||||||
|
table.Cell();
|
||||||
|
table.Cell().Text("Devueltos");
|
||||||
|
table.Cell().AlignRight().Text(item.TotalCantEntrada.ToString("N0"));
|
||||||
|
|
||||||
|
table.Cell();
|
||||||
|
table.Cell().Text("Vendidos");
|
||||||
|
table.Cell().AlignRight().Text(vendidos.ToString("N0"));
|
||||||
|
|
||||||
|
table.Cell();
|
||||||
|
table.Cell().Text("Precio Unitario");
|
||||||
|
table.Cell().AlignRight().Text(item.PrecioEjemplar.ToString("C", CultureAr));
|
||||||
|
|
||||||
|
table.Cell();
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(2).Text(t => t.Span("Importe Vendido").SemiBold());
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(2).AlignRight().Text(t => t.Span(item.TotalRendir.ToString("C", CultureAr)).SemiBold());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
column.Item().BorderTop(2).BorderColor(Colors.Black).PaddingTop(4).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text("Total A Rendir").SemiBold().FontSize(10);
|
||||||
|
row.RelativeItem().AlignRight().Text(text => text.Span(Model.TotalARendir.ToString("C", CultureAr)).SemiBold().FontSize(10));
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!Model.EsAccionista && Model.Ganancias.Any())
|
||||||
|
{
|
||||||
|
column.Item().PaddingTop(10).Element(ComposeGananciasTable);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeGananciasTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().Text("Comisiones Acreditadas").SemiBold().FontSize(11);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2);
|
||||||
|
columns.RelativeColumn(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Ganancias)
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Lighten2).Padding(3).Text(item.Publicacion);
|
||||||
|
table.Cell().Border(1).BorderColor(Colors.Grey.Lighten2).Padding(3).AlignRight().Text(item.TotalRendir.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).Padding(3).Text("Total Comisiones").SemiBold();
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).Padding(3).AlignRight().Text(t => t.Span(Model.TotalComisiones.ToString("C", CultureAr)).SemiBold());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ListadoDistCanMensualDiariosDocument : IDocument
|
||||||
|
{
|
||||||
|
public ListadoDistCanMensualDiariosViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR");
|
||||||
|
|
||||||
|
public ListadoDistCanMensualDiariosDocument(ListadoDistCanMensualDiariosViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text($"Ventas por {Model.TipoDestinatario} desde el {Model.FechaDesde} hasta el {Model.FechaHasta}").SemiBold().FontSize(12);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
// APLICAMOS LA SOLUCIÓN AQUÍ: .AlignTop()
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).AlignTop().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(3); // Nombre
|
||||||
|
columns.ConstantColumn(50); // El Día
|
||||||
|
columns.ConstantColumn(50); // El Plata
|
||||||
|
columns.ConstantColumn(60); // Vendidos
|
||||||
|
columns.RelativeColumn(1.5f); // Imp. El Día
|
||||||
|
columns.RelativeColumn(1.5f); // Imp. El Plata
|
||||||
|
columns.RelativeColumn(1.5f); // Importe Total
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Medium).Padding(4).Text("Nombre").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Medium).Padding(4).AlignCenter().Text("El Día").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Medium).Padding(4).AlignCenter().Text("El Plata").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Medium).Padding(4).AlignCenter().Text("Vendidos").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Medium).Padding(4).AlignRight().Text("Imp. El Día").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Medium).Padding(4).AlignRight().Text("Imp. El Plata").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1).BorderColor(Colors.Grey.Medium).Padding(4).AlignRight().Text("Importe Total").SemiBold();
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Detalles.OrderBy(d => d.Canilla))
|
||||||
|
{
|
||||||
|
table.Cell().Padding(3).PaddingRight(10).Text(item.Canilla);
|
||||||
|
table.Cell().Padding(3).AlignCenter().Text(item.ElDia?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Padding(3).AlignCenter().Text(item.ElPlata?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Padding(3).AlignCenter().Text(item.Vendidos?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Padding(3).AlignRight().Text(item.ImporteElDia?.ToString("C", CultureAr) ?? "$ 0.00");
|
||||||
|
table.Cell().Padding(3).AlignRight().Text(item.ImporteElPlata?.ToString("C", CultureAr) ?? "$ 0.00");
|
||||||
|
table.Cell().Padding(3).AlignRight().Text(item.ImporteTotal?.ToString("C", CultureAr) ?? "$ 0.00");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de Totales
|
||||||
|
var totalElDia = Model.Detalles.Sum(x => x.ElDia ?? 0);
|
||||||
|
var totalElPlata = Model.Detalles.Sum(x => x.ElPlata ?? 0);
|
||||||
|
var totalVendidos = Model.Detalles.Sum(x => x.Vendidos ?? 0);
|
||||||
|
var totalImpElDia = Model.Detalles.Sum(x => x.ImporteElDia ?? 0);
|
||||||
|
var totalImpElPlata = Model.Detalles.Sum(x => x.ImporteElPlata ?? 0);
|
||||||
|
var totalImpTotal = Model.Detalles.Sum(x => x.ImporteTotal ?? 0);
|
||||||
|
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(4).Text("Totales").SemiBold();
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(4).AlignCenter().Text(t => t.Span(totalElDia.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(4).AlignCenter().Text(t => t.Span(totalElPlata.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(4).AlignCenter().Text(t => t.Span(totalVendidos.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(4).AlignRight().Text(t => t.Span(totalImpElDia.ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(4).AlignRight().Text(t => t.Span(totalImpElPlata.ToString("C", CultureAr)).SemiBold());
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).PaddingTop(4).AlignRight().Text(t => t.Span(totalImpTotal.ToString("C", CultureAr)).SemiBold());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ListadoDistCanMensualDocument : IDocument
|
||||||
|
{
|
||||||
|
public ListadoDistCanMensualViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR");
|
||||||
|
|
||||||
|
public ListadoDistCanMensualDocument(ListadoDistCanMensualViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1.5f, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("Listado de Distribución Mensual").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text(Model.TipoDestinatario).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha de Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Periodo: ").SemiBold(); text.Span($"{Model.FechaDesde} - {Model.FechaHasta}"); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(10);
|
||||||
|
|
||||||
|
// Agrupamos los datos por Canilla
|
||||||
|
var gruposPorCanilla = Model.Detalles.GroupBy(d => d.Canilla);
|
||||||
|
|
||||||
|
// Creamos una tabla principal que contendrá todo
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2.5f); // Canilla / Publicación
|
||||||
|
columns.RelativeColumn(); // Llevados
|
||||||
|
columns.RelativeColumn(); // Devueltos
|
||||||
|
columns.RelativeColumn(1.2f); // Importe
|
||||||
|
});
|
||||||
|
|
||||||
|
// Encabezado principal de la tabla
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().BorderBottom(1.5f).BorderColor(Colors.Black).Padding(4).Text("Canilla / Publicación").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1.5f).BorderColor(Colors.Black).Padding(4).AlignRight().Text("Llevados").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1.5f).BorderColor(Colors.Black).Padding(4).AlignRight().Text("Devueltos").SemiBold();
|
||||||
|
header.Cell().BorderBottom(1.5f).BorderColor(Colors.Black).Padding(4).AlignRight().Text("Importe").SemiBold();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Iteramos sobre cada grupo de canilla
|
||||||
|
foreach (var grupo in gruposPorCanilla)
|
||||||
|
{
|
||||||
|
// Fila del nombre del Canilla
|
||||||
|
table.Cell().ColumnSpan(4).PaddingTop(8).Text(grupo.Key).SemiBold();
|
||||||
|
|
||||||
|
// Filas de detalle para ese canilla
|
||||||
|
foreach (var detalle in grupo)
|
||||||
|
{
|
||||||
|
table.Cell().PaddingLeft(15).Padding(2).Text(detalle.Publicacion);
|
||||||
|
table.Cell().Padding(2).AlignRight().Text(detalle.TotalCantSalida?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Padding(2).AlignRight().Text(detalle.TotalCantEntrada?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Padding(2).AlignRight().Text(detalle.TotalRendir?.ToString("C", CultureAr) ?? "$ 0.00");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de total por canilla
|
||||||
|
var totalRendirCanilla = grupo.Sum(d => d.TotalRendir ?? 0);
|
||||||
|
table.Cell().ColumnSpan(3).BorderTop(1.5f).BorderColor(Colors.Black).AlignRight().Padding(2).Text("A Rendir").SemiBold();
|
||||||
|
table.Cell().BorderTop(1.5f).BorderColor(Colors.Black).AlignRight().Padding(2).Text(t => t.Span(totalRendirCanilla.ToString("C", CultureAr)).SemiBold());
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Fila de TOTALES GENERALES ---
|
||||||
|
var totalGeneralLlevados = Model.Detalles.Sum(d => d.TotalCantSalida ?? 0);
|
||||||
|
var totalGeneralDevueltos = Model.Detalles.Sum(d => d.TotalCantEntrada ?? 0);
|
||||||
|
var totalGeneralRendir = Model.Detalles.Sum(d => d.TotalRendir ?? 0);
|
||||||
|
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).PaddingTop(5).Text("TOTALES").ExtraBold();
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).PaddingTop(5).AlignRight().Text(t => t.Span(totalGeneralLlevados.ToString("N0")).ExtraBold());
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).PaddingTop(5).AlignRight().Text(t => t.Span(totalGeneralDevueltos.ToString("N0")).ExtraBold());
|
||||||
|
table.Cell().BorderTop(2).BorderColor(Colors.Black).PaddingTop(5).AlignRight().Text(t => t.Span(totalGeneralRendir.ToString("C", CultureAr)).ExtraBold());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ListadoDistCanillasImporteDocument : IDocument
|
||||||
|
{
|
||||||
|
public ListadoDistCanillasImporteViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR");
|
||||||
|
|
||||||
|
public ListadoDistCanillasImporteDocument(ListadoDistCanillasImporteViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1.5f, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("Listado de Distribución con Importes").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text(Model.TipoDestinatario).FontSize(12);
|
||||||
|
column.Item().AlignCenter().Text(Model.NombrePublicacion).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha de Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Periodo: ").SemiBold(); text.Span($"{Model.FechaDesde} - {Model.FechaHasta}"); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(); // Fecha
|
||||||
|
columns.RelativeColumn(); // Llevados
|
||||||
|
columns.RelativeColumn(); // Devueltos
|
||||||
|
columns.RelativeColumn(); // Vendidos
|
||||||
|
columns.RelativeColumn(1.5f); // Importe Publicación
|
||||||
|
columns.RelativeColumn(1.5f); // A Rendir
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Fecha");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Vendidos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Imp. Publicación");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("A Rendir");
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Detalles)
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Fecha);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Llevados.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Devueltos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Vendidos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.TotalRendirPublicacion.ToString("C", CultureAr));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.TotalRendirGeneral.ToString("C", CultureAr));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de Totales
|
||||||
|
var totalLlevados = Model.Detalles.Sum(x => x.Llevados);
|
||||||
|
var totalDevueltos = Model.Detalles.Sum(x => x.Devueltos);
|
||||||
|
var totalVendidos = Model.Detalles.Sum(x => x.Vendidos);
|
||||||
|
var totalRendirPub = Model.Detalles.Sum(x => x.TotalRendirPublicacion);
|
||||||
|
var totalRendirGral = Model.Detalles.Sum(x => x.TotalRendirGeneral);
|
||||||
|
|
||||||
|
var boldStyle = TextStyle.Default.SemiBold();
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3); // Celda vacía
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(totalLlevados.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(totalDevueltos.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(totalVendidos.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(totalRendirPub.ToString("C", CultureAr)).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(totalRendirGral.ToString("C", CultureAr)).Style(boldStyle));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,179 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ListadoDistribucionCanillasDocument : IDocument
|
||||||
|
{
|
||||||
|
public ListadoDistribucionCanillasViewModel Model { get; }
|
||||||
|
|
||||||
|
public ListadoDistribucionCanillasDocument(ListadoDistribucionCanillasViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("Listado de Distribución - Canillitas").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text(Model.NombrePublicacion).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha de Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Periodo: ").SemiBold(); text.Span($"{Model.FechaDesde} - {Model.FechaHasta}"); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(8, Unit.Millimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(15);
|
||||||
|
|
||||||
|
column.Item().Text("Distribución").SemiBold().FontSize(12);
|
||||||
|
column.Item().Element(ComposeDetalleDiarioTable);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre);
|
||||||
|
|
||||||
|
column.Item().Text("Promedios").SemiBold().FontSize(12);
|
||||||
|
column.Item().Element(ComposePromediosTable);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeDetalleDiarioTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(50); // Día
|
||||||
|
columns.RelativeColumn(); // Llevados
|
||||||
|
columns.RelativeColumn(); // Devueltos
|
||||||
|
columns.RelativeColumn(); // Venta Neta
|
||||||
|
columns.RelativeColumn(2); // Promedio (columna vacía en el original)
|
||||||
|
columns.RelativeColumn(2); // % Devolución
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Día");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Venta Neta");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Promedio");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("% Devolución");
|
||||||
|
});
|
||||||
|
|
||||||
|
decimal ventaNetaAcumulada = 0;
|
||||||
|
int conteoDias = 0;
|
||||||
|
|
||||||
|
foreach (var item in Model.DetalleDiario.OrderBy(x => x.Dia))
|
||||||
|
{
|
||||||
|
var ventaNetaDia = item.Llevados - item.Devueltos;
|
||||||
|
ventaNetaAcumulada += ventaNetaDia;
|
||||||
|
conteoDias++;
|
||||||
|
var promedio = ventaNetaAcumulada / conteoDias;
|
||||||
|
var porcDevolucion = item.Llevados > 0 ? (decimal)item.Devueltos * 100 / item.Llevados : 0;
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Dia.ToString());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Llevados.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Devueltos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(ventaNetaDia.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(promedio.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(porcDevolucion.ToString("F2"));
|
||||||
|
}
|
||||||
|
|
||||||
|
var totalVentaNeta = Model.TotalesDetalleDiario.Llevados - Model.TotalesDetalleDiario.Devueltos;
|
||||||
|
var totalPorcDevolucion = Model.TotalesDetalleDiario.Llevados > 0 ? (decimal)Model.TotalesDetalleDiario.Devueltos * 100 / Model.TotalesDetalleDiario.Llevados : 0;
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3); // Celda vacía
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.TotalesDetalleDiario.Llevados.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.TotalesDetalleDiario.Devueltos.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(totalVentaNeta.ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span((ventaNetaAcumulada / (conteoDias > 0 ? conteoDias : 1)).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(totalPorcDevolucion.ToString("F2")).SemiBold());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposePromediosTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingBottom(5).Text("Promedios por Día de Semana").SemiBold().FontSize(11);
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(1.5f);
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn(1.2f);
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Día Semana");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Cant. Días");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Ventas");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("% Devolución");
|
||||||
|
});
|
||||||
|
|
||||||
|
var dayOrder = new Dictionary<string, int> { { "Lunes", 1 }, { "Martes", 2 }, { "Miércoles", 3 }, { "Jueves", 4 }, { "Viernes", 5 }, { "Sábado", 6 }, { "Domingo", 7 } };
|
||||||
|
|
||||||
|
foreach (var item in Model.PromediosPorDia.OrderBy(d => dayOrder.GetValueOrDefault(d.Dia, 99)))
|
||||||
|
{
|
||||||
|
var porcDevolucion = item.Llevados > 0 ? (decimal)item.Devueltos * 100 / item.Llevados : 0;
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Dia);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Cant.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Promedio_Llevados.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Promedio_Devueltos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Promedio_Ventas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(porcDevolucion.ToString("F2") + "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- SECCIÓN AÑADIDA PARA LA FILA "GENERAL" ---
|
||||||
|
var general = Model.PromedioGeneral;
|
||||||
|
if (general != null)
|
||||||
|
{
|
||||||
|
var porcDevolucionGeneral = general.Promedio_Llevados > 0 ? (decimal)general.Promedio_Devueltos * 100 / general.Promedio_Llevados : 0;
|
||||||
|
var boldStyle = TextStyle.Default.SemiBold();
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3).Text(text => text.Span(general.Dia).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.Cant.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.Promedio_Llevados.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.Promedio_Devueltos.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.Promedio_Ventas.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(porcDevolucionGeneral.ToString("F2") + "%").Style(boldStyle));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ListadoDistribucionDistribuidoresDocument : IDocument
|
||||||
|
{
|
||||||
|
public ListadoDistribucionDistribuidoresViewModel Model { get; }
|
||||||
|
|
||||||
|
public ListadoDistribucionDistribuidoresDocument(ListadoDistribucionDistribuidoresViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("Listado de Distribución").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text(Model.NombreDistribuidor).FontSize(12);
|
||||||
|
column.Item().AlignCenter().Text(Model.NombrePublicacion).FontSize(11);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha de Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Periodo: ").SemiBold(); text.Span($"{Model.FechaDesde} - {Model.FechaHasta}"); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(8, Unit.Millimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(15);
|
||||||
|
column.Item().Text("Distribución").SemiBold().FontSize(12);
|
||||||
|
column.Item().Element(ComposeDetalleDiarioTable);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre);
|
||||||
|
|
||||||
|
column.Item().Text("Promedios").SemiBold().FontSize(12);
|
||||||
|
column.Item().Element(ComposePromediosTable);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeDetalleDiarioTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(50); columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn(); columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn(2); columns.RelativeColumn(2);
|
||||||
|
});
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Día");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Venta Neta");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Promedio");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("% Devolución");
|
||||||
|
});
|
||||||
|
|
||||||
|
decimal ventaNetaAcumulada = 0;
|
||||||
|
int conteoDias = 0;
|
||||||
|
|
||||||
|
foreach (var item in Model.DetalleDiario.OrderBy(x => x.Dia))
|
||||||
|
{
|
||||||
|
var llevados = item.Llevados ?? 0;
|
||||||
|
var devueltos = item.Devueltos ?? 0;
|
||||||
|
var ventaNetaDia = llevados - devueltos;
|
||||||
|
if(llevados > 0)
|
||||||
|
{
|
||||||
|
ventaNetaAcumulada += ventaNetaDia;
|
||||||
|
conteoDias++;
|
||||||
|
}
|
||||||
|
var promedio = conteoDias > 0 ? ventaNetaAcumulada / conteoDias : 0;
|
||||||
|
var porcDevolucion = llevados > 0 ? (decimal)devueltos * 100 / llevados : 0;
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Dia.ToString());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(llevados.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(devueltos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(ventaNetaDia.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(promedio.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(porcDevolucion.ToString("F2") + "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
var totalLlevados = Model.DetalleDiario.Sum(i => i.Llevados ?? 0);
|
||||||
|
var totalDevueltos = Model.DetalleDiario.Sum(i => i.Devueltos ?? 0);
|
||||||
|
var totalVentaNeta = totalLlevados - totalDevueltos;
|
||||||
|
var totalPorcDevolucion = totalLlevados > 0 ? (decimal)totalDevueltos * 100 / totalLlevados : 0;
|
||||||
|
|
||||||
|
var boldStyle = TextStyle.Default.SemiBold();
|
||||||
|
table.Cell().Border(1).Padding(3);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(totalLlevados.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(totalDevueltos.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(totalVentaNeta.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span((ventaNetaAcumulada / (conteoDias > 0 ? conteoDias : 1)).ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(totalPorcDevolucion.ToString("F2") + "%").Style(boldStyle));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposePromediosTable(IContainer container)
|
||||||
|
{
|
||||||
|
var dayOrder = new Dictionary<string, int> { { "Lunes", 1 }, { "Martes", 2 }, { "Miércoles", 3 }, { "Jueves", 4 }, { "Viernes", 5 }, { "Sábado", 6 }, { "Domingo", 7 }};
|
||||||
|
|
||||||
|
container.Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(1.5f); columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn(); columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn(); columns.RelativeColumn(1.2f);
|
||||||
|
});
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Día");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Cant. Días");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Ventas");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("% Devolución");
|
||||||
|
});
|
||||||
|
foreach (var item in Model.PromediosPorDia.Where(p => p.Dia != "General").OrderBy(d => dayOrder.GetValueOrDefault(d.Dia, 99)))
|
||||||
|
{
|
||||||
|
var llevados = item.Promedio_Llevados ?? 0;
|
||||||
|
var devueltos = item.Promedio_Devueltos ?? 0;
|
||||||
|
var porcDevolucion = llevados > 0 ? (decimal)devueltos * 100 / llevados : 0;
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Dia);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Cant?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(llevados.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(devueltos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Promedio_Ventas?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(porcDevolucion.ToString("F2") + "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- FILA GENERAL ---
|
||||||
|
var general = Model.PromedioGeneral;
|
||||||
|
if (general != null)
|
||||||
|
{
|
||||||
|
var boldStyle = TextStyle.Default.SemiBold();
|
||||||
|
var llevadosGeneral = general.Llevados ?? 0; // Usamos el total para el %
|
||||||
|
var devueltosGeneral = general.Devueltos ?? 0; // Usamos el total para el %
|
||||||
|
var porcDevolucionGeneral = llevadosGeneral > 0 ? (decimal)devueltosGeneral * 100 / llevadosGeneral : 0;
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3).Text(t => t.Span(general.Dia).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(general.Cant?.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(general.Promedio_Llevados?.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(general.Promedio_Devueltos?.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(general.Promedio_Ventas?.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(porcDevolucionGeneral.ToString("F2") + "%").Style(boldStyle));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class ListadoDistribucionGeneralDocument : IDocument
|
||||||
|
{
|
||||||
|
public ListadoDistribucionGeneralViewModel Model { get; }
|
||||||
|
|
||||||
|
public ListadoDistribucionGeneralDocument(ListadoDistribucionGeneralViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("Listado de Distribución General Mensual").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text(Model.NombrePublicacion).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(1, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha de Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Mes Consultado: ").SemiBold(); text.Span(Model.MesConsultado); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Millimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(20);
|
||||||
|
|
||||||
|
if (Model.ResumenMensual.Any())
|
||||||
|
{
|
||||||
|
column.Item().Element(ComposeResumenTable);
|
||||||
|
}
|
||||||
|
if (Model.PromediosPorDia.Any())
|
||||||
|
{
|
||||||
|
column.Item().Element(ComposePromediosTable);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeResumenTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(60);
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Día");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Tirada");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Sin Cargo");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Perdidos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Vendidos");
|
||||||
|
});
|
||||||
|
|
||||||
|
var dayAbbreviations = new Dictionary<System.DayOfWeek, string>
|
||||||
|
{
|
||||||
|
{ System.DayOfWeek.Sunday, "Dom" },
|
||||||
|
{ System.DayOfWeek.Monday, "Lun" },
|
||||||
|
{ System.DayOfWeek.Tuesday, "Mar" },
|
||||||
|
{ System.DayOfWeek.Wednesday, "Mie" },
|
||||||
|
{ System.DayOfWeek.Thursday, "Jue" },
|
||||||
|
{ System.DayOfWeek.Friday, "Vie" },
|
||||||
|
{ System.DayOfWeek.Saturday, "Sab" }
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var item in Model.ResumenMensual.OrderBy(x => x.Fecha))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(3).Text($"{dayAbbreviations[item.Fecha.DayOfWeek]} {item.Fecha.Day}");
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.CantidadTirada.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.SinCargo.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Perdidos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Llevados.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Devueltos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.Vendidos.ToString("N0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(3);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.ResumenMensual.Sum(x => x.CantidadTirada).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.ResumenMensual.Sum(x => x.SinCargo).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.ResumenMensual.Sum(x => x.Perdidos).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.ResumenMensual.Sum(x => x.Llevados).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.ResumenMensual.Sum(x => x.Devueltos).ToString("N0")).SemiBold());
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(t => t.Span(Model.ResumenMensual.Sum(x => x.Vendidos).ToString("N0")).SemiBold());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposePromediosTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
// --- TÍTULO DE LA TABLA DE PROMEDIOS ---
|
||||||
|
column.Item().PaddingBottom(5).AlignCenter().Text("Promedios Diarios de Distribución").SemiBold();
|
||||||
|
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(1.2f);
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
columns.RelativeColumn();
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Día");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Cant. Días");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Tirada");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Sin Cargo");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Perdidos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Llevados");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Devueltos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Vendidos");
|
||||||
|
});
|
||||||
|
|
||||||
|
var dayOrder = new Dictionary<string, int> { { "Lunes", 1 }, { "Martes", 2 }, { "Miércoles", 3 }, { "Jueves", 4 }, { "Viernes", 5 }, { "Sábado", 6 }, { "Domingo", 7 } };
|
||||||
|
|
||||||
|
// Mostramos los promedios por día de la semana
|
||||||
|
foreach (var item in Model.PromediosPorDia.OrderBy(d => dayOrder.GetValueOrDefault(d.Dia, 99)))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Dia);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.CantidadDias.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.PromedioTirada.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.PromedioSinCargo.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.PromedioPerdidos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.PromedioLlevados.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.PromedioDevueltos.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.PromedioVendidos.ToString("N0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- FILA GENERAL CON DATOS CALCULADOS DEL VIEWMODEL ---
|
||||||
|
var general = Model.PromedioGeneral;
|
||||||
|
if (general != null)
|
||||||
|
{
|
||||||
|
var boldStyle = TextStyle.Default.SemiBold();
|
||||||
|
table.Cell().Border(1).Padding(3).Text(text => text.Span(general.Dia).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.CantidadDias.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.PromedioTirada.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.PromedioSinCargo.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.PromedioPerdidos.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.PromedioLlevados.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.PromedioDevueltos.ToString("N0")).Style(boldStyle));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(general.PromedioVendidos.ToString("N0")).Style(boldStyle));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class MovimientoBobinasDocument : IDocument
|
||||||
|
{
|
||||||
|
public MovimientoBobinasViewModel Model { get; }
|
||||||
|
|
||||||
|
public MovimientoBobinasDocument(MovimientoBobinasViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
public DocumentSettings GetSettings() => DocumentSettings.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container
|
||||||
|
.Page(page =>
|
||||||
|
{
|
||||||
|
// Configuramos la página en modo apaisado (landscape)
|
||||||
|
page.Size(PageSizes.A4.Landscape());
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Roboto").FontSize(9)); // Un poco más pequeño por la cantidad de columnas
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
|
||||||
|
page.Footer()
|
||||||
|
.AlignCenter()
|
||||||
|
.Text(x =>
|
||||||
|
{
|
||||||
|
x.Span("Página ");
|
||||||
|
x.CurrentPageNumber();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Movimiento de Bobinas").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text($"Planta: {Model.NombrePlanta}").FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(2, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Column(col =>
|
||||||
|
{
|
||||||
|
col.Item().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha del Reporte: ").SemiBold();
|
||||||
|
text.Span(Model.FechaReporte);
|
||||||
|
});
|
||||||
|
col.Item().Text($"Periodo Consultado: Desde {Model.FechaDesde} Hasta {Model.FechaHasta}");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Table(table =>
|
||||||
|
{
|
||||||
|
// Definimos 11 columnas. Usamos una combinación de relativas y constantes
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2.5f); // Tipo
|
||||||
|
columns.ConstantColumn(50); // Cant. Inicial
|
||||||
|
columns.ConstantColumn(60); // Kg Iniciales
|
||||||
|
columns.ConstantColumn(50); // Compradas
|
||||||
|
columns.ConstantColumn(60); // Kg Comprados
|
||||||
|
columns.ConstantColumn(50); // Consumidas
|
||||||
|
columns.ConstantColumn(60); // Kg Consumidos
|
||||||
|
columns.ConstantColumn(50); // Dañadas
|
||||||
|
columns.ConstantColumn(60); // Kg Dañados
|
||||||
|
columns.ConstantColumn(50); // Cant. Final
|
||||||
|
columns.ConstantColumn(60); // Kg Final
|
||||||
|
});
|
||||||
|
|
||||||
|
// Encabezado de la tabla
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
// Celda por celda para control total
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).Text("Tipo");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Cant. Inicial");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Kg Inicial");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Compradas");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Kg Comprados");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Consumidas");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Kg Consumidos");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Dañadas");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Kg Dañados");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Cant. Final");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(2).AlignCenter().Text("Kg Final");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Filas de datos
|
||||||
|
foreach (var item in Model.Movimientos)
|
||||||
|
{
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).Text(item.TipoBobina);
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.BobinasIniciales.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.KilosIniciales.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.BobinasCompradas.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.KilosComprados.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.BobinasConsumidas.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.KilosConsumidos.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.BobinasDaniadas.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.KilosDaniados.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.BobinasFinales.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(2).AlignCenter().Text(item.KilosFinales.ToString("N0"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class MovimientoBobinasEstadoDocument : IDocument
|
||||||
|
{
|
||||||
|
public MovimientoBobinasEstadoViewModel Model { get; }
|
||||||
|
|
||||||
|
public MovimientoBobinasEstadoDocument(MovimientoBobinasEstadoViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
public DocumentSettings GetSettings() => DocumentSettings.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container
|
||||||
|
.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Roboto").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
|
||||||
|
page.Footer()
|
||||||
|
.AlignCenter()
|
||||||
|
.Text(x =>
|
||||||
|
{
|
||||||
|
x.Span("Página ");
|
||||||
|
x.CurrentPageNumber();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Movimiento de Bobinas por Estados").SemiBold().FontSize(14);
|
||||||
|
column.Item().AlignCenter().Text($"Planta: {Model.NombrePlanta}").FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(2, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Column(col =>
|
||||||
|
{
|
||||||
|
col.Item().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha del Reporte: ").SemiBold();
|
||||||
|
text.Span(Model.FechaReporte);
|
||||||
|
});
|
||||||
|
col.Item().Text($"Periodo Consultado: Desde {Model.FechaDesde} Hasta {Model.FechaHasta}");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Column(column =>
|
||||||
|
{
|
||||||
|
// Primera tabla: Detalle de Movimientos
|
||||||
|
column.Item().Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(3); // Tipo Bobina
|
||||||
|
columns.RelativeColumn(2); // Remito
|
||||||
|
columns.ConstantColumn(80); // Fecha
|
||||||
|
columns.ConstantColumn(60); // Cantidad
|
||||||
|
columns.RelativeColumn(2); // Tipo Movimiento
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).Text("Tipo Bobina");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).Text("N° Remito");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignCenter().Text("Fecha Mov.");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Cantidad");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).Text("Tipo Movimiento");
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Detalles)
|
||||||
|
{
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).Text(item.TipoBobina);
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).Text(item.NumeroRemito);
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignCenter().Text(item.FechaMovimiento.ToString("dd/MM/yyyy"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(item.Cantidad.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).Text(item.TipoMovimiento);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Espacio entre tablas
|
||||||
|
column.Item().PaddingTop(1, Unit.Centimetre);
|
||||||
|
|
||||||
|
// Segunda tabla: Totales
|
||||||
|
column.Item().AlignLeft().Table(table => // Alineamos la tabla a la izquierda para que no ocupe todo el ancho
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(120); // Tipo Movimiento
|
||||||
|
columns.ConstantColumn(80); // Total Bobinas
|
||||||
|
columns.ConstantColumn(80); // Total Kilos
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).Text("Totales por Movimiento");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Total Bobinas");
|
||||||
|
header.Cell().Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Total Kilos");
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var total in Model.Totales)
|
||||||
|
{
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).Text(total.TipoMovimiento);
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(total.TotalBobinas.ToString("N0"));
|
||||||
|
table.Cell().BorderBottom(1).BorderColor(Colors.Grey.Lighten2).Padding(4).AlignRight().Text(total.TotalKilos.ToString("N0"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class NovedadesCanillasDocument : IDocument
|
||||||
|
{
|
||||||
|
public NovedadesCanillasViewModel Model { get; }
|
||||||
|
private static readonly CultureInfo CultureAr = new CultureInfo("es-AR");
|
||||||
|
|
||||||
|
public NovedadesCanillasDocument(NovedadesCanillasViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1.5f, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(10));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("Listado de Novedades - Canillas").SemiBold().FontSize(16);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha de Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Periodo: ").SemiBold(); text.Span($"{Model.FechaDesde} - {Model.FechaHasta}"); });
|
||||||
|
});
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5).Border(1).Background(Colors.Grey.Lighten3).AlignCenter().Padding(2).Text(Model.NombreEmpresa).SemiBold();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(1, Unit.Centimetre).Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(20);
|
||||||
|
|
||||||
|
if (Model.ResumenCanillas.Any())
|
||||||
|
{
|
||||||
|
column.Item().Element(ComposeResumenTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Model.DetallesNovedades.Any())
|
||||||
|
{
|
||||||
|
column.Item().Element(ComposeDetallesNovedadesTable);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeResumenTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(3); // Canilla
|
||||||
|
columns.RelativeColumn(1); // Legajo
|
||||||
|
columns.RelativeColumn(1); // Faltas
|
||||||
|
columns.RelativeColumn(1); // Francos
|
||||||
|
columns.RelativeColumn(1.5f); // Comisiones
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Canilla");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Legajo");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignCenter().Text("Faltas");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignCenter().Text("Francos");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Comisiones");
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.ResumenCanillas.OrderBy(x => x.Canilla))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Canilla);
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.Legajo?.ToString() ?? "-");
|
||||||
|
table.Cell().Border(1).Padding(3).AlignCenter().Text(item.Faltas?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Border(1).Padding(3).AlignCenter().Text(item.Francos?.ToString("N0") ?? "0");
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.TotalRendir?.ToString("C", CultureAr) ?? "$ 0.00");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de Totales
|
||||||
|
table.Cell().ColumnSpan(4).Border(1).Padding(3).AlignRight().Text("Total").SemiBold();
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.ResumenCanillas.Sum(x => x.TotalRendir ?? 0).ToString("C", CultureAr)).SemiBold());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeDetallesNovedadesTable(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().PaddingTop(10).Text("Otras Novedades").SemiBold().FontSize(12);
|
||||||
|
column.Item().PaddingTop(5).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2); // Nombre
|
||||||
|
columns.ConstantColumn(80); // Fecha
|
||||||
|
columns.RelativeColumn(4); // Detalle
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Nombre");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Fecha");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Detalle");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Agrupamos por canillita para mostrar su nombre una sola vez
|
||||||
|
foreach (var grupo in Model.DetallesNovedades.GroupBy(x => x.NomApe))
|
||||||
|
{
|
||||||
|
// Celda con el nombre del canillita, abarcando todas las filas de sus novedades
|
||||||
|
table.Cell().RowSpan((uint)grupo.Count()).Border(1).Padding(3).Text(grupo.Key);
|
||||||
|
|
||||||
|
// Iteramos sobre las novedades del grupo
|
||||||
|
foreach (var detalle in grupo.OrderBy(d => d.Fecha))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(3).Text(detalle.Fecha.ToString("dd/MM/yyyy"));
|
||||||
|
table.Cell().Border(1).Padding(3).Text(detalle.Detalle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class TiradasPublicacionesSeccionesDocument : IDocument
|
||||||
|
{
|
||||||
|
public TiradasPublicacionesSeccionesViewModel Model { get; }
|
||||||
|
|
||||||
|
public TiradasPublicacionesSeccionesDocument(TiradasPublicacionesSeccionesViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("Reporte de Tiradas por Publicación Mensual").SemiBold().FontSize(14);
|
||||||
|
|
||||||
|
// Título secundario dinámico
|
||||||
|
string subTitle = Model.EsConsolidado
|
||||||
|
? $"Consolidado - Publicación: {Model.NombrePublicacion}"
|
||||||
|
: $"Planta: {Model.NombrePlanta} - Publicación: {Model.NombrePublicacion}";
|
||||||
|
column.Item().AlignCenter().Text(subTitle).FontSize(12);
|
||||||
|
|
||||||
|
column.Item().PaddingTop(5, Unit.Millimetre).Row(row =>
|
||||||
|
{
|
||||||
|
row.RelativeItem().Text(text => { text.Span("Fecha del Reporte: ").SemiBold(); text.Span(Model.FechaReporte); });
|
||||||
|
row.RelativeItem().AlignRight().Text(text => { text.Span("Mes Consultado: ").SemiBold(); text.Span(Model.MesConsultado); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.RelativeColumn(2.5f); // Nombre Seccion
|
||||||
|
columns.RelativeColumn(1.5f); // Páginas Impresas
|
||||||
|
columns.RelativeColumn(1); // Total Ediciones
|
||||||
|
columns.RelativeColumn(1.5f); // Pág. Por Edición
|
||||||
|
columns.RelativeColumn(1.2f); // Total Ejemplares
|
||||||
|
columns.RelativeColumn(1.5f); // Pág. Ejemplar
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).Text("Nombre Sección");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Páginas Impresas");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Total Ediciones");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Pág/Edición");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Total Ejemplares");
|
||||||
|
header.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(4).AlignRight().Text("Prom. Pág/Ejemplar");
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.Detalles.OrderBy(x => x.NombreSeccion))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(3).Text(item.NombreSeccion);
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.TotalPaginasImpresas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.CantidadTiradas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.TotalPaginasEjemplares.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.TotalEjemplares.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(item.PromedioPaginasPorEjemplar.ToString("N0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fila de Totales
|
||||||
|
var style = TextStyle.Default.SemiBold();
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span("Totales").Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.TotalPaginasImpresas).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.CantidadTiradas).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.TotalPaginasEjemplares).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.TotalEjemplares).ToString("N0")).Style(style));
|
||||||
|
table.Cell().Border(1).Padding(3).AlignRight().Text(text => text.Span(Model.Detalles.Sum(x => x.PromedioPaginasPorEjemplar).ToString("N0")).Style(style));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class VentaMensualSecretariaElDiaDocument : IDocument
|
||||||
|
{
|
||||||
|
public VentaMensualSecretariaElDiaViewModel Model { get; }
|
||||||
|
|
||||||
|
public VentaMensualSecretariaElDiaDocument(VentaMensualSecretariaElDiaViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(11));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("VENTA DIARIO EL DÍA").SemiBold().FontSize(16);
|
||||||
|
|
||||||
|
column.Item().AlignCenter().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha Consultada: Desde ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaDesde).FontSize(12);
|
||||||
|
text.Span(" Hasta ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaHasta).FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(50); // Día
|
||||||
|
columns.RelativeColumn(); // Canillas
|
||||||
|
columns.RelativeColumn(); // Tirajes
|
||||||
|
columns.RelativeColumn(); // Ventas
|
||||||
|
columns.RelativeColumn(); // Accionistas
|
||||||
|
columns.RelativeColumn(); // Total Coop.
|
||||||
|
columns.RelativeColumn(); // Total Gral.
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("DÍA").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("CANILLAS").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("TIRAJES").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("VENTAS").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("ACCIONISTAS").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("TOTAL COOPERATIVA").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("TOTAL").FontColor(Colors.White).SemiBold());
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.VentasDiarias.OrderBy(x => x.Dia))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.Dia.ToString());
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.CantidadCanillas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.Tirajes.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.Ventas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.Accionistas.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.TotalCooperativa.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(t => t.Span(item.TotalGeneral.ToString("N0")).SemiBold());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class VentaMensualSecretariaElPlataDocument : IDocument
|
||||||
|
{
|
||||||
|
public VentaMensualSecretariaElPlataViewModel Model { get; }
|
||||||
|
|
||||||
|
public VentaMensualSecretariaElPlataDocument(VentaMensualSecretariaElPlataViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(11));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Spacing(5);
|
||||||
|
column.Item().AlignCenter().Text("VENTA DIARIO EL PLATA").SemiBold().FontSize(16);
|
||||||
|
|
||||||
|
column.Item().AlignCenter().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha Consultada: Desde ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaDesde).FontSize(12);
|
||||||
|
text.Span(" Hasta ").SemiBold().FontSize(12);
|
||||||
|
text.Span(Model.FechaHasta).FontSize(12);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(50); // Día
|
||||||
|
columns.RelativeColumn(); // Tirada Coop
|
||||||
|
columns.RelativeColumn(); // Devolución Coop
|
||||||
|
columns.RelativeColumn(); // Venta Coop
|
||||||
|
columns.RelativeColumn(); // Tirada Canillas
|
||||||
|
columns.RelativeColumn(); // Venta Canillas
|
||||||
|
columns.RelativeColumn(); // Total
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("DÍA").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("TIRADA COOP.").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("DEVOLUCIÓN COOP.").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("VENTA COOP.").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("TIRADA CANILLAS").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("VENTA CANILLAS (TOTAL)").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().Background(Colors.Black).Border(1).BorderColor(Colors.White).Padding(4).AlignCenter().Text(text => text.Span("TOTAL").FontColor(Colors.White).SemiBold());
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in Model.VentasDiarias.OrderBy(x => x.Dia))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.Dia.ToString());
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.TiradaCoop.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.DevolucionCoop.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.VentaCoop.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.TiradaCan.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.VentaCan.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(t => t.Span(item.Total.ToString("N0")).SemiBold());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Reportes.ViewModels;
|
||||||
|
using QuestPDF.Elements.Table;
|
||||||
|
using QuestPDF.Fluent;
|
||||||
|
using QuestPDF.Helpers;
|
||||||
|
using QuestPDF.Infrastructure;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||||
|
{
|
||||||
|
public class VentaMensualSecretariaTirDevoDocument : IDocument
|
||||||
|
{
|
||||||
|
public VentaMensualSecretariaTirDevoViewModel Model { get; }
|
||||||
|
|
||||||
|
public VentaMensualSecretariaTirDevoDocument(VentaMensualSecretariaTirDevoViewModel model)
|
||||||
|
{
|
||||||
|
Model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
|
||||||
|
|
||||||
|
public void Compose(IDocumentContainer container)
|
||||||
|
{
|
||||||
|
container.Page(page =>
|
||||||
|
{
|
||||||
|
// CORRECCIÓN: Se aplica Landscape() al tamaño de página.
|
||||||
|
page.Size(PageSizes.A4.Landscape());
|
||||||
|
page.Margin(1, Unit.Centimetre);
|
||||||
|
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(12));
|
||||||
|
|
||||||
|
page.Header().Element(ComposeHeader);
|
||||||
|
page.Content().Element(ComposeContent);
|
||||||
|
page.Footer().AlignCenter().Text(x => { x.Span("Página "); x.CurrentPageNumber(); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeHeader(IContainer container)
|
||||||
|
{
|
||||||
|
container.Column(column =>
|
||||||
|
{
|
||||||
|
column.Item().AlignCenter().Text("TIRADA Y DEVOLUCIÓN").SemiBold().FontSize(18);
|
||||||
|
column.Item().AlignCenter().Text(text =>
|
||||||
|
{
|
||||||
|
text.Span("Fecha Consultada: Desde ").SemiBold().FontSize(14);
|
||||||
|
text.Span(Model.FechaDesde).FontSize(14);
|
||||||
|
text.Span(" Hasta ").SemiBold().FontSize(14);
|
||||||
|
text.Span(Model.FechaHasta).FontSize(14);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComposeContent(IContainer container)
|
||||||
|
{
|
||||||
|
container.PaddingTop(5, Unit.Millimetre).Table(table =>
|
||||||
|
{
|
||||||
|
table.ColumnsDefinition(columns =>
|
||||||
|
{
|
||||||
|
columns.ConstantColumn(40);
|
||||||
|
columns.RelativeColumn(); columns.RelativeColumn(); columns.RelativeColumn(); // EL DÍA
|
||||||
|
columns.RelativeColumn(); columns.RelativeColumn(); columns.RelativeColumn(); // POPULAR
|
||||||
|
columns.RelativeColumn(); columns.RelativeColumn(); columns.RelativeColumn(); // CLARÍN
|
||||||
|
columns.RelativeColumn(); columns.RelativeColumn(); columns.RelativeColumn(); // LA NACIÓN
|
||||||
|
});
|
||||||
|
|
||||||
|
table.Header(header =>
|
||||||
|
{
|
||||||
|
// CORRECCIÓN: La sintaxis de VerticalAlign es un método.
|
||||||
|
header.Cell().RowSpan(2).Border(1).Background(Colors.Black).AlignCenter().AlignMiddle().Text(text => text.Span("Día").FontColor(Colors.White).SemiBold());
|
||||||
|
|
||||||
|
header.Cell().ColumnSpan(3).Border(1).Background(Colors.Black).AlignCenter().Text(text => text.Span("EL DÍA").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().ColumnSpan(3).Border(1).Background(Colors.Black).AlignCenter().Text(text => text.Span("POPULAR").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().ColumnSpan(3).Border(1).Background(Colors.Black).AlignCenter().Text(text => text.Span("CLARÍN").FontColor(Colors.White).SemiBold());
|
||||||
|
header.Cell().ColumnSpan(3).Border(1).Background(Colors.Black).AlignCenter().Text(text => text.Span("LA NACIÓN").FontColor(Colors.White).SemiBold());
|
||||||
|
|
||||||
|
// CORRECCIÓN: Se define una función local para crear y estilizar las celdas del sub-encabezado.
|
||||||
|
// Esto evita el error de "multiple child elements".
|
||||||
|
void SubHeaderCell(ITableCellContainer cell, string text)
|
||||||
|
{
|
||||||
|
cell.Border(1)
|
||||||
|
.Background(Colors.Black)
|
||||||
|
.AlignCenter()
|
||||||
|
.Text(txt => txt.Span(text).FontColor(Colors.White).SemiBold());
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var _ in Enumerable.Range(0, 4))
|
||||||
|
{
|
||||||
|
SubHeaderCell(header.Cell(), "TIRADA");
|
||||||
|
SubHeaderCell(header.Cell(), "DEVOLUC");
|
||||||
|
SubHeaderCell(header.Cell(), "VENTA");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Filas de datos (sin cambios)
|
||||||
|
foreach (var item in Model.VentasDiarias.OrderBy(x => x.Dia))
|
||||||
|
{
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.Dia.ToString());
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.TiradaCoop.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.DevolucionCoop.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(t => t.Span(item.VentaCoop.ToString("N0")).SemiBold());
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.TiradaPopular.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.DevolucionPopular.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(t => t.Span(item.VentaPopular.ToString("N0")).SemiBold());
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.TiradaClarin.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.DevolucionClarin.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(t => t.Span(item.VentaClarin.ToString("N0")).SemiBold());
|
||||||
|
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.TiradaNacion.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(item.DevolucionNacion.ToString("N0"));
|
||||||
|
table.Cell().Border(1).Padding(4).AlignCenter().Text(t => t.Span(item.VentaNacion.ToString("N0")).SemiBold());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,779 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
|
||||||
<AutoRefresh>0</AutoRefresh>
|
|
||||||
<DataSources>
|
|
||||||
<DataSource Name="DSConsumoBobinas">
|
|
||||||
<ConnectionProperties>
|
|
||||||
<DataProvider>System.Data.DataSet</DataProvider>
|
|
||||||
<ConnectString>/* Local Connection */</ConnectString>
|
|
||||||
</ConnectionProperties>
|
|
||||||
<rd:DataSourceID>2bf94014-b80d-4047-9164-c0b5ad337361</rd:DataSourceID>
|
|
||||||
</DataSource>
|
|
||||||
</DataSources>
|
|
||||||
<DataSets>
|
|
||||||
<DataSet Name="DSConsumoBobinasPublicacion">
|
|
||||||
<Query>
|
|
||||||
<DataSourceName>DSConsumoBobinas</DataSourceName>
|
|
||||||
<CommandText>/* Local Query */</CommandText>
|
|
||||||
</Query>
|
|
||||||
<Fields>
|
|
||||||
<Field Name="NombrePlanta">
|
|
||||||
<DataField>NombrePlanta</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="NombrePublicacion">
|
|
||||||
<DataField>NombrePublicacion</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalKilos">
|
|
||||||
<DataField>TotalKilos</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="CantidadBobinas">
|
|
||||||
<DataField>CantidadBobinas</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
</Fields>
|
|
||||||
<rd:DataSetInfo>
|
|
||||||
<rd:DataSetName>DSConsumoBobinas</rd:DataSetName>
|
|
||||||
<rd:SchemaPath>C:\Users\dmolinari\source\repos\Cobol-VBNet\Reportes\DSConsumoBobinas.xsd</rd:SchemaPath>
|
|
||||||
<rd:TableName>SP_BobinasUtilizadasPorPublicacion</rd:TableName>
|
|
||||||
<rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
|
|
||||||
<rd:TableAdapterGetDataMethod>GetData</rd:TableAdapterGetDataMethod>
|
|
||||||
<rd:TableAdapterName>SP_BobinasUtilizadasPorPublicacionTableAdapter</rd:TableAdapterName>
|
|
||||||
</rd:DataSetInfo>
|
|
||||||
</DataSet>
|
|
||||||
</DataSets>
|
|
||||||
<ReportSections>
|
|
||||||
<ReportSection>
|
|
||||||
<Body>
|
|
||||||
<ReportItems>
|
|
||||||
<Tablix Name="Tablix1">
|
|
||||||
<TablixBody>
|
|
||||||
<TablixColumns>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>6cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>5cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>4cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
</TablixColumns>
|
|
||||||
<TablixRows>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox11">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Publicación</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>roboto</FontFamily>
|
|
||||||
<FontSize>11pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox13">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Kilos</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>roboto</FontFamily>
|
|
||||||
<FontSize>11pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox15">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Cant.Bobinas</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>roboto</FontFamily>
|
|
||||||
<FontSize>11pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox15</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="NombrePublicacion">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!NombrePublicacion.Value</Value>
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>NombrePublicacion</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TotalKilos">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalKilos.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<Format>#,0</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TotalKilos</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="CantidadBobinas">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!CantidadBobinas.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<Format>#,0</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>CantidadBobinas</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox48">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Totales </Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>roboto</FontFamily>
|
|
||||||
<FontSize>11pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Right</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox48</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox50">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!TotalKilos.Value)</Value>
|
|
||||||
<Style>
|
|
||||||
<Format>#,0</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox50</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox51">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!CantidadBobinas.Value)</Value>
|
|
||||||
<Style>
|
|
||||||
<Format>#,0</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox51</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
</TablixRows>
|
|
||||||
</TablixBody>
|
|
||||||
<TablixColumnHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixColumnHierarchy>
|
|
||||||
<TablixRowHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember>
|
|
||||||
<TablixHeader>
|
|
||||||
<Size>4cm</Size>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox17">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Planta</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>roboto</FontFamily>
|
|
||||||
<FontSize>11pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox17</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixHeader>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
<KeepWithGroup>After</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<Group Name="NombrePlanta">
|
|
||||||
<GroupExpressions>
|
|
||||||
<GroupExpression>=Fields!NombrePlanta.Value</GroupExpression>
|
|
||||||
</GroupExpressions>
|
|
||||||
</Group>
|
|
||||||
<SortExpressions>
|
|
||||||
<SortExpression>
|
|
||||||
<Value>=Fields!NombrePlanta.Value</Value>
|
|
||||||
</SortExpression>
|
|
||||||
</SortExpressions>
|
|
||||||
<TablixHeader>
|
|
||||||
<Size>4cm</Size>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="NombrePlanta1">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!NombrePlanta.Value</Value>
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>NombrePlanta1</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixHeader>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember>
|
|
||||||
<Group Name="Detalles" />
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<KeepWithGroup>Before</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixMember>
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixRowHierarchy>
|
|
||||||
<DataSetName>DSConsumoBobinasPublicacion</DataSetName>
|
|
||||||
<Top>0.14111cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>1.8cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</Tablix>
|
|
||||||
</ReportItems>
|
|
||||||
<Height>0.80957in</Height>
|
|
||||||
<Style />
|
|
||||||
</Body>
|
|
||||||
<Width>21cm</Width>
|
|
||||||
<Page>
|
|
||||||
<PageHeader>
|
|
||||||
<Height>1.91974cm</Height>
|
|
||||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
|
||||||
<PrintOnLastPage>true</PrintOnLastPage>
|
|
||||||
<ReportItems>
|
|
||||||
<Textbox Name="Textbox41">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Reporte de Consumo de Bobinas por Publicaciones</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>0.28998cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.72912cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox43">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Fecha del Reporte</Value>
|
|
||||||
<Style>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.16692cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.64974cm</Height>
|
|
||||||
<Width>3.43896cm</Width>
|
|
||||||
<ZIndex>1</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox49">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Globals!ExecutionTime).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.16692cm</Top>
|
|
||||||
<Left>4.00151cm</Left>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<Width>2.60584cm</Width>
|
|
||||||
<ZIndex>2</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox71">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Fecha Consultada: Desde</Value>
|
|
||||||
<Style>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.17052cm</Top>
|
|
||||||
<Left>6.64968cm</Left>
|
|
||||||
<Height>0.64974cm</Height>
|
|
||||||
<Width>4.5cm</Width>
|
|
||||||
<ZIndex>3</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox72">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Parameters!FechaDesde.Value).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.2058cm</Top>
|
|
||||||
<Left>11.0676cm</Left>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<Width>2.52646cm</Width>
|
|
||||||
<ZIndex>4</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox76">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Hasta</Value>
|
|
||||||
<Style>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.17052cm</Top>
|
|
||||||
<Left>13.31184cm</Left>
|
|
||||||
<Height>0.64974cm</Height>
|
|
||||||
<Width>1.13709cm</Width>
|
|
||||||
<ZIndex>5</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox77">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Parameters!FechaHasta.Value).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.17052cm</Top>
|
|
||||||
<Left>14.44892cm</Left>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<Width>2.52646cm</Width>
|
|
||||||
<ZIndex>6</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</ReportItems>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</PageHeader>
|
|
||||||
<PageHeight>29.7cm</PageHeight>
|
|
||||||
<PageWidth>21cm</PageWidth>
|
|
||||||
<LeftMargin>0cm</LeftMargin>
|
|
||||||
<RightMargin>0cm</RightMargin>
|
|
||||||
<TopMargin>0.5cm</TopMargin>
|
|
||||||
<BottomMargin>0.5cm</BottomMargin>
|
|
||||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
|
||||||
<Style />
|
|
||||||
</Page>
|
|
||||||
</ReportSection>
|
|
||||||
</ReportSections>
|
|
||||||
<ReportParameters>
|
|
||||||
<ReportParameter Name="FechaDesde">
|
|
||||||
<DataType>DateTime</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
<ReportParameter Name="FechaHasta">
|
|
||||||
<DataType>DateTime</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
</ReportParameters>
|
|
||||||
<ReportParametersLayout>
|
|
||||||
<GridLayoutDefinition>
|
|
||||||
<NumberOfColumns>4</NumberOfColumns>
|
|
||||||
<NumberOfRows>2</NumberOfRows>
|
|
||||||
<CellDefinitions>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>FechaDesde</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>FechaHasta</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
</CellDefinitions>
|
|
||||||
</GridLayoutDefinition>
|
|
||||||
</ReportParametersLayout>
|
|
||||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
|
||||||
<rd:ReportID>4e743a44-a248-48fe-9b28-03d7da14e6e5</rd:ReportID>
|
|
||||||
</Report>
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,992 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
|
||||||
<AutoRefresh>0</AutoRefresh>
|
|
||||||
<DataSources>
|
|
||||||
<DataSource Name="DSLiquidacionCanillas">
|
|
||||||
<ConnectionProperties>
|
|
||||||
<DataProvider>System.Data.DataSet</DataProvider>
|
|
||||||
<ConnectString>/* Local Connection */</ConnectString>
|
|
||||||
</ConnectionProperties>
|
|
||||||
<rd:DataSourceID>ee328c50-edc3-4726-92dc-19ec72ac5a56</rd:DataSourceID>
|
|
||||||
</DataSource>
|
|
||||||
</DataSources>
|
|
||||||
<DataSets>
|
|
||||||
<DataSet Name="DSLiquidacionCanillas">
|
|
||||||
<Query>
|
|
||||||
<DataSourceName>DSLiquidacionCanillas</DataSourceName>
|
|
||||||
<CommandText>/* Local Query */</CommandText>
|
|
||||||
</Query>
|
|
||||||
<Fields>
|
|
||||||
<Field Name="Publicacion">
|
|
||||||
<DataField>Publicacion</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Canilla">
|
|
||||||
<DataField>Canilla</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalCantSalida">
|
|
||||||
<DataField>TotalCantSalida</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalCantEntrada">
|
|
||||||
<DataField>TotalCantEntrada</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalRendir">
|
|
||||||
<DataField>TotalRendir</DataField>
|
|
||||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="PrecioEjemplar">
|
|
||||||
<DataField>PrecioEjemplar</DataField>
|
|
||||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
</Fields>
|
|
||||||
<rd:DataSetInfo>
|
|
||||||
<rd:DataSetName>DSLiquidacionCanillas</rd:DataSetName>
|
|
||||||
<rd:SchemaPath>C:\Users\dmolinari\source\repos\Cobol-VBNet\Reportes\DSLiquidacionCanillas.xsd</rd:SchemaPath>
|
|
||||||
<rd:TableName>SP_DistCanillasLiquidacion</rd:TableName>
|
|
||||||
<rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
|
|
||||||
<rd:TableAdapterGetDataMethod>GetData</rd:TableAdapterGetDataMethod>
|
|
||||||
<rd:TableAdapterName>SP_DistCanillasLiquidacionTableAdapter</rd:TableAdapterName>
|
|
||||||
</rd:DataSetInfo>
|
|
||||||
</DataSet>
|
|
||||||
</DataSets>
|
|
||||||
<ReportSections>
|
|
||||||
<ReportSection>
|
|
||||||
<Body>
|
|
||||||
<ReportItems>
|
|
||||||
<Tablix Name="Tablix1">
|
|
||||||
<TablixBody>
|
|
||||||
<TablixColumns>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3.53124cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3.10854cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3.55834cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
</TablixColumns>
|
|
||||||
<TablixRows>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox38">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>="Vendedor: " & First(Fields!Canilla.Value, "DSLiquidacionCanillas")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox38</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<ColSpan>3</ColSpan>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell />
|
|
||||||
<TablixCell />
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Publicacion">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!Publicacion.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Publicacion</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox13">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Retirados</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TotalCantSalida">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalCantSalida.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TotalCantSalida</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox7">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox7</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox14">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Devueltos</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox12">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalCantEntrada.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox27">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox27</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox28">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Vendidos</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox28</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox29">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalCantSalida.Value-Fields!TotalCantEntrada.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox29</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox33">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox33</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox30">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Precio Unitario</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox30</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox32">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!PrecioEjemplar.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<Format>'$'#,0.00;'$'-#,0.00</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
<rd:FormatSymbolCulture>es-AR</rd:FormatSymbolCulture>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox35">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox35</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox36">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Importe Vendido</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox36</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Width>2pt</Width>
|
|
||||||
</TopBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox37">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalRendir.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Format>'$'#,0.00;'$'-#,0.00</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox37</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Width>2pt</Width>
|
|
||||||
</TopBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
<rd:FormatSymbolCulture>es-AR</rd:FormatSymbolCulture>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox1">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value />
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</TopBorder>
|
|
||||||
<BottomBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</BottomBorder>
|
|
||||||
<LeftBorder>
|
|
||||||
<Style>None</Style>
|
|
||||||
</LeftBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox2">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Total A Rendir</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Width>2pt</Width>
|
|
||||||
</TopBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox4">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!TotalRendir.Value, "DSLiquidacionCanillas")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Format>'$'#,0.00;'$'-#,0.00</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<TopBorder>
|
|
||||||
<Color>Black</Color>
|
|
||||||
<Width>2pt</Width>
|
|
||||||
</TopBorder>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
<rd:FormatSymbolCulture>es-AR</rd:FormatSymbolCulture>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
</TablixRows>
|
|
||||||
</TablixBody>
|
|
||||||
<TablixColumnHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixColumnHierarchy>
|
|
||||||
<TablixRowHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember>
|
|
||||||
<KeepWithGroup>After</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<Group Name="Publicacion">
|
|
||||||
<GroupExpressions>
|
|
||||||
<GroupExpression>=Fields!Publicacion.Value</GroupExpression>
|
|
||||||
</GroupExpressions>
|
|
||||||
</Group>
|
|
||||||
<SortExpressions>
|
|
||||||
<SortExpression>
|
|
||||||
<Value>=Fields!Publicacion.Value</Value>
|
|
||||||
</SortExpression>
|
|
||||||
</SortExpressions>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<KeepWithGroup>Before</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixRowHierarchy>
|
|
||||||
<DataSetName>DSLiquidacionCanillas</DataSetName>
|
|
||||||
<Top>1.07592cm</Top>
|
|
||||||
<Left>2.09225cm</Left>
|
|
||||||
<Height>3.5cm</Height>
|
|
||||||
<Width>10.19813cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</Tablix>
|
|
||||||
<Textbox Name="Textbox39">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>EL DIA S.A.I.C. y F.</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox39</rd:DefaultName>
|
|
||||||
<Top>0.01025cm</Top>
|
|
||||||
<Left>2.09225cm</Left>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<Width>10.19813cm</Width>
|
|
||||||
<ZIndex>1</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox40">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Liquidación venta de diarios del:</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox39</rd:DefaultName>
|
|
||||||
<Top>0.53236cm</Top>
|
|
||||||
<Left>2.09225cm</Left>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<Width>4.43198cm</Width>
|
|
||||||
<ZIndex>2</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox41">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Parameters!FechaLiqui.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<Format>dd/MM/yyy</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>0.53236cm</Top>
|
|
||||||
<Left>6.44662cm</Left>
|
|
||||||
<Height>0.5cm</Height>
|
|
||||||
<Width>3.86292cm</Width>
|
|
||||||
<ZIndex>3</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</ReportItems>
|
|
||||||
<Height>4.66667cm</Height>
|
|
||||||
<Style />
|
|
||||||
</Body>
|
|
||||||
<Width>14.8cm</Width>
|
|
||||||
<Page>
|
|
||||||
<PageHeight>21cm</PageHeight>
|
|
||||||
<PageWidth>14.8cm</PageWidth>
|
|
||||||
<LeftMargin>0cm</LeftMargin>
|
|
||||||
<RightMargin>0cm</RightMargin>
|
|
||||||
<TopMargin>0.5cm</TopMargin>
|
|
||||||
<BottomMargin>0.5cm</BottomMargin>
|
|
||||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
|
||||||
<Style />
|
|
||||||
</Page>
|
|
||||||
</ReportSection>
|
|
||||||
</ReportSections>
|
|
||||||
<ReportParameters>
|
|
||||||
<ReportParameter Name="FechaLiqui">
|
|
||||||
<DataType>DateTime</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
</ReportParameters>
|
|
||||||
<ReportParametersLayout>
|
|
||||||
<GridLayoutDefinition>
|
|
||||||
<NumberOfColumns>4</NumberOfColumns>
|
|
||||||
<NumberOfRows>2</NumberOfRows>
|
|
||||||
<CellDefinitions>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>FechaLiqui</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
</CellDefinitions>
|
|
||||||
</GridLayoutDefinition>
|
|
||||||
</ReportParametersLayout>
|
|
||||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
|
||||||
<rd:ReportID>3bfdc2c9-c7dc-47b8-b2b1-3512fa773a78</rd:ReportID>
|
|
||||||
</Report>
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,994 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
|
||||||
<AutoRefresh>0</AutoRefresh>
|
|
||||||
<DataSources>
|
|
||||||
<DataSource Name="DSConsumoBobinas">
|
|
||||||
<ConnectionProperties>
|
|
||||||
<DataProvider>System.Data.DataSet</DataProvider>
|
|
||||||
<ConnectString>/* Local Connection */</ConnectString>
|
|
||||||
</ConnectionProperties>
|
|
||||||
<rd:DataSourceID>7c4f9d40-0118-4f83-ae46-6a1b074be5d7</rd:DataSourceID>
|
|
||||||
</DataSource>
|
|
||||||
</DataSources>
|
|
||||||
<DataSets>
|
|
||||||
<DataSet Name="DSTiradasPublicacionesSecciones">
|
|
||||||
<Query>
|
|
||||||
<DataSourceName>DSConsumoBobinas</DataSourceName>
|
|
||||||
<CommandText>/* Local Query */</CommandText>
|
|
||||||
</Query>
|
|
||||||
<Fields>
|
|
||||||
<Field Name="NombreSeccion">
|
|
||||||
<DataField>NombreSeccion</DataField>
|
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalPaginasImpresas">
|
|
||||||
<DataField>TotalPaginasImpresas</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="CantidadTiradas">
|
|
||||||
<DataField>CantidadTiradas</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalPaginasEjemplares">
|
|
||||||
<DataField>TotalPaginasEjemplares</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalEjemplares">
|
|
||||||
<DataField>TotalEjemplares</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="PromedioPaginasPorEjemplar">
|
|
||||||
<DataField>PromedioPaginasPorEjemplar</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
</Fields>
|
|
||||||
<rd:DataSetInfo>
|
|
||||||
<rd:DataSetName>DSConsumoBobinas</rd:DataSetName>
|
|
||||||
<rd:SchemaPath>C:\Users\dmolinari\source\repos\Cobol-VBNet\Reportes\DSConsumoBobinas.xsd</rd:SchemaPath>
|
|
||||||
<rd:TableName>SP_TiradasPublicacionesSecciones</rd:TableName>
|
|
||||||
<rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
|
|
||||||
<rd:TableAdapterGetDataMethod>GetData</rd:TableAdapterGetDataMethod>
|
|
||||||
<rd:TableAdapterName>SP_TiradasPublicacionesSeccionesTableAdapter</rd:TableAdapterName>
|
|
||||||
</rd:DataSetInfo>
|
|
||||||
</DataSet>
|
|
||||||
</DataSets>
|
|
||||||
<ReportSections>
|
|
||||||
<ReportSection>
|
|
||||||
<Body>
|
|
||||||
<ReportItems>
|
|
||||||
<Tablix Name="Tablix1">
|
|
||||||
<TablixBody>
|
|
||||||
<TablixColumns>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>5.5cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.5cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.5cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.5cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
</TablixColumns>
|
|
||||||
<TablixRows>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox9">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Nombre </Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox11">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Total Páginas Impresas</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox13">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Total Ediciones</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox15">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Pág. Por Edición (Promedio)</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox15</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox17">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Total Ejemplares</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox17</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox19">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Pág. Ejemplar (Promedio)</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="NombreSeccion">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!NombreSeccion.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>NombreSeccion</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TotalPaginasImpresas">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalPaginasImpresas.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TotalPaginasImpresas</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="CantidadTiradas">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!CantidadTiradas.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>CantidadTiradas</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TotalPaginasEjemplares">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalPaginasEjemplares.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TotalPaginasEjemplares</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TotalEjemplares">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalEjemplares.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TotalEjemplares</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="PromedioPaginasPorEjemplar">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!PromedioPaginasPorEjemplar.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>PromedioPaginasPorEjemplar</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox21">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Totales </Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Right</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox21</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox22">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!TotalPaginasImpresas.Value, "DSTiradasPublicacionesSecciones")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox22</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox23">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!CantidadTiradas.Value, "DSTiradasPublicacionesSecciones")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox23</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox24">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!TotalPaginasEjemplares.Value, "DSTiradasPublicacionesSecciones")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox24</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox25">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!TotalEjemplares.Value, "DSTiradasPublicacionesSecciones")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox25</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox26">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Sum(Fields!PromedioPaginasPorEjemplar.Value, "DSTiradasPublicacionesSecciones")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox26</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
</TablixRows>
|
|
||||||
</TablixBody>
|
|
||||||
<TablixColumnHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixColumnHierarchy>
|
|
||||||
<TablixRowHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember>
|
|
||||||
<KeepWithGroup>After</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<Group Name="Detalles" />
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<KeepWithGroup>Before</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixRowHierarchy>
|
|
||||||
<DataSetName>DSTiradasPublicacionesSecciones</DataSetName>
|
|
||||||
<Top>0.14111cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>1.8cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</Tablix>
|
|
||||||
</ReportItems>
|
|
||||||
<Height>0.84039in</Height>
|
|
||||||
<Style />
|
|
||||||
</Body>
|
|
||||||
<Width>21cm</Width>
|
|
||||||
<Page>
|
|
||||||
<PageHeader>
|
|
||||||
<Height>2.55474cm</Height>
|
|
||||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
|
||||||
<PrintOnLastPage>true</PrintOnLastPage>
|
|
||||||
<ReportItems>
|
|
||||||
<Textbox Name="Textbox41">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Reporte de Tiradas por Publicación Mensual</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>0.27552cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.72912cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox42">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>="Consolidados - Publicación: " & Parameters!NomPubli.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.07428cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.64975cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<ZIndex>1</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox43">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Fecha del Reporte</Value>
|
|
||||||
<Style>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.78746cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.64974cm</Height>
|
|
||||||
<Width>3.43896cm</Width>
|
|
||||||
<ZIndex>2</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox49">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Globals!ExecutionTime).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.78746cm</Top>
|
|
||||||
<Left>4.00151cm</Left>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<Width>2.60584cm</Width>
|
|
||||||
<ZIndex>3</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox71">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Mes Consultado:</Value>
|
|
||||||
<Style>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.81998cm</Top>
|
|
||||||
<Left>6.60123cm</Left>
|
|
||||||
<Height>0.64974cm</Height>
|
|
||||||
<Width>3.25646cm</Width>
|
|
||||||
<ZIndex>4</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox72">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Parameters!Mes.Value</Value>
|
|
||||||
<Style />
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.85526cm</Top>
|
|
||||||
<Left>9.74915cm</Left>
|
|
||||||
<Height>0.6cm</Height>
|
|
||||||
<Width>7.02438cm</Width>
|
|
||||||
<ZIndex>5</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</ReportItems>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</PageHeader>
|
|
||||||
<PageHeight>29.7cm</PageHeight>
|
|
||||||
<PageWidth>21cm</PageWidth>
|
|
||||||
<LeftMargin>0cm</LeftMargin>
|
|
||||||
<RightMargin>0cm</RightMargin>
|
|
||||||
<TopMargin>0.5cm</TopMargin>
|
|
||||||
<BottomMargin>0.5cm</BottomMargin>
|
|
||||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
|
||||||
<Style />
|
|
||||||
</Page>
|
|
||||||
</ReportSection>
|
|
||||||
</ReportSections>
|
|
||||||
<ReportParameters>
|
|
||||||
<ReportParameter Name="Mes">
|
|
||||||
<DataType>String</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
<ReportParameter Name="NomPubli">
|
|
||||||
<DataType>String</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
</ReportParameters>
|
|
||||||
<ReportParametersLayout>
|
|
||||||
<GridLayoutDefinition>
|
|
||||||
<NumberOfColumns>4</NumberOfColumns>
|
|
||||||
<NumberOfRows>2</NumberOfRows>
|
|
||||||
<CellDefinitions>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>Mes</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>2</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>NomPubli</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
</CellDefinitions>
|
|
||||||
</GridLayoutDefinition>
|
|
||||||
</ReportParametersLayout>
|
|
||||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
|
||||||
<rd:ReportID>41f590aa-e80a-45c7-8c64-d8fe8117f5ff</rd:ReportID>
|
|
||||||
</Report>
|
|
||||||
@@ -1,879 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
|
||||||
<AutoRefresh>0</AutoRefresh>
|
|
||||||
<DataSources>
|
|
||||||
<DataSource Name="DSListadoDistribucion">
|
|
||||||
<ConnectionProperties>
|
|
||||||
<DataProvider>System.Data.DataSet</DataProvider>
|
|
||||||
<ConnectString>/* Local Connection */</ConnectString>
|
|
||||||
</ConnectionProperties>
|
|
||||||
<rd:DataSourceID>afdb4b97-a9ea-4bab-b77b-a7c9e72d6fac</rd:DataSourceID>
|
|
||||||
</DataSource>
|
|
||||||
</DataSources>
|
|
||||||
<DataSets>
|
|
||||||
<DataSet Name="DSListadoDistribucion">
|
|
||||||
<Query>
|
|
||||||
<DataSourceName>DSListadoDistribucion</DataSourceName>
|
|
||||||
<CommandText>/* Local Query */</CommandText>
|
|
||||||
</Query>
|
|
||||||
<Fields>
|
|
||||||
<Field Name="Dia">
|
|
||||||
<DataField>Dia</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="CantidadCanillas">
|
|
||||||
<DataField>CantidadCanillas</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Tirajes">
|
|
||||||
<DataField>Tirajes</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Ventas">
|
|
||||||
<DataField>Ventas</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Accionistas">
|
|
||||||
<DataField>Accionistas</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalCooperativa">
|
|
||||||
<DataField>TotalCooperativa</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TotalGeneral">
|
|
||||||
<DataField>TotalGeneral</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
</Fields>
|
|
||||||
<rd:DataSetInfo>
|
|
||||||
<rd:DataSetName>DSListadoDistribucion</rd:DataSetName>
|
|
||||||
<rd:SchemaPath>C:\Users\dmolinari\source\repos\Cobol-VBNet\Reportes\DSListadoDistribucion.xsd</rd:SchemaPath>
|
|
||||||
<rd:TableName>SP_VentaMensualSecretariaElDia</rd:TableName>
|
|
||||||
<rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
|
|
||||||
<rd:TableAdapterGetDataMethod>GetData</rd:TableAdapterGetDataMethod>
|
|
||||||
<rd:TableAdapterName>SP_VentaMensualSecretariaElDiaTableAdapter</rd:TableAdapterName>
|
|
||||||
</rd:DataSetInfo>
|
|
||||||
</DataSet>
|
|
||||||
</DataSets>
|
|
||||||
<ReportSections>
|
|
||||||
<ReportSection>
|
|
||||||
<Body>
|
|
||||||
<ReportItems>
|
|
||||||
<Tablix Name="Tablix1">
|
|
||||||
<TablixBody>
|
|
||||||
<TablixColumns>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>1.5475cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.9525cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.85687cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.5cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3.37313cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3.27cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.5cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
</TablixColumns>
|
|
||||||
<TablixRows>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>1.20854cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox5">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>DÍA</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox7">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>CANILLAS</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox7</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox9">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>TIRAJES</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox1">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>VENTAS</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox3">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>ACCIONISTAS</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox6">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>TOTAL COOPERATIVA</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox10">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>TOTAL</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.75875cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Dia">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!Dia.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Dia</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Llevados">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!CantidadCanillas.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Llevados</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Devueltos">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!Tirajes.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Devueltos</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Ventas">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!Ventas.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Ventas</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Accionistas">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!Accionistas.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Accionistas</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TotalCooperativa">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalCooperativa.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TotalCooperativa</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TotalGeneral">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TotalGeneral.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TotalGeneral</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
</TablixRows>
|
|
||||||
</TablixBody>
|
|
||||||
<TablixColumnHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixColumnHierarchy>
|
|
||||||
<TablixRowHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember>
|
|
||||||
<KeepWithGroup>After</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<Group Name="Detalles" />
|
|
||||||
</TablixMember>
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixRowHierarchy>
|
|
||||||
<DataSetName>DSListadoDistribucion</DataSetName>
|
|
||||||
<Top>0.14139cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>1.96729cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</Tablix>
|
|
||||||
</ReportItems>
|
|
||||||
<Height>0.88228in</Height>
|
|
||||||
<Style />
|
|
||||||
</Body>
|
|
||||||
<Width>20.70896cm</Width>
|
|
||||||
<Page>
|
|
||||||
<PageHeader>
|
|
||||||
<Height>1.89329cm</Height>
|
|
||||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
|
||||||
<PrintOnLastPage>true</PrintOnLastPage>
|
|
||||||
<ReportItems>
|
|
||||||
<Textbox Name="Textbox41">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>VENTA DIARIO EL DÍA</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>16pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>0.15522cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.72912cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox55">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Fecha Consultada: Desde</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.07181cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.78267cm</Height>
|
|
||||||
<Width>7.14583cm</Width>
|
|
||||||
<ZIndex>1</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox56">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Parameters!FechaDesde.Value).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.10709cm</Top>
|
|
||||||
<Left>6.94192cm</Left>
|
|
||||||
<Height>0.73293cm</Height>
|
|
||||||
<Width>2.77341cm</Width>
|
|
||||||
<ZIndex>2</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox57">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Hasta</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.07181cm</Top>
|
|
||||||
<Left>10.13866cm</Left>
|
|
||||||
<Height>0.78267cm</Height>
|
|
||||||
<Width>1.56784cm</Width>
|
|
||||||
<ZIndex>3</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox58">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Parameters!FechaHasta.Value).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.10709cm</Top>
|
|
||||||
<Left>11.91074cm</Left>
|
|
||||||
<Height>0.73293cm</Height>
|
|
||||||
<Width>3.02917cm</Width>
|
|
||||||
<ZIndex>4</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</ReportItems>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</PageHeader>
|
|
||||||
<PageHeight>29.7cm</PageHeight>
|
|
||||||
<PageWidth>21cm</PageWidth>
|
|
||||||
<LeftMargin>0cm</LeftMargin>
|
|
||||||
<RightMargin>0cm</RightMargin>
|
|
||||||
<TopMargin>0.5cm</TopMargin>
|
|
||||||
<BottomMargin>0.5cm</BottomMargin>
|
|
||||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
|
||||||
<Style />
|
|
||||||
</Page>
|
|
||||||
</ReportSection>
|
|
||||||
</ReportSections>
|
|
||||||
<ReportParameters>
|
|
||||||
<ReportParameter Name="FechaDesde">
|
|
||||||
<DataType>DateTime</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
<ReportParameter Name="FechaHasta">
|
|
||||||
<DataType>DateTime</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
</ReportParameters>
|
|
||||||
<ReportParametersLayout>
|
|
||||||
<GridLayoutDefinition>
|
|
||||||
<NumberOfColumns>4</NumberOfColumns>
|
|
||||||
<NumberOfRows>2</NumberOfRows>
|
|
||||||
<CellDefinitions>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>2</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>FechaDesde</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>3</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>FechaHasta</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
</CellDefinitions>
|
|
||||||
</GridLayoutDefinition>
|
|
||||||
</ReportParametersLayout>
|
|
||||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
|
||||||
<rd:ReportID>8cf8fb7a-ec4d-4153-8fb0-a21a9e443a88</rd:ReportID>
|
|
||||||
</Report>
|
|
||||||
@@ -1,879 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
|
||||||
<AutoRefresh>0</AutoRefresh>
|
|
||||||
<DataSources>
|
|
||||||
<DataSource Name="DSListadoDistribucion">
|
|
||||||
<ConnectionProperties>
|
|
||||||
<DataProvider>System.Data.DataSet</DataProvider>
|
|
||||||
<ConnectString>/* Local Connection */</ConnectString>
|
|
||||||
</ConnectionProperties>
|
|
||||||
<rd:DataSourceID>afdb4b97-a9ea-4bab-b77b-a7c9e72d6fac</rd:DataSourceID>
|
|
||||||
</DataSource>
|
|
||||||
</DataSources>
|
|
||||||
<DataSets>
|
|
||||||
<DataSet Name="DSListadoDistribucion">
|
|
||||||
<Query>
|
|
||||||
<DataSourceName>DSListadoDistribucion</DataSourceName>
|
|
||||||
<CommandText>/* Local Query */</CommandText>
|
|
||||||
</Query>
|
|
||||||
<Fields>
|
|
||||||
<Field Name="TiradaCoop">
|
|
||||||
<DataField>TiradaCoop</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="DevolucionCoop">
|
|
||||||
<DataField>DevolucionCoop</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="VentaCoop">
|
|
||||||
<DataField>VentaCoop</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="TiradaCan">
|
|
||||||
<DataField>TiradaCan</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="VentaCan">
|
|
||||||
<DataField>VentaCan</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Total">
|
|
||||||
<DataField>Total</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
<Field Name="Dia">
|
|
||||||
<DataField>Dia</DataField>
|
|
||||||
<rd:TypeName>System.Int32</rd:TypeName>
|
|
||||||
</Field>
|
|
||||||
</Fields>
|
|
||||||
<rd:DataSetInfo>
|
|
||||||
<rd:DataSetName>DSListadoDistribucion</rd:DataSetName>
|
|
||||||
<rd:SchemaPath>C:\Users\dmolinari\source\repos\Cobol-VBNet\Reportes\DSListadoDistribucion.xsd</rd:SchemaPath>
|
|
||||||
<rd:TableName>SP_VentaMensualSecretariaElPlata</rd:TableName>
|
|
||||||
<rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
|
|
||||||
<rd:TableAdapterGetDataMethod>GetData</rd:TableAdapterGetDataMethod>
|
|
||||||
<rd:TableAdapterName>SP_VentaMensualSecretariaElPlataTableAdapter</rd:TableAdapterName>
|
|
||||||
</rd:DataSetInfo>
|
|
||||||
</DataSet>
|
|
||||||
</DataSets>
|
|
||||||
<ReportSections>
|
|
||||||
<ReportSection>
|
|
||||||
<Body>
|
|
||||||
<ReportItems>
|
|
||||||
<Tablix Name="Tablix1">
|
|
||||||
<TablixBody>
|
|
||||||
<TablixColumns>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>1.5475cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.9525cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>3.34396cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.79104cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.76459cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.75645cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
<TablixColumn>
|
|
||||||
<Width>2.84396cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
</TablixColumns>
|
|
||||||
<TablixRows>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>1.63187cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox2">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Día</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox7">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>TIRADA</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox7</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox9">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>DEVOLUCIÓN COOP.</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox1">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>VENTA COOP.</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox3">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>TIRADA CANILLAS</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox6">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>VENTA CANILLAS (TOTAL)</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox10">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>TOTAL</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>12pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>LightGrey</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Black</BackgroundColor>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
<TablixRow>
|
|
||||||
<Height>0.75875cm</Height>
|
|
||||||
<TablixCells>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Dia1">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!Dia.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Dia1</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TiradaCoop">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TiradaCoop.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TiradaCoop</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="DevolucionCoop">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!DevolucionCoop.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<Format>#,0;(#,0)</Format>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>DevolucionCoop</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="VentaCoop">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!VentaCoop.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>VentaCoop</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TiradaCan">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TiradaCan.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TiradaCan</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="VentaCan">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!VentaCan.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>VentaCan</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Total">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!Total.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Roboto</FontFamily>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Total</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
|
||||||
</TablixRow>
|
|
||||||
</TablixRows>
|
|
||||||
</TablixBody>
|
|
||||||
<TablixColumnHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
<TablixMember />
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixColumnHierarchy>
|
|
||||||
<TablixRowHierarchy>
|
|
||||||
<TablixMembers>
|
|
||||||
<TablixMember>
|
|
||||||
<KeepWithGroup>After</KeepWithGroup>
|
|
||||||
</TablixMember>
|
|
||||||
<TablixMember>
|
|
||||||
<Group Name="Detalles" />
|
|
||||||
</TablixMember>
|
|
||||||
</TablixMembers>
|
|
||||||
</TablixRowHierarchy>
|
|
||||||
<DataSetName>DSListadoDistribucion</DataSetName>
|
|
||||||
<Top>0.14139cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>2.39062cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</Tablix>
|
|
||||||
</ReportItems>
|
|
||||||
<Height>1.03853in</Height>
|
|
||||||
<Style />
|
|
||||||
</Body>
|
|
||||||
<Width>20.39921cm</Width>
|
|
||||||
<Page>
|
|
||||||
<PageHeader>
|
|
||||||
<Height>1.89329cm</Height>
|
|
||||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
|
||||||
<PrintOnLastPage>true</PrintOnLastPage>
|
|
||||||
<ReportItems>
|
|
||||||
<Textbox Name="Textbox41">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>VENTA DIARIO EL PLATA</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>16pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>0.15875cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.72912cm</Height>
|
|
||||||
<Width>19cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox55">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Fecha Consultada: Desde</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.07534cm</Top>
|
|
||||||
<Left>0.619cm</Left>
|
|
||||||
<Height>0.78267cm</Height>
|
|
||||||
<Width>7.14583cm</Width>
|
|
||||||
<ZIndex>1</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox56">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Parameters!FechaDesde.Value).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.11062cm</Top>
|
|
||||||
<Left>6.94192cm</Left>
|
|
||||||
<Height>0.73293cm</Height>
|
|
||||||
<Width>2.77341cm</Width>
|
|
||||||
<ZIndex>2</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox57">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Hasta</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox41</rd:DefaultName>
|
|
||||||
<Top>1.07534cm</Top>
|
|
||||||
<Left>10.13866cm</Left>
|
|
||||||
<Height>0.78267cm</Height>
|
|
||||||
<Width>1.56784cm</Width>
|
|
||||||
<ZIndex>3</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
<Textbox Name="Textbox58">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=CDate(Parameters!FechaHasta.Value).ToString("dd/MM/yyyy")</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox49</rd:DefaultName>
|
|
||||||
<Top>1.11062cm</Top>
|
|
||||||
<Left>11.91074cm</Left>
|
|
||||||
<Height>0.73293cm</Height>
|
|
||||||
<Width>3.02917cm</Width>
|
|
||||||
<ZIndex>4</ZIndex>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<VerticalAlign>Middle</VerticalAlign>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</ReportItems>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</PageHeader>
|
|
||||||
<PageHeight>29.7cm</PageHeight>
|
|
||||||
<PageWidth>21cm</PageWidth>
|
|
||||||
<LeftMargin>0cm</LeftMargin>
|
|
||||||
<RightMargin>0cm</RightMargin>
|
|
||||||
<TopMargin>0.5cm</TopMargin>
|
|
||||||
<BottomMargin>0.5cm</BottomMargin>
|
|
||||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
|
||||||
<Style />
|
|
||||||
</Page>
|
|
||||||
</ReportSection>
|
|
||||||
</ReportSections>
|
|
||||||
<ReportParameters>
|
|
||||||
<ReportParameter Name="FechaDesde">
|
|
||||||
<DataType>DateTime</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
<ReportParameter Name="FechaHasta">
|
|
||||||
<DataType>DateTime</DataType>
|
|
||||||
<Prompt>ReportParameter1</Prompt>
|
|
||||||
</ReportParameter>
|
|
||||||
</ReportParameters>
|
|
||||||
<ReportParametersLayout>
|
|
||||||
<GridLayoutDefinition>
|
|
||||||
<NumberOfColumns>4</NumberOfColumns>
|
|
||||||
<NumberOfRows>2</NumberOfRows>
|
|
||||||
<CellDefinitions>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>2</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>FechaDesde</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>3</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>FechaHasta</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
</CellDefinitions>
|
|
||||||
</GridLayoutDefinition>
|
|
||||||
</ReportParametersLayout>
|
|
||||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
|
||||||
<rd:ReportID>8cf8fb7a-ec4d-4153-8fb0-a21a9e443a88</rd:ReportID>
|
|
||||||
</Report>
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,94 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Suscripciones;
|
||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Security.Claims;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/ajustes")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class AjustesController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IAjusteService _ajusteService;
|
||||||
|
private readonly ILogger<AjustesController> _logger;
|
||||||
|
|
||||||
|
// Permiso a crear en BD
|
||||||
|
private const string PermisoGestionarAjustes = "SU011";
|
||||||
|
|
||||||
|
public AjustesController(IAjusteService ajusteService, ILogger<AjustesController> logger)
|
||||||
|
{
|
||||||
|
_ajusteService = ajusteService;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TienePermiso(string codAcc) => User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == codAcc);
|
||||||
|
|
||||||
|
private int? GetCurrentUserId()
|
||||||
|
{
|
||||||
|
if (int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier) ?? User.FindFirstValue("sub"), out int userId)) return userId;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/suscriptores/{idSuscriptor}/ajustes
|
||||||
|
[HttpGet("~/api/suscriptores/{idSuscriptor:int}/ajustes")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<AjusteDto>), StatusCodes.Status200OK)]
|
||||||
|
public async Task<IActionResult> GetAjustesPorSuscriptor(int idSuscriptor, [FromQuery] DateTime? fechaDesde, [FromQuery] DateTime? fechaHasta)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarAjustes)) return Forbid();
|
||||||
|
var ajustes = await _ajusteService.ObtenerAjustesPorSuscriptor(idSuscriptor, fechaDesde, fechaHasta);
|
||||||
|
return Ok(ajustes);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/ajustes
|
||||||
|
[HttpPost]
|
||||||
|
[ProducesResponseType(typeof(AjusteDto), StatusCodes.Status201Created)]
|
||||||
|
public async Task<IActionResult> CreateAjuste([FromBody] CreateAjusteDto createDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarAjustes)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (dto, error) = await _ajusteService.CrearAjusteManual(createDto, userId.Value);
|
||||||
|
|
||||||
|
if (error != null) return BadRequest(new { message = error });
|
||||||
|
if (dto == null) return StatusCode(500, "Error al crear el ajuste.");
|
||||||
|
|
||||||
|
// Devolvemos el objeto creado con un 201
|
||||||
|
return StatusCode(201, dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/ajustes/{id}/anular
|
||||||
|
[HttpPost("{id:int}/anular")]
|
||||||
|
public async Task<IActionResult> Anular(int id)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarAjustes)) return Forbid();
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _ajusteService.AnularAjuste(id, userId.Value);
|
||||||
|
if (!exito) return BadRequest(new { message = error });
|
||||||
|
|
||||||
|
return Ok(new { message = "Ajuste anulado correctamente." });
|
||||||
|
}
|
||||||
|
|
||||||
|
// PUT: api/ajustes/{id}
|
||||||
|
[HttpPut("{id:int}")]
|
||||||
|
public async Task<IActionResult> UpdateAjuste(int id, [FromBody] UpdateAjusteDto updateDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarAjustes)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var (exito, error) = await _ajusteService.ActualizarAjuste(id, updateDto);
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
if (error != null && error.Contains("no encontrado")) return NotFound(new { message = error });
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
// Archivo: GestionIntegral.Api/Controllers/Suscripciones/DebitosController.cs
|
||||||
|
|
||||||
|
using GestionIntegral.Api.Dtos.Suscripciones;
|
||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Security.Claims;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/debitos")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class DebitosController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IDebitoAutomaticoService _debitoService;
|
||||||
|
private readonly ILogger<DebitosController> _logger;
|
||||||
|
|
||||||
|
// Permiso para generar archivos de débito (a crear en BD)
|
||||||
|
private const string PermisoGenerarDebitos = "SU007";
|
||||||
|
|
||||||
|
public DebitosController(IDebitoAutomaticoService debitoService, ILogger<DebitosController> logger)
|
||||||
|
{
|
||||||
|
_debitoService = debitoService;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TienePermiso(string codAcc) => User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == codAcc);
|
||||||
|
private int? GetCurrentUserId()
|
||||||
|
{
|
||||||
|
if (int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier) ?? User.FindFirstValue("sub"), out int userId)) return userId;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/debitos/{anio}/{mes}/generar-archivo
|
||||||
|
[HttpPost("{anio:int}/{mes:int}/generar-archivo")]
|
||||||
|
[ProducesResponseType(typeof(FileContentResult), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> GenerarArchivo(int anio, int mes)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGenerarDebitos)) return Forbid();
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (contenido, nombreArchivo, error) = await _debitoService.GenerarArchivoPagoDirecto(anio, mes, userId.Value);
|
||||||
|
|
||||||
|
if (error != null)
|
||||||
|
{
|
||||||
|
// Si el error es "No se encontraron facturas", es un 404. Otros son 400.
|
||||||
|
if (error.Contains("No se encontraron"))
|
||||||
|
{
|
||||||
|
return NotFound(new { message = error });
|
||||||
|
}
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(contenido) || string.IsNullOrEmpty(nombreArchivo))
|
||||||
|
{
|
||||||
|
return StatusCode(500, new { message = "El servicio no pudo generar el contenido del archivo correctamente." });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Devolver el archivo para descarga
|
||||||
|
var fileBytes = Encoding.UTF8.GetBytes(contenido);
|
||||||
|
return File(fileBytes, "text/plain", nombreArchivo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/debitos/procesar-respuesta
|
||||||
|
[HttpPost("procesar-respuesta")]
|
||||||
|
[ProducesResponseType(typeof(ProcesamientoLoteResponseDto), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
public async Task<IActionResult> ProcesarArchivoRespuesta(IFormFile archivo)
|
||||||
|
{
|
||||||
|
// Usamos el mismo permiso de generar débitos para procesar la respuesta.
|
||||||
|
if (!TienePermiso(PermisoGenerarDebitos)) return Forbid();
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var resultado = await _debitoService.ProcesarArchivoRespuesta(archivo, userId.Value);
|
||||||
|
|
||||||
|
if (resultado.Errores.Any() && resultado.PagosAprobados == 0 && resultado.PagosRechazados == 0)
|
||||||
|
{
|
||||||
|
return BadRequest(resultado);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok(resultado);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Comunicaciones;
|
||||||
|
using GestionIntegral.Api.Services.Comunicaciones;
|
||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Security.Claims;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/facturacion")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class FacturacionController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IFacturacionService _facturacionService;
|
||||||
|
private readonly ILogger<FacturacionController> _logger;
|
||||||
|
private readonly IEmailLogService _emailLogService;
|
||||||
|
private const string PermisoGestionarFacturacion = "SU006";
|
||||||
|
private const string PermisoEnviarEmail = "SU009";
|
||||||
|
|
||||||
|
public FacturacionController(IFacturacionService facturacionService, ILogger<FacturacionController> logger, IEmailLogService emailLogService)
|
||||||
|
{
|
||||||
|
_facturacionService = facturacionService;
|
||||||
|
_logger = logger;
|
||||||
|
_emailLogService = emailLogService;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TienePermiso(string codAcc) => User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == codAcc);
|
||||||
|
|
||||||
|
private int? GetCurrentUserId()
|
||||||
|
{
|
||||||
|
if (int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier) ?? User.FindFirstValue("sub"), out int userId)) return userId;
|
||||||
|
_logger.LogWarning("No se pudo obtener el UserId del token JWT en FacturacionController.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPut("{idFactura:int}/numero-factura")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
public async Task<IActionResult> UpdateNumeroFactura(int idFactura, [FromBody] string numeroFactura)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarFacturacion)) return Forbid();
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _facturacionService.ActualizarNumeroFactura(idFactura, numeroFactura, userId.Value);
|
||||||
|
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
if (error != null && error.Contains("no existe")) return NotFound(new { message = error });
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost("{idFactura:int}/enviar-factura-pdf")]
|
||||||
|
public async Task<IActionResult> EnviarFacturaPdf(int idFactura)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoEnviarEmail)) return Forbid();
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
var (exito, error, emailDestino) = await _facturacionService.EnviarFacturaPdfPorEmail(idFactura, userId.Value);
|
||||||
|
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
|
||||||
|
var mensajeExito = $"El email con la factura PDF se ha enviado correctamente a {emailDestino}.";
|
||||||
|
return Ok(new { message = mensajeExito });
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("{anio:int}/{mes:int}")]
|
||||||
|
public async Task<IActionResult> GetFacturas(
|
||||||
|
int anio, int mes,
|
||||||
|
[FromQuery] string? nombreSuscriptor,
|
||||||
|
[FromQuery] string? estadoPago,
|
||||||
|
[FromQuery] string? estadoFacturacion,
|
||||||
|
[FromQuery] string? tipoFactura)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarFacturacion)) return Forbid();
|
||||||
|
if (anio < 2020 || mes < 1 || mes > 12) return BadRequest(new { message = "El período no es válido." });
|
||||||
|
|
||||||
|
var resumenes = await _facturacionService.ObtenerResumenesDeCuentaPorPeriodo(anio, mes, nombreSuscriptor, estadoPago, estadoFacturacion, tipoFactura);
|
||||||
|
return Ok(resumenes);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost("{anio:int}/{mes:int}")]
|
||||||
|
public async Task<IActionResult> GenerarFacturacion(int anio, int mes)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarFacturacion)) return Forbid();
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
if (anio < 2020 || mes < 1 || mes > 12) return BadRequest(new { message = "El año y el mes proporcionados no son válidos." });
|
||||||
|
|
||||||
|
var (exito, mensaje, resultadoEnvio) = await _facturacionService.GenerarFacturacionMensual(anio, mes, userId.Value);
|
||||||
|
|
||||||
|
if (!exito) return StatusCode(StatusCodes.Status500InternalServerError, new { message = mensaje });
|
||||||
|
|
||||||
|
return Ok(new { message = mensaje, resultadoEnvio });
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("historial-lotes-envio")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<LoteDeEnvioHistorialDto>), StatusCodes.Status200OK)]
|
||||||
|
public async Task<IActionResult> GetHistorialLotesEnvio([FromQuery] int? anio, [FromQuery] int? mes)
|
||||||
|
{
|
||||||
|
if (!TienePermiso("SU006")) return Forbid();
|
||||||
|
var historial = await _facturacionService.ObtenerHistorialLotesEnvio(anio, mes);
|
||||||
|
return Ok(historial);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Endpoint para el historial de envíos de una factura individual
|
||||||
|
[HttpGet("{idFactura:int}/historial-envios")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<EmailLogDto>), StatusCodes.Status200OK)]
|
||||||
|
public async Task<IActionResult> GetHistorialEnvios(int idFactura)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarFacturacion)) return Forbid(); // Reutilizamos el permiso
|
||||||
|
|
||||||
|
// Construimos la referencia que se guarda en el log
|
||||||
|
string referencia = $"Factura-{idFactura}";
|
||||||
|
var historial = await _emailLogService.ObtenerHistorialPorReferencia(referencia);
|
||||||
|
|
||||||
|
return Ok(historial);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/formaspago")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize] // Solo usuarios logueados pueden ver esto
|
||||||
|
public class FormasDePagoController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IFormaPagoService _formaPagoService;
|
||||||
|
|
||||||
|
public FormasDePagoController(IFormaPagoService formaPagoService)
|
||||||
|
{
|
||||||
|
_formaPagoService = formaPagoService;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/formaspago
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> GetAll()
|
||||||
|
{
|
||||||
|
var formasDePago = await _formaPagoService.ObtenerTodos();
|
||||||
|
return Ok(formasDePago);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Suscripciones;
|
||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Security.Claims;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/pagos")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class PagosController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IPagoService _pagoService;
|
||||||
|
private readonly ILogger<PagosController> _logger;
|
||||||
|
|
||||||
|
// Permiso para registrar pagos manuales (a crear en BD)
|
||||||
|
private const string PermisoRegistrarPago = "SU008";
|
||||||
|
|
||||||
|
public PagosController(IPagoService pagoService, ILogger<PagosController> logger)
|
||||||
|
{
|
||||||
|
_pagoService = pagoService;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TienePermiso(string codAcc) => User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == codAcc);
|
||||||
|
|
||||||
|
private int? GetCurrentUserId()
|
||||||
|
{
|
||||||
|
if (int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier) ?? User.FindFirstValue("sub"), out int userId)) return userId;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/facturas/{idFactura}/pagos
|
||||||
|
[HttpGet("~/api/facturas/{idFactura:int}/pagos")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<PagoDto>), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
public async Task<IActionResult> GetPagosPorFactura(int idFactura)
|
||||||
|
{
|
||||||
|
// Se podría usar un permiso de "Ver Facturación"
|
||||||
|
if (!TienePermiso("SU006")) return Forbid();
|
||||||
|
|
||||||
|
var pagos = await _pagoService.ObtenerPagosPorFacturaId(idFactura);
|
||||||
|
return Ok(pagos);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/pagos
|
||||||
|
[HttpPost]
|
||||||
|
[ProducesResponseType(typeof(PagoDto), StatusCodes.Status201Created)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
public async Task<IActionResult> RegistrarPago([FromBody] CreatePagoDto createDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoRegistrarPago)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (dto, error) = await _pagoService.RegistrarPagoManual(createDto, userId.Value);
|
||||||
|
|
||||||
|
if (error != null) return BadRequest(new { message = error });
|
||||||
|
if (dto == null) return StatusCode(StatusCodes.Status500InternalServerError, "Error al registrar el pago.");
|
||||||
|
|
||||||
|
// No tenemos un "GetById" para pagos, así que devolvemos el objeto con un 201.
|
||||||
|
return StatusCode(201, dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Suscripciones;
|
||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Security.Claims;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/promociones")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class PromocionesController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IPromocionService _promocionService;
|
||||||
|
private readonly ILogger<PromocionesController> _logger;
|
||||||
|
|
||||||
|
// Permiso a crear en BD
|
||||||
|
private const string PermisoGestionarPromociones = "SU010";
|
||||||
|
|
||||||
|
public PromocionesController(IPromocionService promocionService, ILogger<PromocionesController> logger)
|
||||||
|
{
|
||||||
|
_promocionService = promocionService;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TienePermiso(string codAcc) => User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == codAcc);
|
||||||
|
private int? GetCurrentUserId()
|
||||||
|
{
|
||||||
|
if (int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier) ?? User.FindFirstValue("sub"), out int userId)) return userId;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/promociones
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> GetAll([FromQuery] bool soloActivas = true)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarPromociones)) return Forbid();
|
||||||
|
var promociones = await _promocionService.ObtenerTodas(soloActivas);
|
||||||
|
return Ok(promociones);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/promociones/{id}
|
||||||
|
[HttpGet("{id:int}", Name = "GetPromocionById")]
|
||||||
|
public async Task<IActionResult> GetById(int id)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarPromociones)) return Forbid();
|
||||||
|
var promocion = await _promocionService.ObtenerPorId(id);
|
||||||
|
if (promocion == null) return NotFound();
|
||||||
|
return Ok(promocion);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/promociones
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> Create([FromBody] CreatePromocionDto createDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarPromociones)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (dto, error) = await _promocionService.Crear(createDto, userId.Value);
|
||||||
|
|
||||||
|
if (error != null) return BadRequest(new { message = error });
|
||||||
|
if (dto == null) return StatusCode(500, "Error al crear la promoción.");
|
||||||
|
|
||||||
|
return CreatedAtRoute("GetPromocionById", new { id = dto.IdPromocion }, dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
// PUT: api/promociones/{id}
|
||||||
|
[HttpPut("{id:int}")]
|
||||||
|
public async Task<IActionResult> Update(int id, [FromBody] UpdatePromocionDto updateDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarPromociones)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _promocionService.Actualizar(id, updateDto, userId.Value);
|
||||||
|
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
if (error != null && error.Contains("no encontrada")) return NotFound(new { message = error });
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
// Archivo: GestionIntegral.Api/Controllers/Suscripciones/SuscripcionesController.cs
|
||||||
|
|
||||||
|
using GestionIntegral.Api.Dtos.Suscripciones;
|
||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Security.Claims;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/suscripciones")] // Ruta base para acciones sobre una suscripción específica
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class SuscripcionesController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly ISuscripcionService _suscripcionService;
|
||||||
|
private readonly ILogger<SuscripcionesController> _logger;
|
||||||
|
|
||||||
|
// Permisos (nuevos, a crear en la BD)
|
||||||
|
private const string PermisoGestionarSuscripciones = "SU005";
|
||||||
|
|
||||||
|
public SuscripcionesController(ISuscripcionService suscripcionService, ILogger<SuscripcionesController> logger)
|
||||||
|
{
|
||||||
|
_suscripcionService = suscripcionService;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TienePermiso(string codAcc) => User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == codAcc);
|
||||||
|
|
||||||
|
private int? GetCurrentUserId()
|
||||||
|
{
|
||||||
|
if (int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier) ?? User.FindFirstValue("sub"), out int userId)) return userId;
|
||||||
|
_logger.LogWarning("No se pudo obtener el UserId del token JWT en SuscripcionesController.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Endpoint anidado para obtener las suscripciones de un suscriptor
|
||||||
|
// GET: api/suscriptores/{idSuscriptor}/suscripciones
|
||||||
|
[HttpGet("~/api/suscriptores/{idSuscriptor:int}/suscripciones")]
|
||||||
|
public async Task<IActionResult> GetBySuscriptor(int idSuscriptor)
|
||||||
|
{
|
||||||
|
// Se podría usar el permiso de ver suscriptores (SU001) o el de gestionar suscripciones (SU005)
|
||||||
|
if (!TienePermiso("SU001")) return Forbid();
|
||||||
|
|
||||||
|
var suscripciones = await _suscripcionService.ObtenerPorSuscriptorId(idSuscriptor);
|
||||||
|
return Ok(suscripciones);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/suscripciones/{id}
|
||||||
|
[HttpGet("{id:int}", Name = "GetSuscripcionById")]
|
||||||
|
public async Task<IActionResult> GetById(int id)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarSuscripciones)) return Forbid();
|
||||||
|
var suscripcion = await _suscripcionService.ObtenerPorId(id);
|
||||||
|
if (suscripcion == null) return NotFound();
|
||||||
|
return Ok(suscripcion);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/suscripciones
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> Create([FromBody] CreateSuscripcionDto createDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarSuscripciones)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (dto, error) = await _suscripcionService.Crear(createDto, userId.Value);
|
||||||
|
|
||||||
|
if (error != null) return BadRequest(new { message = error });
|
||||||
|
if (dto == null) return StatusCode(StatusCodes.Status500InternalServerError, "Error al crear la suscripción.");
|
||||||
|
|
||||||
|
return CreatedAtRoute("GetSuscripcionById", new { id = dto.IdSuscripcion }, dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
// PUT: api/suscripciones/{id}
|
||||||
|
[HttpPut("{id:int}")]
|
||||||
|
public async Task<IActionResult> Update(int id, [FromBody] UpdateSuscripcionDto updateDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarSuscripciones)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _suscripcionService.Actualizar(id, updateDto, userId.Value);
|
||||||
|
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
if (error != null && error.Contains("no encontrada")) return NotFound(new { message = error });
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/suscripciones/{idSuscripcion}/promociones
|
||||||
|
[HttpGet("{idSuscripcion:int}/promociones")]
|
||||||
|
public async Task<IActionResult> GetPromocionesAsignadas(int idSuscripcion)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarSuscripciones)) return Forbid();
|
||||||
|
var promos = await _suscripcionService.ObtenerPromocionesAsignadas(idSuscripcion);
|
||||||
|
return Ok(promos);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/suscripciones/{idSuscripcion}/promociones-disponibles
|
||||||
|
[HttpGet("{idSuscripcion:int}/promociones-disponibles")]
|
||||||
|
public async Task<IActionResult> GetPromocionesDisponibles(int idSuscripcion)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarSuscripciones)) return Forbid();
|
||||||
|
var promos = await _suscripcionService.ObtenerPromocionesDisponibles(idSuscripcion);
|
||||||
|
return Ok(promos);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/suscripciones/{idSuscripcion}/promociones
|
||||||
|
[HttpPost("{idSuscripcion:int}/promociones")]
|
||||||
|
public async Task<IActionResult> AsignarPromocion(int idSuscripcion, [FromBody] AsignarPromocionDto dto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarSuscripciones)) return Forbid();
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _suscripcionService.AsignarPromocion(idSuscripcion, dto, userId.Value);
|
||||||
|
if (!exito) return BadRequest(new { message = error });
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
// DELETE: api/suscripciones/{idSuscripcion}/promociones/{idPromocion}
|
||||||
|
[HttpDelete("{idSuscripcion:int}/promociones/{idPromocion:int}")]
|
||||||
|
public async Task<IActionResult> QuitarPromocion(int idSuscripcion, int idPromocion)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoGestionarSuscripciones)) return Forbid();
|
||||||
|
var (exito, error) = await _suscripcionService.QuitarPromocion(idSuscripcion, idPromocion);
|
||||||
|
if (!exito) return BadRequest(new { message = error });
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
using GestionIntegral.Api.Dtos.Suscripciones;
|
||||||
|
using GestionIntegral.Api.Services.Suscripciones;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Security.Claims;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||||
|
{
|
||||||
|
[Route("api/suscriptores")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
|
public class SuscriptoresController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly ISuscriptorService _suscriptorService;
|
||||||
|
private readonly ILogger<SuscriptoresController> _logger;
|
||||||
|
|
||||||
|
// Permisos para Suscriptores
|
||||||
|
private const string PermisoVer = "SU001";
|
||||||
|
private const string PermisoCrear = "SU002";
|
||||||
|
private const string PermisoModificar = "SU003";
|
||||||
|
private const string PermisoActivarDesactivar = "SU004";
|
||||||
|
|
||||||
|
public SuscriptoresController(ISuscriptorService suscriptorService, ILogger<SuscriptoresController> logger)
|
||||||
|
{
|
||||||
|
_suscriptorService = suscriptorService;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TienePermiso(string codAcc) => User.IsInRole("SuperAdmin") || User.HasClaim(c => c.Type == "permission" && c.Value == codAcc);
|
||||||
|
|
||||||
|
private int? GetCurrentUserId()
|
||||||
|
{
|
||||||
|
if (int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier) ?? User.FindFirstValue("sub"), out int userId)) return userId;
|
||||||
|
_logger.LogWarning("No se pudo obtener el UserId del token JWT en SuscriptoresController.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/suscriptores
|
||||||
|
[HttpGet]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<SuscriptorDto>), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
public async Task<IActionResult> GetAll([FromQuery] string? nombre, [FromQuery] string? nroDoc, [FromQuery] bool soloActivos = true)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoVer)) return Forbid();
|
||||||
|
var suscriptores = await _suscriptorService.ObtenerTodos(nombre, nroDoc, soloActivos);
|
||||||
|
return Ok(suscriptores);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/suscriptores/{id}
|
||||||
|
[HttpGet("{id:int}", Name = "GetSuscriptorById")]
|
||||||
|
[ProducesResponseType(typeof(SuscriptorDto), StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> GetById(int id)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoVer)) return Forbid();
|
||||||
|
var suscriptor = await _suscriptorService.ObtenerPorId(id);
|
||||||
|
if (suscriptor == null) return NotFound();
|
||||||
|
return Ok(suscriptor);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/suscriptores
|
||||||
|
[HttpPost]
|
||||||
|
[ProducesResponseType(typeof(SuscriptorDto), StatusCodes.Status201Created)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
public async Task<IActionResult> Create([FromBody] CreateSuscriptorDto createDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoCrear)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (dto, error) = await _suscriptorService.Crear(createDto, userId.Value);
|
||||||
|
|
||||||
|
if (error != null) return BadRequest(new { message = error });
|
||||||
|
if (dto == null) return StatusCode(StatusCodes.Status500InternalServerError, "Error al crear el suscriptor.");
|
||||||
|
|
||||||
|
return CreatedAtRoute("GetSuscriptorById", new { id = dto.IdSuscriptor }, dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
// PUT: api/suscriptores/{id}
|
||||||
|
[HttpPut("{id:int}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> Update(int id, [FromBody] UpdateSuscriptorDto updateDto)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoModificar)) return Forbid();
|
||||||
|
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _suscriptorService.Actualizar(id, updateDto, userId.Value);
|
||||||
|
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
if (error != null && error.Contains("no encontrado")) return NotFound(new { message = error });
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// DELETE: api/suscriptores/{id} (Desactivar)
|
||||||
|
[HttpDelete("{id:int}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> Deactivate(int id)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoActivarDesactivar)) return Forbid();
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _suscriptorService.Desactivar(id, userId.Value);
|
||||||
|
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
if (error != null && error.Contains("no encontrado")) return NotFound(new { message = error });
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/suscriptores/{id}/activar
|
||||||
|
[HttpPost("{id:int}/activar")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
public async Task<IActionResult> Activate(int id)
|
||||||
|
{
|
||||||
|
if (!TienePermiso(PermisoActivarDesactivar)) return Forbid();
|
||||||
|
|
||||||
|
var userId = GetCurrentUserId();
|
||||||
|
if (userId == null) return Unauthorized();
|
||||||
|
|
||||||
|
var (exito, error) = await _suscriptorService.Activar(id, userId.Value);
|
||||||
|
|
||||||
|
if (!exito)
|
||||||
|
{
|
||||||
|
if (error != null && error.Contains("no encontrado")) return NotFound(new { message = error });
|
||||||
|
return BadRequest(new { message = error });
|
||||||
|
}
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
using Dapper;
|
||||||
|
using GestionIntegral.Api.Models.Comunicaciones;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Comunicaciones
|
||||||
|
{
|
||||||
|
public class EmailLogRepository : IEmailLogRepository
|
||||||
|
{
|
||||||
|
private readonly DbConnectionFactory _connectionFactory;
|
||||||
|
private readonly ILogger<EmailLogRepository> _logger;
|
||||||
|
public EmailLogRepository(DbConnectionFactory connectionFactory, ILogger<EmailLogRepository> logger)
|
||||||
|
{
|
||||||
|
_connectionFactory = connectionFactory;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task CreateAsync(EmailLog log)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
INSERT INTO dbo.com_EmailLogs
|
||||||
|
(FechaEnvio, DestinatarioEmail, Asunto, Estado, Error, IdUsuarioDisparo, Origen, ReferenciaId, IdLoteDeEnvio)
|
||||||
|
VALUES
|
||||||
|
(@FechaEnvio, @DestinatarioEmail, @Asunto, @Estado, @Error, @IdUsuarioDisparo, @Origen, @ReferenciaId, @IdLoteDeEnvio);";
|
||||||
|
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
await connection.ExecuteAsync(sql, log);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EmailLog>> GetByReferenceAsync(string referenciaId)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
SELECT * FROM dbo.com_EmailLogs
|
||||||
|
WHERE ReferenciaId = @ReferenciaId
|
||||||
|
ORDER BY FechaEnvio DESC;";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<EmailLog>(sql, new { ReferenciaId = referenciaId });
|
||||||
|
}
|
||||||
|
catch (System.Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener logs de email por ReferenciaId: {ReferenciaId}", referenciaId);
|
||||||
|
return Enumerable.Empty<EmailLog>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EmailLog>> GetByLoteIdAsync(int idLoteDeEnvio)
|
||||||
|
{
|
||||||
|
// Ordenamos por Estado descendente para que los 'Fallidos' aparezcan primero
|
||||||
|
const string sql = @"
|
||||||
|
SELECT * FROM dbo.com_EmailLogs
|
||||||
|
WHERE IdLoteDeEnvio = @IdLoteDeEnvio
|
||||||
|
ORDER BY Estado DESC, FechaEnvio DESC;";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<EmailLog>(sql, new { IdLoteDeEnvio = idLoteDeEnvio });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener logs de email por IdLoteDeEnvio: {IdLoteDeEnvio}", idLoteDeEnvio);
|
||||||
|
return Enumerable.Empty<EmailLog>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using GestionIntegral.Api.Models.Comunicaciones;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Comunicaciones
|
||||||
|
{
|
||||||
|
public interface IEmailLogRepository
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Guarda un nuevo registro de log de email en la base de datos.
|
||||||
|
/// </summary>
|
||||||
|
Task CreateAsync(EmailLog log);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Obtiene todos los registros de log de email que coinciden con una referencia específica.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="referenciaId">El identificador de la entidad (ej. "Factura-59").</param>
|
||||||
|
/// <returns>Una colección de registros de log de email.</returns>
|
||||||
|
Task<IEnumerable<EmailLog>> GetByReferenceAsync(string referenciaId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Obtiene todos los registros de log de email que pertenecen a un lote de envío masivo.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idLoteDeEnvio">El ID del lote de envío.</param>
|
||||||
|
/// <returns>Una colección de registros de log de email.</returns>
|
||||||
|
Task<IEnumerable<EmailLog>> GetByLoteIdAsync(int idLoteDeEnvio);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using GestionIntegral.Api.Models.Comunicaciones;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Comunicaciones
|
||||||
|
{
|
||||||
|
public interface ILoteDeEnvioRepository
|
||||||
|
{
|
||||||
|
Task<LoteDeEnvio> CreateAsync(LoteDeEnvio lote);
|
||||||
|
Task<bool> UpdateAsync(LoteDeEnvio lote);
|
||||||
|
Task<IEnumerable<LoteDeEnvio>> GetAllAsync(int? anio, int? mes);
|
||||||
|
Task<LoteDeEnvio?> GetByIdAsync(int id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
using System.Text;
|
||||||
|
using Dapper;
|
||||||
|
using GestionIntegral.Api.Models.Comunicaciones;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Comunicaciones
|
||||||
|
{
|
||||||
|
public class LoteDeEnvioRepository : ILoteDeEnvioRepository
|
||||||
|
{
|
||||||
|
private readonly DbConnectionFactory _connectionFactory;
|
||||||
|
public LoteDeEnvioRepository(DbConnectionFactory connectionFactory)
|
||||||
|
{
|
||||||
|
_connectionFactory = connectionFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<LoteDeEnvio> CreateAsync(LoteDeEnvio lote)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
INSERT INTO dbo.com_LotesDeEnvio (FechaInicio, Periodo, Origen, Estado, IdUsuarioDisparo)
|
||||||
|
OUTPUT INSERTED.*
|
||||||
|
VALUES (@FechaInicio, @Periodo, @Origen, @Estado, @IdUsuarioDisparo);";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QuerySingleAsync<LoteDeEnvio>(sql, lote);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateAsync(LoteDeEnvio lote)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
UPDATE dbo.com_LotesDeEnvio SET
|
||||||
|
FechaFin = @FechaFin,
|
||||||
|
Estado = @Estado,
|
||||||
|
TotalCorreos = @TotalCorreos,
|
||||||
|
TotalEnviados = @TotalEnviados,
|
||||||
|
TotalFallidos = @TotalFallidos
|
||||||
|
WHERE IdLoteDeEnvio = @IdLoteDeEnvio;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
var rows = await connection.ExecuteAsync(sql, lote);
|
||||||
|
return rows == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<LoteDeEnvio>> GetAllAsync(int? anio, int? mes)
|
||||||
|
{
|
||||||
|
var sqlBuilder = new StringBuilder("SELECT * FROM dbo.com_LotesDeEnvio WHERE 1=1");
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
|
||||||
|
if (anio.HasValue)
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND YEAR(FechaInicio) = @Anio");
|
||||||
|
parameters.Add("Anio", anio.Value);
|
||||||
|
}
|
||||||
|
if (mes.HasValue)
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND MONTH(FechaInicio) = @Mes");
|
||||||
|
parameters.Add("Mes", mes.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlBuilder.Append(" ORDER BY FechaInicio DESC;");
|
||||||
|
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<LoteDeEnvio>(sqlBuilder.ToString(), parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<LoteDeEnvio?> GetByIdAsync(int id)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT * FROM dbo.com_LotesDeEnvio WHERE IdLoteDeEnvio = @Id;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QuerySingleOrDefaultAsync<LoteDeEnvio>(sql, new { Id = id });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using Dapper;
|
using Dapper;
|
||||||
|
using GestionIntegral.Api.Dtos.Distribucion;
|
||||||
using GestionIntegral.Api.Models.Distribucion;
|
using GestionIntegral.Api.Models.Distribucion;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System; // Para Exception
|
using System; // Para Exception
|
||||||
@@ -25,7 +26,7 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|||||||
string? nomApeFilter,
|
string? nomApeFilter,
|
||||||
int? legajoFilter,
|
int? legajoFilter,
|
||||||
bool? esAccionista,
|
bool? esAccionista,
|
||||||
bool? soloActivos) // <<-- Parámetro aquí
|
bool? soloActivos)
|
||||||
{
|
{
|
||||||
using var connection = _connectionFactory.CreateConnection();
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
var sqlBuilder = new System.Text.StringBuilder(@"
|
var sqlBuilder = new System.Text.StringBuilder(@"
|
||||||
@@ -73,6 +74,37 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<CanillaDropdownDto>> GetAllDropdownAsync(bool? esAccionista, bool? soloActivos)
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
var sqlBuilder = new System.Text.StringBuilder(@"
|
||||||
|
SELECT c.Id_Canilla AS IdCanilla, c.Legajo, c.NomApe
|
||||||
|
FROM dbo.dist_dtCanillas c
|
||||||
|
WHERE 1=1 ");
|
||||||
|
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
|
||||||
|
if (soloActivos.HasValue)
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND c.Baja = @BajaStatus ");
|
||||||
|
parameters.Add("BajaStatus", !soloActivos.Value); // Si soloActivos es true, Baja debe ser false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (esAccionista.HasValue)
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND c.Accionista = @EsAccionista ");
|
||||||
|
parameters.Add("EsAccionista", esAccionista.Value); // true para accionistas, false para no accionistas (canillitas)
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlBuilder.Append(" ORDER BY c.NomApe;");
|
||||||
|
|
||||||
|
var result = await connection.QueryAsync<CanillaDropdownDto>(
|
||||||
|
sqlBuilder.ToString(),
|
||||||
|
parameters
|
||||||
|
);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<(Canilla? Canilla, string? NombreZona, string? NombreEmpresa)> GetByIdAsync(int id)
|
public async Task<(Canilla? Canilla, string? NombreZona, string? NombreEmpresa)> GetByIdAsync(int id)
|
||||||
{
|
{
|
||||||
const string sql = @"
|
const string sql = @"
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ using GestionIntegral.Api.Models.Distribucion;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using GestionIntegral.Api.Dtos.Distribucion;
|
||||||
|
|
||||||
namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
||||||
{
|
{
|
||||||
public interface ICanillaRepository
|
public interface ICanillaRepository
|
||||||
{
|
{
|
||||||
Task<IEnumerable<(Canilla Canilla, string? NombreZona, string? NombreEmpresa)>> GetAllAsync(string? nomApeFilter, int? legajoFilter, bool? soloActivos, bool? esAccionista);
|
Task<IEnumerable<(Canilla Canilla, string? NombreZona, string? NombreEmpresa)>> GetAllAsync(string? nomApeFilter, int? legajoFilter, bool? soloActivos, bool? esAccionista);
|
||||||
|
Task<IEnumerable<CanillaDropdownDto>> GetAllDropdownAsync(bool? esAccionista, bool? soloActivos);
|
||||||
Task<(Canilla? Canilla, string? NombreZona, string? NombreEmpresa)> GetByIdAsync(int id);
|
Task<(Canilla? Canilla, string? NombreZona, string? NombreEmpresa)> GetByIdAsync(int id);
|
||||||
Task<Canilla?> GetByIdSimpleAsync(int id); // Para obtener solo la entidad Canilla
|
Task<Canilla?> GetByIdSimpleAsync(int id); // Para obtener solo la entidad Canilla
|
||||||
Task<Canilla?> CreateAsync(Canilla nuevoCanilla, int idUsuario, IDbTransaction transaction);
|
Task<Canilla?> CreateAsync(Canilla nuevoCanilla, int idUsuario, IDbTransaction transaction);
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ using GestionIntegral.Api.Models.Distribucion;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using GestionIntegral.Api.Dtos.Distribucion;
|
||||||
|
|
||||||
namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
||||||
{
|
{
|
||||||
public interface IOtroDestinoRepository
|
public interface IOtroDestinoRepository
|
||||||
{
|
{
|
||||||
Task<IEnumerable<OtroDestino>> GetAllAsync(string? nombreFilter);
|
Task<IEnumerable<OtroDestino>> GetAllAsync(string? nombreFilter);
|
||||||
|
Task<IEnumerable<OtroDestinoDropdownDto>> GetAllDropdownAsync();
|
||||||
Task<OtroDestino?> GetByIdAsync(int id);
|
Task<OtroDestino?> GetByIdAsync(int id);
|
||||||
Task<OtroDestino?> CreateAsync(OtroDestino nuevoDestino, int idUsuario, IDbTransaction transaction);
|
Task<OtroDestino?> CreateAsync(OtroDestino nuevoDestino, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> UpdateAsync(OtroDestino destinoAActualizar, int idUsuario, IDbTransaction transaction);
|
Task<bool> UpdateAsync(OtroDestino destinoAActualizar, int idUsuario, IDbTransaction transaction);
|
||||||
|
|||||||
@@ -9,10 +9,11 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|||||||
{
|
{
|
||||||
Task<IEnumerable<PubliSeccion>> GetByPublicacionIdAsync(int idPublicacion, bool? soloActivas = null);
|
Task<IEnumerable<PubliSeccion>> GetByPublicacionIdAsync(int idPublicacion, bool? soloActivas = null);
|
||||||
Task<PubliSeccion?> GetByIdAsync(int idSeccion);
|
Task<PubliSeccion?> GetByIdAsync(int idSeccion);
|
||||||
|
Task<IEnumerable<PubliSeccion>> GetByIdsAndPublicacionAsync(IEnumerable<int> idsSeccion, int idPublicacion, bool? soloActivas = null);
|
||||||
Task<PubliSeccion?> CreateAsync(PubliSeccion nuevaSeccion, int idUsuario, IDbTransaction transaction);
|
Task<PubliSeccion?> CreateAsync(PubliSeccion nuevaSeccion, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> UpdateAsync(PubliSeccion seccionAActualizar, int idUsuario, IDbTransaction transaction);
|
Task<bool> UpdateAsync(PubliSeccion seccionAActualizar, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> DeleteAsync(int idSeccion, int idUsuario, IDbTransaction transaction);
|
Task<bool> DeleteAsync(int idSeccion, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> DeleteByPublicacionIdAsync(int idPublicacion, int idUsuarioAuditoria, IDbTransaction transaction); // Ya existe
|
Task<bool> DeleteByPublicacionIdAsync(int idPublicacion, int idUsuarioAuditoria, IDbTransaction transaction);
|
||||||
Task<bool> ExistsByNameInPublicacionAsync(string nombre, int idPublicacion, int? excludeIdSeccion = null);
|
Task<bool> ExistsByNameInPublicacionAsync(string nombre, int idPublicacion, int? excludeIdSeccion = null);
|
||||||
Task<bool> IsInUseAsync(int idSeccion); // Verificar en bob_RegPublicaciones, bob_StockBobinas
|
Task<bool> IsInUseAsync(int idSeccion); // Verificar en bob_RegPublicaciones, bob_StockBobinas
|
||||||
Task<IEnumerable<(PubliSeccionHistorico Historial, string NombreUsuarioModifico)>> GetHistorialAsync(
|
Task<IEnumerable<(PubliSeccionHistorico Historial, string NombreUsuarioModifico)>> GetHistorialAsync(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Dapper;
|
using Dapper;
|
||||||
|
using GestionIntegral.Api.Dtos.Distribucion;
|
||||||
using GestionIntegral.Api.Models.Distribucion;
|
using GestionIntegral.Api.Models.Distribucion;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -44,6 +45,21 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<OtroDestinoDropdownDto>> GetAllDropdownAsync()
|
||||||
|
{
|
||||||
|
const string sql = "SELECT Id_Destino AS IdDestino, Nombre FROM dbo.dist_dtOtrosDestinos ORDER BY Nombre;";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<OtroDestinoDropdownDto>(sql);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener Otros Destinos para dropdown.");
|
||||||
|
return Enumerable.Empty<OtroDestinoDropdownDto>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<OtroDestino?> GetByIdAsync(int id)
|
public async Task<OtroDestino?> GetByIdAsync(int id)
|
||||||
{
|
{
|
||||||
const string sql = "SELECT Id_Destino AS IdDestino, Nombre, Obs FROM dbo.dist_dtOtrosDestinos WHERE Id_Destino = @Id";
|
const string sql = "SELECT Id_Destino AS IdDestino, Nombre, Obs FROM dbo.dist_dtOtrosDestinos WHERE Id_Destino = @Id";
|
||||||
|
|||||||
@@ -169,6 +169,32 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|||||||
return rowsAffected == 1;
|
return rowsAffected == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<PubliSeccion>> GetByIdsAndPublicacionAsync(IEnumerable<int> idsSeccion, int idPublicacion, bool? soloActivas = null)
|
||||||
|
{
|
||||||
|
if (idsSeccion == null || !idsSeccion.Any())
|
||||||
|
{
|
||||||
|
return Enumerable.Empty<PubliSeccion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
var sqlBuilder = new StringBuilder(@"
|
||||||
|
SELECT Id_Seccion AS IdSeccion, Id_Publicacion AS IdPublicacion, Nombre, Estado
|
||||||
|
FROM dbo.dist_dtPubliSecciones
|
||||||
|
WHERE Id_Publicacion = @IdPublicacionParam AND Id_Seccion IN @IdsSeccionParam");
|
||||||
|
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
parameters.Add("IdPublicacionParam", idPublicacion);
|
||||||
|
parameters.Add("IdsSeccionParam", idsSeccion);
|
||||||
|
|
||||||
|
if (soloActivas.HasValue)
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND Estado = @EstadoParam");
|
||||||
|
parameters.Add("EstadoParam", soloActivas.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
using var connection = _cf.CreateConnection();
|
||||||
|
return await connection.QueryAsync<PubliSeccion>(sqlBuilder.ToString(), parameters);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<bool> DeleteAsync(int idSeccion, int idUsuario, IDbTransaction transaction)
|
public async Task<bool> DeleteAsync(int idSeccion, int idUsuario, IDbTransaction transaction)
|
||||||
{
|
{
|
||||||
var actual = await transaction.Connection!.QuerySingleOrDefaultAsync<PubliSeccion>(
|
var actual = await transaction.Connection!.QuerySingleOrDefaultAsync<PubliSeccion>(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Dapper;
|
using Dapper;
|
||||||
using GestionIntegral.Api.Data.Repositories.Impresion;
|
using GestionIntegral.Api.Data.Repositories.Impresion;
|
||||||
|
using GestionIntegral.Api.Dtos.Impresion;
|
||||||
using GestionIntegral.Api.Models.Impresion;
|
using GestionIntegral.Api.Models.Impresion;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -45,6 +46,25 @@ namespace GestionIntegral.Api.Data.Repositories.Impresion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EstadoBobinaDropdownDto>> GetAllDropdownAsync()
|
||||||
|
{
|
||||||
|
var sqlBuilder = new StringBuilder("SELECT Id_EstadoBobina AS IdEstadoBobina, Denominacion FROM dbo.bob_dtEstadosBobinas WHERE 1=1");
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
|
||||||
|
sqlBuilder.Append(" ORDER BY Denominacion;");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<EstadoBobinaDropdownDto>(sqlBuilder.ToString(), parameters);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener todos los Estados de Bobina.");
|
||||||
|
return Enumerable.Empty<EstadoBobinaDropdownDto>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<EstadoBobina?> GetByIdAsync(int id)
|
public async Task<EstadoBobina?> GetByIdAsync(int id)
|
||||||
{
|
{
|
||||||
const string sql = "SELECT Id_EstadoBobina AS IdEstadoBobina, Denominacion, Obs FROM dbo.bob_dtEstadosBobinas WHERE Id_EstadoBobina = @Id";
|
const string sql = "SELECT Id_EstadoBobina AS IdEstadoBobina, Denominacion, Obs FROM dbo.bob_dtEstadosBobinas WHERE Id_EstadoBobina = @Id";
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ using GestionIntegral.Api.Models.Impresion;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using GestionIntegral.Api.Dtos.Impresion;
|
||||||
|
|
||||||
namespace GestionIntegral.Api.Data.Repositories.Impresion
|
namespace GestionIntegral.Api.Data.Repositories.Impresion
|
||||||
{
|
{
|
||||||
public interface IEstadoBobinaRepository
|
public interface IEstadoBobinaRepository
|
||||||
{
|
{
|
||||||
Task<IEnumerable<EstadoBobina>> GetAllAsync(string? denominacionFilter);
|
Task<IEnumerable<EstadoBobina>> GetAllAsync(string? denominacionFilter);
|
||||||
|
Task<IEnumerable<EstadoBobinaDropdownDto>> GetAllDropdownAsync();
|
||||||
Task<EstadoBobina?> GetByIdAsync(int id);
|
Task<EstadoBobina?> GetByIdAsync(int id);
|
||||||
Task<EstadoBobina?> CreateAsync(EstadoBobina nuevoEstadoBobina, int idUsuario, IDbTransaction transaction);
|
Task<EstadoBobina?> CreateAsync(EstadoBobina nuevoEstadoBobina, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> UpdateAsync(EstadoBobina estadoBobinaAActualizar, int idUsuario, IDbTransaction transaction);
|
Task<bool> UpdateAsync(EstadoBobina estadoBobinaAActualizar, int idUsuario, IDbTransaction transaction);
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// --- FICHERO MODIFICADO: IRegTiradaRepository.cs ---
|
||||||
|
|
||||||
using GestionIntegral.Api.Models.Impresion;
|
using GestionIntegral.Api.Models.Impresion;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -6,11 +8,12 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace GestionIntegral.Api.Data.Repositories.Impresion
|
namespace GestionIntegral.Api.Data.Repositories.Impresion
|
||||||
{
|
{
|
||||||
public interface IRegTiradaRepository // Para bob_RegTiradas
|
public interface IRegTiradaRepository
|
||||||
{
|
{
|
||||||
Task<RegTirada?> GetByIdAsync(int idRegistro);
|
Task<RegTirada?> GetByIdAsync(int idRegistro);
|
||||||
Task<IEnumerable<RegTirada>> GetByCriteriaAsync(DateTime? fecha, int? idPublicacion, int? idPlanta);
|
Task<IEnumerable<RegTirada>> GetByCriteriaAsync(DateTime? fecha, int? idPublicacion, int? idPlanta);
|
||||||
Task<RegTirada?> CreateAsync(RegTirada nuevaTirada, int idUsuario, IDbTransaction transaction);
|
Task<RegTirada?> CreateAsync(RegTirada nuevaTirada, int idUsuario, IDbTransaction transaction);
|
||||||
|
Task<bool> UpdateAsync(RegTirada tiradaAActualizar, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> DeleteAsync(int idRegistro, int idUsuario, IDbTransaction transaction); // Si se borra el registro principal
|
Task<bool> DeleteAsync(int idRegistro, int idUsuario, IDbTransaction transaction); // Si se borra el registro principal
|
||||||
Task<bool> DeleteByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, int idUsuario, IDbTransaction transaction);
|
Task<bool> DeleteByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, int idUsuario, IDbTransaction transaction);
|
||||||
Task<RegTirada?> GetByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, IDbTransaction? transaction = null);
|
Task<RegTirada?> GetByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, IDbTransaction? transaction = null);
|
||||||
@@ -27,9 +30,11 @@ namespace GestionIntegral.Api.Data.Repositories.Impresion
|
|||||||
|
|
||||||
public interface IRegPublicacionSeccionRepository // Para bob_RegPublicaciones
|
public interface IRegPublicacionSeccionRepository // Para bob_RegPublicaciones
|
||||||
{
|
{
|
||||||
|
Task<RegPublicacionSeccion?> GetByIdAsync(int idTirada);
|
||||||
Task<IEnumerable<RegPublicacionSeccion>> GetByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta);
|
Task<IEnumerable<RegPublicacionSeccion>> GetByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta);
|
||||||
Task<RegPublicacionSeccion?> CreateAsync(RegPublicacionSeccion nuevaSeccionTirada, int idUsuario, IDbTransaction transaction);
|
Task<RegPublicacionSeccion?> CreateAsync(RegPublicacionSeccion nuevaSeccionTirada, int idUsuario, IDbTransaction transaction);
|
||||||
|
Task<bool> UpdateAsync(RegPublicacionSeccion seccionAActualizar, int idUsuario, IDbTransaction transaction);
|
||||||
|
Task<bool> DeleteByIdAsync(int idTirada, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> DeleteByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, int idUsuario, IDbTransaction transaction);
|
Task<bool> DeleteByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, int idUsuario, IDbTransaction transaction);
|
||||||
// Podría tener un DeleteByIdAsync si se permite borrar secciones individuales de una tirada
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ namespace GestionIntegral.Api.Data.Repositories.Impresion
|
|||||||
public interface ITipoBobinaRepository
|
public interface ITipoBobinaRepository
|
||||||
{
|
{
|
||||||
Task<IEnumerable<TipoBobina>> GetAllAsync(string? denominacionFilter);
|
Task<IEnumerable<TipoBobina>> GetAllAsync(string? denominacionFilter);
|
||||||
|
Task<IEnumerable<TipoBobina>> GetAllDropdownAsync();
|
||||||
Task<TipoBobina?> GetByIdAsync(int id);
|
Task<TipoBobina?> GetByIdAsync(int id);
|
||||||
Task<TipoBobina?> CreateAsync(TipoBobina nuevoTipoBobina, int idUsuario, IDbTransaction transaction);
|
Task<TipoBobina?> CreateAsync(TipoBobina nuevoTipoBobina, int idUsuario, IDbTransaction transaction);
|
||||||
Task<bool> UpdateAsync(TipoBobina tipoBobinaAActualizar, int idUsuario, IDbTransaction transaction);
|
Task<bool> UpdateAsync(TipoBobina tipoBobinaAActualizar, int idUsuario, IDbTransaction transaction);
|
||||||
|
|||||||
@@ -83,6 +83,42 @@ namespace GestionIntegral.Api.Data.Repositories.Impresion
|
|||||||
return inserted;
|
return inserted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateAsync(RegTirada tiradaAActualizar, int idUsuario, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
// 1. Obtener el estado actual para guardarlo en el historial
|
||||||
|
const string sqlSelectActual = "SELECT * FROM dbo.bob_RegTiradas WHERE Id_Registro = @IdRegistro";
|
||||||
|
var estadoActual = await transaction.Connection!.QuerySingleOrDefaultAsync<RegTirada>(sqlSelectActual, new { IdRegistro = tiradaAActualizar.IdRegistro }, transaction);
|
||||||
|
|
||||||
|
if (estadoActual == null)
|
||||||
|
{
|
||||||
|
throw new KeyNotFoundException("No se encontró el registro de tirada a actualizar para generar el historial.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Guardar el estado PREVIO en el historial
|
||||||
|
const string sqlHistorico = @"INSERT INTO dbo.bob_RegTiradas_H (Id_Registro, Ejemplares, Id_Publicacion, Fecha, Id_Planta, Id_Usuario, FechaMod, TipoMod)
|
||||||
|
VALUES (@IdRegistroParam, @EjemplaresParam, @IdPublicacionParam, @FechaParam, @IdPlantaParam, @IdUsuarioParam, @FechaModParam, @TipoModParam);";
|
||||||
|
await transaction.Connection!.ExecuteAsync(sqlHistorico, new
|
||||||
|
{
|
||||||
|
IdRegistroParam = estadoActual.IdRegistro,
|
||||||
|
EjemplaresParam = estadoActual.Ejemplares,
|
||||||
|
IdPublicacionParam = estadoActual.IdPublicacion,
|
||||||
|
FechaParam = estadoActual.Fecha,
|
||||||
|
IdPlantaParam = estadoActual.IdPlanta,
|
||||||
|
IdUsuarioParam = idUsuario,
|
||||||
|
FechaModParam = DateTime.Now,
|
||||||
|
TipoModParam = "Modificado"
|
||||||
|
}, transaction);
|
||||||
|
|
||||||
|
// 3. Actualizar el registro principal
|
||||||
|
const string sqlUpdate = @"
|
||||||
|
UPDATE dbo.bob_RegTiradas
|
||||||
|
SET Ejemplares = @Ejemplares
|
||||||
|
WHERE Id_Registro = @IdRegistro;";
|
||||||
|
|
||||||
|
var rowsAffected = await transaction.Connection!.ExecuteAsync(sqlUpdate, tiradaAActualizar, transaction);
|
||||||
|
return rowsAffected == 1;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<bool> DeleteAsync(int idRegistro, int idUsuario, IDbTransaction transaction)
|
public async Task<bool> DeleteAsync(int idRegistro, int idUsuario, IDbTransaction transaction)
|
||||||
{
|
{
|
||||||
var actual = await GetByIdAsync(idRegistro); // No necesita TX aquí ya que es solo para historial
|
var actual = await GetByIdAsync(idRegistro); // No necesita TX aquí ya que es solo para historial
|
||||||
@@ -276,6 +312,66 @@ namespace GestionIntegral.Api.Data.Repositories.Impresion
|
|||||||
return inserted;
|
return inserted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<RegPublicacionSeccion?> GetByIdAsync(int idTirada)
|
||||||
|
{
|
||||||
|
const string sql = @"SELECT Id_Tirada AS IdTirada, Id_Publicacion AS IdPublicacion, Id_Seccion AS IdSeccion, CantPag, Fecha, Id_Planta AS IdPlanta
|
||||||
|
FROM dbo.bob_RegPublicaciones WHERE Id_Tirada = @IdTiradaParam";
|
||||||
|
using var connection = _cf.CreateConnection();
|
||||||
|
return await connection.QuerySingleOrDefaultAsync<RegPublicacionSeccion>(sql, new { IdTiradaParam = idTirada });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateAsync(RegPublicacionSeccion seccionAActualizar, int idUsuario, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
// Obtener estado PREVIO para historial
|
||||||
|
var actual = await GetByIdAsync(seccionAActualizar.IdTirada);
|
||||||
|
if (actual == null) throw new KeyNotFoundException("No se encontró la sección de tirada a actualizar.");
|
||||||
|
|
||||||
|
// Insertar en historial con tipo "Modificado"
|
||||||
|
const string sqlHistorico = @"INSERT INTO dbo.bob_RegPublicaciones_H (Id_Tirada, Id_Publicacion, Id_Seccion, CantPag, Fecha, Id_Planta, Id_Usuario, FechaMod, TipoMod)
|
||||||
|
VALUES (@IdTirada, @IdPublicacion, @IdSeccion, @CantPag, @Fecha, @IdPlanta, @IdUsuario, GETDATE(), 'Modificado');";
|
||||||
|
await transaction.Connection!.ExecuteAsync(sqlHistorico, new
|
||||||
|
{
|
||||||
|
actual.IdTirada,
|
||||||
|
actual.IdPublicacion,
|
||||||
|
actual.IdSeccion,
|
||||||
|
actual.CantPag,
|
||||||
|
actual.Fecha,
|
||||||
|
actual.IdPlanta,
|
||||||
|
IdUsuario = idUsuario
|
||||||
|
}, transaction);
|
||||||
|
|
||||||
|
// Actualizar el registro
|
||||||
|
const string sqlUpdate = "UPDATE dbo.bob_RegPublicaciones SET CantPag = @CantPag WHERE Id_Tirada = @IdTirada";
|
||||||
|
var rowsAffected = await transaction.Connection!.ExecuteAsync(sqlUpdate, seccionAActualizar, transaction);
|
||||||
|
return rowsAffected == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> DeleteByIdAsync(int idTirada, int idUsuario, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
// Obtener estado PREVIO para historial
|
||||||
|
var actual = await GetByIdAsync(idTirada);
|
||||||
|
if (actual == null) return false; // Ya no existe, no hacemos nada.
|
||||||
|
|
||||||
|
// Insertar en historial con tipo "Eliminado"
|
||||||
|
const string sqlHistorico = @"INSERT INTO dbo.bob_RegPublicaciones_H (Id_Tirada, Id_Publicacion, Id_Seccion, CantPag, Fecha, Id_Planta, Id_Usuario, FechaMod, TipoMod)
|
||||||
|
VALUES (@IdTirada, @IdPublicacion, @IdSeccion, @CantPag, @Fecha, @IdPlanta, @IdUsuario, GETDATE(), 'Eliminado');";
|
||||||
|
await transaction.Connection!.ExecuteAsync(sqlHistorico, new
|
||||||
|
{
|
||||||
|
actual.IdTirada,
|
||||||
|
actual.IdPublicacion,
|
||||||
|
actual.IdSeccion,
|
||||||
|
actual.CantPag,
|
||||||
|
actual.Fecha,
|
||||||
|
actual.IdPlanta,
|
||||||
|
IdUsuario = idUsuario
|
||||||
|
}, transaction);
|
||||||
|
|
||||||
|
// Eliminar el registro
|
||||||
|
const string sqlDelete = "DELETE FROM dbo.bob_RegPublicaciones WHERE Id_Tirada = @IdTirada";
|
||||||
|
var rowsAffected = await transaction.Connection!.ExecuteAsync(sqlDelete, new { IdTirada = idTirada }, transaction);
|
||||||
|
return rowsAffected == 1;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<bool> DeleteByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, int idUsuario, IDbTransaction transaction)
|
public async Task<bool> DeleteByFechaPublicacionPlantaAsync(DateTime fecha, int idPublicacion, int idPlanta, int idUsuario, IDbTransaction transaction)
|
||||||
{
|
{
|
||||||
var seccionesAEliminar = await GetByFechaPublicacionPlantaAsync(fecha.Date, idPublicacion, idPlanta); // No necesita TX, es SELECT
|
var seccionesAEliminar = await GetByFechaPublicacionPlantaAsync(fecha.Date, idPublicacion, idPlanta); // No necesita TX, es SELECT
|
||||||
|
|||||||
@@ -61,13 +61,13 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|||||||
}
|
}
|
||||||
if (fechaDesde.HasValue)
|
if (fechaDesde.HasValue)
|
||||||
{
|
{
|
||||||
sqlBuilder.Append(" AND sb.FechaRemito >= @FechaDesdeParam"); // O FechaEstado según el contexto del filtro
|
sqlBuilder.Append(" AND sb.FechaRemito >= @FechaDesdeParam");
|
||||||
parameters.Add("FechaDesdeParam", fechaDesde.Value.Date);
|
parameters.Add("FechaDesdeParam", fechaDesde.Value.Date);
|
||||||
}
|
}
|
||||||
if (fechaHasta.HasValue)
|
if (fechaHasta.HasValue)
|
||||||
{
|
{
|
||||||
sqlBuilder.Append(" AND sb.FechaRemito <= @FechaHastaParam"); // O FechaEstado
|
sqlBuilder.Append(" AND sb.FechaRemito <= @FechaHastaParam");
|
||||||
parameters.Add("FechaHastaParam", fechaHasta.Value.Date.AddDays(1).AddTicks(-1)); // Hasta el final del día
|
parameters.Add("FechaHastaParam", fechaHasta.Value.Date);
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlBuilder.Append(" ORDER BY sb.FechaRemito DESC, sb.NroBobina;");
|
sqlBuilder.Append(" ORDER BY sb.FechaRemito DESC, sb.NroBobina;");
|
||||||
@@ -224,14 +224,12 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|||||||
|
|
||||||
if (actual == null) throw new KeyNotFoundException("Bobina no encontrada para eliminar.");
|
if (actual == null) throw new KeyNotFoundException("Bobina no encontrada para eliminar.");
|
||||||
|
|
||||||
// --- INICIO DE CAMBIO EN VALIDACIÓN ---
|
|
||||||
// Permitir eliminar si está Disponible (1) o Dañada (3)
|
// Permitir eliminar si está Disponible (1) o Dañada (3)
|
||||||
if (actual.IdEstadoBobina != 1 && actual.IdEstadoBobina != 3)
|
if (actual.IdEstadoBobina != 1 && actual.IdEstadoBobina != 3)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Intento de eliminar bobina {IdBobina} que no está en estado 'Disponible' o 'Dañada'. Estado actual: {EstadoActual}", idBobina, actual.IdEstadoBobina);
|
_logger.LogWarning("Intento de eliminar bobina {IdBobina} que no está en estado 'Disponible' o 'Dañada'. Estado actual: {EstadoActual}", idBobina, actual.IdEstadoBobina);
|
||||||
return false; // Devolver false si no cumple la condición para ser eliminada
|
return false; // Devolver false si no cumple la condición para ser eliminada
|
||||||
}
|
}
|
||||||
// --- FIN DE CAMBIO EN VALIDACIÓN ---
|
|
||||||
|
|
||||||
const string sqlDelete = "DELETE FROM dbo.bob_StockBobinas WHERE Id_Bobina = @IdBobinaParam";
|
const string sqlDelete = "DELETE FROM dbo.bob_StockBobinas WHERE Id_Bobina = @IdBobinaParam";
|
||||||
const string sqlInsertHistorico = @"
|
const string sqlInsertHistorico = @"
|
||||||
|
|||||||
@@ -44,6 +44,24 @@ namespace GestionIntegral.Api.Data.Repositories.Impresion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<TipoBobina>> GetAllDropdownAsync()
|
||||||
|
{
|
||||||
|
var sqlBuilder = new StringBuilder("SELECT Id_TipoBobina AS IdTipoBobina, Denominacion FROM dbo.bob_dtBobinas WHERE 1=1");
|
||||||
|
|
||||||
|
sqlBuilder.Append(" ORDER BY Denominacion;");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<TipoBobina>(sqlBuilder.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener todos los Tipos de Bobina.");
|
||||||
|
return Enumerable.Empty<TipoBobina>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<TipoBobina?> GetByIdAsync(int id)
|
public async Task<TipoBobina?> GetByIdAsync(int id)
|
||||||
{
|
{
|
||||||
const string sql = "SELECT Id_TipoBobina AS IdTipoBobina, Denominacion FROM dbo.bob_dtBobinas WHERE Id_TipoBobina = @Id";
|
const string sql = "SELECT Id_TipoBobina AS IdTipoBobina, Denominacion FROM dbo.bob_dtBobinas WHERE Id_TipoBobina = @Id";
|
||||||
|
|||||||
@@ -45,5 +45,8 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
Task<IEnumerable<LiquidacionCanillaGananciaDto>> GetLiquidacionCanillaGananciasAsync(DateTime fecha, int idCanilla);
|
Task<IEnumerable<LiquidacionCanillaGananciaDto>> GetLiquidacionCanillaGananciasAsync(DateTime fecha, int idCanilla);
|
||||||
Task<IEnumerable<ListadoDistCanMensualDiariosDto>> GetReporteMensualDiariosAsync(DateTime fechaDesde, DateTime fechaHasta, bool esAccionista);
|
Task<IEnumerable<ListadoDistCanMensualDiariosDto>> GetReporteMensualDiariosAsync(DateTime fechaDesde, DateTime fechaHasta, bool esAccionista);
|
||||||
Task<IEnumerable<ListadoDistCanMensualPubDto>> GetReporteMensualPorPublicacionAsync(DateTime fechaDesde, DateTime fechaHasta, bool esAccionista);
|
Task<IEnumerable<ListadoDistCanMensualPubDto>> GetReporteMensualPorPublicacionAsync(DateTime fechaDesde, DateTime fechaHasta, bool esAccionista);
|
||||||
|
Task<IEnumerable<FacturasParaReporteDto>> GetDatosReportePublicidadAsync(string periodo);
|
||||||
|
Task<IEnumerable<DistribucionSuscripcionDto>> GetDistribucionSuscripcionesActivasAsync(DateTime fechaDesde, DateTime fechaHasta);
|
||||||
|
Task<IEnumerable<DistribucionSuscripcionDto>> GetDistribucionSuscripcionesBajasAsync(DateTime fechaDesde, DateTime fechaHasta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection();
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
var result = await connection.QueryAsync<ExistenciaPapelDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
var result = await connection.QueryAsync<ExistenciaPapelDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
_logger.LogInformation("SP {SPName} ejecutado, {Count} filas devueltas.", spName, result.Count());
|
_logger.LogInformation("SP {SPName} ejecutado, {Count} filas devueltas.", spName, result.Count());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection();
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
return await connection.QueryAsync<MovimientoBobinasDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
return await connection.QueryAsync<MovimientoBobinasDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -84,7 +84,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
return await conn.QueryAsync<DevueltosOtrosDiasDto>(
|
return await conn.QueryAsync<DevueltosOtrosDiasDto>(
|
||||||
"SP_DistCanillasCantidadEntradaSalidaOtrosDias",
|
"SP_DistCanillasCantidadEntradaSalidaOtrosDias",
|
||||||
parametros,
|
parametros,
|
||||||
commandType: CommandType.StoredProcedure
|
commandType: CommandType.StoredProcedure, commandTimeout: 120
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection();
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
return await connection.QueryAsync<MovimientoBobinaEstadoDetalleDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
return await connection.QueryAsync<MovimientoBobinaEstadoDetalleDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -123,7 +123,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection();
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
return await connection.QueryAsync<MovimientoBobinaEstadoTotalDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
return await connection.QueryAsync<MovimientoBobinaEstadoTotalDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -140,7 +140,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@Mes", fechaDesde.Month, DbType.Int32);
|
parameters.Add("@Mes", fechaDesde.Month, DbType.Int32);
|
||||||
parameters.Add("@Anio", fechaDesde.Year, DbType.Int32);
|
parameters.Add("@Anio", fechaDesde.Year, DbType.Int32);
|
||||||
// El SP no usa fechaHasta explícitamente, calcula el fin de mes internamente
|
// El SP no usa fechaHasta explícitamente, calcula el fin de mes internamente
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionGeneralResumenDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionGeneralResumenDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionGeneralResumenDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionGeneralResumenDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@Id_Publicacion", idPublicacion, DbType.Int32);
|
parameters.Add("@Id_Publicacion", idPublicacion, DbType.Int32);
|
||||||
parameters.Add("@Mes", fechaDesde.Month, DbType.Int32);
|
parameters.Add("@Mes", fechaDesde.Month, DbType.Int32);
|
||||||
parameters.Add("@Anio", fechaDesde.Year, DbType.Int32);
|
parameters.Add("@Anio", fechaDesde.Year, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionGeneralPromedioDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionGeneralPromedioDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionGeneralPromedioDiaDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionGeneralPromedioDiaDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@idPublicacion", idPublicacion, DbType.Int32);
|
parameters.Add("@idPublicacion", idPublicacion, DbType.Int32);
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionCanillasSimpleDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionCanillasSimpleDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionCanillasSimpleDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionCanillasSimpleDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@idPublicacion", idPublicacion, DbType.Int32);
|
parameters.Add("@idPublicacion", idPublicacion, DbType.Int32);
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionCanillasPromedioDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionCanillasPromedioDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionCanillasPromedioDiaDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionCanillasPromedioDiaDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
parameters.Add("@accionista", esAccionista, DbType.Boolean);
|
parameters.Add("@accionista", esAccionista, DbType.Boolean);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionCanillasImporteDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ListadoDistribucionCanillasImporteDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionCanillasImporteDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ListadoDistribucionCanillasImporteDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<VentaMensualSecretariaElDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<VentaMensualSecretariaElDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<VentaMensualSecretariaElDiaDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<VentaMensualSecretariaElDiaDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<VentaMensualSecretariaElPlataDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<VentaMensualSecretariaElPlataDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<VentaMensualSecretariaElPlataDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<VentaMensualSecretariaElPlataDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<VentaMensualSecretariaTirDevoDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<VentaMensualSecretariaTirDevoDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<VentaMensualSecretariaTirDevoDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<VentaMensualSecretariaTirDevoDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fecha", fecha, DbType.DateTime);
|
parameters.Add("@fecha", fecha, DbType.DateTime);
|
||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fecha", fecha, DbType.DateTime);
|
parameters.Add("@fecha", fecha, DbType.DateTime);
|
||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fecha", fecha, DbType.DateTime);
|
parameters.Add("@fecha", fecha, DbType.DateTime);
|
||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaAllDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaAllDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaAllDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaAllDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fecha", fechaLiquidacion, DbType.DateTime);
|
parameters.Add("@fecha", fechaLiquidacion, DbType.DateTime);
|
||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fecha", fechaLiquidacion, DbType.DateTime);
|
parameters.Add("@fecha", fechaLiquidacion, DbType.DateTime);
|
||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<DetalleDistribucionCanillaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<DetalleDistribucionCanillaDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@Fecha", fecha, DbType.DateTime);
|
parameters.Add("@Fecha", fecha, DbType.DateTime);
|
||||||
parameters.Add("@IdEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@IdEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ObtenerCtrlDevolucionesDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ObtenerCtrlDevolucionesDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ObtenerCtrlDevolucionesDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ObtenerCtrlDevolucionesDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@fecha", fecha, DbType.DateTime);
|
parameters.Add("@fecha", fecha, DbType.DateTime);
|
||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ControlDevolucionesReporteDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ControlDevolucionesReporteDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ControlDevolucionesReporteDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ControlDevolucionesReporteDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +297,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@FechaInicio", fechaDesde, DbType.Date);
|
parameters.Add("@FechaInicio", fechaDesde, DbType.Date);
|
||||||
parameters.Add("@FechaFin", fechaHasta, DbType.Date);
|
parameters.Add("@FechaFin", fechaHasta, DbType.Date);
|
||||||
parameters.Add("@IdPlanta", idPlanta, DbType.Int32);
|
parameters.Add("@IdPlanta", idPlanta, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<TiradasPublicacionesSeccionesDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<TiradasPublicacionesSeccionesDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<TiradasPublicacionesSeccionesDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<TiradasPublicacionesSeccionesDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@IdPublicacion", idPublicacion, DbType.Int32);
|
parameters.Add("@IdPublicacion", idPublicacion, DbType.Int32);
|
||||||
parameters.Add("@FechaInicio", fechaDesde, DbType.Date);
|
parameters.Add("@FechaInicio", fechaDesde, DbType.Date);
|
||||||
parameters.Add("@FechaFin", fechaHasta, DbType.Date);
|
parameters.Add("@FechaFin", fechaHasta, DbType.Date);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<TiradasPublicacionesSeccionesDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<TiradasPublicacionesSeccionesDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<TiradasPublicacionesSeccionesDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<TiradasPublicacionesSeccionesDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@FechaInicio", fechaDesde, DbType.DateTime2);
|
parameters.Add("@FechaInicio", fechaDesde, DbType.DateTime2);
|
||||||
parameters.Add("@FechaFin", fechaHasta, DbType.DateTime2);
|
parameters.Add("@FechaFin", fechaHasta, DbType.DateTime2);
|
||||||
parameters.Add("@idPlanta", idPlanta, DbType.Int32);
|
parameters.Add("@idPlanta", idPlanta, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ConsumoBobinasSeccionDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ConsumoBobinasSeccionDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ConsumoBobinasSeccionDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ConsumoBobinasSeccionDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@FechaInicio", fechaDesde, DbType.DateTime2);
|
parameters.Add("@FechaInicio", fechaDesde, DbType.DateTime2);
|
||||||
parameters.Add("@FechaFin", fechaHasta, DbType.DateTime2);
|
parameters.Add("@FechaFin", fechaHasta, DbType.DateTime2);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ConsumoBobinasSeccionDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ConsumoBobinasSeccionDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ConsumoBobinasSeccionDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ConsumoBobinasSeccionDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,7 +339,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@FechaInicio", fechaDesde, DbType.DateTime2);
|
parameters.Add("@FechaInicio", fechaDesde, DbType.DateTime2);
|
||||||
parameters.Add("@FechaFin", fechaHasta, DbType.DateTime2);
|
parameters.Add("@FechaFin", fechaHasta, DbType.DateTime2);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ConsumoBobinasPublicacionDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ConsumoBobinasPublicacionDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ConsumoBobinasPublicacionDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ConsumoBobinasPublicacionDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@FechaInicioMesB", fechaInicioMesB, DbType.Date);
|
parameters.Add("@FechaInicioMesB", fechaInicioMesB, DbType.Date);
|
||||||
parameters.Add("@FechaFinMesB", fechaFinMesB, DbType.Date);
|
parameters.Add("@FechaFinMesB", fechaFinMesB, DbType.Date);
|
||||||
parameters.Add("@IdPlanta", idPlanta, DbType.Int32);
|
parameters.Add("@IdPlanta", idPlanta, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ComparativaConsumoBobinasDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ComparativaConsumoBobinasDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ComparativaConsumoBobinasDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ComparativaConsumoBobinasDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,7 +364,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@FechaFinMesA", fechaFinMesA, DbType.Date);
|
parameters.Add("@FechaFinMesA", fechaFinMesA, DbType.Date);
|
||||||
parameters.Add("@FechaInicioMesB", fechaInicioMesB, DbType.Date);
|
parameters.Add("@FechaInicioMesB", fechaInicioMesB, DbType.Date);
|
||||||
parameters.Add("@FechaFinMesB", fechaFinMesB, DbType.Date);
|
parameters.Add("@FechaFinMesB", fechaFinMesB, DbType.Date);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ComparativaConsumoBobinasDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<ComparativaConsumoBobinasDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ComparativaConsumoBobinasDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<ComparativaConsumoBobinasDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<BalanceCuentaDistDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<BalanceCuentaDistDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<BalanceCuentaDistDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<BalanceCuentaDistDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,7 +390,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<BalanceCuentaDebCredDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<BalanceCuentaDebCredDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<BalanceCuentaDebCredDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<BalanceCuentaDebCredDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -403,7 +403,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
parameters.Add("@fechaDesde", fechaDesde, DbType.DateTime);
|
||||||
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
parameters.Add("@fechaHasta", fechaHasta, DbType.DateTime);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<BalanceCuentaPagosDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<BalanceCuentaPagosDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<BalanceCuentaPagosDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<BalanceCuentaPagosDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
parameters.Add("@Destino", destino, DbType.String);
|
parameters.Add("@Destino", destino, DbType.String);
|
||||||
parameters.Add("@idDestino", idDestino, DbType.Int32);
|
parameters.Add("@idDestino", idDestino, DbType.Int32);
|
||||||
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
parameters.Add("@idEmpresa", idEmpresa, DbType.Int32);
|
||||||
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<SaldoDto>(spName, parameters, commandType: CommandType.StoredProcedure); }
|
try { using var connection = _dbConnectionFactory.CreateConnection(); return await connection.QueryAsync<SaldoDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120); }
|
||||||
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<SaldoDto>(); }
|
catch (Exception ex) { _logger.LogError(ex, "Error SP {SPName}", spName); return Enumerable.Empty<SaldoDto>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,7 +430,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection(); // <--- CORREGIDO AQUÍ
|
using var connection = _dbConnectionFactory.CreateConnection(); // <--- CORREGIDO AQUÍ
|
||||||
return await connection.QueryAsync<ListadoDistribucionDistSimpleDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
return await connection.QueryAsync<ListadoDistribucionDistSimpleDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -450,7 +450,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection(); // <--- CORREGIDO AQUÍ
|
using var connection = _dbConnectionFactory.CreateConnection(); // <--- CORREGIDO AQUÍ
|
||||||
return await connection.QueryAsync<ListadoDistribucionDistPromedioDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
return await connection.QueryAsync<ListadoDistribucionDistPromedioDiaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -489,7 +489,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection();
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
return await connection.QueryAsync<LiquidacionCanillaDetalleDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
return await connection.QueryAsync<LiquidacionCanillaDetalleDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -507,7 +507,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var connection = _dbConnectionFactory.CreateConnection();
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
return await connection.QueryAsync<LiquidacionCanillaGananciaDto>(spName, parameters, commandType: CommandType.StoredProcedure);
|
return await connection.QueryAsync<LiquidacionCanillaGananciaDto>(spName, parameters, commandType: CommandType.StoredProcedure, commandTimeout: 120);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -528,7 +528,7 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
return await connection.QueryAsync<ListadoDistCanMensualDiariosDto>(
|
return await connection.QueryAsync<ListadoDistCanMensualDiariosDto>(
|
||||||
"dbo.SP_DistCanillasAccConImporteEntreFechasDiarios",
|
"dbo.SP_DistCanillasAccConImporteEntreFechasDiarios",
|
||||||
parameters,
|
parameters,
|
||||||
commandType: CommandType.StoredProcedure
|
commandType: CommandType.StoredProcedure, commandTimeout: 120
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,8 +544,114 @@ namespace GestionIntegral.Api.Data.Repositories.Reportes
|
|||||||
return await connection.QueryAsync<ListadoDistCanMensualPubDto>(
|
return await connection.QueryAsync<ListadoDistCanMensualPubDto>(
|
||||||
"dbo.SP_DistCanillasAccConImporteEntreFechas",
|
"dbo.SP_DistCanillasAccConImporteEntreFechas",
|
||||||
parameters,
|
parameters,
|
||||||
commandType: CommandType.StoredProcedure
|
commandType: CommandType.StoredProcedure, commandTimeout: 120
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<FacturasParaReporteDto>> GetDatosReportePublicidadAsync(string periodo)
|
||||||
|
{
|
||||||
|
// Esta consulta une todas las tablas necesarias para obtener los datos del reporte
|
||||||
|
const string sql = @"
|
||||||
|
SELECT
|
||||||
|
f.IdFactura,
|
||||||
|
f.Periodo,
|
||||||
|
s.NombreCompleto AS NombreSuscriptor,
|
||||||
|
s.TipoDocumento,
|
||||||
|
s.NroDocumento,
|
||||||
|
f.ImporteFinal,
|
||||||
|
e.Id_Empresa AS IdEmpresa,
|
||||||
|
e.Nombre AS NombreEmpresa
|
||||||
|
FROM dbo.susc_Facturas f
|
||||||
|
JOIN dbo.susc_Suscriptores s ON f.IdSuscriptor = s.IdSuscriptor
|
||||||
|
-- Usamos una subconsulta para obtener la empresa de forma segura
|
||||||
|
JOIN (
|
||||||
|
SELECT DISTINCT
|
||||||
|
fd.IdFactura,
|
||||||
|
p.Id_Empresa
|
||||||
|
FROM dbo.susc_FacturaDetalles fd
|
||||||
|
JOIN dbo.susc_Suscripciones sub ON fd.IdSuscripcion = sub.IdSuscripcion
|
||||||
|
JOIN dbo.dist_dtPublicaciones p ON sub.IdPublicacion = p.Id_Publicacion
|
||||||
|
) AS FacturaEmpresa ON f.IdFactura = FacturaEmpresa.IdFactura
|
||||||
|
JOIN dbo.dist_dtEmpresas e ON FacturaEmpresa.Id_Empresa = e.Id_Empresa
|
||||||
|
WHERE
|
||||||
|
f.Periodo = @Periodo
|
||||||
|
AND f.EstadoPago = 'Pagada'
|
||||||
|
AND f.EstadoFacturacion = 'Pendiente de Facturar'
|
||||||
|
ORDER BY
|
||||||
|
e.Nombre, s.NombreCompleto;
|
||||||
|
";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<FacturasParaReporteDto>(sql, new { Periodo = periodo });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al ejecutar la consulta para el Reporte de Publicidad para el período {Periodo}", periodo);
|
||||||
|
return Enumerable.Empty<FacturasParaReporteDto>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<DistribucionSuscripcionDto>> GetDistribucionSuscripcionesActivasAsync(DateTime fechaDesde, DateTime fechaHasta)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
SELECT
|
||||||
|
e.Nombre AS NombreEmpresa, p.Nombre AS NombrePublicacion,
|
||||||
|
sus.NombreCompleto AS NombreSuscriptor, sus.Direccion, sus.Telefono,
|
||||||
|
s.FechaInicio, s.FechaFin, s.DiasEntrega, s.Observaciones
|
||||||
|
FROM dbo.susc_Suscripciones s
|
||||||
|
JOIN dbo.susc_Suscriptores sus ON s.IdSuscriptor = sus.IdSuscriptor
|
||||||
|
JOIN dbo.dist_dtPublicaciones p ON s.IdPublicacion = p.Id_Publicacion
|
||||||
|
JOIN dbo.dist_dtEmpresas e ON p.Id_Empresa = e.Id_Empresa
|
||||||
|
WHERE
|
||||||
|
-- --- INICIO DE LA CORRECCIÓN ---
|
||||||
|
-- Se asegura de que SOLO se incluyan suscripciones y suscriptores ACTIVOS.
|
||||||
|
s.Estado = 'Activa' AND sus.Activo = 1
|
||||||
|
-- --- FIN DE LA CORRECCIÓN ---
|
||||||
|
AND s.FechaInicio <= @FechaHasta
|
||||||
|
AND (s.FechaFin IS NULL OR s.FechaFin >= @FechaDesde)
|
||||||
|
ORDER BY e.Nombre, p.Nombre, sus.NombreCompleto;";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<DistribucionSuscripcionDto>(sql, new { FechaDesde = fechaDesde, FechaHasta = fechaHasta });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener datos para Reporte de Distribución (Activas).");
|
||||||
|
return Enumerable.Empty<DistribucionSuscripcionDto>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<DistribucionSuscripcionDto>> GetDistribucionSuscripcionesBajasAsync(DateTime fechaDesde, DateTime fechaHasta)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
SELECT
|
||||||
|
e.Nombre AS NombreEmpresa, p.Nombre AS NombrePublicacion,
|
||||||
|
sus.NombreCompleto AS NombreSuscriptor, sus.Direccion, sus.Telefono,
|
||||||
|
s.FechaInicio, s.FechaFin, s.DiasEntrega, s.Observaciones
|
||||||
|
FROM dbo.susc_Suscripciones s
|
||||||
|
JOIN dbo.susc_Suscriptores sus ON s.IdSuscriptor = sus.IdSuscriptor
|
||||||
|
JOIN dbo.dist_dtPublicaciones p ON s.IdPublicacion = p.Id_Publicacion
|
||||||
|
JOIN dbo.dist_dtEmpresas e ON p.Id_Empresa = e.Id_Empresa
|
||||||
|
WHERE
|
||||||
|
-- La lógica aquí es correcta: buscamos cualquier suscripción cuya fecha de fin
|
||||||
|
-- caiga dentro del rango de fechas seleccionado.
|
||||||
|
s.FechaFin BETWEEN @FechaDesde AND @FechaHasta
|
||||||
|
ORDER BY e.Nombre, p.Nombre, s.FechaFin, sus.NombreCompleto;";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _dbConnectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<DistribucionSuscripcionDto>(sql, new { FechaDesde = fechaDesde, FechaHasta = fechaHasta });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener datos para Reporte de Distribución (Bajas).");
|
||||||
|
return Enumerable.Empty<DistribucionSuscripcionDto>();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
using Dapper;
|
||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public class AjusteRepository : IAjusteRepository
|
||||||
|
{
|
||||||
|
private readonly DbConnectionFactory _connectionFactory;
|
||||||
|
private readonly ILogger<AjusteRepository> _logger;
|
||||||
|
|
||||||
|
public AjusteRepository(DbConnectionFactory factory, ILogger<AjusteRepository> logger)
|
||||||
|
{
|
||||||
|
_connectionFactory = factory;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateAsync(Ajuste ajuste, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
UPDATE dbo.susc_Ajustes SET
|
||||||
|
IdEmpresa = @IdEmpresa,
|
||||||
|
FechaAjuste = @FechaAjuste,
|
||||||
|
TipoAjuste = @TipoAjuste,
|
||||||
|
Monto = @Monto,
|
||||||
|
Motivo = @Motivo
|
||||||
|
WHERE IdAjuste = @IdAjuste AND Estado = 'Pendiente';";
|
||||||
|
if (transaction?.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction.Connection), "La conexión de la transacción no puede ser nula.");
|
||||||
|
}
|
||||||
|
var rows = await transaction.Connection.ExecuteAsync(sql, ajuste, transaction);
|
||||||
|
return rows == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Ajuste?> CreateAsync(Ajuste nuevoAjuste, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
INSERT INTO dbo.susc_Ajustes (IdSuscriptor, IdEmpresa, FechaAjuste, TipoAjuste, Monto, Motivo, Estado, IdUsuarioAlta, FechaAlta)
|
||||||
|
OUTPUT INSERTED.*
|
||||||
|
VALUES (@IdSuscriptor, @IdEmpresa, @FechaAjuste, @TipoAjuste, @Monto, @Motivo, 'Pendiente', @IdUsuarioAlta, GETDATE());";
|
||||||
|
if (transaction?.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction.Connection), "La conexión de la transacción no puede ser nula.");
|
||||||
|
}
|
||||||
|
return await transaction.Connection.QuerySingleOrDefaultAsync<Ajuste>(sql, nuevoAjuste, transaction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Ajuste>> GetAjustesPorSuscriptorAsync(int idSuscriptor, DateTime? fechaDesde, DateTime? fechaHasta)
|
||||||
|
{
|
||||||
|
var sqlBuilder = new StringBuilder("SELECT * FROM dbo.susc_Ajustes WHERE IdSuscriptor = @IdSuscriptor");
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
parameters.Add("IdSuscriptor", idSuscriptor);
|
||||||
|
|
||||||
|
if (fechaDesde.HasValue)
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND FechaAjuste >= @FechaDesde");
|
||||||
|
parameters.Add("FechaDesde", fechaDesde.Value.Date);
|
||||||
|
}
|
||||||
|
if (fechaHasta.HasValue)
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND FechaAjuste <= @FechaHasta");
|
||||||
|
parameters.Add("FechaHasta", fechaHasta.Value.Date);
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlBuilder.Append(" ORDER BY FechaAlta DESC;");
|
||||||
|
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<Ajuste>(sqlBuilder.ToString(), parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Ajuste>> GetAjustesPendientesHastaFechaAsync(int idSuscriptor, int idEmpresa, DateTime fechaHasta, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
SELECT * FROM dbo.susc_Ajustes
|
||||||
|
WHERE IdSuscriptor = @IdSuscriptor
|
||||||
|
AND IdEmpresa = @IdEmpresa
|
||||||
|
AND Estado = 'Pendiente'
|
||||||
|
AND FechaAjuste <= @FechaHasta;";
|
||||||
|
|
||||||
|
if (transaction?.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction.Connection), "La conexión de la transacción no puede ser nula.");
|
||||||
|
}
|
||||||
|
return await transaction.Connection.QueryAsync<Ajuste>(sql, new { idSuscriptor, idEmpresa, FechaHasta = fechaHasta }, transaction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> MarcarAjustesComoAplicadosAsync(IEnumerable<int> idsAjustes, int idFactura, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
if (!idsAjustes.Any()) return true;
|
||||||
|
|
||||||
|
const string sql = @"
|
||||||
|
UPDATE dbo.susc_Ajustes SET
|
||||||
|
Estado = 'Aplicado',
|
||||||
|
IdFacturaAplicado = @IdFactura
|
||||||
|
WHERE IdAjuste IN @IdsAjustes;";
|
||||||
|
|
||||||
|
if (transaction?.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction.Connection), "La conexión de la transacción no puede ser nula.");
|
||||||
|
}
|
||||||
|
var rowsAffected = await transaction.Connection.ExecuteAsync(sql, new { IdsAjustes = idsAjustes, IdFactura = idFactura }, transaction);
|
||||||
|
return rowsAffected == idsAjustes.Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Ajuste?> GetByIdAsync(int idAjuste)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT * FROM dbo.susc_Ajustes WHERE IdAjuste = @IdAjuste;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QuerySingleOrDefaultAsync<Ajuste>(sql, new { idAjuste });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> AnularAjusteAsync(int idAjuste, int idUsuario, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
UPDATE dbo.susc_Ajustes SET
|
||||||
|
Estado = 'Anulado',
|
||||||
|
IdUsuarioAnulo = @IdUsuario,
|
||||||
|
FechaAnulacion = GETDATE()
|
||||||
|
WHERE IdAjuste = @IdAjuste AND Estado = 'Pendiente';";
|
||||||
|
|
||||||
|
if (transaction?.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction.Connection), "La conexión de la transacción no puede ser nula.");
|
||||||
|
}
|
||||||
|
|
||||||
|
var rows = await transaction.Connection.ExecuteAsync(sql, new { IdAjuste = idAjuste, IdUsuario = idUsuario }, transaction);
|
||||||
|
return rows == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Ajuste>> GetAjustesPorIdFacturaAsync(int idFactura)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT * FROM dbo.susc_Ajustes WHERE IdFacturaAplicado = @IdFactura;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<Ajuste>(sql, new { IdFactura = idFactura });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
using Dapper;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public class FacturaDetalleRepository : IFacturaDetalleRepository
|
||||||
|
{
|
||||||
|
private readonly DbConnectionFactory _connectionFactory;
|
||||||
|
private readonly ILogger<FacturaDetalleRepository> _logger;
|
||||||
|
|
||||||
|
public FacturaDetalleRepository(DbConnectionFactory connectionFactory, ILogger<FacturaDetalleRepository> logger)
|
||||||
|
{
|
||||||
|
_connectionFactory = connectionFactory;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<FacturaDetalle?> CreateAsync(FacturaDetalle nuevoDetalle, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
if (transaction == null || transaction.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction), "La transacción o su conexión no pueden ser nulas.");
|
||||||
|
}
|
||||||
|
const string sqlInsert = @"
|
||||||
|
INSERT INTO dbo.susc_FacturaDetalles (IdFactura, IdSuscripcion, Descripcion, ImporteBruto, DescuentoAplicado, ImporteNeto)
|
||||||
|
OUTPUT INSERTED.*
|
||||||
|
VALUES (@IdFactura, @IdSuscripcion, @Descripcion, @ImporteBruto, @DescuentoAplicado, @ImporteNeto);";
|
||||||
|
|
||||||
|
return await transaction.Connection.QuerySingleOrDefaultAsync<FacturaDetalle>(sqlInsert, nuevoDetalle, transaction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<FacturaDetalle>> GetDetallesPorFacturaIdAsync(int idFactura)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT * FROM dbo.susc_FacturaDetalles WHERE IdFactura = @IdFactura;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<FacturaDetalle>(sql, new { IdFactura = idFactura });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<FacturaDetalle>> GetDetallesPorPeriodoAsync(string periodo)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
SELECT fd.*
|
||||||
|
FROM dbo.susc_FacturaDetalles fd
|
||||||
|
JOIN dbo.susc_Facturas f ON fd.IdFactura = f.IdFactura
|
||||||
|
WHERE f.Periodo = @Periodo;";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<FacturaDetalle>(sql, new { Periodo = periodo });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener los detalles de factura para el período {Periodo}", periodo);
|
||||||
|
return Enumerable.Empty<FacturaDetalle>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,271 @@
|
|||||||
|
using Dapper;
|
||||||
|
using GestionIntegral.Api.Data;
|
||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public class FacturaRepository : IFacturaRepository
|
||||||
|
{
|
||||||
|
private readonly DbConnectionFactory _connectionFactory;
|
||||||
|
private readonly ILogger<FacturaRepository> _logger;
|
||||||
|
|
||||||
|
public FacturaRepository(DbConnectionFactory connectionFactory, ILogger<FacturaRepository> logger)
|
||||||
|
{
|
||||||
|
_connectionFactory = connectionFactory;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Factura?> GetByIdAsync(int idFactura)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT * FROM dbo.susc_Facturas WHERE IdFactura = @idFactura;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QuerySingleOrDefaultAsync<Factura>(sql, new { idFactura });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Factura>> GetByPeriodoAsync(string periodo)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT * FROM dbo.susc_Facturas WHERE Periodo = @Periodo ORDER BY IdFactura;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<Factura>(sql, new { Periodo = periodo });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Factura?> GetBySuscriptorYPeriodoAsync(int idSuscriptor, string periodo, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT TOP 1 * FROM dbo.susc_Facturas WHERE IdSuscriptor = @IdSuscriptor AND Periodo = @Periodo;";
|
||||||
|
if (transaction == null || transaction.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction), "La transacción o su conexión no pueden ser nulas.");
|
||||||
|
}
|
||||||
|
return await transaction.Connection.QuerySingleOrDefaultAsync<Factura>(sql, new { idSuscriptor, Periodo = periodo }, transaction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Factura>> GetListBySuscriptorYPeriodoAsync(int idSuscriptor, string periodo)
|
||||||
|
{
|
||||||
|
const string sql = "SELECT * FROM dbo.susc_Facturas WHERE IdSuscriptor = @IdSuscriptor AND Periodo = @Periodo;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<Factura>(sql, new { idSuscriptor, Periodo = periodo });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Factura?> CreateAsync(Factura nuevaFactura, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
if (transaction == null || transaction.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction), "La transacción o su conexión no pueden ser nulas.");
|
||||||
|
}
|
||||||
|
|
||||||
|
const string sqlInsert = @"
|
||||||
|
INSERT INTO dbo.susc_Facturas
|
||||||
|
(IdSuscriptor, Periodo, FechaEmision, FechaVencimiento, ImporteBruto,
|
||||||
|
DescuentoAplicado, ImporteFinal, EstadoPago, EstadoFacturacion, TipoFactura)
|
||||||
|
OUTPUT INSERTED.*
|
||||||
|
VALUES
|
||||||
|
(@IdSuscriptor, @Periodo, @FechaEmision, @FechaVencimiento, @ImporteBruto,
|
||||||
|
@DescuentoAplicado, @ImporteFinal, @EstadoPago, @EstadoFacturacion, @TipoFactura);";
|
||||||
|
|
||||||
|
return await transaction.Connection.QuerySingleAsync<Factura>(sqlInsert, nuevaFactura, transaction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateEstadoPagoAsync(int idFactura, string nuevoEstadoPago, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
if (transaction == null || transaction.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction), "La transacción o su conexión no pueden ser nulas.");
|
||||||
|
}
|
||||||
|
const string sql = "UPDATE dbo.susc_Facturas SET EstadoPago = @NuevoEstadoPago WHERE IdFactura = @IdFactura;";
|
||||||
|
var rowsAffected = await transaction.Connection.ExecuteAsync(sql, new { NuevoEstadoPago = nuevoEstadoPago, idFactura }, transaction);
|
||||||
|
return rowsAffected == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateNumeroFacturaAsync(int idFactura, string numeroFactura, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
if (transaction == null || transaction.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction), "La transacción o su conexión no pueden ser nulas.");
|
||||||
|
}
|
||||||
|
const string sql = @"
|
||||||
|
UPDATE dbo.susc_Facturas SET
|
||||||
|
NumeroFactura = @NumeroFactura,
|
||||||
|
EstadoFacturacion = 'Facturado'
|
||||||
|
WHERE IdFactura = @IdFactura;";
|
||||||
|
var rowsAffected = await transaction.Connection.ExecuteAsync(sql, new { NumeroFactura = numeroFactura, idFactura }, transaction);
|
||||||
|
return rowsAffected == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateLoteDebitoAsync(IEnumerable<int> idsFacturas, int idLoteDebito, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
if (transaction == null || transaction.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction), "La transacción o su conexión no pueden ser nulas.");
|
||||||
|
}
|
||||||
|
const string sql = "UPDATE dbo.susc_Facturas SET IdLoteDebito = @IdLoteDebito WHERE IdFactura IN @IdsFacturas;";
|
||||||
|
var rowsAffected = await transaction.Connection.ExecuteAsync(sql, new { IdLoteDebito = idLoteDebito, IdsFacturas = idsFacturas }, transaction);
|
||||||
|
return rowsAffected == idsFacturas.Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<(Factura Factura, string NombreSuscriptor, int IdEmpresa, decimal TotalPagado)>> GetByPeriodoEnrichedAsync(
|
||||||
|
string periodo, string? nombreSuscriptor, string? estadoPago, string? estadoFacturacion, string? tipoFactura)
|
||||||
|
{
|
||||||
|
var sqlBuilder = new StringBuilder(@"
|
||||||
|
WITH FacturaConEmpresa AS (
|
||||||
|
-- Esta subconsulta obtiene el IdEmpresa para cada factura basándose en la primera suscripción que encuentra en sus detalles.
|
||||||
|
-- Esto es seguro porque nuestra lógica de negocio asegura que todos los detalles de una factura pertenecen a la misma empresa.
|
||||||
|
SELECT
|
||||||
|
f.IdFactura,
|
||||||
|
(SELECT TOP 1 p.Id_Empresa
|
||||||
|
FROM dbo.susc_FacturaDetalles fd
|
||||||
|
JOIN dbo.susc_Suscripciones s ON fd.IdSuscripcion = s.IdSuscripcion
|
||||||
|
JOIN dbo.dist_dtPublicaciones p ON s.IdPublicacion = p.Id_Publicacion
|
||||||
|
WHERE fd.IdFactura = f.IdFactura) AS IdEmpresa
|
||||||
|
FROM dbo.susc_Facturas f
|
||||||
|
WHERE f.Periodo = @Periodo
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
f.*,
|
||||||
|
s.NombreCompleto AS NombreSuscriptor,
|
||||||
|
fce.IdEmpresa,
|
||||||
|
(SELECT ISNULL(SUM(Monto), 0) FROM dbo.susc_Pagos pg WHERE pg.IdFactura = f.IdFactura AND pg.Estado = 'Aprobado') AS TotalPagado
|
||||||
|
FROM dbo.susc_Facturas f
|
||||||
|
JOIN dbo.susc_Suscriptores s ON f.IdSuscriptor = s.IdSuscriptor
|
||||||
|
JOIN FacturaConEmpresa fce ON f.IdFactura = fce.IdFactura
|
||||||
|
WHERE f.Periodo = @Periodo");
|
||||||
|
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
parameters.Add("Periodo", periodo);
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(nombreSuscriptor))
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND s.NombreCompleto LIKE @NombreSuscriptor");
|
||||||
|
parameters.Add("NombreSuscriptor", $"%{nombreSuscriptor}%");
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(estadoPago))
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND f.EstadoPago = @EstadoPago");
|
||||||
|
parameters.Add("EstadoPago", estadoPago);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(estadoFacturacion))
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND f.EstadoFacturacion = @EstadoFacturacion");
|
||||||
|
parameters.Add("EstadoFacturacion", estadoFacturacion);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(tipoFactura))
|
||||||
|
{
|
||||||
|
sqlBuilder.Append(" AND f.TipoFactura = @TipoFactura");
|
||||||
|
parameters.Add("TipoFactura", tipoFactura);
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlBuilder.Append(" ORDER BY s.NombreCompleto, f.IdFactura;");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
var result = await connection.QueryAsync<Factura, string, int, decimal, (Factura, string, int, decimal)>(
|
||||||
|
sqlBuilder.ToString(),
|
||||||
|
(factura, suscriptor, idEmpresa, totalPagado) => (factura, suscriptor, idEmpresa, totalPagado),
|
||||||
|
parameters,
|
||||||
|
splitOn: "NombreSuscriptor,IdEmpresa,TotalPagado"
|
||||||
|
);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener facturas enriquecidas para el período {Periodo}", periodo);
|
||||||
|
return Enumerable.Empty<(Factura, string, int, decimal)>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateEstadoYMotivoAsync(int idFactura, string nuevoEstadoPago, string? motivoRechazo, IDbTransaction transaction)
|
||||||
|
{
|
||||||
|
if (transaction == null || transaction.Connection == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(transaction), "La transacción o su conexión no pueden ser nulas.");
|
||||||
|
}
|
||||||
|
const string sql = @"
|
||||||
|
UPDATE dbo.susc_Facturas SET
|
||||||
|
EstadoPago = @NuevoEstadoPago,
|
||||||
|
MotivoRechazo = @MotivoRechazo
|
||||||
|
WHERE IdFactura = @IdFactura;";
|
||||||
|
var rowsAffected = await transaction.Connection.ExecuteAsync(sql, new { NuevoEstadoPago = nuevoEstadoPago, MotivoRechazo = motivoRechazo, idFactura }, transaction);
|
||||||
|
return rowsAffected == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<string?> GetUltimoPeriodoFacturadoAsync()
|
||||||
|
{
|
||||||
|
const string sql = "SELECT TOP 1 Periodo FROM dbo.susc_Facturas ORDER BY Periodo DESC;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QuerySingleOrDefaultAsync<string>(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<(Factura Factura, string NombreEmpresa)>> GetFacturasConEmpresaAsync(int idSuscriptor, string periodo)
|
||||||
|
{
|
||||||
|
// Esta consulta es más robusta y eficiente. Obtiene la factura y el nombre de la empresa en una sola llamada.
|
||||||
|
const string sql = @"
|
||||||
|
SELECT f.*, e.Nombre AS NombreEmpresa
|
||||||
|
FROM dbo.susc_Facturas f
|
||||||
|
OUTER APPLY (
|
||||||
|
SELECT TOP 1 emp.Nombre
|
||||||
|
FROM dbo.susc_FacturaDetalles fd
|
||||||
|
JOIN dbo.susc_Suscripciones s ON fd.IdSuscripcion = s.IdSuscripcion
|
||||||
|
JOIN dbo.dist_dtPublicaciones p ON s.IdPublicacion = p.Id_Publicacion
|
||||||
|
JOIN dbo.dist_dtEmpresas emp ON p.Id_Empresa = emp.Id_Empresa
|
||||||
|
WHERE fd.IdFactura = f.IdFactura
|
||||||
|
) e
|
||||||
|
WHERE f.IdSuscriptor = @IdSuscriptor AND f.Periodo = @Periodo;";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
var result = await connection.QueryAsync<Factura, string, (Factura, string)>(
|
||||||
|
sql,
|
||||||
|
(factura, nombreEmpresa) => (factura, nombreEmpresa ?? "N/A"), // Asignamos "N/A" si no encuentra empresa
|
||||||
|
new { IdSuscriptor = idSuscriptor, Periodo = periodo },
|
||||||
|
splitOn: "NombreEmpresa"
|
||||||
|
);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener facturas con empresa para suscriptor {IdSuscriptor} y período {Periodo}", idSuscriptor, periodo);
|
||||||
|
return Enumerable.Empty<(Factura, string)>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Factura>> GetFacturasPagadasPendientesDeFacturar(string periodo)
|
||||||
|
{
|
||||||
|
// Consulta simplificada pero robusta.
|
||||||
|
const string sql = @"
|
||||||
|
SELECT * FROM dbo.susc_Facturas
|
||||||
|
WHERE Periodo = @Periodo
|
||||||
|
AND EstadoPago = 'Pagada'
|
||||||
|
AND EstadoFacturacion = 'Pendiente de Facturar';";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<Factura>(sql, new { Periodo = periodo });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener facturas pagadas pendientes de facturar para el período {Periodo}", periodo);
|
||||||
|
return Enumerable.Empty<Factura>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Factura>> GetByIdsAsync(IEnumerable<int> ids)
|
||||||
|
{
|
||||||
|
if (ids == null || !ids.Any())
|
||||||
|
{
|
||||||
|
return Enumerable.Empty<Factura>();
|
||||||
|
}
|
||||||
|
const string sql = "SELECT * FROM dbo.susc_Facturas WHERE IdFactura IN @Ids;";
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<Factura>(sql, new { Ids = ids });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
using Dapper;
|
||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public class FormaPagoRepository : IFormaPagoRepository
|
||||||
|
{
|
||||||
|
private readonly DbConnectionFactory _connectionFactory;
|
||||||
|
private readonly ILogger<FormaPagoRepository> _logger;
|
||||||
|
|
||||||
|
public FormaPagoRepository(DbConnectionFactory connectionFactory, ILogger<FormaPagoRepository> logger)
|
||||||
|
{
|
||||||
|
_connectionFactory = connectionFactory;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<FormaPago>> GetAllAsync()
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
SELECT IdFormaPago, Nombre, RequiereCBU, Activo
|
||||||
|
FROM dbo.susc_FormasDePago
|
||||||
|
WHERE Activo = 1
|
||||||
|
ORDER BY Nombre;";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QueryAsync<FormaPago>(sql);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener todas las Formas de Pago activas.");
|
||||||
|
return Enumerable.Empty<FormaPago>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<FormaPago?> GetByIdAsync(int id)
|
||||||
|
{
|
||||||
|
const string sql = @"
|
||||||
|
SELECT IdFormaPago, Nombre, RequiereCBU, Activo
|
||||||
|
FROM dbo.susc_FormasDePago
|
||||||
|
WHERE IdFormaPago = @Id;";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var connection = _connectionFactory.CreateConnection();
|
||||||
|
return await connection.QuerySingleOrDefaultAsync<FormaPago>(sql, new { Id = id });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error al obtener Forma de Pago por ID: {IdFormaPago}", id);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Archivo: GestionIntegral.Api/Data/Repositories/Suscripciones/IAjusteRepository.cs
|
||||||
|
|
||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public interface IAjusteRepository
|
||||||
|
{
|
||||||
|
Task<Ajuste?> GetByIdAsync(int idAjuste);
|
||||||
|
Task<Ajuste?> CreateAsync(Ajuste nuevoAjuste, IDbTransaction transaction);
|
||||||
|
Task<bool> UpdateAsync(Ajuste ajuste, IDbTransaction transaction);
|
||||||
|
Task<bool> AnularAjusteAsync(int idAjuste, int idUsuario, IDbTransaction transaction);
|
||||||
|
Task<IEnumerable<Ajuste>> GetAjustesPorSuscriptorAsync(int idSuscriptor, DateTime? fechaDesde, DateTime? fechaHasta);
|
||||||
|
Task<IEnumerable<Ajuste>> GetAjustesPendientesHastaFechaAsync(int idSuscriptor, int idEmpresa, DateTime fechaHasta, IDbTransaction transaction);
|
||||||
|
Task<bool> MarcarAjustesComoAplicadosAsync(IEnumerable<int> idsAjustes, int idFactura, IDbTransaction transaction);
|
||||||
|
Task<IEnumerable<Ajuste>> GetAjustesPorIdFacturaAsync(int idFactura);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public interface IFacturaDetalleRepository
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Crea un nuevo registro de detalle de factura.
|
||||||
|
/// </summary>
|
||||||
|
Task<FacturaDetalle?> CreateAsync(FacturaDetalle nuevoDetalle, IDbTransaction transaction);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Obtiene todos los detalles de una factura específica.
|
||||||
|
/// </summary>
|
||||||
|
Task<IEnumerable<FacturaDetalle>> GetDetallesPorFacturaIdAsync(int idFactura);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Obtiene de forma eficiente todos los detalles de todas las facturas de un período específico.
|
||||||
|
/// </summary>
|
||||||
|
Task<IEnumerable<FacturaDetalle>> GetDetallesPorPeriodoAsync(string periodo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public interface IFacturaRepository
|
||||||
|
{
|
||||||
|
Task<Factura?> GetByIdAsync(int idFactura);
|
||||||
|
Task<IEnumerable<Factura>> GetByIdsAsync(IEnumerable<int> ids);
|
||||||
|
Task<IEnumerable<Factura>> GetByPeriodoAsync(string periodo);
|
||||||
|
Task<Factura?> GetBySuscriptorYPeriodoAsync(int idSuscriptor, string periodo, IDbTransaction transaction);
|
||||||
|
Task<IEnumerable<Factura>> GetListBySuscriptorYPeriodoAsync(int idSuscriptor, string periodo);
|
||||||
|
Task<IEnumerable<(Factura Factura, string NombreEmpresa)>> GetFacturasConEmpresaAsync(int idSuscriptor, string periodo);
|
||||||
|
Task<Factura?> CreateAsync(Factura nuevaFactura, IDbTransaction transaction);
|
||||||
|
Task<bool> UpdateEstadoPagoAsync(int idFactura, string nuevoEstadoPago, IDbTransaction transaction);
|
||||||
|
Task<bool> UpdateNumeroFacturaAsync(int idFactura, string numeroFactura, IDbTransaction transaction);
|
||||||
|
Task<bool> UpdateLoteDebitoAsync(IEnumerable<int> idsFacturas, int idLoteDebito, IDbTransaction transaction);
|
||||||
|
Task<IEnumerable<(Factura Factura, string NombreSuscriptor, int IdEmpresa, decimal TotalPagado)>> GetByPeriodoEnrichedAsync(
|
||||||
|
string periodo, string? nombreSuscriptor, string? estadoPago, string? estadoFacturacion, string? tipoFactura);
|
||||||
|
Task<bool> UpdateEstadoYMotivoAsync(int idFactura, string nuevoEstadoPago, string? motivoRechazo, IDbTransaction transaction);
|
||||||
|
Task<string?> GetUltimoPeriodoFacturadoAsync();
|
||||||
|
Task<IEnumerable<Factura>> GetFacturasPagadasPendientesDeFacturar(string periodo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public interface IFormaPagoRepository
|
||||||
|
{
|
||||||
|
Task<IEnumerable<FormaPago>> GetAllAsync();
|
||||||
|
Task<FormaPago?> GetByIdAsync(int id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public interface ILoteDebitoRepository
|
||||||
|
{
|
||||||
|
Task<LoteDebito?> CreateAsync(LoteDebito nuevoLote, IDbTransaction transaction);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using GestionIntegral.Api.Models.Suscripciones;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace GestionIntegral.Api.Data.Repositories.Suscripciones
|
||||||
|
{
|
||||||
|
public interface IPagoRepository
|
||||||
|
{
|
||||||
|
Task<IEnumerable<Pago>> GetByFacturaIdAsync(int idFactura);
|
||||||
|
Task<Pago?> CreateAsync(Pago nuevoPago, IDbTransaction transaction);
|
||||||
|
Task<decimal> GetTotalPagadoAprobadoAsync(int idFactura, IDbTransaction transaction);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user