Merge branch 'responsive' of github.com:webnotes/erpnext into responsive

This commit is contained in:
Rushabh Mehta
2013-07-10 20:43:15 +05:30
72 changed files with 1246 additions and 435 deletions

View File

@@ -45,43 +45,48 @@ cur_frm.cscript.abbr = function(doc){
}
}
cur_frm.fields_dict.default_cash_account.get_query = cur_frm.fields_dict.default_bank_account.get_query;
cur_frm.fields_dict.default_bank_account.get_query = function(doc) {
return 'SELECT `tabAccount`.name, `tabAccount`.debit_or_credit, `tabAccount`.group_or_ledger FROM `tabAccount` WHERE `tabAccount`.company = "'+doc.name+'" AND `tabAccount`.group_or_ledger = "Ledger" AND `tabAccount`.docstatus != 2 AND `tabAccount`.account_type = "Bank or Cash" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.name LIMIT 50';
}
cur_frm.fields_dict.default_cash_account.get_query = function(doc) {
return 'SELECT `tabAccount`.name, `tabAccount`.debit_or_credit, `tabAccount`.group_or_ledger FROM `tabAccount` WHERE `tabAccount`.company = "'+doc.name+'" AND `tabAccount`.group_or_ledger = "Ledger" AND `tabAccount`.docstatus != 2 AND `tabAccount`.account_type = "Bank or Cash" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.name LIMIT 50';
return{
filters:{
'company': doc.name,
'group_or_ledger': "Ledger",
'account_type': "Bank or Cash"
}
}
}
cur_frm.fields_dict.payables_group.get_query = cur_frm.fields_dict.receivables_group.get_query;
cur_frm.fields_dict.receivables_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';
}
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';
return{
filters:{
'company': doc.name,
'group_or_ledger': "Group"
}
}
}
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",
"filters": {
"is_pl_account": "No",
"debit_or_credit": "Debit",
"company": doc.name
"company": doc.name,
'group_or_ledger': "Ledger"
}
}
}
cur_frm.fields_dict["stock_adjustment_account"].get_query = function(doc) {
return {
"query": "accounts.utils.get_account_list",
"filters": {
"is_pl_account": "Yes",
"debit_or_credit": "Debit",
"company": doc.name
"company": doc.name,
'group_or_ledger': "Ledger"
}
}
}
@@ -91,18 +96,17 @@ if (sys_defaults.auto_inventory_accounting) {
cur_frm.fields_dict["stock_received_but_not_billed"].get_query = function(doc) {
return {
"query": "accounts.utils.get_account_list",
"filters": {
"is_pl_account": "No",
"debit_or_credit": "Credit",
"company": doc.name
"company": doc.name,
'group_or_ledger': "Ledger"
}
}
}
cur_frm.fields_dict["stock_adjustment_cost_center"].get_query = function(doc) {
return {
"query": "accounts.utils.get_cost_center_list",
"filters": {"company": doc.name}
}
}