diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 886ddd2acc0..b7706028114 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2776,8 +2776,14 @@ erpnext.apply_putaway_rule = (frm, purpose=null) => { erpnext.set_unit_price_items_note = (frm) => { if (frm.doc.has_unit_price_items && !frm.is_new()) { - frm.dashboard.set_headline_alert( - __("The {0} contains Unit Price Items with 0 Qty.", [__(frm.doc.doctype)]), + // Remove existing note + const $note = $(frm.layout.wrapper.find(".unit-price-items-note")); + if ($note.length) { $note.parent().remove(); } + + frm.layout.show_message( + `
+ ${__("The {0} contains Unit Price Items.", [__(frm.doc.doctype)])} +
`, "yellow", true );