From fd18a7d641eb5bd9ec45415242a9d25eec169c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Gonz=C3=A1lez=20Galindo?= Date: Mon, 30 Oct 2023 11:20:49 +0100 Subject: [PATCH] =?UTF-8?q?Correcci=C3=B3n=20sobre=20las=20=C3=B3rdenes=20?= =?UTF-8?q?de=20compra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor | 2 +- .../Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor b/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor index d48d3d1..89c0c74 100644 --- a/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor +++ b/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor @@ -138,7 +138,7 @@ else
@ProjectClient.MarketName
-
+
@OrderProject.Description
diff --git a/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor.cs b/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor.cs index 8e93a03..2e98c64 100644 --- a/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor.cs +++ b/MCPackServer/Server/Pages/PurchaseOrdersModule/PurchaseOrdersReport.razor.cs @@ -80,9 +80,10 @@ protected override async Task OnInitializedAsync() MaterialNumbers.Add((i + 1).ToString()); Subtotal += OrderArticles[i].SalePrice * OrderArticles[i].Quantity; } + Subtotal = Math.Round(Subtotal, 2); Discount = Subtotal * (Order.Discount / 100); - Tax = OrderProvider.HasTaxes ? (Subtotal - Discount) * 0.16f : 0; - Total = Subtotal - Discount + Tax; + Tax = Math.Round(OrderProvider.HasTaxes ? (Subtotal - Discount) * 0.16f : 0, 2); + Total = Math.Round(Subtotal - Discount + Tax, 2); NumberOfPages = 1 + OrderArticles.Count / 10; ArticlesPerPage = new(); for (int i = 0; i < NumberOfPages; i++)