fix: check if shipping rule value exists
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index 8cca7dd..1b192b7 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -259,7 +259,7 @@
self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"])
- if hasattr(self.doc, "shipping_rule"):
+ if hasattr(self.doc, "shipping_rule") and self.doc.shipping_rule:
shipping_rule = frappe.get_doc("Shipping Rule", self.doc.shipping_rule)
shipping_rule.apply(self.doc)