refactor: merge taxes from delivery note to Sales Invoice

(cherry picked from commit 550cbbd91c)
This commit is contained in:
ruthra kumar
2024-04-01 16:25:35 +05:30
committed by Mergify
parent 1eb720a7b0
commit 22b16a6b0e
4 changed files with 47 additions and 36 deletions

View File

@@ -819,7 +819,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",
@@ -845,7 +845,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;
}