refactor: standardize cost_center updation across transactions

This commit is contained in:
Navin-S-R
2025-12-12 14:25:08 +05:30
parent 3c032e1f35
commit c28f6f1856
4 changed files with 2 additions and 25 deletions

View File

@@ -1241,12 +1241,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
this.frm.refresh_field("payment_schedule");
}
cost_center(doc) {
this.frm.doc.items.forEach((item) => {
item.cost_center = doc.cost_center;
});
this.frm.refresh_field("items");
cost_center(doc, cdt, cdn) {
erpnext.utils.copy_value_in_all_rows(doc, cdt, cdn, "items", "cost_center");
}
due_date(doc, cdt, cdn) {