phronCare/Documents/Templates/Quotes/Template_v1.cshtml
Leandro Hernan Rojas 5ec19044f2
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 6m14s
Update GetByIdDTO
2025-05-16 17:19:40 -03:00

176 lines
4.9 KiB
Plaintext

@using Domain.Dtos
@using System.Globalization
@model Domain.Dtos.QuoteDto
@{
var culture = CultureInfo.GetCultureInfo("es-AR");
}
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8" />
<title>Presupuesto @Model.Quotenumber</title>
<style>
body {
font-family: 'Liberation Sans', Arial, sans-serif;
font-size: 12px;
color: #000;
margin: 30px;
padding: 20px;
box-sizing: border-box;
border: 1px solid #000;
}
h1, h2, h3 {
margin: 0;
padding: 0;
}
.header {
text-align: center;
margin-bottom: 10px;
}
.section {
margin-top: 10px;
min-height: 60px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 5px;
}
th, td {
border: 1px solid #ccc;
padding: 4px;
text-align: left;
}
th {
background-color: #f0f0f0;
}
.totales {
margin-top: 10px;
float: right;
width: 45%;
}
.footer {
text-align: center;
font-size: 10px;
margin-top: 20px;
color: #666;
}
</style>
</head>
<body>
<div class="header">
<h2>Presupuesto Nº @Model.Quotenumber</h2>
<p>Fecha de emisión: @Model.IssueDate.ToString("dd/MM/yyyy")</p>
</div>
<div class="section">
<h3>Datos del Cliente</h3>
<p><strong>Nombre:</strong> @Model.Customer.Name</p>
<p><strong>Domicilio:</strong> @Model.Customer.Address</p>
<p><strong>Condición IVA:</strong> @Model.Customer.IvaCondition</p>
@if (Model.Customer.Documents != null && Model.Customer.Documents.Any())
{
<p><strong>Documentos:</strong></p>
<ul>
@foreach (var doc in Model.Customer.Documents)
{
<li>@doc.DocumentType: @doc.Number</li>
}
</ul>
}
else
{
<p>— Sin documentos —</p>
}
</div>
<div class="section">
<h3>Datos del Paciente y Atención</h3>
<p><strong>Paciente:</strong> @Model.PatientName</p>
<p><strong>Médico:</strong> @Model.ProfessionalName</p>
<p><strong>Institución:</strong> @Model.InstitutionName</p>
<p><strong>Fecha estimada:</strong> @(Model.EstimatedDate?.ToString("dd/MM/yyyy") ?? "—")</p>
</div>
<div class="section">
<h3>Productos Cotizados</h3>
<table>
<thead>
<tr>
<th>Descripción</th>
<th>Cantidad</th>
<th>Precio Unitario</th>
<th>Subtotal</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Items)
{
<tr>
<td>@item.Description</td>
<td>@item.Quantity</td>
<td>@item.UnitPrice.ToString("C", culture)</td>
<td>@item.Total.ToString("C", culture)</td>
</tr>
}
</tbody>
</table>
</div>
<div class="section">
<h3>Totales</h3>
<table class="totales">
<tbody>
<tr>
<td><strong>Subtotal</strong></td>
<td>@Model.Items.Sum(i => i.Subtotal).ToString("C", culture)</td>
</tr>
@if (Model.Taxes?.Any() == true)
{
@foreach (var tax in Model.Taxes)
{
<tr>
<td><strong>@tax.TaxName (@tax.TaxRate%)</strong></td>
<td>@tax.TaxAmount.ToString("C", culture)</td>
</tr>
}
}
@if (Model.Adjustments?.Any() == true)
{
@foreach (var adj in Model.Adjustments)
{
<tr>
<td><strong>Ajuste: @adj.Reason</strong></td>
<td>@adj.Amount.ToString("C", culture)</td>
</tr>
}
}
<tr>
<td><strong>Total Final</strong></td>
<td>@Model.Total.ToString("C", culture)</td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<h3>Observaciones</h3>
<p>@(string.IsNullOrWhiteSpace(Model.Observations) ? "— Sin observaciones —" : Model.Observations)</p>
</div>
<div class="footer">
<p>Sistema de Gestión y Administración - PhronCare © 2025</p>
</div>
</body>
</html>