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: Conversion rate validation for multi-currency invoices #31350

Merged

Conversation

deepeshgarg007
Copy link
Member

@deepeshgarg007 deepeshgarg007 commented Jun 14, 2022

There are some cases when the exchange rate API doesn't work and the exchange rate in multi-currency invoices is not fetched. In such cases, a multi-currency invoice is submitted with an exchange rate of 1.

There was already validation for this on Purchase Invoice, commodified it and added it on Sales Invoice as well.

@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #31350 (46e6c2c) into develop (ea28ed1) will increase coverage by 0.06%.
The diff coverage is 88.15%.

@@             Coverage Diff             @@
##           develop   #31350      +/-   ##
===========================================
+ Coverage    63.68%   63.75%   +0.06%     
===========================================
  Files          984      984              
  Lines        67573    67724     +151     
===========================================
+ Hits         43037    43179     +142     
- Misses       24536    24545       +9     
Impacted Files Coverage Δ
...ounts/doctype/purchase_invoice/purchase_invoice.py 83.48% <ø> (+<0.01%) ⬆️
...xt/accounts/doctype/payment_entry/payment_entry.py 69.38% <41.66%> (+0.28%) ⬆️
...ctype/payment_ledger_entry/payment_ledger_entry.py 76.36% <73.33%> (-13.64%) ⬇️
erpnext/controllers/accounts_controller.py 85.56% <83.33%> (-0.02%) ⬇️
...e/payment_reconciliation/payment_reconciliation.py 92.51% <93.61%> (+7.71%) ⬆️
erpnext/accounts/utils.py 73.53% <97.77%> (+3.21%) ⬆️
erpnext/accounts/doctype/gl_entry/gl_entry.py 69.10% <100.00%> (-3.00%) ⬇️
...xt/accounts/doctype/journal_entry/journal_entry.py 69.08% <100.00%> (+0.13%) ⬆️
...xt/accounts/doctype/sales_invoice/sales_invoice.py 78.41% <100.00%> (+0.10%) ⬆️
erpnext/accounts/general_ledger.py 94.61% <100.00%> (+0.02%) ⬆️
... and 25 more

@deepeshgarg007
Copy link
Member Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Jun 21, 2022

backport version-13-hotfix

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Jun 21, 2022
…-31350

fix: Conversion rate validation for multi-currency invoices (backport #31350)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accounts needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants