From 21558d25b1aa05fc6d0c2e59a50f8a853e14b2e7 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 1 Mar 2023 16:17:22 +0900 Subject: [PATCH] Do not show product information if there are no product information --- BTCPayServer/Views/UIInvoice/Invoice.cshtml | 57 +++++++++++---------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/BTCPayServer/Views/UIInvoice/Invoice.cshtml b/BTCPayServer/Views/UIInvoice/Invoice.cshtml index cb6579122..1122bf081 100644 --- a/BTCPayServer/Views/UIInvoice/Invoice.cshtml +++ b/BTCPayServer/Views/UIInvoice/Invoice.cshtml @@ -253,32 +253,37 @@
-
-

Product Information

- - @if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemCode)) - { - - - - - } - @if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemDesc)) - { - - - - - } - @if (Model.TaxIncluded is not null) - { - - - - - } -
Item code@Model.TypedMetadata.ItemCode
Item Description@Model.TypedMetadata.ItemDesc
Tax Included@Model.TaxIncluded
-
+ @if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemCode) || + !string.IsNullOrEmpty(Model.TypedMetadata.ItemDesc) || + Model.TypedMetadata.TaxIncluded is not null) + { +
+

Product Information

+ + @if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemCode)) + { + + + + + } + @if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemDesc)) + { + + + + + } + @if (Model.TaxIncluded is not null) + { + + + + + } +
Item code@Model.TypedMetadata.ItemCode
Item Description@Model.TypedMetadata.ItemDesc
Tax Included@Model.TaxIncluded
+
+ } @if (Model.TypedMetadata.BuyerName is not null || Model.TypedMetadata.BuyerEmail is not null || Model.TypedMetadata.BuyerPhone is not null ||