mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
remove presentation currency option from cashflow
This commit is contained in:
@@ -1,36 +1,13 @@
|
|||||||
// Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
// Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
const get_currencies = () => {
|
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||||
// frappe.db.get_list returns a Promise
|
frappe.query_reports["Cash Flow"] = $.extend({},
|
||||||
return frappe.db.get_list('GL Entry',
|
erpnext.financial_statements);
|
||||||
{
|
|
||||||
distinct: true,
|
|
||||||
fields:['account_currency'],
|
|
||||||
as_list: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const flatten = (array) => {
|
frappe.query_reports["Cash Flow"]["filters"].push({
|
||||||
return [].concat.apply([], array);
|
"fieldname": "accumulated_values",
|
||||||
}
|
"label": __("Accumulated Values"),
|
||||||
|
"fieldtype": "Check"
|
||||||
get_currencies().then(currency_list => flatten(currency_list)).then(currency_list => {
|
|
||||||
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
|
||||||
frappe.query_reports["Cash Flow"] = $.extend({},
|
|
||||||
erpnext.financial_statements);
|
|
||||||
|
|
||||||
frappe.query_reports["Cash Flow"]["filters"].push({
|
|
||||||
"fieldname": "accumulated_values",
|
|
||||||
"label": __("Accumulated Values"),
|
|
||||||
"fieldtype": "Check"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "presentation_currency",
|
|
||||||
"label": __("Currency"),
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"options": currency_list
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -51,9 +51,9 @@ def execute(filters=None):
|
|||||||
|
|
||||||
# compute net profit / loss
|
# compute net profit / loss
|
||||||
income = get_data(filters.company, "Income", "Credit", period_list,
|
income = get_data(filters.company, "Income", "Credit", period_list,
|
||||||
accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True, filters=filters)
|
accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True)
|
||||||
expense = get_data(filters.company, "Expense", "Debit", period_list,
|
expense = get_data(filters.company, "Expense", "Debit", period_list,
|
||||||
accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True, filters=filters)
|
accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True)
|
||||||
|
|
||||||
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
|
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user