Set expense account in stock reco only if company available

This commit is contained in:
Nabin Hait 2015-09-07 10:45:15 +05:30
parent 4df98d52c1
commit f44128f81c

View File

@ -36,7 +36,7 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
set_default_expense_account: function() {
var me = this;
if(this.frm.doc.company) {
if (sys_defaults.auto_accounting_for_stock && !this.frm.doc.expense_account) {
return this.frm.call({
method: "erpnext.accounts.utils.get_company_default",
@ -51,6 +51,7 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
}
});
}
}
},
setup: function() {