Merge pull request #52804 from marcramser/patch-6

fix(Purchase Receipt): copy project from first row when adding items
This commit is contained in:
Mihir Kandoi
2026-02-19 14:01:39 +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