Merge pull request #17131 from Anurag810/desk-fixes
fix: desk for selling module, sales invoice now avaialble at module page (WN-SUP41771).
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index ac2ce8e..6ca31e7 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -468,7 +468,7 @@
cur_frm.cscript.cost_center = function(doc, cdt, cdn){
var d = locals[cdt][cdn];
- if(d.idx == 1 && d.cost_center){
+ if(d.cost_center){
var cl = doc.items || [];
for(var i = 0; i < cl.length; i++){
if(!cl[i].cost_center) cl[i].cost_center = d.cost_center;
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index fa1b6df..1bfcd6f 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -1393,7 +1393,9 @@
},
callback: function(r) {
if(!r.exc) {
- me.frm.set_value("taxes", r.message);
+ for (let tax of r.message) {
+ me.frm.add_child("taxes", tax);
+ }
me.calculate_taxes_and_totals();
}
}