fix(ux): ReferenceError: me is not defined Delivery Note
(cherry picked from commit 1b010add26)
This commit is contained in:
@@ -97,12 +97,12 @@ frappe.ui.form.on("Delivery Note", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (frm.doc.docstatus == 1 && !frm.doc.inter_company_reference) {
|
if (frm.doc.docstatus == 1 && !frm.doc.inter_company_reference) {
|
||||||
let internal = me.frm.doc.is_internal_customer;
|
let internal = frm.doc.is_internal_customer;
|
||||||
if (internal) {
|
if (internal) {
|
||||||
let button_label = (me.frm.doc.company === me.frm.doc.represents_company) ? "Internal Purchase Receipt" :
|
let button_label = (frm.doc.company === frm.doc.represents_company) ? "Internal Purchase Receipt" :
|
||||||
"Inter Company Purchase Receipt";
|
"Inter Company Purchase Receipt";
|
||||||
|
|
||||||
me.frm.add_custom_button(button_label, function() {
|
frm.add_custom_button(button_label, function() {
|
||||||
frappe.model.open_mapped_doc({
|
frappe.model.open_mapped_doc({
|
||||||
method: 'erpnext.stock.doctype.delivery_note.delivery_note.make_inter_company_purchase_receipt',
|
method: 'erpnext.stock.doctype.delivery_note.delivery_note.make_inter_company_purchase_receipt',
|
||||||
frm: frm,
|
frm: frm,
|
||||||
|
|||||||
Reference in New Issue
Block a user