[fix] [minor] use wn.defaults.get_default instead of sys_defaults

This commit is contained in:
Anand Doshi 2013-07-26 13:02:18 +05:30
parent 2b518e37e5
commit 5491332772
14 changed files with 16 additions and 16 deletions

View File

@ -80,7 +80,7 @@ pscript['onload_Accounts Browser'] = function(wrapper){
$.each(r.message, function(i, v) {
$('<option>').html(v).attr('value', v).appendTo(wrapper.$company_select);
});
wrapper.$company_select.val(sys_defaults.company || r[0]).change();
wrapper.$company_select.val(wn.defaults.get_default("company") || r[0]).change();
}
});
}

View File

@ -5,7 +5,7 @@ wn.query_reports["Accounts Payable"] = {
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
},
{
"fieldname":"account",

View File

@ -5,7 +5,7 @@ wn.query_reports["Accounts Receivable"] = {
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
},
{
"fieldname":"account",

View File

@ -19,7 +19,7 @@ wn.query_reports["Budget Variance Report"] = {
label: "Company",
fieldtype: "Link",
options: "Company",
default: sys_defaults.company
default: wn.defaults.get_default("company")
},
]
}

View File

@ -36,7 +36,7 @@ wn.query_reports["Payment Collection With Ageing"] = {
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
},
]
}

View File

@ -34,7 +34,7 @@ wn.query_reports["Payment Made With Ageing"] = {
label: "Company",
fieldtype: "Link",
options: "Company",
default: sys_defaults.company
default: wn.defaults.get_default("company")
},
]
}

View File

@ -4,7 +4,7 @@ wn.query_reports["Sales Register"] = {
"fieldname":"from_date",
"label": "From Date",
"fieldtype": "Date",
"default": wn.defaults.get_user_default("year_start_date"),
"default": wn.defaults.get_default("year_start_date"),
"width": "80"
},
{
@ -36,7 +36,7 @@ wn.query_reports["Sales Register"] = {
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
}
]
}

View File

@ -26,7 +26,7 @@ wn.query_reports["Monthly Attendance Sheet"] = {
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
}
]
}

View File

@ -26,7 +26,7 @@ wn.query_reports["Monthly Salary Register"] = {
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
}
]
}

View File

@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.onload = function(doc, cdt, cdn) {
doc.company = sys_defaults.company;
doc.company = wn.defaults.get_default("company");
refresh_field("company");
}

View File

@ -33,7 +33,7 @@ var get_filters = function(){
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
},
];
}

View File

@ -33,7 +33,7 @@ var get_filters = function(){
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
"default": wn.defaults.get_default("company")
},
];
}

View File

@ -31,8 +31,8 @@ erpnext.selling.Opportunity = wn.ui.form.Controller.extend({
set_multiple(cdt,cdn,{status:'Draft'});
if(!this.frm.doc.date)
this.frm.doc.transaction_date = date.obj_to_str(new Date());
if(!this.frm.doc.company && sys_defaults.company)
set_multiple(cdt,cdn,{company:sys_defaults.company});
if(!this.frm.doc.company && wn.defaults.get_default("company"))
set_multiple(cdt,cdn,{company:wn.defaults.get_default("company")});
if(!this.frm.doc.fiscal_year && sys_defaults.fiscal_year)
set_multiple(cdt,cdn,{fiscal_year:sys_defaults.fiscal_year});

View File

@ -30,7 +30,7 @@ wn.query_reports["Sales Person-wise Transaction Summary"] = {
label: "Company",
fieldtype: "Link",
options: "Company",
default: sys_defaults.company
default: wn.defaults.get_default("company")
},
{
fieldname:"item_group",