From 4cdfbace0314e405d368044a7ce44d7ccc2a1fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20=C5=A0taleker?= Date: Tue, 3 Mar 2026 09:16:17 +0100 Subject: [PATCH] tiskanje in posiljanje po mailo --- EveryThing/EveryThing.csproj | 1 + .../Pages/CodeTableItems/Index.cshtml.cs | 2 +- EveryThing/Pages/Invoices/Print.cshtml | 154 ++++++++++++++---- EveryThing/Pages/Invoices/Print.cshtml.cs | 100 +++++++++++- EveryThing/Pages/Projects/Edit.cshtml | 19 ++- EveryThing/Pages/Projects/Edit.cshtml.cs | 28 ++-- EveryThing/appsettings.json | 9 + 7 files changed, 258 insertions(+), 55 deletions(-) diff --git a/EveryThing/EveryThing.csproj b/EveryThing/EveryThing.csproj index 7733d4f..5dd76eb 100644 --- a/EveryThing/EveryThing.csproj +++ b/EveryThing/EveryThing.csproj @@ -34,6 +34,7 @@ + diff --git a/EveryThing/Pages/CodeTableItems/Index.cshtml.cs b/EveryThing/Pages/CodeTableItems/Index.cshtml.cs index c2fa72b..b62b2b7 100644 --- a/EveryThing/Pages/CodeTableItems/Index.cshtml.cs +++ b/EveryThing/Pages/CodeTableItems/Index.cshtml.cs @@ -112,7 +112,7 @@ namespace EveryThing.Pages.CodeTableItems sellingPrice = projectPartItem.SellingPrice; differenceInPricePercentage = projectPartItem.DifferenceInPricePercentage; materialDimensions = projectPartItem.MaterialDimensions; - material = projectPartItem.Material.Title; + material = projectPartItem?.Material?.Title; } } diff --git a/EveryThing/Pages/Invoices/Print.cshtml b/EveryThing/Pages/Invoices/Print.cshtml index c9dec08..c35c9c3 100644 --- a/EveryThing/Pages/Invoices/Print.cshtml +++ b/EveryThing/Pages/Invoices/Print.cshtml @@ -61,6 +61,29 @@ +
+
+
+
+
+ + +
+
+
+ @if (Model.Invoice.State == Models.Invoice.Invoice.InvoiceState.New) + { + + } + + + +
+
+
+
+
-
@Html.AntiForgeryToken() @@ -281,6 +287,7 @@