fix: inspection type when create a qc from dc

This commit is contained in:
Nihantra Patel
2024-04-15 17:46:21 +05:30
parent 760e341cd0
commit 098b62f0f6
3 changed files with 11 additions and 4 deletions

View File

@@ -2203,6 +2203,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
];
const me = this;
const inspection_type = ["Purchase Receipt", "Purchase Invoice", "Subcontracting Receipt"].includes(this.frm.doc.doctype)
? "Incoming" : "Outgoing";
const dialog = new frappe.ui.Dialog({
title: __("Select Items for Quality Inspection"),
size: "extra-large",
@@ -2214,7 +2216,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
args: {
doctype: me.frm.doc.doctype,
docname: me.frm.doc.name,
items: data.items
items: data.items,
inspection_type: inspection_type
},
freeze: true,
callback: function (r) {