Skip to content

Commit 0a56647

Browse files
harrishragavanmergify[bot]
authored andcommitted
fix(shipment): user contact validation to use full name
(cherry picked from commit 3c6eb9a)
1 parent c2f666b commit 0a56647

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

erpnext/stock/doctype/shipment/shipment.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ frappe.ui.form.on("Shipment", {
261261
frappe.db.get_value(
262262
"User",
263263
{ name: frappe.session.user },
264-
["full_name", "last_name", "email", "phone", "mobile_no"],
264+
["full_name", "email", "phone", "mobile_no"],
265265
(r) => {
266-
if (!(r.last_name && r.email && (r.phone || r.mobile_no))) {
266+
if (!(r.full_name && r.email && (r.phone || r.mobile_no))) {
267267
if (delivery_type == "Delivery") {
268268
frm.set_value("delivery_company", "");
269269
frm.set_value("delivery_contact", "");
@@ -272,9 +272,9 @@ frappe.ui.form.on("Shipment", {
272272
frm.set_value("pickup_contact", "");
273273
}
274274
frappe.throw(
275-
__("Last Name, Email or Phone/Mobile of the user are mandatory to continue.") +
275+
__("Full Name, Email or Phone/Mobile of the user are mandatory to continue.") +
276276
"</br>" +
277-
__("Please first set Last Name, Email and Phone for the user") +
277+
__("Please first set Full Name, Email and Phone for the user") +
278278
` <a href="/app/user/${frappe.session.user}">${frappe.session.user}</a>`
279279
);
280280
}

0 commit comments

Comments
 (0)