refactor: merge taxes from delivery note to Sales Invoice

This commit is contained in:
ruthra kumar
2024-04-01 16:25:35 +05:30
parent 8b9079d62e
commit 550cbbd91c
4 changed files with 47 additions and 36 deletions

View File

@@ -934,7 +934,7 @@ erpnext.utils.map_current_doc = function (opts) {
if (opts.source_doctype) {
let data_fields = [];
if (opts.source_doctype == "Purchase Receipt") {
if (["Purchase Receipt", "Delivery Note"].includes(opts.source_doctype)) {
data_fields.push({
fieldname: "merge_taxes",
fieldtype: "Check",
@@ -960,7 +960,10 @@ erpnext.utils.map_current_doc = function (opts) {
return;
}
opts.source_name = values;
if (opts.allow_child_item_selection || opts.source_doctype == "Purchase Receipt") {
if (
opts.allow_child_item_selection ||
["Purchase Receipt", "Delivery Note"].includes(opts.source_doctype)
) {
// args contains filtered child docnames
opts.args = args;
}