diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index 5b68f1d2ab..9fefc03716 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -19,7 +19,13 @@

{%= __(report.report_name) %}

-

{%= filters.customer || filters.supplier %}

+

+ {% if (filters.customer_name) { %} + {%= filters.customer_name %} + {% } else { %} + {%= filters.customer || filters.supplier %} + {% } %} +

{% if (filters.tax_id) { %} {%= __("Tax Id: ")%} {%= filters.tax_id %} diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index f44ea448e7..3f9d167864 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -17,8 +17,9 @@ frappe.query_reports["Accounts Receivable"] = { "options": "Customer", on_change: () => { var customer = frappe.query_report_filters_by_name.customer.get_value(); - frappe.db.get_value('Customer', customer, "tax_id", function(value) { + frappe.db.get_value('Customer', customer, ["tax_id", "customer_name"], function(value) { frappe.query_report_filters_by_name.tax_id.set_value(value["tax_id"]); + frappe.query_report_filters_by_name.customer_name.set_value(value["customer_name"]); }); } }, @@ -81,6 +82,12 @@ frappe.query_reports["Accounts Receivable"] = { "label": __("Tax Id"), "fieldtype": "Data", "hidden": 1 + }, + { + "fieldname":"customer_name", + "label": __("Customer Name"), + "fieldtype": "Data", + "hidden": 1 } ], diff --git a/erpnext/setup/setup_wizard/operations/company_setup.py b/erpnext/setup/setup_wizard/operations/company_setup.py index 7fe7f0c2bc..7f9795bcfd 100644 --- a/erpnext/setup/setup_wizard/operations/company_setup.py +++ b/erpnext/setup/setup_wizard/operations/company_setup.py @@ -113,8 +113,7 @@ def create_logo(args): " {1}".format(fileurl, args.get("company_name") )) def create_website(args): - if args.get('setup_website'): - website_maker(args) + website_maker(args) def get_fy_details(fy_start_date, fy_end_date): start_year = getdate(fy_start_date).year diff --git a/erpnext/setup/setup_wizard/operations/default_website.py b/erpnext/setup/setup_wizard/operations/default_website.py index d13767648d..8ca213b1a0 100644 --- a/erpnext/setup/setup_wizard/operations/default_website.py +++ b/erpnext/setup/setup_wizard/operations/default_website.py @@ -12,7 +12,7 @@ class website_maker(object): self.args = args self.company = args.company_name self.tagline = args.company_tagline - self.user = args.name + self.user = args.get('email') self.make_web_page() self.make_website_settings() self.make_blog() @@ -50,6 +50,17 @@ class website_maker(object): website_settings.save() def make_blog(self): + blog_category = frappe.get_doc({ + "doctype": "Blog Category", + "category_name": "general", + "published": 1, + "title": _("General") + }).insert() + + if not self.user: + # Admin setup + return + blogger = frappe.new_doc("Blogger") user = frappe.get_doc("User", self.user) blogger.user = self.user @@ -58,13 +69,6 @@ class website_maker(object): blogger.avatar = user.user_image blogger.insert() - blog_category = frappe.get_doc({ - "doctype": "Blog Category", - "category_name": "general", - "published": 1, - "title": _("General") - }).insert() - frappe.get_doc({ "doctype": "Blog Post", "title": "Welcome",