diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 698c373866..5f1e7d4243 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -204,7 +204,7 @@ doc_events = { 'Address': { 'validate': 'erpnext.regional.india.utils.validate_gstin_for_india' }, - ('Sales Invoice', 'Purchase Invoice'): { + ('Sales Invoice', 'Purchase Invoice', 'Delivery Note'): { 'validate': 'erpnext.regional.india.utils.set_place_of_supply' } } diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 1b912183b1..fb2fabace4 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -64,7 +64,7 @@ def get_itemised_tax_breakup_data(doc): def set_place_of_supply(doc, method): if not frappe.get_meta('Address').has_field('gst_state'): return - if doc.doctype == "Sales Invoice": + if doc.doctype in ("Sales Invoice", "Delivery Note"): address_name = doc.shipping_address_name or doc.customer_address elif doc.doctype == "Purchase Invoice": address_name = doc.shipping_address or doc.supplier_address