fix(india): e-invoice eligibility if company gstin is not configured (#31247)

This commit is contained in:
Saqib Ansari 2022-06-08 09:36:33 +05:30 committed by GitHub
parent f830b57fd4
commit fb4f8d870b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,9 @@ def validate_eligibility(doc):
return False
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 [
"Registered Regular",
"Registered Composition",
@ -71,6 +74,7 @@ def validate_eligibility(doc):
if (
invalid_company
or invalid_company_gstin
or invalid_supply_type
or company_transaction
or no_taxes_applied