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(india): cess value not considered while validating e-invoice totals #30799

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

nextchamp-saqib
Copy link
Member

@nextchamp-saqib nextchamp-saqib commented Apr 25, 2022

Fix below error, when cess value is non-zero for an e-invoice

Exception:
Traceback (most recent call last):
File "/home/mariecurie/frappe-bench/apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 638, in make_einvoice
try:
File "/home/mariecurie/frappe-bench/apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 560, in validate_totals
if abs(flt(value_details["TotInvVal"]) - calculated_invoice_value) > 1:
File "/home/mariecurie/frappe-bench/apps/frappe/frappe/init.py", line 503, in throw
msgprint(
File "/home/mariecurie/frappe-bench/apps/frappe/frappe/init.py", line 478, in msgprint
_raise_exception()
File "/home/mariecurie/frappe-bench/apps/frappe/frappe/init.py", line 433, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Total Item Value + Taxes - Discount is not equal to the Invoice Grand Total. Please check taxes / discounts for any correction.

Fixes: #30767

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Apr 25, 2022
@nextchamp-saqib nextchamp-saqib added backport version-13-hotfix and removed needs-tests This PR needs automated unit-tests. labels Apr 25, 2022
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #30799 (8e6c7a6) into develop (5ac3e7e) will increase coverage by 0.19%.
The diff coverage is 75.75%.

@@             Coverage Diff             @@
##           develop   #30799      +/-   ##
===========================================
+ Coverage    61.34%   61.53%   +0.19%     
===========================================
  Files         1082     1079       -3     
  Lines        69377    69552     +175     
===========================================
+ Hits         42559    42800     +241     
+ Misses       26818    26752      -66     
Impacted Files Coverage Δ
erpnext/regional/india/setup.py 95.28% <ø> (ø)
erpnext/setup/install.py 0.00% <0.00%> (ø)
...deferred_accounting/process_deferred_accounting.py 77.77% <50.00%> (ø)
erpnext/regional/india/e_invoice/utils.py 42.25% <71.42%> (-0.28%) ⬇️
erpnext/controllers/accounts_controller.py 85.15% <90.00%> (+0.11%) ⬆️
erpnext/accounts/deferred_revenue.py 75.00% <100.00%> (-0.75%) ⬇️
...cy_exchange_settings/currency_exchange_settings.py 58.00% <100.00%> (-5.47%) ⬇️
erpnext/controllers/taxes_and_totals.py 97.54% <100.00%> (+<0.01%) ⬆️
...ext/manufacturing/doctype/work_order/work_order.py 78.31% <100.00%> (ø)
erpnext/regional/india/utils.py 64.86% <100.00%> (ø)
... and 92 more

@deepeshgarg007
Copy link
Member

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Apr 25, 2022

backport version-13-hotfix

✅ Backports have been created

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cess Value not considered in Einvoicing India
2 participants