Minor fix, if no default company
This commit is contained in:
parent
b0a8d000b1
commit
d5fd535909
@ -71,7 +71,7 @@ $.extend(erpnext.queries, {
|
||||
|
||||
warehouse: function(doc) {
|
||||
return {
|
||||
filters: [["Warehouse", "company", "in", ["", doc.company]]]
|
||||
filters: [["Warehouse", "company", "in", ["", cstr(doc.company)]]]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user