[hot] fix quotation (#7039)

diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 59fdf70..97eca54 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -66,7 +66,8 @@
 			});
 		}
 
-		if(this.frm.fields_dict["packed_items"].grid.get_field('batch_no')) {
+		if(this.frm.fields_dict["packed_items"] &&
+			this.frm.fields_dict["packed_items"].grid.get_field('batch_no')) {
 			this.frm.set_query("batch_no", "packed_items", function(doc, cdt, cdn) {
 				return me.set_query_for_batch(doc, cdt, cdn)
 			});