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

Undo reversals when vouchers are deleted #2207

Closed
jniles opened this issue Oct 16, 2017 · 1 comment
Closed

Undo reversals when vouchers are deleted #2207

jniles opened this issue Oct 16, 2017 · 1 comment
Assignees
Labels

Comments

@jniles
Copy link
Collaborator

jniles commented Oct 16, 2017

With #2188, we gained the ability to delete records from the database tables. However, when a user deletes a voucher that is a reversal, it does not toggle the "reversed" flag on the underlying table. This means that cash payments and invoices are still marked as "reversed", even if the voucher has been deleted.

This is a corner case bug. It should be fixed as soon as possible.

@jniles jniles added the Bug label Oct 16, 2017
@jniles jniles self-assigned this Oct 19, 2017
@jniles
Copy link
Collaborator Author

jniles commented Oct 19, 2017

I'll take this one.

jniles added a commit to jniles/bhima that referenced this issue Oct 19, 2017
This commit updates the voucher delete method to undo the "reversal"
flag on the reversed record if the voucher has been removed.  It is
currently a naive method - simply attempt to remove the value if it is
present.  This can be improved in the future by checking the transaction
types first.

Closes IMA-WorldHealth#2207.
jniles added a commit to jniles/bhima that referenced this issue Oct 19, 2017
This commit updates the voucher delete method to undo the "reversal"
flag on the reversed record if the voucher has been removed.  It is
currently a naive method - simply attempt to remove the value if it is
present.  This can be improved in the future by checking the transaction
types first.

Closes IMA-WorldHealth#2207.
bors bot added a commit that referenced this issue Oct 20, 2017
2220: fix(vouchers): undo reversals on delete r=DedrickEnc a=jniles

This commit updates the voucher delete method to undo the "reversal"
flag on the reversed record if the voucher has been removed.  It is
currently a naive method - simply attempt to remove the value if it is
present.  This can be improved in the future by checking the transaction
types first.

Closes #2207.
@bors bors bot closed this as completed in #2220 Oct 20, 2017
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

1 participant