Merge pull request #22598 from AfshanKhan/fix-cost-center-option-for-expense-claim

fix: cost center should only show option of selected company
This commit is contained in:
rohitwaghchaure 2020-07-07 12:24:56 +05:30 committed by GitHub
commit 93732ae21b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,6 +113,14 @@ cur_frm.cscript.calculate_total_amount = function(doc,cdt,cdn){
cur_frm.cscript.calculate_total(doc,cdt,cdn);
};
cur_frm.fields_dict['cost_center'].get_query = function(doc) {
return {
filters: {
"company": doc.company
}
}
};
erpnext.expense_claim = {
set_title: function(frm) {
if (!frm.doc.task) {