diff --git a/web/static/invoice.css b/web/static/invoice.css
index 85cb1f1..d923c91 100644
--- a/web/static/invoice.css
+++ b/web/static/invoice.css
@@ -97,9 +97,11 @@
font-weight: bold;
}
-.invoice tbody td:first-child {
- max-width: 15em;
+.invoice tbody .description td:first-child {
+ padding: 0 1rem;
white-space: pre-wrap;
+ text-align: justify;
+ hyphens: auto;
}
.invoice .legal {
diff --git a/web/template/invoices/view.gohtml b/web/template/invoices/view.gohtml
index 01b54cf..e6e78d3 100644
--- a/web/template/invoices/view.gohtml
+++ b/web/template/invoices/view.gohtml
@@ -78,17 +78,11 @@
{{ $lastIndex := len .Products | sub 1 }}
{{ range $index, $product := .Products -}}
- {{- if .Description }}
-
- {{ .Name }} |
-
- {{ end -}}
-
- {{- if .Description }}
- {{ .Description }} |
- {{- else }}
- {{ .Name }} |
- {{- end -}}
+
+ {{ .Name }} |
{{ .Price | formatPrice }} |
{{ if $.HasDiscounts -}}
{{ $product.Discount | formatPercent }} |
@@ -100,6 +94,11 @@
{{ end -}}
{{ .Total | formatPrice }} |
+ {{- if .Description }}
+
+ {{ .Description }} |
+
+ {{ end -}}
{{ if (eq $index $lastIndex) }}
- {{- if .Description }}
-
- {{ .Name }} |
-
- {{ end -}}
-
- {{- if .Description }}
- {{ .Description }} |
- {{- else }}
- {{ .Name }} |
- {{- end -}}
+
+ {{ .Name }} |
{{ .Price | formatPrice }} |
{{ if $.HasDiscounts -}}
{{ $product.Discount | formatPercent }} |
@@ -104,6 +98,11 @@
{{ end -}}
{{ .Total | formatPrice }} |
+ {{- if .Description }}
+
+ {{ .Description }} |
+
+ {{- end }}
{{ if (eq $index $lastIndex) }}