mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
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:
39
public/js/purchase_trends_filters.js
Normal file
39
public/js/purchase_trends_filters.js
Normal 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
|
||||
},
|
||||
];
|
||||
}
|
||||
39
public/js/sales_trends_filters.js
Normal file
39
public/js/sales_trends_filters.js
Normal 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
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user