mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 04:15:10 +00:00
fix(india): e-invoice eligibility if company gstin is not configured (#31247)
(cherry picked from commit fb4f8d870b)
This commit is contained in:
@@ -56,6 +56,9 @@ def validate_eligibility(doc):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
invalid_company = not frappe.db.get_value("E Invoice User", {"company": doc.get("company")})
|
invalid_company = not frappe.db.get_value("E Invoice User", {"company": doc.get("company")})
|
||||||
|
invalid_company_gstin = not frappe.db.get_value(
|
||||||
|
"E Invoice User", {"gstin": doc.get("company_gstin")}
|
||||||
|
)
|
||||||
invalid_supply_type = doc.get("gst_category") not in [
|
invalid_supply_type = doc.get("gst_category") not in [
|
||||||
"Registered Regular",
|
"Registered Regular",
|
||||||
"Registered Composition",
|
"Registered Composition",
|
||||||
@@ -72,6 +75,7 @@ def validate_eligibility(doc):
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
invalid_company
|
invalid_company
|
||||||
|
or invalid_company_gstin
|
||||||
or invalid_supply_type
|
or invalid_supply_type
|
||||||
or company_transaction
|
or company_transaction
|
||||||
or no_taxes_applied
|
or no_taxes_applied
|
||||||
|
|||||||
Reference in New Issue
Block a user