Fix Tamaño Impresión - Ticket Canilla
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 2m41s
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 2m41s
This commit is contained in:
@@ -18,23 +18,32 @@ namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||
}
|
||||
|
||||
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.A4);
|
||||
page.Margin(5, Unit.Millimetre);
|
||||
page.DefaultTextStyle(x => x.FontFamily("Arial").FontSize(9));
|
||||
|
||||
page.Content().Column(mainColumn =>
|
||||
{
|
||||
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);
|
||||
});
|
||||
}
|
||||
mainColumn.Item()
|
||||
.AlignCenter()
|
||||
.Width(PageSizes.A6.Width)
|
||||
.Height(PageSizes.A6.Height)
|
||||
.Column(a6ContentColumn =>
|
||||
{
|
||||
a6ContentColumn.Item().Padding(10, Unit.Millimetre).Column(content =>
|
||||
{
|
||||
content.Item().Element(ComposeHeader);
|
||||
content.Item().Element(ComposeContent);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void ComposeHeader(IContainer container)
|
||||
{
|
||||
@@ -50,13 +59,13 @@ namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||
column.Item().PaddingTop(10);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void ComposeContent(IContainer container)
|
||||
{
|
||||
container.Column(column =>
|
||||
{
|
||||
column.Spacing(15);
|
||||
|
||||
|
||||
column.Item().Table(table =>
|
||||
{
|
||||
table.ColumnsDefinition(columns =>
|
||||
@@ -71,15 +80,15 @@ namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||
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"));
|
||||
@@ -87,7 +96,7 @@ namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||
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());
|
||||
@@ -99,20 +108,20 @@ namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||
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 =>
|
||||
@@ -126,7 +135,7 @@ namespace GestionIntegral.Api.Controllers.Reportes.PdfTemplates
|
||||
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());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user