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: incorrect paid_amount and exchange rate in Payment Entry #35107

Conversation

ruthra-kumar
Copy link
Member

WithCash and Bank account unset in Company master and Party has Default Company Bank Account. In such cases, creating Payment against a Sales/Purchase Invoice has incorrect paid/received amount and the exchange rate is not fetched.
Fixing in this PR.

Company master:
Screenshot 2023-04-30 at 1 14 36 PM

Customer master:
Screenshot 2023-04-30 at 1 16 40 PM

Invoice in foreign currency for above party:
Screenshot 2023-04-30 at 1 17 23 PM

before fix - Incorrect exchange rate and amount:
Screenshot 2023-04-30 at 1 17 34 PM

after fix:
Screenshot 2023-04-30 at 1 18 11 PM

If Company master has no default cash or bank account set but Party has
default company bank account set. In this case, paid_amount and
conversion rate are not calculated correctly
@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Apr 30, 2023
@codecov
Copy link

codecov bot commented Apr 30, 2023

Codecov Report

Merging #35107 (1233553) into develop (04902e1) will decrease coverage by 0.01%.
The diff coverage is 77.77%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35107      +/-   ##
===========================================
- Coverage    63.69%   63.69%   -0.01%     
===========================================
  Files          813      813              
  Lines        60007    60029      +22     
===========================================
+ Hits         38221    38234      +13     
- Misses       21786    21795       +9     
Impacted Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 74.16% <77.77%> (-0.31%) ⬇️

... and 16 files with indirect coverage changes

@ruthra-kumar ruthra-kumar changed the title fix: incorrect paid_amount and exchange rate in PE fix: incorrect paid_amount and exchange rate in Payment Entry Apr 30, 2023
@ruthra-kumar ruthra-kumar marked this pull request as ready for review May 2, 2023 03:51
@ruthra-kumar ruthra-kumar merged commit 7e24215 into frappe:develop May 2, 2023
1 check passed
@ruthra-kumar ruthra-kumar added the backport version-14-hotfix backport to version 14 label May 2, 2023
ruthra-kumar added a commit that referenced this pull request May 2, 2023
…-35107

fix: incorrect paid_amount and exchange rate in Payment Entry (backport #35107)
@ruthra-kumar ruthra-kumar deleted the fix_incorrect_paid_amount_if_bank_cash_account_missing branch June 14, 2023 16:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant