fix: Missing args while fetching items from delivery note

This commit is contained in:
Nabin Hait
2024-04-22 16:28:31 +05:30
parent 7286df86c5
commit bbe323fbb4
2 changed files with 9 additions and 6 deletions

View File

@@ -907,11 +907,14 @@ erpnext.utils.map_current_doc = function (opts) {
if (opts.source_doctype) {
let data_fields = [];
if (["Purchase Receipt", "Delivery Note"].includes(opts.source_doctype)) {
data_fields.push({
fieldname: "merge_taxes",
fieldtype: "Check",
label: __("Merge taxes from multiple documents"),
});
let target_meta = frappe.get_meta(cur_frm.doc.doctype);
if (target_meta.fields.find((f) => f.fieldname === "taxes")) {
data_fields.push({
fieldname: "merge_taxes",
fieldtype: "Check",
label: __("Merge taxes from multiple documents"),
});
}
}
const d = new frappe.ui.form.MultiSelectDialog({
doctype: opts.source_doctype,

View File

@@ -1093,7 +1093,7 @@ def make_delivery_trip(source_name, target_doc=None):
@frappe.whitelist()
def make_installation_note(source_name, target_doc=None):
def make_installation_note(source_name, target_doc=None, kwargs=None):
def update_item(obj, target, source_parent):
target.qty = flt(obj.qty) - flt(obj.installed_qty)
target.serial_no = obj.serial_no