Minor fix, if no default company

This commit is contained in:
nabinhait 2014-07-14 12:39:50 +05:30
parent b0a8d000b1
commit d5fd535909
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ $.extend(erpnext.queries, {
warehouse: function(doc) {
return {
filters: [["Warehouse", "company", "in", ["", doc.company]]]
filters: [["Warehouse", "company", "in", ["", cstr(doc.company)]]]
}
}
});

View File

@ -92,7 +92,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
set_default_account: function() {
var me = this;
if(cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
if(cint(frappe.defaults.get_default("auto_accounting_for_stock")) && this.frm.doc.company) {
var account_for = "stock_adjustment_account";
if (this.frm.doc.purpose == "Purchase Return")