[aii] some fixes
This commit is contained in:
parent
30bd65a81b
commit
a477d41843
@ -362,6 +362,7 @@ cur_frm.set_query("income_account", "entries", function(doc) {
|
||||
})
|
||||
|
||||
// expense account
|
||||
if (sys_defaults.auto_inventory_accounting) {
|
||||
cur_frm.fields_dict['entries'].grid.get_field('expense_account').get_query = function(doc) {
|
||||
return {
|
||||
"query": "accounts.utils.get_account_list",
|
||||
@ -372,6 +373,7 @@ cur_frm.fields_dict['entries'].grid.get_field('expense_account').get_query = fun
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// warehouse in detail table
|
||||
//----------------------------
|
||||
|
||||
@ -63,7 +63,7 @@ cur_frm.fields_dict.payables_group.get_query = function(doc) {
|
||||
return 'SELECT `tabAccount`.name FROM `tabAccount` WHERE `tabAccount`.company = "'+doc.name+'" AND `tabAccount`.group_or_ledger = "Group" AND `tabAccount`.docstatus != 2 AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.name LIMIT 50';
|
||||
}
|
||||
|
||||
|
||||
if (sys_defaults.auto_inventory_accounting) {
|
||||
cur_frm.fields_dict["stock_in_hand_account"].get_query = function(doc) {
|
||||
return {
|
||||
"query": "accounts.utils.get_account_list",
|
||||
@ -109,3 +109,4 @@ cur_frm.fields_dict["stock_adjustment_cost_center"].get_query = function(doc) {
|
||||
"filters": {"company": doc.name}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -310,6 +310,8 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
||||
}
|
||||
}
|
||||
|
||||
if (sys_defaults.auto_inventory_accounting) {
|
||||
|
||||
cur_frm.cscript.expense_account = function(doc, cdt, cdn){
|
||||
var d = locals[cdt][cdn];
|
||||
if(d.expense_account) {
|
||||
@ -340,3 +342,4 @@ cur_frm.fields_dict.delivery_note_details.grid.get_field("cost_center").get_quer
|
||||
filters: { company_name: doc.company}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,7 +77,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
};
|
||||
|
||||
if (sys_defaults.auto_inventory_accounting) {
|
||||
this.frm.add_fetch("company", "expense_adjustment_account", "stock_adjustment_account");
|
||||
this.frm.add_fetch("company", "stock_adjustment_account", "expense_adjustment_account");
|
||||
|
||||
this.frm.fields_dict["expense_adjustment_account"].get_query = function() {
|
||||
return {
|
||||
|
||||
@ -41,8 +41,8 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
|
||||
setup: function() {
|
||||
var me = this;
|
||||
|
||||
this.frm.add_fetch("company", "expense_account", "stock_adjustment_account");
|
||||
if (sys_defaults.auto_inventory_accounting) {
|
||||
this.frm.add_fetch("company", "stock_adjustment_account", "expense_account");
|
||||
|
||||
this.frm.fields_dict["expense_account"].get_query = function() {
|
||||
return {
|
||||
@ -54,6 +54,7 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user