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

Cess Value not considered in Einvoicing India #30767

Closed
sumeetagra opened this issue Apr 21, 2022 · 3 comments · Fixed by #30799
Closed

Cess Value not considered in Einvoicing India #30767

sumeetagra opened this issue Apr 21, 2022 · 3 comments · Fixed by #30799
Labels

Comments

@sumeetagra
Copy link

Information about bug

Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 69, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 37, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 75, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1447, in call
return fn(*args, **newargs)
File "apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 1255, in get_einvoice
return make_einvoice(invoice)
File "apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 638, in make_einvoice
validate_totals(einvoice)
File "apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 560, in validate_totals
frappe.throw(
File "apps/frappe/frappe/init.py", line 503, in throw
msgprint(
File "apps/frappe/frappe/init.py", line 478, in msgprint
_raise_exception()
File "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.

Module

accounts

Version

ERPNext: v13.27.0 (version-13)

Frappe Framework: v13.26.1 (version-13)

Installation method

No response

Relevant log output / Stack trace / Full Error Message.

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 37, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 75, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1447, in call
    return fn(*args, **newargs)
  File "apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 1255, in get_einvoice
    return make_einvoice(invoice)
  File "apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 638, in make_einvoice
    validate_totals(einvoice)
  File "apps/erpnext/erpnext/regional/india/e_invoice/utils.py", line 560, in validate_totals
    frappe.throw(
  File "apps/frappe/frappe/__init__.py", line 503, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 478, in msgprint
    _raise_exception()
  File "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.
@sumeetagra sumeetagra added the bug label Apr 21, 2022
@nextchamp-saqib
Copy link
Member

@sumeetagra Hey, can you post the e-invoice JSON generated for this invoice? You can find it in the error log list

@sumeetagra
Copy link
Author

sumeetagra commented Apr 21, 2022 via email

@sumeetagra
Copy link
Author

sumeetagra commented Apr 21, 2022

Error
Total Item Value + Taxes - Discount is not equal to the Invoice Grand Total. Please check taxes / discounts for any correction.

Data:
{
"Version": "1.1",
"TranDtls": {
"TaxSch": "GST",
"SupTyp": "B2B",
"RegRev": "N"
},
"DocDtls": {
"Typ": "INV",
"No": "GI23/00012",
"Dt": "21/04/2022"
},
"SellerDtls": {
"Gstin": "27AAACG7196G1ZD",
"LglNm": "GOYAL IRON & STEEL (NAGPUR) PVT LTD",
"Loc": "NAGPUR",
"Pin": 440001,
"Stcd": "27",
"Addr1": "SG-1, GULMOHAR,",
"Addr2": "OPPO HISLOP COLLEGE, CIVIL LINES"
},
"BuyerDtls": {
"Gstin": "xxxxxxxxxxx",
"LglNm": "xxxxxxxxxxxxx",
"Addr1": "PLOT NO.180,181,182,272, BHIWANDI WADA ROAD ",
"Addr2": "VILLAGE GHONSA, MET NAKA , TALUKA WADA, DIST : PALGHAR",
"Loc": "WADA",
"Pin": 421303,
"Stcd": "27",
"Pos": "27"
},
"ItemList": [
{
"SlNo": "1",
"PrdDesc": "IMPORTED COAL",
"IsServc": "N",
"HsnCd": "2701",
"Unit": "MTS",
"Qty": 34.41,
"UnitPrice": 15500.0,
"TotAmt": 533355.0,
"Discount": 0.0,
"AssAmt": 533355.0,
"GstRt": 5.0,
"IgstAmt": 0.0,
"CgstAmt": 13333.88,
"SgstAmt": 13333.88,
"CesRt": 0.0,
"CesAmt": 0.0,
"CesNonAdvlAmt": 13764.0,
"OthChrg": 0.0,
"TotItemVal": 573786.75
}
],
"ValDtls": {
"AssVal": 533355.0,
"CgstVal": 13333.88,
"SgstVal": 13333.88,
"IgstVal": 0.0,
"CesVal": 13764.0,
"Discount": 0.0,
"RndOffAmt": 0.24,
"OthChrg": 0.0,
"TotInvVal": 573787.0,
"TotInvValFc": 573787.0
},
"EwbDtls": {
"TransName": "V00121",
"TransMode": "1",
"Distance": 0,
"TransDocNo": "0",
"TransDocDt": "21/04/2022",
"VehNo": "GJ15AV7815",
"VehType": "R"
}
}

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants