mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-12 17:23:38 +00:00
fix(shipment): user contact validation to use full name
(cherry picked from commit 3c6eb9a531)
This commit is contained in:
@@ -261,9 +261,9 @@ frappe.ui.form.on("Shipment", {
|
||||
frappe.db.get_value(
|
||||
"User",
|
||||
{ name: frappe.session.user },
|
||||
["full_name", "last_name", "email", "phone", "mobile_no"],
|
||||
["full_name", "email", "phone", "mobile_no"],
|
||||
(r) => {
|
||||
if (!(r.last_name && r.email && (r.phone || r.mobile_no))) {
|
||||
if (!(r.full_name && r.email && (r.phone || r.mobile_no))) {
|
||||
if (delivery_type == "Delivery") {
|
||||
frm.set_value("delivery_company", "");
|
||||
frm.set_value("delivery_contact", "");
|
||||
@@ -272,9 +272,9 @@ frappe.ui.form.on("Shipment", {
|
||||
frm.set_value("pickup_contact", "");
|
||||
}
|
||||
frappe.throw(
|
||||
__("Last Name, Email or Phone/Mobile of the user are mandatory to continue.") +
|
||||
__("Full Name, Email or Phone/Mobile of the user are mandatory to continue.") +
|
||||
"</br>" +
|
||||
__("Please first set Last Name, Email and Phone for the user") +
|
||||
__("Please first set Full Name, Email and Phone for the user") +
|
||||
` <a href="/app/user/${frappe.session.user}">${frappe.session.user}</a>`
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user