From 5f4c5d9d510bf8a2338d7dec585bda4b04c74ef4 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Tue, 7 Dec 2021 20:35:49 +0000 Subject: [PATCH] Display zero values in grey --- postgres/numeric.go | 5 +++++ web/amount.tpl | 4 ++-- web/static/css/main.css | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/postgres/numeric.go b/postgres/numeric.go index acf5f03..82c09a8 100644 --- a/postgres/numeric.go +++ b/postgres/numeric.go @@ -19,3 +19,8 @@ func (n Numeric) GetPositive() bool { float := n.GetFloat64() return float >= 0 } + +func (n Numeric) IsZero() bool { + float := n.GetFloat64() + return float == 0 +} diff --git a/web/amount.tpl b/web/amount.tpl index 1f6a9c6..fd68a36 100644 --- a/web/amount.tpl +++ b/web/amount.tpl @@ -1,11 +1,11 @@ {{define "amount"}} - + {{printf "%.2f" .GetFloat64}} {{end}} {{define "amount-cell"}} - + {{printf "%.2f" .GetFloat64}} {{end}} \ No newline at end of file diff --git a/web/static/css/main.css b/web/static/css/main.css index 3e68448..4046749 100644 --- a/web/static/css/main.css +++ b/web/static/css/main.css @@ -1,3 +1,7 @@ +html { + font-size: 16px; +} + #head { height:160px; line-height: 160px; @@ -63,4 +67,7 @@ body { .negative { color: #d50000; +} +.zero { + color: #888888; } \ No newline at end of file