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

(Bug) Journal Vouchers let you make transactions against title accounts #884

Closed
sfount opened this issue Nov 11, 2016 · 6 comments
Closed
Assignees
Labels

Comments

@sfount
Copy link
Contributor

sfount commented Nov 11, 2016

Title accounts are currently shown with all other accounts types in the typeahead on journal vouchers. They can also be selected and vouchers can be made from and to title accounts without issue.

screenshot 2016-11-11 at 09 26 22

Current Behaviour
Title accounts can be selected and are valid accounts for voucher transactions.

Expected Behaviour
Title accounts show not be able to be selected in journal vouchers
A voucher hitting a title account should be rejected and not posted to the journal

@sfount sfount added the Bug label Nov 11, 2016
@jniles
Copy link
Collaborator

jniles commented Nov 11, 2016

@sfount, do you propose that the title accounts are disabled, or not shown?

@jniles
Copy link
Collaborator

jniles commented Nov 14, 2016

I'll take a look at this by disabling title accounts.

@jniles jniles self-assigned this Nov 14, 2016
jniles pushed a commit to jniles/bhima that referenced this issue Nov 14, 2016
This commit disables the title accounts on all voucher pages.  The title
accounts are still shown, but are disabled by checking the TITLE
bhConstant value.

It also does not allow a user to use the same account twice in a simple
voucher, as this would lead to an invalid transaction.

Closes IMA-WorldHealth#884.  Closes IMA-WorldHealth#896.
@sfount
Copy link
Contributor Author

sfount commented Nov 15, 2016

Disabled sounds good to me 👍 That still provides the title 'groups' context but does not allow the user to select accounts that cannot make up a transaction.

jniles pushed a commit to jniles/bhima that referenced this issue Nov 15, 2016
This commit disables the title accounts on all voucher pages.  The title
accounts are still shown, but are disabled by checking the TITLE
bhConstant value.

It also does not allow a user to use the same account twice in a simple
voucher, as this would lead to an invalid transaction.

Closes IMA-WorldHealth#884.  Closes IMA-WorldHealth#896.
@jniles
Copy link
Collaborator

jniles commented Nov 15, 2016

Cool. I've implemented it in #898.

@sfount
Copy link
Contributor Author

sfount commented Nov 15, 2016

@jnilles @IMA-WorldHealth/bhima-core Do you think that the posting journal server methods should reject a transaction that tries to use a title account or should this just be implemented by limiting the client?

I have no problem with limiting the client for now but I know there will always be a way until it is restricted on the server.

@jniles
Copy link
Collaborator

jniles commented Nov 15, 2016

@sfount, limiting on the server is a good idea.

Ideally, bhConstants should be shared between the server/client. I'm not sure how to do this yet.

jniles pushed a commit to jniles/bhima that referenced this issue Nov 18, 2016
This commit disables the title accounts on all voucher pages.  The title
accounts are still shown, but are disabled by checking the TITLE
bhConstant value.

It also does not allow a user to use the same account twice in a simple
voucher, as this would lead to an invalid transaction.

Closes IMA-WorldHealth#884.  Closes IMA-WorldHealth#896.
sfount pushed a commit that referenced this issue Nov 19, 2016
This commit disables the title accounts on all voucher pages.  The title
accounts are still shown, but are disabled by checking the TITLE
bhConstant value.

It also does not allow a user to use the same account twice in a simple
voucher, as this would lead to an invalid transaction.

Closes #884.  Closes #896.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants