116 lines
3.9 KiB
Plaintext
116 lines
3.9 KiB
Plaintext
|
|
@using GestionIntegral.Api.Dtos.Reportes.ViewModels
|
||
|
|
|
||
|
|
@model ExistenciaPapelViewModel
|
||
|
|
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8" />
|
||
|
|
<style>
|
||
|
|
body {
|
||
|
|
font-family: 'Roboto', Arial, sans-serif;
|
||
|
|
font-size: 10pt;
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
}
|
||
|
|
.report-container {
|
||
|
|
width: 100%;
|
||
|
|
margin: auto;
|
||
|
|
}
|
||
|
|
.report-header {
|
||
|
|
text-align: center;
|
||
|
|
padding: 10px;
|
||
|
|
border-bottom: 2px solid #ccc;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
}
|
||
|
|
.report-header h1 {
|
||
|
|
font-size: 14pt;
|
||
|
|
margin: 0 0 5px 0;
|
||
|
|
}
|
||
|
|
.report-header h2 {
|
||
|
|
font-size: 12pt;
|
||
|
|
margin: 0;
|
||
|
|
font-weight: normal;
|
||
|
|
}
|
||
|
|
.report-parameters {
|
||
|
|
margin-bottom: 20px;
|
||
|
|
padding: 10px;
|
||
|
|
border: 1px solid #eee;
|
||
|
|
background-color: #f9f9f9;
|
||
|
|
}
|
||
|
|
.report-parameters p {
|
||
|
|
margin: 0 0 5px 0;
|
||
|
|
}
|
||
|
|
.report-table {
|
||
|
|
width: 100%;
|
||
|
|
border-collapse: collapse;
|
||
|
|
font-size: 9pt;
|
||
|
|
}
|
||
|
|
.report-table th, .report-table td {
|
||
|
|
border: 1px solid #ccc;
|
||
|
|
padding: 6px;
|
||
|
|
text-align: left;
|
||
|
|
}
|
||
|
|
.report-table th {
|
||
|
|
background-color: #f2f2f2;
|
||
|
|
font-weight: bold;
|
||
|
|
}
|
||
|
|
.text-right { text-align: right; }
|
||
|
|
.text-center { text-align: center; }
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="report-container">
|
||
|
|
<div class="report-header">
|
||
|
|
<h1>Reporte de Existencias de Papel</h1>
|
||
|
|
<h2>Planta: @Model.NombrePlanta</h2>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="report-parameters">
|
||
|
|
<p><strong>Fecha del Reporte:</strong> @Model.FechaReporte</p>
|
||
|
|
<p><strong>Periodo Consultado:</strong> Desde @Model.FechaDesde Hasta @Model.FechaHasta</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<table class="report-table">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Tipo Bobina</th>
|
||
|
|
<th class="text-right">Cant. Stock</th>
|
||
|
|
<th class="text-right">Kg. Stock</th>
|
||
|
|
<th class="text-right">Consumo Acumulado (Kg)</th>
|
||
|
|
<th class="text-right">Días Disponibles</th>
|
||
|
|
<th class="text-center">Fin Stock Estimado</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
@foreach (var item in Model.Existencias)
|
||
|
|
{
|
||
|
|
<tr>
|
||
|
|
<td>@item.TipoBobina</td>
|
||
|
|
<td class="text-right">@(item.BobinasEnStock?.ToString("N0") ?? "0")</td>
|
||
|
|
<td class="text-right">@(item.TotalKilosEnStock?.ToString("N0") ?? "0")</td>
|
||
|
|
<td class="text-right">@(item.ConsumoAcumulado?.ToString("N0") ?? "0")</td>
|
||
|
|
<td class="text-right">@(item.PromedioDiasDisponibles?.ToString("N0") ?? "N/A")</td>
|
||
|
|
<td class="text-center">@(item.FechaEstimacionFinStock?.ToString("dd/MM/yyyy") ?? "N/A")</td>
|
||
|
|
</tr>
|
||
|
|
}
|
||
|
|
</tbody>
|
||
|
|
<tfoot>
|
||
|
|
@{
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
<tr style="font-weight: bold;">
|
||
|
|
<td class="text-right">Totales</td>
|
||
|
|
<td class="text-right">@totalBobinas.ToString("N0")</td>
|
||
|
|
<td class="text-right">@totalKilos.ToString("N0")</td>
|
||
|
|
<td class="text-right">@totalConsumo.ToString("N0")</td>
|
||
|
|
<td></td>
|
||
|
|
<td></td>
|
||
|
|
</tr>
|
||
|
|
</tfoot>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|