Merge pull request #22614 from deepeshgarg007/payment_reco_cost_center_fix
fix: Add default cost center in payment reconciliation JV
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
index 97aa922..5cd8e6f 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
@@ -1,4 +1,5 @@
{
+ "actions": "",
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2016-02-25 01:24:07.224790",
@@ -28,7 +29,6 @@
"letter_head",
"more_info",
"status",
- "fiscal_year",
"column_break3",
"amended_from"
],
@@ -219,17 +219,6 @@
"search_index": 1
},
{
- "fieldname": "fiscal_year",
- "fieldtype": "Link",
- "label": "Fiscal Year",
- "oldfieldname": "fiscal_year",
- "oldfieldtype": "Select",
- "options": "Fiscal Year",
- "print_hide": 1,
- "reqd": 1,
- "search_index": 1
- },
- {
"fieldname": "column_break3",
"fieldtype": "Column Break"
},
@@ -245,7 +234,8 @@
],
"icon": "fa fa-shopping-cart",
"is_submittable": 1,
- "modified": "2019-09-24 15:08:32.750661",
+ "links": [],
+ "modified": "2020-06-25 14:37:21.140194",
"modified_by": "Administrator",
"module": "Buying",
"name": "Request for Quotation",
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index a044e1d..8c6a9cf 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -29,10 +29,16 @@
filters: filters
};
})
- },
- refresh: function (frm) {
- frm.set_query("parent_task", { "is_group": 1 });
+ frm.set_query("parent_task", function () {
+ let filters = {
+ "is_group": 1
+ };
+ if (frm.doc.project) filters["project"] = frm.doc.project;
+ return {
+ filters: filters
+ }
+ });
},
is_group: function (frm) {
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index 05ffa87..961b8c6 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -458,19 +458,23 @@
@frappe.whitelist()
def download_ewb_json():
- data = frappe._dict(frappe.local.form_dict)
-
- frappe.local.response.filecontent = json.dumps(data['data'], indent=4, sort_keys=True)
+ data = json.loads(frappe.local.form_dict.data)
+ frappe.local.response.filecontent = json.dumps(data, indent=4, sort_keys=True)
frappe.local.response.type = 'download'
- billList = json.loads(data['data'])['billLists']
+ filename_prefix = 'Bulk'
+ docname = frappe.local.form_dict.docname
+ if docname:
+ if docname.startswith('['):
+ docname = json.loads(docname)
+ if len(docname) == 1:
+ docname = docname[0]
- if len(billList) > 1:
- doc_name = 'Bulk'
- else:
- doc_name = data['docname']
+ if not isinstance(docname, list):
+ # removes characters not allowed in a filename (https://stackoverflow.com/a/38766141/4767738)
+ filename_prefix = re.sub('[^\w_.)( -]', '', docname)
- frappe.local.response.filename = '{0}_e-WayBill_Data_{1}.json'.format(doc_name, frappe.utils.random_string(5))
+ frappe.local.response.filename = '{0}_e-WayBill_Data_{1}.json'.format(filename_prefix, frappe.utils.random_string(5))
@frappe.whitelist()
def get_gstins_for_company(company):
diff --git a/erpnext/regional/report/datev/datev.js b/erpnext/regional/report/datev/datev.js
index d8638ab..55f12cf 100644
--- a/erpnext/regional/report/datev/datev.js
+++ b/erpnext/regional/report/datev/datev.js
@@ -30,7 +30,7 @@
}
],
onload: function(query_report) {
- query_report.page.add_inner_button("Download DATEV Export", () => {
+ query_report.page.add_menu_item(__("Download DATEV File"), () => {
const filters = JSON.stringify(query_report.get_values());
window.open(`/api/method/erpnext.regional.report.datev.datev.download_datev_csv?filters=${filters}`);
});