Skip to content

Commit

Permalink
Merge pull request #41924 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-41922

fix: duplicate rows fetching in RFQ (backport #41922)
  • Loading branch information
rohitwaghchaure authored Jun 17, 2024
2 parents e3539ac + c159e3b commit ecb8897
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion erpnext/public/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ecb8897

Please sign in to comment.