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 add deductions in internal transfer payment entry #27545

Merged
merged 3 commits into from
Oct 12, 2021

Conversation

nextchamp-saqib
Copy link
Member

@nextchamp-saqib nextchamp-saqib commented Sep 16, 2021

Due to recent changes from 7141860, the received_amount was being set as paid_amount even if there were deductions such as transfer fees was added to the payment entry.

To replicate the issue:

  • Create a Payment Entry of type Internal Transfer
  • Set From & To account
  • Set Paid Amount as 1000 and Received Amount as 900
  • Add a new row to the Deductions table and set Account, Cost Center & Amount as 100
  • Now save the payment entry
  • You should see that Received Amount has been set as Paid Amount and Difference Amount is -100

Expected Behaviour:

  • The Received Amount should have been 900 since there has been a transfer fee deduction added manually.

  • Test Case

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #27545 (3b9514d) into develop (065a2ce) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #27545      +/-   ##
===========================================
- Coverage    54.49%   54.46%   -0.04%     
===========================================
  Files         1248     1254       +6     
  Lines        67515    67745     +230     
===========================================
+ Hits         36793    36894     +101     
- Misses       30722    30851     +129     
Impacted Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 69.67% <100.00%> (+0.08%) ⬆️
...ctype/woocommerce_settings/woocommerce_settings.py 80.39% <0.00%> (-3.93%) ⬇️
...e/asset_value_adjustment/asset_value_adjustment.py 87.80% <0.00%> (-3.66%) ⬇️
erpnext/shopping_cart/utils.py 32.14% <0.00%> (-3.58%) ⬇️
...value/warehouse_wise_item_balance_age_and_value.py 92.59% <0.00%> (-2.47%) ⬇️
erpnext/hr/doctype/staffing_plan/staffing_plan.py 91.13% <0.00%> (-2.20%) ⬇️
erpnext/stock/report/stock_ageing/stock_ageing.py 91.36% <0.00%> (-2.16%) ⬇️
...s/doctype/promotional_scheme/promotional_scheme.py 96.00% <0.00%> (-1.92%) ⬇️
...ement/doctype/loan_application/loan_application.py 64.88% <0.00%> (-1.01%) ⬇️
erpnext/accounts/deferred_revenue.py 75.22% <0.00%> (-0.89%) ⬇️
... and 46 more

@stale
Copy link

stale bot commented Oct 1, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within a week if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Oct 1, 2021
@deepeshgarg007
Copy link
Member

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Oct 12, 2021

Command backport version-13-hotfix: pending

backport version-13-hotfix is pending

@mergify
Copy link
Contributor

mergify bot commented Oct 12, 2021

Command backport version-13-hotfix: success

Backports have been created

AfshanKhan added a commit that referenced this pull request Oct 14, 2021
#27545) (#27930)

* fix: cannot add deductions in internal transfer payment entry

(cherry picked from commit 1b7414e)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py

* fix: Update message string

(cherry picked from commit 3b9514d)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py

* fix: conflicts

Co-authored-by: Saqib Ansari <nextchamp.saqib@gmail.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
…-fix

fix: cannot add deductions in internal transfer payment entry
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.

None yet

2 participants