Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional expansion formats #368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions ledger-report.el
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ specifier."
("payee" . ledger-report-payee-format-specifier)
("account" . ledger-report-account-format-specifier)
("month" . ledger-report-month-format-specifier)
("amount1" . ledger-report-amount1-format-specifier)
("amount2" . ledger-report-amount2-format-specifier)
("date1" . ledger-report-date1-format-specifier)
("date2" . ledger-report-date2-format-specifier)
("tagname" . ledger-report-tagname-format-specifier)
("tagvalue" . ledger-report-tagvalue-format-specifier))
"An alist mapping ledger report format specifiers to implementing functions.
Expand Down Expand Up @@ -253,6 +257,22 @@ See documentation for the function `ledger-master-file'")
;; values, but it remains to be implemented.
(ledger-read-string-with-default "Tag Value: " nil))

(defun ledger-report-amount1-format-specifier ()
"Return an amount."
(ledger-read-string-with-default "Amount: " nil))

(defun ledger-report-amount2-format-specifier ()
"Return an amount."
(ledger-read-string-with-default "Second amount: " nil))

(defun ledger-report-date1-format-specifier ()
"Return a date."
(ledger-read-string-with-default "Date: " nil))

(defun ledger-report-date2-format-specifier ()
"Return a date."
(ledger-read-string-with-default "Second date: " nil))

(defun ledger-report-read-name ()
"Read the name of a ledger report to use, with completion.

Expand Down