[Fix] Customer and Address blank if does not exist in Delivery Stops (#11895)

diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.js b/erpnext/stock/doctype/delivery_trip/delivery_trip.js
index 8477fa2..4091463 100644
--- a/erpnext/stock/doctype/delivery_trip/delivery_trip.js
+++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.js
@@ -104,9 +104,19 @@
 						if (r.message["shipping_address"]) {
 							frappe.model.set_value(cdt, cdn, "address", r.message["shipping_address"].parent);
 						}
+						else {
+							frappe.model.set_value(cdt, cdn, "address", '');
+						}
 						if (r.message["contact_person"]) {
 							frappe.model.set_value(cdt, cdn, "contact", r.message["contact_person"].parent);
 						}
+						else {
+							frappe.model.set_value(cdt, cdn, "contact", '');
+						}
+					}
+					else {
+						frappe.model.set_value(cdt, cdn, "address", '');
+						frappe.model.set_value(cdt, cdn, "contact", '');
 					}
 				}
 			});
diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.py b/erpnext/stock/doctype/delivery_trip/delivery_trip.py
index f81250f..b5de330 100644
--- a/erpnext/stock/doctype/delivery_trip/delivery_trip.py
+++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.py
@@ -166,11 +166,12 @@
 			delivery_notes = (delivery_stop_info.delivery_notes).split(",")
 			attachments = []
 			for delivery_note in delivery_notes:
+				default_print_format = frappe.get_value('Delivery Note', delivery_note, 'default_print_format')
 				attachments.append(
 					frappe.attach_print('Delivery Note',
 	 					 delivery_note,
 						 file_name="Delivery Note",
-						 print_format='Delivery Note'))
+						 print_format=default_print_format or "Standard"))
 
 		if not delivery_stop_info.notified_by_email and contact_info.email_id:
 			driver_info = frappe.db.get_value("Driver", driver, ["full_name", "cell_number"], as_dict=1)