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: fetch currency in discount accounting SI #36889

Conversation

GursheenK
Copy link
Member

Problem
When using Discount Accounting, if a Sales Invoice is created using a different currency instead of the default currency for that company, the GL entries created consider the SI currency for the discount account but the company default currency for all other accounts. This leads to a mismatch in the total debit and total credit values and the SI cannot be submitted.

Solution
Use the base_discount_amount instead of the discount_amount in the GL entry for Discount Accounting.

Closes #36529

@github-actions github-actions bot added accounts needs-tests This PR needs automated unit-tests. labels Aug 31, 2023
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #36889 (112cfe6) into develop (cd74c6c) will increase coverage by 0.00%.
Report is 2 commits behind head on develop.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop   #36889   +/-   ##
========================================
  Coverage    65.42%   65.42%           
========================================
  Files          794      794           
  Lines        62194    62194           
========================================
+ Hits         40690    40693    +3     
+ Misses       21504    21501    -3     
Files Changed Coverage
erpnext/controllers/accounts_controller.py ø

@deepeshgarg007 deepeshgarg007 added the backport version-14-hotfix backport to version 14 label Sep 1, 2023
@deepeshgarg007 deepeshgarg007 merged commit 1e72a43 into frappe:develop Sep 1, 2023
14 checks passed
deepeshgarg007 added a commit that referenced this pull request Sep 1, 2023
…-36889

fix: fetch currency in discount accounting SI (#36889)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accounts 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.

Dsicount Account Option in selling
2 participants