Merge pull request #16992 from hrwX/cost_center

fix(Purchase Invoice): Cost Centre as per company
This commit is contained in:
Nabin Hait 2019-04-04 11:43:35 +05:30 committed by GitHub
commit 9eeb3715f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -468,7 +468,7 @@ cur_frm.fields_dict["items"].grid.get_field("cost_center").get_query = function(
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;