Merge pull request #25988 from rohitwaghchaure/donot-copy-difference-account
fix: on click of duplicate button system has not copied the difference account
This commit is contained in:
commit
8975c5241e
@ -986,7 +986,10 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
|
||||
items_add: function(doc, cdt, cdn) {
|
||||
var row = frappe.get_doc(cdt, cdn);
|
||||
this.frm.script_manager.copy_from_first_row("items", row, ["expense_account", "cost_center"]);
|
||||
|
||||
if (!(row.expense_account && row.cost_center)) {
|
||||
this.frm.script_manager.copy_from_first_row("items", row, ["expense_account", "cost_center"]);
|
||||
}
|
||||
|
||||
if(!row.s_warehouse) row.s_warehouse = this.frm.doc.from_warehouse;
|
||||
if(!row.t_warehouse) row.t_warehouse = this.frm.doc.to_warehouse;
|
||||
|
Loading…
Reference in New Issue
Block a user