Hi
Is there any way we can stop draft print for only Sales Invoice? we do not want to use global print setting to stop draft print. Kindy advise.
Thanks.
Please Try this code
frappe.ui.form.on('Sales Invoice', {
refresh(frm) {
if (frm.doc.docstatus == 1) {
$("button[data-original-title=Print]").show();
}else{
$("button[data-original-title=Print]").hide();
}
}
});
2 Likes
Noted, thanks.