Merge pull request #52806 from frappe/mergify/bp/version-16-hotfix/pr-52804

fix(Purchase Receipt): copy project from first row when adding items (backport #52804)
This commit is contained in:
Mihir Kandoi
2026-02-19 14:03:27 +05:30
committed by GitHub

View File

@@ -365,6 +365,15 @@ erpnext.stock.PurchaseReceiptController = class PurchaseReceiptController extend
apply_putaway_rule() {
if (this.frm.doc.apply_putaway_rule) erpnext.apply_putaway_rule(this.frm);
}
items_add(doc, cdt, cdn) {
const row = frappe.get_doc(cdt, cdn);
this.frm.script_manager.copy_from_first_row("items", row, [
"expense_account",
"cost_center",
"project",
]);
}
};
// for backward compatibility: combine new and previous states