Terminado los PDF y acabado la parte de herramienta URBAN de imprimir
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<button @onclick="@(() => abrirPopupGuardar())" class="btnBlue d-flex align-items-center"> <i class="fas fa-save pe-2"></i>@TituloBoton</button>
|
||||
<b class="Fuente2 ps-2 pe-2 nomSim">Nombre de la simulación: </b>
|
||||
<InputText @bind-Value="casa.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
@bind-Value="objetoCASA.CostesProduccion.PlazoPresentacionDocumentos"
|
||||
step="any"
|
||||
@oninput="e => controlarMeses(e.Value?.ToString())"
|
||||
class="inputForm formatoMoneda inputTabla text-end" />
|
||||
class="inputForm formatoMoneda inputTabla text-end" /> meses
|
||||
|
||||
</div>
|
||||
</td>
|
||||
@@ -113,8 +113,7 @@
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="TotalesTabla tdAlter">HORAS TRABAJO PROFESIONAL</td>
|
||||
<td class="text-end TotalesTabla tdAlter">@objetoCASA.TrabajoProfesional.HorasTPE.MilesYDecimales() h</td>
|
||||
<td colspan="2" class="TotalesTabla text-end fw-bold">Horas trabajo profesional @objetoCASA.TrabajoProfesional.TotalHorasTPE.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
|
||||
public async void calcularModificarHora()
|
||||
{
|
||||
ultimaHoraDocumentacion = objetoCASA.TrabajoProfesional.HorasTPEDocumentacion;
|
||||
ultimaHoraObra = objetoCASA.TrabajoProfesional.HorasTPEDireccion;
|
||||
// ultimaHoraDocumentacion = objetoCASA.TrabajoProfesional.HorasTPEDocumentacion;
|
||||
// ultimaHoraObra = objetoCASA.TrabajoProfesional.HorasTPEDireccion;
|
||||
|
||||
objetoCASA.CalcularHorasTPEManual(objetoCASA.TrabajoProfesional.HorasTPEDocumentacion, objetoCASA.TrabajoProfesional.HorasTPEDireccion);
|
||||
horasTPEOriginal = objetoCASA.TrabajoProfesional.HorasTPE;
|
||||
@@ -98,7 +98,7 @@
|
||||
public void restablecerHoras()
|
||||
{
|
||||
objetoCASA.TrabajoProfesional.HorasTPEDocumentacion= ultimaHoraDocumentacion;
|
||||
objetoCASA.TrabajoProfesional.HorasTPEDireccion = ultimaHoraObra;
|
||||
objetoCASA.TrabajoProfesional.HorasTPEDireccion = ultimaHoraObra;
|
||||
|
||||
objetoCASA.CalcularHorasTPEManual(objetoCASA.TrabajoProfesional.HorasTPEDocumentacion, objetoCASA.TrabajoProfesional.HorasTPEDireccion);
|
||||
horasTPEOriginal = objetoCASA.TrabajoProfesional.HorasTPE;
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
else
|
||||
{
|
||||
objetoCASA.ActualizarFaseCalculo(_Parent.horasTPEOriginal);
|
||||
_Parent.calcularModificarHora();
|
||||
}
|
||||
|
||||
await InvokeAsync(StateHasChanged);
|
||||
@@ -167,6 +168,7 @@
|
||||
// if (objetoCASA.TrabajoProfesional.HorasTPE != 0 && objetoCASA.TrabajoProfesional.HorasTPEDocumentacion != 0 && objetoCASA.TrabajoProfesional.HorasTPEDireccion != 0)
|
||||
// {
|
||||
// }
|
||||
// _Parent.calcularModificarHora();
|
||||
_Parent.restablecerHoras();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
@using bdHerramientaCACOA.HerramientaURBAN
|
||||
@using bdHerramientaCACOA.db
|
||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||
@using PuppeteerSharp
|
||||
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||
@inject IJSRuntime JS
|
||||
|
||||
@rendermode InteractiveServer
|
||||
@inject NavigationManager Navigation
|
||||
@@ -48,7 +50,7 @@
|
||||
<button @onclick="@(() => abrirPopupGuardar())" class="btnBlue d-flex align-items-center"> <i class="fas fa-save pe-1"></i>@TituloBoton</button>
|
||||
<b class="Fuente2 ps-2 pe-2 nomSim">Nombre de la simulación: </b>
|
||||
<InputText @bind-Value="urban.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
<Tabs>
|
||||
@@ -76,6 +78,9 @@
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
<div style="display:none">
|
||||
<HerramientaCASA.Components.Pages.Imprimir.HerramientaURBANImprimir objetoURBAN="urban"></HerramientaCASA.Components.Pages.Imprimir.HerramientaURBANImprimir>
|
||||
</div>
|
||||
@code {
|
||||
[Parameter]
|
||||
public string? idSimulador { get; set; } = "";
|
||||
@@ -90,6 +95,7 @@
|
||||
List<ToastMessage> mensajes = new List<ToastMessage>();
|
||||
|
||||
string nombreOriginal = "";
|
||||
private string pdfUrl;
|
||||
|
||||
private int idUser = 0;
|
||||
|
||||
@@ -250,4 +256,67 @@
|
||||
{
|
||||
await popupGuardar.HideAsync();
|
||||
}
|
||||
private async Task imprimir()
|
||||
{
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtml");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
<style>{cssContent}</style>
|
||||
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css' rel='stylesheet' integrity='sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN' crossorigin='anonymous'>
|
||||
</head>
|
||||
<body>
|
||||
{contenidoHtml}
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
var fileName = $"factura_{DateTime.Now:yyyyMMddHHmmss}.pdf";
|
||||
var filePath = Path.Combine("wwwroot", fileName);
|
||||
|
||||
var browserFetcher = new BrowserFetcher();
|
||||
await browserFetcher.DownloadAsync();
|
||||
|
||||
using var browser = await Puppeteer.LaunchAsync(new LaunchOptions
|
||||
{
|
||||
Headless = true,
|
||||
Args = new[] { "--ignore-certificate-errors" }
|
||||
});
|
||||
|
||||
using var page = await browser.NewPageAsync();
|
||||
|
||||
await page.SetViewportAsync(new ViewPortOptions { Width = 1200, Height = 800 });
|
||||
|
||||
await page.SetContentAsync(fullHtml);
|
||||
|
||||
await page.PdfAsync(filePath, new PdfOptions
|
||||
{
|
||||
PrintBackground = true,
|
||||
Format = PuppeteerSharp.Media.PaperFormat.A4,
|
||||
MarginOptions = new PuppeteerSharp.Media.MarginOptions
|
||||
{
|
||||
Top = "20mm",
|
||||
Bottom = "20mm"
|
||||
}
|
||||
});
|
||||
|
||||
pdfUrl = "/" + fileName;
|
||||
|
||||
Navigation.NavigateTo(pdfUrl, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtml() {
|
||||
const DespachoImprimir = document.getElementById('DespachoURBANImprimir');
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
</script>
|
||||
@@ -26,6 +26,7 @@
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-4">
|
||||
<label class="tituloLbl">Documentación Mínima:</label>
|
||||
|
||||
@@ -0,0 +1,382 @@
|
||||
@using System.Globalization
|
||||
@using bdHerramientaCACOA.HerramientaURBAN
|
||||
<div id="DespachoURBANImprimir" class="d-flex flex-column align-items-center">
|
||||
@* DESPACHO URBAN*@
|
||||
<div class="col-12 mx-auto mb-5">
|
||||
<div class="mb-4 col-8 mx-auto justify-content-center d-flex">
|
||||
<label style="color: #078b98 !important"><b>Despacho Profesional</b></label>
|
||||
</div>
|
||||
<div class="col-8 mx-auto" style="align-items: flex-end;">
|
||||
<div style="height: 49px;">
|
||||
<b>Coste hora Despacho Profesional</b>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Tipo de costes</th>
|
||||
<th class="colorB fw-bold">Coste/hora</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="colorB w4">Costes directos</td>
|
||||
<td class="text-end">@objetoURBAN.DespachoProfesional.CostesDirectos.MilesYDecimales() €/hora</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorB ">Costes indirectos</td>
|
||||
<td class="text-end">@objetoURBAN.DespachoProfesional.TasaCostesIndirectos.MilesYDecimales() €/hora</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="colorB ">Costes variables</td>
|
||||
<td class="text-end">@objetoURBAN.CostesProduccion.CostesVariables.MilesYDecimales() €/hora</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="text-end fw-bold colorC TotalesTabla">
|
||||
<div style="height:28px; align-content:center;">
|
||||
Total Coste hora Despacho Profesional: <span> @objetoURBAN.CostesProduccion.TotalCostes.MilesYDecimales() €/hora</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-8 mx-auto">
|
||||
|
||||
<div style="height: 49px;">
|
||||
<b>Coste hora Externalización</b>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Externalización</th>
|
||||
<th class="colorB fw-bold">Porcentaje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="colorFilasIntro w4">Incremento por externalización</td>
|
||||
<td class="text-end">
|
||||
<span>
|
||||
@objetoURBAN.CostesProduccion.CoeficienteCostesExternalizacion %
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="text-end fw-bold colorC TotalesTabla">
|
||||
Coste hora Externalización: <span> @objetoURBAN.CostesProduccion.CosteHoraExternalizacion.MilesYDecimales() €/hora</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@* TRABAJAO PROFESIONAL *@
|
||||
<div class="col-12 mx-auto mb-5">
|
||||
<div class="mb-4 col-8 mx-auto justify-content-center d-flex">
|
||||
<label style="color: #078b98 !important"><b>Trabajo Profesional</b></label>
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-center" style="gap:20px;">
|
||||
<div class="formatoCampos pt-2">
|
||||
<label class="tituloLbl">Tipo de Documento:</label>
|
||||
<label>@CultureInfo.CurrentCulture.TextInfo.ToTitleCase(@objetoURBAN.Enumerados.TiposDeDocumentos.First(x => x.idEnumeracion == objetoURBAN.TrabajoProfesional.idTipoDocumentacion).Descripcion.ToLower())</label>
|
||||
</div>
|
||||
<div class="formatoCampos pt-2">
|
||||
<label class="tituloLbl">Documento:</label>
|
||||
@if (objetoURBAN.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
<label>@objetoURBAN.Enumerados.ProyectosPorTipo(objetoURBAN.TrabajoProfesional.idTipoDocumentacion).First(x => x.idtipoproyectos == objetoURBAN.TrabajoProfesional.idTipoProyecto).Descripcion</label>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@* TABLAS DE DATOS MINIMOS Y OPCIONALES *@
|
||||
<div class="col-11 mx-auto">
|
||||
@* TABLA DE DATOS MINIMOS *@
|
||||
|
||||
<div style="height: 49px; margin-top:50px;">
|
||||
<b>Documentación Mínima:</b>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Descripción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in objetoURBAN.TrabajoProfesional.DocumentacionMinima)
|
||||
{
|
||||
<tr>
|
||||
<td class="colorB w4">@item.Descripcion</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@* TABLA DE DATOS OPCIONALES *@
|
||||
|
||||
<div style="height: 49px; margin-top:50px;">
|
||||
<b>Documentación Opcional:</b>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Descripción</th>
|
||||
<th class="colorB fw-bold">Añadida</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in objetoURBAN.TrabajoProfesional.DocumentacionOpcional)
|
||||
{
|
||||
<tr>
|
||||
<td class="colorB w4">@item.Descripcion</td>
|
||||
<td class="colorB w4 text-end">@item.Checkeada</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@* TABLA DE DATOS NECESARIOS *@
|
||||
<div class="col-11 mx-auto">
|
||||
<div style="height: 49px; margin-top:50px;">
|
||||
<b>Datos Necesarios:</b>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Descripción</th>
|
||||
<th class="colorB fw-bold">Valor</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in objetoURBAN.TrabajoProfesional.DatosNecesarios)
|
||||
{
|
||||
<tr>
|
||||
<td class="colorB w4">@item.Descripcion</td>
|
||||
<td class="colorB w4 text-end">@item.ValorNecesario</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-11 mx-auto">
|
||||
<div style="height: 49px; margin-top:50px;">
|
||||
<b>Datos Necesarios:</b>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Descripción</th>
|
||||
<th class="colorB fw-bold"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in objetoURBAN.TrabajoProfesional.FasesTrabajoProfesional)
|
||||
{
|
||||
<tr>
|
||||
<td class="colorB w4">@item.Denominacion</td>
|
||||
<td class="colorB w4 text-end">@item.Porcentaje %</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="text-end fw-bold colorC TotalesTabla">
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
<div style="align-self: center;">
|
||||
@if (objetoURBAN.TrabajoProfesional.FasesTrabajoProfesional.Sum(x => x.Porcentaje) != 100)
|
||||
{
|
||||
<div>
|
||||
Trabajo en misión parcial: <span> @objetoURBAN.TrabajoProfesional.FasesTrabajoProfesional.Sum(x => x.Porcentaje) %</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
Total: <span> @objetoURBAN.TrabajoProfesional.FasesTrabajoProfesional.Sum(x => x.Porcentaje) %</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@* INNOVACIÓN INSTRUMENTOS*@
|
||||
<div class="col-11 mx-auto mb-5">
|
||||
<div>
|
||||
<div class="mt-3 mb-3"><b>Innovacion de los instrumentos</b></div>
|
||||
<p class="col-6">
|
||||
<label>@objetoURBAN.TrabajoProfesional.valorInstrumentos %</label>
|
||||
</p>
|
||||
|
||||
@foreach (var enu in objetoURBAN.Enumerados.ListaInstrumentos)
|
||||
{
|
||||
<div class="form-check" style="gap:10px;">
|
||||
@if (enu.Seleccionado)
|
||||
{
|
||||
<span>poner circlo relleno</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>poner circlo vacio</span>
|
||||
|
||||
}
|
||||
<label class="form-check-label" for="@enu.idEnumeracion">@enu.Descripcion</label>
|
||||
</div>
|
||||
}
|
||||
<table class="tablaAlter mt-4" style="width: 100%;">
|
||||
<tr>
|
||||
<td class="tdAlter TotalesTabla" style="width: 320px;">HORAS TRABAJO PROFESIONAL URBANISMO: </td>
|
||||
<td class="tdAlter TotalesTabla tdAlineadoDerecha">@objetoURBAN.TrabajoProfesional.horasTrabProfesional.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@* PLAZOS Y HORAS *@
|
||||
<div class="col-11 mx-auto mb-5">
|
||||
<div class="row justify-content-center align-content-center align-items-center">
|
||||
<div class="col-9 mb-5 align-items-center">
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<tr>
|
||||
<td style="width:60%" class="colorFilasIntro fw-bold w4">Plazo de presentación de la documentación:</td>
|
||||
<td class="text-end">
|
||||
<div class="d-flex" style="gap:3px;">
|
||||
<span class="text-end">@objetoURBAN.CostesProduccion.PlazoPresentacionDocumentos</span>meses
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="col-9 mb-5 ">
|
||||
<div style="height: 24px;">
|
||||
<b>Trabajo profesional</b>
|
||||
</div>
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Trabajos</th>
|
||||
<th class="colorB fw-bold">Horas</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="colorB ">Horas en despacho profesional</td>
|
||||
<td class="text-end">@objetoURBAN.CostesProduccion.HorasEnPlazo.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorB ">Horas mediante externalización</td>
|
||||
<td class="text-end">@objetoURBAN.CostesProduccion.NumHorasMinimoExt.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="text-end colorC fw-bold w4 TotalesTabla">
|
||||
Total horas del trabajo profesional: <span>@((objetoURBAN.CostesProduccion.HorasEnPlazo + objetoURBAN.CostesProduccion.NumHorasMinimoExt).MilesYDecimales()) h </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@* COSTE DE PRODUCCIÓN *@
|
||||
<div class="col-12 mx-auto mb-5">
|
||||
<div class="mb-4 col-8 mx-auto justify-content-center d-flex">
|
||||
<label style="color: #078b98 !important"><b>Coste de producción</b></label>
|
||||
</div>
|
||||
<div class="col-8 mx-auto">
|
||||
<div style="height: 24px;">
|
||||
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
||||
</div>
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Concepto</th>
|
||||
<th class="colorB fw-bold text-end"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tdAlter TotalesTabla fw-bold ">COSTES DE PRODUCCIÓN DEL TRABAJO PROFESIONAL</td>
|
||||
<td class=" tdAlter TotalesTabla text-end"><span> @objetoURBAN.CostesProduccion.CostesProduccionTrabProf.MilesYDecimales() €</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="TotalesTabla colorFilasIntro "><b>Beneficio</b> (antes de impuestos)</td>
|
||||
<td class="TotalesTabla text-end">
|
||||
<div class="text-end align-items-end" style="gap:3px;">
|
||||
<label>@objetoURBAN.CostesProduccion.Beneficio</label> %
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="TotalesTabla text-end fw-bold">
|
||||
Precio del trabajo profesional: <span>@objetoURBAN.CostesProduccion.PrecioTrabajoProfesional.MilesYDecimales() € </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public URBAN objetoURBAN { get; set; } = new URBAN();
|
||||
|
||||
public tsHerramientasCACOA bd;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||
}
|
||||
public void RefreshState()
|
||||
{
|
||||
this.StateHasChanged();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,49 +1,49 @@
|
||||
<div id="LicitacionesCASAImprimir" class="d-flex flex-column align-items-center">
|
||||
<div class="col-12 mx-auto mb-5">
|
||||
<div class="mb-4 col-11 mx-auto justify-content-center d-flex">
|
||||
<label style="color: #078b98 !important"><b>Licitaciones Edificación</b></label>
|
||||
<div class="col-12 mx-auto mb-5">
|
||||
<div class="mb-4 col-11 mx-auto justify-content-center d-flex">
|
||||
<label style="color: #078b98 !important"><b>Licitaciones Edificación</b></label>
|
||||
</div>
|
||||
<div class="col-11 mx-auto" style="align-items: flex-end;">
|
||||
<div style="height: 49px;">
|
||||
<b>Usos/Tipologías</b>
|
||||
</div>
|
||||
<div class="col-11 mx-auto" style="align-items: flex-end;">
|
||||
<div style="height: 49px;">
|
||||
<b>Usos/Tipologías</b>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Superficie</th>
|
||||
<th class="colorB fw-bold">Usos</th>
|
||||
<th class="colorB fw-bold">Tipología</th>
|
||||
<th class="colorB fw-bold">Intervención</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Superficie</th>
|
||||
<th class="colorB fw-bold">Usos</th>
|
||||
<th class="colorB fw-bold">Tipología</th>
|
||||
<th class="colorB fw-bold">Intervención</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach (var uso in objetoLicitaciones.Usos)
|
||||
{
|
||||
<tr>
|
||||
<td class="text-end">@uso.superficie.MilesYDecimales()</td>
|
||||
<td>@objetoLicitaciones.Enumerados.GruposTipologias?.FirstOrDefault(x => x.idEnumeracion == uso.idGrupoTipologia)?.ValorAlfabetico1</td>
|
||||
<td>@objetoLicitaciones.Enumerados.Tipologias?.FirstOrDefault(x => x.idTipologia == uso.idTipologia)?.Descripcion</td>
|
||||
<td>@objetoLicitaciones.Enumerados.Intervenciones?.FirstOrDefault(x => x.idEnumeracion == uso.idTipoIntervencion)?.ValorAlfabetico1</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="text-end fw-bold colorC TotalesTabla">
|
||||
<div style="height:28px; align-content:center;">
|
||||
Total superficie: <span> @objetoLicitaciones.Usos.Sum(x => x.superficie).MilesYDecimales()</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@foreach (var uso in objetoLicitaciones.Usos)
|
||||
{
|
||||
<tr>
|
||||
<td class="text-end">@uso.superficie.MilesYDecimales()</td>
|
||||
<td>@objetoLicitaciones.Enumerados.GruposTipologias?.FirstOrDefault(x => x.idEnumeracion == uso.idGrupoTipologia)?.ValorAlfabetico1</td>
|
||||
<td>@objetoLicitaciones.Enumerados.Tipologias?.FirstOrDefault(x => x.idTipologia == uso.idTipologia)?.Descripcion</td>
|
||||
<td>@objetoLicitaciones.Enumerados.Intervenciones?.FirstOrDefault(x => x.idEnumeracion == uso.idTipoIntervencion)?.ValorAlfabetico1</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="text-end fw-bold colorC TotalesTabla">
|
||||
<div style="height:28px; align-content:center;">
|
||||
Total superficie: <span> @objetoLicitaciones.Usos.Sum(x => x.superficie).MilesYDecimales()</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-11 mx-auto" style="align-items: flex-end;">
|
||||
<div style="height: 49px;">
|
||||
<b>Fases</b>
|
||||
@@ -63,13 +63,13 @@
|
||||
@foreach (var fase in objetoLicitaciones.FasesTrabajo)
|
||||
{
|
||||
<tr>
|
||||
<td >@fase.Denominacion</td>
|
||||
<td>@fase.Denominacion</td>
|
||||
<td class="text-end">
|
||||
<div style="gap:3px;">
|
||||
<span>@fase.Porcentaje</span>
|
||||
@if (fase.Seleccionado)
|
||||
{
|
||||
<span> poner tick </span>
|
||||
<span>poner check</span>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
@@ -82,8 +82,8 @@
|
||||
<div class="d-flex justify-content-end">
|
||||
<div style="align-self: center;">
|
||||
@if (objetoLicitaciones.FasesTrabajo
|
||||
.Where(f => f.Seleccionado)
|
||||
.Sum(f => f.Porcentaje) != 100)
|
||||
.Where(f => f.Seleccionado)
|
||||
.Sum(f => f.Porcentaje) != 100)
|
||||
{
|
||||
<div>
|
||||
Trabajo en misión parcial: <span>
|
||||
@@ -108,7 +108,64 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-11 mx-auto" style="align-items: flex-end;">
|
||||
<div style="height: 49px;">
|
||||
<b>Costes de producción</b>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold" style="width:60%">Concepto</th>
|
||||
<th class="colorB fw-bold"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Plazo de presentación de la documentación</td>
|
||||
<td class="text-end">@objetoLicitaciones.PlazoPresentacionDocumentos</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Coste hora de producción</td>
|
||||
<td class="text-end"><span>@objetoLicitaciones.costeHoraProduccion.MilesYDecimales() €/h</span> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Horas trabajo profesional</td>
|
||||
<td class="text-end"><span>@objetoLicitaciones.horasProduccion.MilesYDecimales() h</span> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tdAlter fw-bold w4">COSTE DE PRODUCCIÓN DEL TRABAJO PROFESIONAL</td>
|
||||
<td class="text-end"><span> @objetoLicitaciones.CostesProduccionTrabProf.MilesYDecimales() €</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="TotalesTabla colorB w4">
|
||||
G.G. + B.I.
|
||||
<span class="fw-normal" style="font-size:10px;">(40/19 Junta Consultiva de Contratación Pública del Estado)</span>
|
||||
</td>
|
||||
<td class="TotalesTabla text-end" style="align-content:center;">
|
||||
<div class="d-flex" style="justify-content: end; gap:3px;">
|
||||
@objetoLicitaciones.Beneficio %
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="text-end fw-bold TotalesTabla tablaCACOA">
|
||||
Precio del trabajo profesional: <span>@objetoLicitaciones.PrecioTrabProf.MilesYDecimales() € </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="colorB fw-bold w4">Coste de producción del Trabajo Profesional</td>
|
||||
<td class="tdAlter fw-bold w4">COSTE DE PRODUCCIÓN DEL TRABAJO PROFESIONAL</td>
|
||||
<td class="text-end"><span> @objetoLicitaciones.CostesProduccionTrabProf.MilesYDecimales() €</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorB fw-bold w4">
|
||||
<td class="TotalesTabla colorB w4">
|
||||
G.G. + B.I. <br />
|
||||
<span class="fw-normal" style="font-size:10px;">(40/19 Junta Consultiva de Contratación Pública del Estado)</span>
|
||||
</td>
|
||||
<td class="text-end" style="align-content:center;">
|
||||
<td class="TotalesTabla text-end" style="align-content:center;">
|
||||
<div class="d-flex" style="justify-content: end; gap:3px;">
|
||||
@objetoLicitaciones.Beneficio %
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<button @onclick="@(() => abrirPopupGuardar())" class="btnBlue d-flex align-items-center"> <i class="fas fa-save pe-1"></i>@TituloBoton</button>
|
||||
<b class="Fuente2 ps-2 pe-2 nomSim">Nombre de la simulación: </b>
|
||||
<InputText @bind-Value="objetoLicitaciones.Descripcion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
|
||||
@@ -406,6 +406,7 @@
|
||||
<head>
|
||||
<style>{cssContent}</style>
|
||||
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css' rel='stylesheet' integrity='sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN' crossorigin='anonymous'>
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css'>
|
||||
</head>
|
||||
<body>
|
||||
{contenidoHtml}
|
||||
@@ -464,6 +465,7 @@
|
||||
objetoLicitaciones.EsPorUsos = true;
|
||||
objetoLicitaciones.horasProduccion = 0;
|
||||
objetoLicitaciones.CalcularHorasSuperficie();
|
||||
objetoLicitaciones.PrecioDelEncargo = objetoLicitaciones.OtrosTrabajos.Sum(x => x.Coste) + objetoLicitaciones.PrecioTrabProf;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
private async void modificarHorasChanged(bool res)
|
||||
@@ -472,11 +474,11 @@
|
||||
// ultimaHoraDocumentacion = objetoCASA.TrabajoProfesional.HorasTPEDocumentacion;
|
||||
// ultimaHoraObra = objetoCASA.TrabajoProfesional.HorasTPEDireccion;
|
||||
|
||||
|
||||
modificarHoras = res;
|
||||
modificarTabla = !res;
|
||||
objetoLicitaciones.EsPorUsos = false;
|
||||
objetoLicitaciones.CalcularHorasSuperficie();
|
||||
objetoLicitaciones.PrecioDelEncargo = objetoLicitaciones.OtrosTrabajos.Sum(x => x.Coste) + objetoLicitaciones.PrecioTrabProf;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold">Concepto</th>
|
||||
<th class="colorB fw-bold" style="width:60%;">Concepto</th>
|
||||
<th class="colorB fw-bold text-end"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="colorFilasIntro fw-bold w4">
|
||||
<td class="colorFilasIntro w4">
|
||||
Plazo de presentación de la documentación:
|
||||
@if (objetoLicitaciones.IncrementoUrgencia > 0)
|
||||
{
|
||||
@@ -34,13 +34,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="colorB fw-bold w4">Coste hora de producción</td>
|
||||
<td class="text-end"><span>@objetoLicitaciones.costeHoraProduccion.MilesYDecimales() h</span>
|
||||
<td class="colorB w4">Coste hora de producción</td>
|
||||
<td class="text-end"><span>@objetoLicitaciones.costeHoraProduccion.MilesYDecimales() €/h</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorB fw-bold w4">Horas Trabajo profesional</td>
|
||||
<td class="colorB w4">Horas Trabajo profesional</td>
|
||||
<td class="text-end">
|
||||
@if (objetoLicitaciones.EsPorUsos)
|
||||
{
|
||||
@@ -58,16 +58,16 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorB fw-bold w4">Coste de producción del Trabajo Profesional</td>
|
||||
<td class="tdAlter fw-bold w4">COSTE DE PRODUCCIÓN DEL TRABAJO PROFESIONAL</td>
|
||||
<td class="text-end"><span> @objetoLicitaciones.CostesProduccionTrabProf.MilesYDecimales() €</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorB fw-bold w4">
|
||||
G.G. + B.I. <br />
|
||||
<td class="TotalesTabla colorB w4">
|
||||
G.G. + B.I.
|
||||
<span class="fw-normal" style="font-size:10px;">(40/19 Junta Consultiva de Contratación Pública del Estado)</span>
|
||||
</td>
|
||||
<td class="text-end" style="align-content:center;">
|
||||
<td class="TotalesTabla text-end" style="align-content:center;">
|
||||
<div class="d-flex" style="justify-content: end; gap:3px;">
|
||||
@objetoLicitaciones.Beneficio %
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 d-flex mt-3" style="gap: 40px;">
|
||||
<RadioInput style="margin-right: 10px;" Label="Cálculo Completo" Value="modificarTabla" ValueExpression="() => modificarTabla" ValueChanged="(value) => modificarTablaChanged(value)" />
|
||||
<RadioInput style="margin-right: 10px;" Label="Cálculo por tipo de documento" Value="modificarTabla" ValueExpression="() => modificarTabla" ValueChanged="(value) => modificarTablaChanged(value)" />
|
||||
<RadioInput style="margin-right: 10px;" Label="Cálculo por tiempo" Value="modificarHoras" ValueExpression="() => modificarHoras" ValueChanged="(value) => modificarHorasChanged(value)" />
|
||||
</div>
|
||||
@if (modificarTabla)
|
||||
|
||||
@@ -457,6 +457,7 @@ namespace bdHerramientaCACOA
|
||||
TrabajoProfesional.HorasTPEDocumentacion = horasDocu;
|
||||
TrabajoProfesional.HorasTPEDireccion = horasDireccion;
|
||||
TrabajoProfesional.HorasTPE = horasDocu + horasDireccion;
|
||||
TrabajoProfesional.TotalHorasTPE = horasDocu + horasDireccion;
|
||||
CalcularCostesProduccion();
|
||||
}
|
||||
public double CalcularHorasTrabajoProfesionalEdificacion()
|
||||
@@ -529,6 +530,7 @@ namespace bdHerramientaCACOA
|
||||
TrabajoProfesional.HorasTPEDocumentacion = CalcularHorasTPEDocumentacion();
|
||||
TrabajoProfesional.HorasTPEDireccion = CalcularHorasTPEDireccion();
|
||||
TrabajoProfesional.HorasTPE = TrabajoProfesional.HorasTPEDocumentacion + TrabajoProfesional.HorasTPEDireccion;
|
||||
TrabajoProfesional.TotalHorasTPE = TrabajoProfesional.HorasTPEDocumentacion + TrabajoProfesional.HorasTPEDireccion;
|
||||
}
|
||||
|
||||
public double CalcularSuperficieTotal()
|
||||
|
||||
@@ -236,11 +236,16 @@ namespace bdHerramientaCACOA
|
||||
{
|
||||
horasProduccion = Math.Round((superficie * coefSupTotal * coefTipoTotal * coefIntervencionTotal * (fasesEncargadas / 100)), 2, MidpointRounding.AwayFromZero);
|
||||
// calcular horas elaboracion documentacion
|
||||
horasPorcentaje = FasesTrabajo.Where(x => x.Codigo.Contains("ESTPREVIO") || x.Codigo.Contains("ANTEPROYECTO") || x.Codigo.Contains("PROYBASICO") || x.Codigo.Contains("PROYEJEC")).Sum(x => x.Porcentaje);
|
||||
//horasPorcentaje = FasesTrabajo.Where(x => (x.Codigo.Contains("ESTPREVIO") || x.Codigo.Contains("ANTEPROYECTO") || x.Codigo.Contains("PROYBASICO") || x.Codigo.Contains("PROYEJEC"))).Sum(x => x.Porcentaje);
|
||||
|
||||
// COMPROBAR SI ESTO ESTÁ BIEN, SINO EL COSTE HORA DE PRODUCCIÓN NO CAMBIA
|
||||
horasPorcentaje = FasesTrabajo.Where(x=>x.Seleccionado).Sum(x => x.Porcentaje);
|
||||
horasDocumentacion = Math.Round(superficie * coefSupTotal * coefTipoTotal * coefIntervencionTotal * (horasPorcentaje / 100), 2, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
else {
|
||||
horasDocumentacion = horasProduccion;
|
||||
|
||||
// COMPROBAR SI ESTO ESTÁ BIEN, SINO EL COSTE HORA DE PRODUCCIÓN NO CAMBIA Y TAMBIÉN VER SI DEBE CAMBIAR HORAS TRABAJO PROFESIONAL
|
||||
horasDocumentacion = Math.Round(horasProduccion * (fasesEncargadas / 100), 2, MidpointRounding.AwayFromZero); ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user