summaryrefslogtreecommitdiff
path: root/src/report.h
diff options
context:
space:
mode:
authorPaulo Flabiano Smorigo <pfsmorigo@gmail.com>2018-01-03 18:44:43 -0200
committerPaulo Flabiano Smorigo <pfsmorigo@gmail.com>2018-01-03 18:44:43 -0200
commitd0e80c02fb2328cb89efe41c400af68e322d9e80 (patch)
tree4bae5f77c5fb428f9630c8beb7ad89bf574ee9f9 /src/report.h
parente3bcb8e87e4f89b7fc694c2c444f602aa9ee2bab (diff)
downloadfork-ledger-d0e80c02fb2328cb89efe41c400af68e322d9e80.tar.gz
fork-ledger-d0e80c02fb2328cb89efe41c400af68e322d9e80.tar.bz2
fork-ledger-d0e80c02fb2328cb89efe41c400af68e322d9e80.zip
Use amount_width variable for budget report
Instead of using a "magic" value (12), use the proper variable to set the width.
Diffstat (limited to 'src/report.h')
-rw-r--r--src/report.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/report.h b/src/report.h
index b625d335..8a7efddd 100644
--- a/src/report.h
+++ b/src/report.h
@@ -459,12 +459,12 @@ public:
(report_t, budget_format_,
CTOR(report_t, budget_format_) {
on(none,
- "%(justify(scrub(get_at(display_total, 0)), 12, -1, true, color))"
- " %(justify(-scrub(get_at(display_total, 1)), 12, "
- " 12 + 1 + 12, true, color))"
+ "%(justify(scrub(get_at(display_total, 0)), int(amount_width), -1, true, color))"
+ " %(justify(-scrub(get_at(display_total, 1)), int(amount_width), "
+ " int(amount_width) + 1 + int(amount_width), true, color))"
" %(justify(scrub((get_at(display_total, 1) || 0) + "
- " (get_at(display_total, 0) || 0)), 12, "
- " 12 + 1 + 12 + 1 + 12, true, color))"
+ " (get_at(display_total, 0) || 0)), int(amount_width), "
+ " int(amount_width) + 1 + int(amount_width) + 1 + int(amount_width), true, color))"
" %(ansify_if("
" justify((get_at(display_total, 1) ? "
" (100% * quantity(scrub(get_at(display_total, 0)))) / "