feat: Merge taxes from mapped docs (#38346)

* feat: Merge taxes from mapped docs

* chore: ci failures
This commit is contained in:
Deepesh Garg
2023-12-27 22:37:01 +05:30
committed by GitHub
parent 4feecb69d8
commit 9b1c22250f
2 changed files with 48 additions and 7 deletions

View File

@@ -843,7 +843,7 @@ erpnext.utils.map_current_doc = function(opts) {
freeze_message: __("Mapping {0} ...", [opts.source_doctype]),
callback: function(r) {
if(!r.exc) {
var doc = frappe.model.sync(r.message);
frappe.model.sync(r.message);
cur_frm.dirty();
cur_frm.refresh();
}
@@ -870,6 +870,11 @@ erpnext.utils.map_current_doc = function(opts) {
target: opts.target,
date_field: opts.date_field || undefined,
setters: opts.setters,
data_fields: [{
fieldname: 'merge_taxes',
fieldtype: 'Check',
label: __('Merge taxes from multiple documents'),
}],
get_query: opts.get_query,
add_filters_group: 1,
allow_child_item_selection: opts.allow_child_item_selection,
@@ -883,10 +888,7 @@ erpnext.utils.map_current_doc = function(opts) {
return;
}
opts.source_name = values;
if (opts.allow_child_item_selection) {
// args contains filtered child docnames
opts.args = args;
}
opts.args = args;
d.dialog.hide();
_map();
},