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

Txn Validation: Date range #85

Closed
hrj opened this issue Mar 17, 2016 · 4 comments
Closed

Txn Validation: Date range #85

hrj opened this issue Mar 17, 2016 · 4 comments

Comments

@hrj
Copy link
Owner

hrj commented Mar 17, 2016

Often, the input .ledger files are meant for a specific year. It would be nice to validate the date of the transaction, to ensure that the date lies within the year (or quarter, month, whatever).

Many UI based accounting packages do this naturally but since abandon has a text-based input it is easy to make mistakes in the date field. This is especially a problem in countries where the financial year is not aligned with the calendar year. In India, for example, financial year begins in March, and hence dates can get messed up while yanking and pasting.

Plan:

  • Have a config option for specifying the valid date range. (Ref. eodConstraints)
  • We could add a directive to .ledger file to forcefully accept a particular date. Usually, opening balances are posted on the day before the financial year. Since this is an exceptional transaction and we don't want other transactions to be posted on that date, a "force accept date" directive would be useful. The config file constraint can then be set to allow only dates for the financial year.
@hrj hrj added this to the Version 0.3 milestone Mar 17, 2016
@hrj hrj modified the milestones: Version 0.3.5, Version 0.3 Jun 24, 2016
@Entea
Copy link
Contributor

Entea commented Sep 6, 2016

@hrj Do you mind if I try to submit a PR for this story as an exercise? :)

@hrj
Copy link
Owner Author

hrj commented Sep 6, 2016

@Entea Not at all; go ahead :)

@hrj
Copy link
Owner Author

hrj commented Sep 7, 2016

For the "suppress error" directive, we can define a special tag. That requires support for tags to be implemented as per #16 .

@hrj
Copy link
Owner Author

hrj commented Sep 7, 2016

I created follow up tasks #93 and #94

@hrj hrj modified the milestones: Version 0.3.1, Version 0.3.2 Sep 11, 2016
@hrj hrj closed this as completed Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants