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

fix: cannot create reverse journal entry #29125

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

nextchamp-saqib
Copy link
Member

@nextchamp-saqib nextchamp-saqib commented Jan 4, 2022

While creating a Reverse Journal Entry, the Reference field under the Accounts table was set as the Original Journal Entry's name.

Consider a case where a Sales Invoice was reconciled with a JV and then this JV is reversed, then due to the reference under the Accounts not being set as Sales Invoice, the outstanding of the Sales Invoice will not be updated.

This PR fixes the reference field and also adds a field "Reversal Of" to store the original journal entry's reference


Fixes #26425

@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #29125 (3aa1817) into develop (650b388) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #29125      +/-   ##
===========================================
- Coverage    55.76%   55.72%   -0.04%     
===========================================
  Files         1131     1131              
  Lines        67550    67587      +37     
===========================================
- Hits         37669    37665       -4     
- Misses       29881    29922      +41     
Impacted Files Coverage Δ
...xt/accounts/doctype/journal_entry/journal_entry.py 68.13% <100.00%> (-0.05%) ⬇️
erpnext/utilities/product.py 14.70% <0.00%> (-35.30%) ⬇️
erpnext/shopping_cart/product_info.py 30.30% <0.00%> (-21.22%) ⬇️
...e/asset_value_adjustment/asset_value_adjustment.py 86.04% <0.00%> (-3.49%) ⬇️
...t/product_bundle_balance/product_bundle_balance.py 79.54% <0.00%> (-2.28%) ⬇️
...e/shopping_cart_settings/shopping_cart_settings.py 65.38% <0.00%> (-1.93%) ⬇️
...eorder_level/itemwise_recommended_reorder_level.py 92.45% <0.00%> (-1.89%) ⬇️
.../hr/doctype/upload_attendance/upload_attendance.py 44.69% <0.00%> (-1.52%) ⬇️
erpnext/shopping_cart/product_query.py 61.19% <0.00%> (-1.50%) ⬇️
erpnext/stock/reorder_item.py 76.92% <0.00%> (-0.86%) ⬇️
... and 21 more

@nextchamp-saqib nextchamp-saqib added needs-tests This PR needs automated unit-tests. backport version-13-hotfix and removed needs-tests This PR needs automated unit-tests. labels Jan 4, 2022
@deepeshgarg007
Copy link
Member

@Mergifyio backport version-13-hotfix

@deepeshgarg007 deepeshgarg007 merged commit 80dce1a into frappe:develop Jan 6, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 6, 2022

backport version-13-hotfix

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Jan 6, 2022
…-29125

fix: cannot create reverse journal entry (backport #29125)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reverse Journal Entry
2 participants