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

Conflicts:
	accounts/search_criteria/trend_analyzer/trend_analyzer.py
	buying/doctype/purchase_common/purchase_common.js
This commit is contained in:
Anand Doshi
2013-06-21 12:22:52 +05:30
57 changed files with 1572 additions and 95 deletions

View File

@@ -0,0 +1,39 @@
var get_filters = function(){
return [
{
"fieldname":"period",
"label": "Period",
"fieldtype": "Select",
"options": ["Monthly", "Quarterly", "Half-yearly", "Yearly"].join("\n"),
"default": "Monthly"
},
{
"fieldname":"based_on",
"label": "Based On",
"fieldtype": "Select",
"options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"),
"default": "Item"
},
{
"fieldname":"group_by",
"label": "Group By",
"fieldtype": "Select",
"options": ["Item", "Supplier"].join("\n"),
"default": ""
},
{
"fieldname":"fiscal_year",
"label": "Fiscal Year",
"fieldtype": "Link",
"options":'Fiscal Year',
"default": sys_defaults.fiscal_year
},
{
"fieldname":"company",
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
},
];
}

View File

@@ -0,0 +1,39 @@
var get_filters = function(){
return[
{
"fieldname":"period",
"label": "Period",
"fieldtype": "Select",
"options": ["Monthly", "Quarterly", "Half-yearly", "Yearly"].join("\n"),
"default": "Monthly"
},
{
"fieldname":"based_on",
"label": "Based On",
"fieldtype": "Select",
"options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"),
"default": "Item"
},
{
"fieldname":"group_by",
"label": "Group By",
"fieldtype": "Select",
"options": ["Item", "Customer"].join("\n"),
"default": ""
},
{
"fieldname":"fiscal_year",
"label": "Fiscal Year",
"fieldtype": "Link",
"options":'Fiscal Year',
"default": sys_defaults.fiscal_year
},
{
"fieldname":"company",
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"default": sys_defaults.company
},
];
}

View File

@@ -70,7 +70,7 @@ erpnext.TransactionController = wn.ui.form.Controller.extend({
},
company: function() {
if(this.frm.doc.company) {
if(this.frm.doc.company && this.frm.fields_dict.currency) {
var me = this;
var company_currency = this.get_company_currency();
$.each(["currency", "price_list_currency"], function(i, fieldname) {
@@ -87,6 +87,9 @@ erpnext.TransactionController = wn.ui.form.Controller.extend({
},
currency: function() {
if(this.frm.doc.currency === this.get_company_currency())
this.frm.set_value("conversion_rate", 1.0);
this.price_list_currency();
},