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: Reverse provisional entries on Purchase Invoice cancel #31233

Merged

Conversation

deepeshgarg007
Copy link
Member

@deepeshgarg007 deepeshgarg007 commented Jun 5, 2022

For context read https://docs.erpnext.com/docs/v13/user/manual/en/accounts/purchase-invoice#45-provisional-accounting-for-expenses-only-for-non-stock-items

On cancellation of Purchase Invoice against a service Purchase Receipt, the provisional entries posted against the Purchase Receipt were not getting canceled and on amending the Purchase Invoice against reverse provisional entries were passed due to which the balances went off

To avoid this simply cancel reversal entries on Purchase Invoice cancel

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jun 5, 2022
@codecov
Copy link

codecov bot commented Jun 5, 2022

Codecov Report

Merging #31233 (dc8e80e) into develop (77dcdff) will increase coverage by 0.34%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #31233      +/-   ##
===========================================
+ Coverage    63.25%   63.60%   +0.34%     
===========================================
  Files          986      986              
  Lines        67372    67444      +72     
===========================================
+ Hits         42619    42900     +281     
+ Misses       24753    24544     -209     
Impacted Files Coverage Δ
...ounts/doctype/purchase_invoice/purchase_invoice.py 82.58% <100.00%> (+0.10%) ⬆️
...rial_no_valuation/incorrect_serial_no_valuation.py 85.96% <0.00%> (-10.53%) ⬇️
...unts/report/purchase_register/purchase_register.py 71.71% <0.00%> (-6.58%) ⬇️
...e_purchase_register/item_wise_purchase_register.py 74.25% <0.00%> (-3.97%) ⬇️
...e_sales_analytics/supplier_wise_sales_analytics.py 86.88% <0.00%> (-3.28%) ⬇️
erpnext/hr/doctype/shift_type/shift_type.py 86.41% <0.00%> (-2.47%) ⬇️
...value/warehouse_wise_item_balance_age_and_value.py 89.02% <0.00%> (-2.44%) ⬇️
erpnext/stock/reorder_item.py 73.33% <0.00%> (-0.84%) ⬇️
erpnext/stock/report/stock_ledger/stock_ledger.py 84.92% <0.00%> (-0.80%) ⬇️
erpnext/stock/doctype/batch/batch.py 83.33% <0.00%> (-0.62%) ⬇️
... and 35 more

@deepeshgarg007
Copy link
Member Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Jun 7, 2022

backport version-13-hotfix

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Jun 7, 2022
…-31233

fix: Reverse provisional entries on Purchase Invoice cancel (backport #31233)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant