Minor fix, if no default company
This commit is contained in:
@@ -71,7 +71,7 @@ $.extend(erpnext.queries, {
|
|||||||
|
|
||||||
warehouse: function(doc) {
|
warehouse: function(doc) {
|
||||||
return {
|
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() {
|
set_default_account: function() {
|
||||||
var me = this;
|
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";
|
var account_for = "stock_adjustment_account";
|
||||||
|
|
||||||
if (this.frm.doc.purpose == "Purchase Return")
|
if (this.frm.doc.purpose == "Purchase Return")
|
||||||
|
|||||||
Reference in New Issue
Block a user