fix: duplicate rows fetching in RFQ

(cherry picked from commit 555510c128)
This commit is contained in:
Rohit Waghchaure
2024-06-17 12:48:33 +05:30
committed by Mergify
parent 9771bbdb75
commit c159e3b06f

View File

@@ -933,7 +933,13 @@ erpnext.utils.map_current_doc = function (opts) {
frappe.msgprint(__("Please select {0}", [opts.source_doctype]));
return;
}
opts.source_name = values;
if (values.constructor === Array) {
opts.source_name = [...new Set(values)];
} else {
opts.source_name = values;
}
if (
opts.allow_child_item_selection ||
["Purchase Receipt", "Delivery Note"].includes(opts.source_doctype)