From e9f6d6ba4df5abdcd37454665763166f43da5f48 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins <matiss@mja.lv> Date: Fri, 7 Jul 2023 19:14:50 +0100 Subject: [PATCH] :bug: fix zero budget values (#1308) Closes #1299 <img width="324" alt="Screenshot 2023-07-07 at 18 56 38" src="https://github.com/actualbudget/actual/assets/886567/1a4dbd65-52af-44d9-8205-94a4c6c745e5"> --- .../desktop-client/src/components/spreadsheet/format.js | 2 +- upcoming-release-notes/1308.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/1308.md diff --git a/packages/desktop-client/src/components/spreadsheet/format.js b/packages/desktop-client/src/components/spreadsheet/format.js index 3bbdde031..3cc523f31 100644 --- a/packages/desktop-client/src/components/spreadsheet/format.js +++ b/packages/desktop-client/src/components/spreadsheet/format.js @@ -18,7 +18,7 @@ export default function format(value, type = 'string') { } return formatted; case 'financial': - if (value == null || value === '') { + if (value == null || value === '' || value === 0) { return integerToCurrency(0); } else if (typeof value === 'string') { const parsed = parseFloat(value); diff --git a/upcoming-release-notes/1308.md b/upcoming-release-notes/1308.md new file mode 100644 index 000000000..6bfad9522 --- /dev/null +++ b/upcoming-release-notes/1308.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MatissJanis] +--- + +Fix budget showing "--0.00" values sometimes -- GitLab