Skip to content

Support simple arithmetic expressions in posting amounts #2648

Description

@purpleidea

It would be useful if posting amounts could contain simple arithmetic expressions, for example:

assets:personal    $-21.60 + $-27.68 + $-5.03 + $-17.80

Currently this fails with unexpected '+', requiring the user to calculate and enter $-72.11 manually.

Supporting basic +, -, *, /, and parentheses in posting amounts would make journal entries easier to audit because the original component amounts could remain visible.

This would be incredibly useful for situations when I have 5 receipts in a section where each is split into base amount (price+tip) and tax (as second line item) which is common in accounting where I live.

Seeing the total at the bottom would make it easier to find the bill. Eg:

2025-10-14 some outing		; customer:simon
	expenses:meals			$47.97 ; page:13
	assets:tax:gstexp		$2.23
	expenses:meals			$200.65 ; page:17
	assets:tax:gstexp		$8.35
	expenses:parking		$15.75 ; page:20
	assets:tax:gstexp		$0.79
	expenses:lodging		$419.32 ; page:21
	assets:tax:gstexp		$18.68
	assets:personal			$-50.20 + $-209.00 + $-16.54 + $-438   ; $-713.74

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WISHSome kind of improvement request or proposal.bountyThar's some kind o' loot on offer..journalThe journal file format, and its features.needs-codeTo unblock: needs code/code updates

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions