Merge pull request #25759 from nextchamp-saqib/einvoicing-fix-7
fix: cannot bypass e-invoicing for non gst item invoices
This commit is contained in:
commit
b63cc307cc
@ -43,8 +43,9 @@ def validate_eligibility(doc):
|
|||||||
invalid_supply_type = doc.get('gst_category') not in ['Registered Regular', 'SEZ', 'Overseas', 'Deemed Export']
|
invalid_supply_type = doc.get('gst_category') not in ['Registered Regular', 'SEZ', 'Overseas', 'Deemed Export']
|
||||||
company_transaction = doc.get('billing_address_gstin') == doc.get('company_gstin')
|
company_transaction = doc.get('billing_address_gstin') == doc.get('company_gstin')
|
||||||
no_taxes_applied = not doc.get('taxes')
|
no_taxes_applied = not doc.get('taxes')
|
||||||
|
has_non_gst_item = any(d for d in doc.get('items') if d.get('is_non_gst'))
|
||||||
|
|
||||||
if invalid_company or invalid_supply_type or company_transaction or no_taxes_applied:
|
if invalid_company or invalid_supply_type or company_transaction or no_taxes_applied or has_non_gst_item:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user