phronCare/Documents/Templates/Quotes/Template_v1.cshtml
Leandro Hernan Rojas c0d98e2ec8
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 5m49s
Patch QuotePrint Adjustments
2025-07-15 16:51:29 -03:00

229 lines
7.6 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: 11px;
color: #000;
margin: 30px;
padding: 20px;
box-sizing: border-box;
border: 1px solid #000;
}
.row {
display: flex;
justify-content: space-between;
gap: 20px;
}
.col {
flex: 1;
}
.izquierda {
flex-basis: 50%; /* fácil de cambiar a 40%, 30%, etc. */
}
.derecha {
flex-basis: 50%;
}
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">
<table style="width:100%; border: 1px solid black; border-radius: 6px; border-collapse: separate; margin-bottom: 20px;">
<tr>
<!-- Columna izquierda: empresa -->
<td style="width: 50%; padding: 10px; vertical-align: top;">
<img src="data:image/png;base64,@Model.LogoBase64" alt="Logo" style="height: 60px;" />
<div style="font-size: 10px; margin-top: 8px;">
<strong>BIODEC S.R.L.</strong><br />
Segurola 1885<br />
C.P. (C1407AOK) - Capital Federal<br />
Buenos Aires - Argentina<br />
Tel: 4864 6005 / Fax directo: 4864 5710<br />
www.biodec.net<br />
Email: ventas@biodec.net<br />
Urgencias: 15-2155-9380 * 15-5909-4987 * 15-5909-4892
</div>
</td>
<!-- Columna derecha: presupuesto -->
<td style="width: 50%; padding: 10px; vertical-align: top; text-align: center;">
<h2 style="margin: 0;">PRESUPUESTO</h2>
<h3 style="margin: 5px 0;">Nº @Model.Quotenumber</h3>
<strong>FECHA @Model.IssueDate.ToString("dd/MM/yyyy")</strong>
<div style="font-size: 10px; margin-top: 8px;">
CUIT: 33-70849672-9<br />
INGRESOS BRUTOS: 901-070604-2<br />
INICIO DE ACTIVIDADES: 02-10-2003<br />
IVA RESPONSABLE INSCRIPTO
</div>
</td>
</tr>
</table>
</div>
<hr />
<div class="row">
<div class="col izquierda">
<!-- Datos del Cliente -->
<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>
<p><strong>Condición de pago:</strong> @Model.PaymentTermDescription</p>
<p><strong>Validez de la oferta:</strong> @((Model.OfferValidityDays.HasValue ? $"{Model.OfferValidityDays} días" : "—"))</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="col derecha">
<!-- Datos del Paciente y Atención -->
<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>
<div class="section">
<h3>Productos Cotizados</h3>
<table>
<thead>
<tr>
<th style="width: 70%;">Descripción</th>
<th style="width: 10%; text-align: center;">Cantidad</th>
<th style="width: 10%; text-align: center;">Precio Unitario</th>
<th style="width: 10%; text-align: center;">Subtotal</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Items)
{
<tr>
<td>@item.Description</td>
<td style="text-align: center;">@item.Quantity</td>
<td style="text-align: center;">@item.UnitPrice.ToString("C", culture)</td>
<td style="text-align: center;">@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 style="text-align: right;">@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 style="text-align: right;">@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 style="text-align: right;">@adj.Amount.ToString("C", culture)</td>
</tr>
}
} *@
<tr>
<td><strong>Total Final</strong></td>
<td style ="text-align: right;">@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>