Merge pull request #22765 from anupamvs/rfq

feat: Provision to make RFQ against Opportunity
diff --git a/erpnext/accounts/accounts_dashboard/accounts/accounts.json b/erpnext/accounts/accounts_dashboard/accounts/accounts.json
new file mode 100644
index 0000000..2fab50e
--- /dev/null
+++ b/erpnext/accounts/accounts_dashboard/accounts/accounts.json
@@ -0,0 +1,58 @@
+{
+ "cards": [
+  {
+   "card": "Total Outgoing Bills"
+  },
+  {
+   "card": "Total Incoming Bills"
+  },
+  {
+   "card": "Total Incoming Payment"
+  },
+  {
+   "card": "Total Outgoing Payment"
+  }
+ ],
+ "charts": [
+  {
+   "chart": "Profit and Loss",
+   "width": "Full"
+  },
+  {
+   "chart": "Incoming Bills (Purchase Invoice)",
+   "width": "Half"
+  },
+  {
+   "chart": "Outgoing Bills (Sales Invoice)",
+   "width": "Half"
+  },
+  {
+   "chart": "Accounts Receivable Ageing",
+   "width": "Half"
+  },
+  {
+   "chart": "Accounts Payable Ageing",
+   "width": "Half"
+  },
+  {
+   "chart": "Budget Variance",
+   "width": "Full"
+  },
+  {
+   "chart": "Bank Balance",
+   "width": "Full"
+  }
+ ],
+ "creation": "2020-07-17 11:25:34.796608",
+ "dashboard_name": "Accounts",
+ "docstatus": 0,
+ "doctype": "Dashboard",
+ "idx": 0,
+ "is_default": 0,
+ "is_standard": 1,
+ "modified": "2020-07-22 13:07:34.540574",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Accounts",
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/dashboard_chart/accounts_payable_ageing/accounts_payable_ageing.json b/erpnext/accounts/dashboard_chart/accounts_payable_ageing/accounts_payable_ageing.json
new file mode 100644
index 0000000..fb5ee64
--- /dev/null
+++ b/erpnext/accounts/dashboard_chart/accounts_payable_ageing/accounts_payable_ageing.json
@@ -0,0 +1,23 @@
+{
+ "chart_name": "Accounts Payable Ageing",
+ "chart_type": "Report",
+ "creation": "2020-07-17 11:25:34.564015",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"report_date\":\"frappe.datetime.now_date()\"}",
+ "filters_json": "{\"ageing_based_on\":\"Due Date\",\"range1\":30,\"range2\":60,\"range3\":90,\"range4\":120,\"group_by_party\":0,\"based_on_payment_terms\":0}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 12:29:33.584419",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Accounts Payable Ageing",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Accounts Payable",
+ "timeseries": 0,
+ "type": "Donut",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/accounts/dashboard_chart/accounts_receivable_ageing/accounts_receivable_ageing.json b/erpnext/accounts/dashboard_chart/accounts_receivable_ageing/accounts_receivable_ageing.json
new file mode 100644
index 0000000..48ec781
--- /dev/null
+++ b/erpnext/accounts/dashboard_chart/accounts_receivable_ageing/accounts_receivable_ageing.json
@@ -0,0 +1,23 @@
+{
+ "chart_name": "Accounts Receivable Ageing",
+ "chart_type": "Report",
+ "creation": "2020-07-17 11:25:34.535388",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"report_date\":\"frappe.datetime.now_date()\"}",
+ "filters_json": "{\"ageing_based_on\":\"Due Date\",\"range1\":30,\"range2\":60,\"range3\":90,\"range4\":120,\"group_by_party\":0,\"based_on_payment_terms\":0,\"show_future_payments\":0,\"show_delivery_notes\":0,\"show_sales_person\":0}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 12:28:42.743551",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Accounts Receivable Ageing",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Accounts Receivable",
+ "timeseries": 0,
+ "type": "Donut",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/accounts/dashboard_chart/bank_balance/bank_balance.json b/erpnext/accounts/dashboard_chart/bank_balance/bank_balance.json
new file mode 100644
index 0000000..6442c02
--- /dev/null
+++ b/erpnext/accounts/dashboard_chart/bank_balance/bank_balance.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Bank Balance",
+ "chart_type": "Custom",
+ "creation": "2020-07-17 11:25:34.620221",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"account\":\"locals[\\\":Company\\\"][frappe.defaults.get_user_default(\\\"Company\\\")][\\\"default_bank_account\\\"]\"}",
+ "filters_json": "{}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 12:19:59.879476",
+ "modified": "2020-07-22 12:21:48.780513",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Bank Balance",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "source": "Account Balance Timeline",
+ "time_interval": "Quarterly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Line",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/accounts/dashboard_chart/budget_variance/budget_variance.json b/erpnext/accounts/dashboard_chart/budget_variance/budget_variance.json
new file mode 100644
index 0000000..8631d3d
--- /dev/null
+++ b/erpnext/accounts/dashboard_chart/budget_variance/budget_variance.json
@@ -0,0 +1,23 @@
+{
+ "chart_name": "Budget Variance",
+ "chart_type": "Report",
+ "creation": "2020-07-17 11:25:34.593061",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
+ "filters_json": "{\"period\":\"Monthly\",\"budget_against\":\"Cost Center\",\"show_cumulative\":0}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 12:24:49.144210",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Budget Variance",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Budget Variance Report",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git "a/erpnext/accounts/dashboard_chart/incoming_bills_\050purchase_invoice\051/incoming_bills_\050purchase_invoice\051.json" "b/erpnext/accounts/dashboard_chart/incoming_bills_\050purchase_invoice\051/incoming_bills_\050purchase_invoice\051.json"
new file mode 100644
index 0000000..55f0d77
--- /dev/null
+++ "b/erpnext/accounts/dashboard_chart/incoming_bills_\050purchase_invoice\051/incoming_bills_\050purchase_invoice\051.json"
@@ -0,0 +1,29 @@
+{
+ "based_on": "posting_date",
+ "chart_name": "Incoming Bills (Purchase Invoice)",
+ "chart_type": "Sum",
+ "color": "#a83333",
+ "creation": "2020-07-17 11:25:34.479703",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Purchase Invoice",
+ "dynamic_filters_json": "",
+ "filters_json": "[[\"Purchase Invoice\",\"docstatus\",\"=\",1]]",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-21 17:37:30.727306",
+ "modified": "2020-07-21 17:51:07.374917",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Incoming Bills (Purchase Invoice)",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Monthly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 0,
+ "value_based_on": "base_net_total",
+ "y_axis": []
+}
\ No newline at end of file
diff --git "a/erpnext/accounts/dashboard_chart/outgoing_bills_\050sales_invoice\051/outgoing_bills_\050sales_invoice\051.json" "b/erpnext/accounts/dashboard_chart/outgoing_bills_\050sales_invoice\051/outgoing_bills_\050sales_invoice\051.json"
new file mode 100644
index 0000000..45de667
--- /dev/null
+++ "b/erpnext/accounts/dashboard_chart/outgoing_bills_\050sales_invoice\051/outgoing_bills_\050sales_invoice\051.json"
@@ -0,0 +1,28 @@
+{
+ "based_on": "posting_date",
+ "chart_name": "Outgoing Bills (Sales Invoice)",
+ "chart_type": "Sum",
+ "color": "#7b933d",
+ "creation": "2020-07-17 11:25:34.507547",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Sales Invoice",
+ "filters_json": "[[\"Sales Invoice\",\"docstatus\",\"=\",1]]",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-21 17:37:31.574666",
+ "modified": "2020-07-21 17:52:03.970530",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Outgoing Bills (Sales Invoice)",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Monthly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 0,
+ "value_based_on": "base_net_total",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/accounts/dashboard_chart/profit_and_loss/profit_and_loss.json b/erpnext/accounts/dashboard_chart/profit_and_loss/profit_and_loss.json
new file mode 100644
index 0000000..3fa995b
--- /dev/null
+++ b/erpnext/accounts/dashboard_chart/profit_and_loss/profit_and_loss.json
@@ -0,0 +1,23 @@
+{
+ "chart_name": "Profit and Loss",
+ "chart_type": "Report",
+ "creation": "2020-07-17 11:25:34.448572",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
+ "filters_json": "{\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"periodicity\":\"Yearly\",\"include_default_book_entries\":1}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 12:33:48.888943",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Profit and Loss",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Profit and Loss Statement",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/accounts/dashboard_fixtures.py b/erpnext/accounts/dashboard_fixtures.py
deleted file mode 100644
index b2abffc..0000000
--- a/erpnext/accounts/dashboard_fixtures.py
+++ /dev/null
@@ -1,284 +0,0 @@
-# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-import frappe
-import json
-from frappe.utils import nowdate, add_months, get_date_str
-from frappe import _
-from erpnext.accounts.utils import get_fiscal_year, get_account_name, FiscalYearError
-
-def _get_fiscal_year(date=None):
-	try:
-		fiscal_year = get_fiscal_year(date=nowdate(), as_dict=True)
-		return fiscal_year
-
-	except FiscalYearError:
-		#if no fiscal year for current date then get default fiscal year
-		try:
-			fiscal_year = get_fiscal_year(as_dict=True)
-			return fiscal_year
-
-		except FiscalYearError:
-			#if still no fiscal year found then no accounting data created, return
-			return None
-
-def get_company_for_dashboards():
-	company = frappe.defaults.get_defaults().company
-	if company:
-		return company
-	else:
-		company_list = frappe.get_list("Company")
-		if company_list:
-			return company_list[0].name
-	return None
-
-def get_data():
-
-	fiscal_year = _get_fiscal_year(nowdate())
-
-	if not fiscal_year:
-		return frappe._dict()
-
-	return frappe._dict({
-		"dashboards": get_dashboards(),
-		"charts": get_charts(fiscal_year),
-		"number_cards": get_number_cards(fiscal_year)
-	})
-
-def get_dashboards():
-	return [{
-		"name": "Accounts",
-		"dashboard_name": "Accounts",
-		"doctype": "Dashboard",
-		"charts": [
-			{ "chart": "Profit and Loss" , "width": "Full"},
-			{ "chart": "Incoming Bills (Purchase Invoice)", "width": "Half"},
-			{ "chart": "Outgoing Bills (Sales Invoice)", "width": "Half"},
-			{ "chart": "Accounts Receivable Ageing", "width": "Half"},
-			{ "chart": "Accounts Payable Ageing", "width": "Half"},
-			{ "chart": "Budget Variance", "width": "Full"},
-			{ "chart": "Bank Balance", "width": "Full"}
-		],
-		"cards": [
-			{"card": "Total Outgoing Bills"},
-			{"card": "Total Incoming Bills"},
-			{"card": "Total Incoming Payment"},
-			{"card": "Total Outgoing Payment"}
-		]
-	}]
-
-def get_charts(fiscal_year):
-	company = frappe.get_doc("Company", get_company_for_dashboards())
-	bank_account = company.default_bank_account or get_account_name("Bank", company=company.name)
-	default_cost_center = company.cost_center
-
-	return [
-		{
-			"doctype": "Dashboard Charts",
-			"name": "Profit and Loss",
-			"owner": "Administrator",
-			"report_name": "Profit and Loss Statement",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"filter_based_on": "Fiscal Year",
-				"from_fiscal_year": fiscal_year.get('name'),
-				"to_fiscal_year": fiscal_year.get('name'),
-				"periodicity": "Monthly",
-				"include_default_book_entries": 1
-			}),
-			"type": "Bar",
-			'timeseries': 0,
-			"chart_type": "Report",
-			"chart_name": _("Profit and Loss"),
-			"is_custom": 1,
-			"is_public": 1
-		},
-		{
-			"doctype": "Dashboard Chart",
-			"time_interval": "Monthly",
-			"name": "Incoming Bills (Purchase Invoice)",
-			"chart_name": _("Incoming Bills (Purchase Invoice)"),
-			"timespan": "Last Year",
-			"color": "#a83333",
-			"value_based_on": "base_net_total",
-			"filters_json": json.dumps([["Purchase Invoice", "docstatus", "=", 1]]),
-			"chart_type": "Sum",
-			"timeseries": 1,
-			"based_on": "posting_date",
-			"owner": "Administrator",
-			"document_type": "Purchase Invoice",
-			"type": "Bar",
-			"width": "Half",
-			"is_public": 1
-		},
-		{
-			"doctype": "Dashboard Chart",
-			"name": "Outgoing Bills (Sales Invoice)",
-			"time_interval": "Monthly",
-			"chart_name": _("Outgoing Bills (Sales Invoice)"),
-			"timespan": "Last Year",
-			"color": "#7b933d",
-			"value_based_on": "base_net_total",
-			"filters_json": json.dumps([["Sales Invoice", "docstatus", "=", 1]]),
-			"chart_type": "Sum",
-			"timeseries": 1,
-			"based_on": "posting_date",
-			"owner": "Administrator",
-			"document_type": "Sales Invoice",
-			"type": "Bar",
-			"width": "Half",
-			"is_public": 1
-		},
-		{
-			"doctype": "Dashboard Charts",
-			"name": "Accounts Receivable Ageing",
-			"owner": "Administrator",
-			"report_name": "Accounts Receivable",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"report_date": nowdate(),
-				"ageing_based_on": "Due Date",
-				"range1": 30,
-				"range2": 60,
-				"range3": 90,
-				"range4": 120
-				}),
-			"type": "Donut",
-			'timeseries': 0,
-			"chart_type": "Report",
-			"chart_name": _("Accounts Receivable Ageing"),
-			"is_custom": 1,
-			"is_public": 1
-		},
-		{
-			"doctype": "Dashboard Charts",
-			"name": "Accounts Payable Ageing",
-			"owner": "Administrator",
-			"report_name": "Accounts Payable",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"report_date": nowdate(),
-				"ageing_based_on": "Due Date",
-				"range1": 30,
-				"range2": 60,
-				"range3": 90,
-				"range4": 120
-			}),
-			"type": "Donut",
-			'timeseries': 0,
-			"chart_type": "Report",
-			"chart_name": _("Accounts Payable Ageing"),
-			"is_custom": 1,
-			"is_public": 1
-		},
-		{
-			"doctype": "Dashboard Charts",
-			"name": "Budget Variance",
-			"owner": "Administrator",
-			"report_name": "Budget Variance Report",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"from_fiscal_year": fiscal_year.get('name'),
-				"to_fiscal_year": fiscal_year.get('name'),
-				"period": "Monthly",
-				"budget_against": "Cost Center"
-			}),
-			"type": "Bar",
-			"timeseries": 0,
-			"chart_type": "Report",
-			"chart_name": _("Budget Variance"),
-			"is_custom": 1,
-			"is_public": 1
-		},
-		{
-			"doctype": "Dashboard Charts",
-			"name": "Bank Balance",
-			"time_interval": "Quarterly",
-			"chart_name": "Bank Balance",
-			"timespan": "Last Year",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"account": bank_account
-			}),
-			"source": "Account Balance Timeline",
-			"chart_type": "Custom",
-			"timeseries": 1,
-			"owner": "Administrator",
-			"type": "Line",
-			"width": "Half",
-			"is_public": 1
-		},
-	]
-
-def get_number_cards(fiscal_year):
-
-	year_start_date = get_date_str(fiscal_year.get("year_start_date"))
-	year_end_date = get_date_str(fiscal_year.get("year_end_date"))
-	return [
-		{
-			"doctype": "Number Card",
-			"document_type": "Payment Entry",
-			"name": "Total Incoming Payment",
-			"filters_json": json.dumps([
-				['Payment Entry', 'docstatus', '=', 1],
-				['Payment Entry', 'posting_date', 'between', [year_start_date, year_end_date]],
-				['Payment Entry', 'payment_type', '=', 'Receive']
-			]),
-			"label": _("Total Incoming Payment"),
-			"function": "Sum",
-			"aggregate_function_based_on": "base_received_amount",
-			"is_public": 1,
-			"is_custom": 1,
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		},
-		{
-			"doctype": "Number Card",
-			"document_type": "Payment Entry",
-			"name": "Total Outgoing Payment",
-			"filters_json": json.dumps([
-				['Payment Entry', 'docstatus', '=', 1],
-				['Payment Entry', 'posting_date', 'between', [year_start_date, year_end_date]],
-				['Payment Entry', 'payment_type', '=', 'Pay']
-			]),
-			"label": _("Total Outgoing Payment"),
-			"function": "Sum",
-			"aggregate_function_based_on": "base_paid_amount",
-			"is_public": 1,
-			"is_custom": 1,
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		},
-		{
-			"doctype": "Number Card",
-			"document_type": "Sales Invoice",
-			"name": "Total Outgoing Bills",
-			"filters_json": json.dumps([
-				['Sales Invoice', 'docstatus', '=', 1],
-				['Sales Invoice', 'posting_date', 'between', [year_start_date, year_end_date]]
-			]),
-			"label": _("Total Outgoing Bills"),
-			"function": "Sum",
-			"aggregate_function_based_on": "base_net_total",
-			"is_public": 1,
-			"is_custom": 1,
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		},
-		{
-			"doctype": "Number Card",
-			"document_type": "Purchase Invoice",
-			"name": "Total Incoming Bills",
-			"filters_json": json.dumps([
-				['Purchase Invoice', 'docstatus', '=', 1],
-				['Purchase Invoice', 'posting_date', 'between', [year_start_date, year_end_date]]
-			]),
-			"label": _("Total Incoming Bills"),
-			"function": "Sum",
-			"aggregate_function_based_on": "base_net_total",
-			"is_public": 1,
-			"is_custom": 1,
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		}
-	]
diff --git a/erpnext/accounts/doctype/bank/bank.json b/erpnext/accounts/doctype/bank/bank.json
index 99978e6..56bae72 100644
--- a/erpnext/accounts/doctype/bank/bank.json
+++ b/erpnext/accounts/doctype/bank/bank.json
@@ -13,7 +13,6 @@
   "bank_name",
   "swift_number",
   "column_break_1",
-  "branch_code",
   "website",
   "address_and_contact",
   "address_html",
@@ -52,15 +51,6 @@
    "search_index": 1
   },
   {
-   "allow_in_quick_entry": 1,
-   "fieldname": "branch_code",
-   "fieldtype": "Data",
-   "in_list_view": 1,
-   "in_standard_filter": 1,
-   "label": "Branch Code",
-   "unique": 1
-  },
-  {
    "fieldname": "address_and_contact",
    "fieldtype": "Section Break",
    "label": "Address and Contact",
@@ -111,7 +101,7 @@
   }
  ],
  "links": [],
- "modified": "2020-03-25 21:22:33.496264",
+ "modified": "2020-07-17 14:00:13.105433",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Bank",
diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json
index 65a0a51..b42f1f9 100644
--- a/erpnext/accounts/doctype/bank_account/bank_account.json
+++ b/erpnext/accounts/doctype/bank_account/bank_account.json
@@ -23,6 +23,7 @@
   "account_details_section",
   "iban",
   "column_break_12",
+  "branch_code",
   "bank_account_no",
   "address_and_contact",
   "address_html",
@@ -197,10 +198,16 @@
    "fieldtype": "Data",
    "label": "Mask",
    "read_only": 1
+  },
+  {
+   "fieldname": "branch_code",
+   "fieldtype": "Data",
+   "in_global_search": 1,
+   "label": "Branch Code"
   }
  ],
  "links": [],
- "modified": "2020-04-06 21:00:45.379804",
+ "modified": "2020-07-17 13:59:50.795412",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Bank Account",
diff --git a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js
index 065d25e..febf85c 100644
--- a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js
+++ b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js
@@ -4,7 +4,7 @@
 cur_frm.add_fetch('bank_account','account','account');
 cur_frm.add_fetch('bank_account','bank_account_no','bank_account_no');
 cur_frm.add_fetch('bank_account','iban','iban');
-cur_frm.add_fetch('bank','branch_code','branch_code');
+cur_frm.add_fetch('bank_account','branch_code','branch_code');
 cur_frm.add_fetch('bank','swift_number','swift_number');
 
 frappe.ui.form.on('Bank Guarantee', {
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
index d3992d5..355fe96 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
@@ -73,6 +73,10 @@
 				};
 			}
 		});
+
+		this.frm.set_value('party_type', '');
+		this.frm.set_value('party', '');
+		this.frm.set_value('receivable_payable_account', '');
 	},
 
 	refresh: function() {
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
index 35d8d34..2f8b634 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
@@ -48,7 +48,8 @@
 			select
 				"Journal Entry" as reference_type, t1.name as reference_name,
 				t1.posting_date, t1.remark as remarks, t2.name as reference_row,
-				{dr_or_cr} as amount, t2.is_advance
+				{dr_or_cr} as amount, t2.is_advance,
+				t2.account_currency as currency
 			from
 				`tabJournal Entry` t1, `tabJournal Entry Account` t2
 			where
@@ -88,7 +89,8 @@
 			if self.party_type == 'Customer' else "Purchase Invoice")
 
 		return frappe.db.sql(""" SELECT `tab{doc}`.name as reference_name, %(voucher_type)s as reference_type,
-				(sum(`tabGL Entry`.{dr_or_cr}) - sum(`tabGL Entry`.{reconciled_dr_or_cr})) as amount
+				(sum(`tabGL Entry`.{dr_or_cr}) - sum(`tabGL Entry`.{reconciled_dr_or_cr})) as amount,
+				account_currency as currency
 			FROM `tab{doc}`, `tabGL Entry`
 			WHERE
 				(`tab{doc}`.name = `tabGL Entry`.against_voucher or `tab{doc}`.name = `tabGL Entry`.voucher_no)
@@ -141,6 +143,7 @@
 			ent.invoice_number = e.get('voucher_no')
 			ent.invoice_date = e.get('posting_date')
 			ent.amount = flt(e.get('invoice_amount'))
+			ent.currency = e.get('currency')
 			ent.outstanding_amount = e.get('outstanding_amount')
 
 	def reconcile(self, args):
@@ -269,11 +272,14 @@
 		reconcile_dr_or_cr = ('debit_in_account_currency'
 			if d.dr_or_cr == 'credit_in_account_currency' else 'credit_in_account_currency')
 
+		company_currency = erpnext.get_company_currency(company)
+
 		jv = frappe.get_doc({
 			"doctype": "Journal Entry",
 			"voucher_type": voucher_type,
 			"posting_date": today(),
 			"company": company,
+			"multi_currency": 1 if d.currency != company_currency else 0,
 			"accounts": [
 				{
 					'account': d.account,
diff --git a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json
index ce7ce98..6a79a85 100644
--- a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json
+++ b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json
@@ -1,183 +1,80 @@
 {
- "allow_copy": 0, 
- "allow_import": 0, 
- "allow_rename": 0, 
- "beta": 0, 
- "creation": "2014-07-09 16:14:23.672922", 
- "custom": 0, 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "", 
- "editable_grid": 1, 
+ "actions": [],
+ "creation": "2014-07-09 16:14:23.672922",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+  "invoice_type",
+  "invoice_number",
+  "invoice_date",
+  "col_break1",
+  "amount",
+  "outstanding_amount",
+  "currency"
+ ],
  "fields": [
   {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "fieldname": "invoice_type", 
-   "fieldtype": "Select", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 1, 
-   "label": "Invoice Type", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "Sales Invoice\nPurchase Invoice\nJournal Entry", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "invoice_type",
+   "fieldtype": "Select",
+   "in_list_view": 1,
+   "label": "Invoice Type",
+   "options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
+   "read_only": 1
+  },
   {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "fieldname": "invoice_number", 
-   "fieldtype": "Dynamic Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 1, 
-   "label": "Invoice Number", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "invoice_type", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "invoice_number",
+   "fieldtype": "Dynamic Link",
+   "in_list_view": 1,
+   "label": "Invoice Number",
+   "options": "invoice_type",
+   "read_only": 1
+  },
   {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "fieldname": "invoice_date", 
-   "fieldtype": "Date", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 1, 
-   "label": "Invoice Date", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "invoice_date",
+   "fieldtype": "Date",
+   "in_list_view": 1,
+   "label": "Invoice Date",
+   "read_only": 1
+  },
   {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "fieldname": "col_break1", 
-   "fieldtype": "Column Break", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "col_break1",
+   "fieldtype": "Column Break"
+  },
   {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "fieldname": "amount", 
-   "fieldtype": "Currency", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 1, 
-   "label": "Amount", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "amount",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Amount",
+   "options": "currency",
+   "read_only": 1
+  },
   {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "fieldname": "outstanding_amount", 
-   "fieldtype": "Currency", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 1, 
-   "label": "Outstanding Amount", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
+   "fieldname": "outstanding_amount",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Outstanding Amount",
+   "options": "currency",
+   "read_only": 1
+  },
+  {
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "label": "Currency",
+   "options": "Currency"
   }
- ], 
- "hide_heading": 0, 
- "hide_toolbar": 0, 
- "idx": 0, 
- "image_view": 0, 
- "in_create": 0, 
-
- "is_submittable": 0, 
- "issingle": 0, 
- "istable": 1, 
- "max_attachments": 0, 
- "modified": "2016-07-11 03:28:03.588476", 
- "modified_by": "Administrator", 
- "module": "Accounts", 
- "name": "Payment Reconciliation Invoice", 
- "name_case": "", 
- "owner": "Administrator", 
- "permissions": [], 
- "quick_entry": 1, 
- "read_only": 0, 
- "read_only_onload": 0, 
- "sort_field": "modified", 
- "sort_order": "DESC", 
- "track_seen": 0
+ ],
+ "istable": 1,
+ "links": [],
+ "modified": "2020-07-19 18:12:27.964073",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Payment Reconciliation Invoice",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
index 018bfd0..925a6f1 100644
--- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
+++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
@@ -1,7 +1,9 @@
 {
+ "actions": [],
  "creation": "2014-07-09 16:13:35.452759",
  "doctype": "DocType",
  "editable_grid": 1,
+ "engine": "InnoDB",
  "field_order": [
   "reference_type",
   "reference_name",
@@ -16,7 +18,8 @@
   "difference_account",
   "difference_amount",
   "sec_break1",
-  "remark"
+  "remark",
+  "currency"
  ],
  "fields": [
   {
@@ -73,6 +76,7 @@
    "fieldtype": "Currency",
    "in_list_view": 1,
    "label": "Amount",
+   "options": "currency",
    "read_only": 1
   },
   {
@@ -81,6 +85,7 @@
    "fieldtype": "Currency",
    "in_list_view": 1,
    "label": "Allocated amount",
+   "options": "currency",
    "reqd": 1
   },
   {
@@ -106,16 +111,25 @@
    "fieldname": "difference_amount",
    "fieldtype": "Currency",
    "label": "Difference Amount",
+   "options": "currency",
    "print_hide": 1,
    "read_only": 1
   },
   {
    "fieldname": "section_break_10",
    "fieldtype": "Section Break"
+  },
+  {
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "label": "Currency",
+   "options": "Currency"
   }
  ],
  "istable": 1,
- "modified": "2019-06-24 00:08:11.150796",
+ "links": [],
+ "modified": "2020-07-19 18:12:41.682347",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Payment Reconciliation Payment",
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json
index eef6be1..8eadfd0 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.json
+++ b/erpnext/accounts/doctype/payment_request/payment_request.json
@@ -211,7 +211,7 @@
    "label": "IBAN"
   },
   {
-   "fetch_from": "bank.branch_code",
+   "fetch_from": "bank_account.branch_code",
    "fetch_if_empty": 1,
    "fieldname": "branch_code",
    "fieldtype": "Read Only",
@@ -352,7 +352,7 @@
  "in_create": 1,
  "is_submittable": 1,
  "links": [],
- "modified": "2020-05-29 17:38:49.392713",
+ "modified": "2020-07-17 14:06:42.185763",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Payment Request",
diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
index 9bc2466..004d358 100644
--- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
+++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
@@ -795,7 +795,7 @@
  "idx": 1,
  "istable": 1,
  "links": [],
- "modified": "2020-03-11 12:24:41.749986",
+ "modified": "2020-07-18 12:24:41.749986",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Sales Invoice Item",
diff --git a/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json
new file mode 100644
index 0000000..283e187
--- /dev/null
+++ b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json
@@ -0,0 +1,21 @@
+{
+ "aggregate_function_based_on": "base_net_total",
+ "creation": "2020-07-17 11:25:34.748329",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Purchase Invoice",
+ "filters_json": "[[\"Purchase Invoice\",\"docstatus\",\"=\",\"1\",false],[\"Purchase Invoice\",\"posting_date\",\"Timespan\",\"this year\",false]]",
+ "function": "Sum",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Incoming Bills",
+ "modified": "2020-07-22 13:06:46.045344",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Total Incoming Bills",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json
new file mode 100644
index 0000000..bc23c15
--- /dev/null
+++ b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json
@@ -0,0 +1,21 @@
+{
+ "aggregate_function_based_on": "base_received_amount",
+ "creation": "2020-07-17 11:25:34.673195",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Payment Entry",
+ "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\",false],[\"Payment Entry\",\"posting_date\",\"Timespan\",\"this year\",false],[\"Payment Entry\",\"payment_type\",\"=\",\"Receive\",false]]",
+ "function": "Sum",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Incoming Payment",
+ "modified": "2020-07-22 13:06:20.237689",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Total Incoming Payment",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json
new file mode 100644
index 0000000..fe91618
--- /dev/null
+++ b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json
@@ -0,0 +1,21 @@
+{
+ "aggregate_function_based_on": "base_net_total",
+ "creation": "2020-07-17 11:25:34.725416",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Sales Invoice",
+ "filters_json": "[[\"Sales Invoice\",\"docstatus\",\"=\",\"1\",false],[\"Sales Invoice\",\"posting_date\",\"Timespan\",\"this year\",false]]",
+ "function": "Sum",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Outgoing Bills",
+ "modified": "2020-07-22 13:07:19.633101",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Total Outgoing Bills",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json
new file mode 100644
index 0000000..d27be88
--- /dev/null
+++ b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json
@@ -0,0 +1,21 @@
+{
+ "aggregate_function_based_on": "base_paid_amount",
+ "creation": "2020-07-17 11:25:34.700137",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Payment Entry",
+ "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\",false],[\"Payment Entry\",\"posting_date\",\"Timespan\",\"this year\",false],[\"Payment Entry\",\"payment_type\",\"=\",\"Pay\",false]]",
+ "function": "Sum",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Outgoing Payment",
+ "modified": "2020-07-22 12:49:34.942896",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Total Outgoing Payment",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 013c30d..824b2f2 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -676,7 +676,8 @@
 	invoice_list = frappe.db.sql("""
 		select
 			voucher_no, voucher_type, posting_date, due_date,
-			ifnull(sum({dr_or_cr}), 0) as invoice_amount
+			ifnull(sum({dr_or_cr}), 0) as invoice_amount,
+			account_currency as currency
 		from
 			`tabGL Entry`
 		where
@@ -733,7 +734,8 @@
 						'invoice_amount': flt(d.invoice_amount),
 						'payment_amount': payment_amount,
 						'outstanding_amount': outstanding_amount,
-						'due_date': d.due_date
+						'due_date': d.due_date,
+						'currency': d.currency
 					})
 				)
 
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index ead503e..89c38c7 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -1014,6 +1014,7 @@
 def get_advance_payment_entries(party_type, party, party_account, order_doctype,
 		order_list=None, include_unallocated=True, against_all_orders=False, limit=None):
 	party_account_field = "paid_from" if party_type == "Customer" else "paid_to"
+	currency_field = "paid_from_account_currency" if party_type == "Customer" else "paid_to_account_currency"
 	payment_type = "Receive" if party_type == "Customer" else "Pay"
 	payment_entries_against_order, unallocated_payment_entries = [], []
 	limit_cond = "limit %s" % limit if limit else ""
@@ -1030,14 +1031,15 @@
 			select
 				"Payment Entry" as reference_type, t1.name as reference_name,
 				t1.remarks, t2.allocated_amount as amount, t2.name as reference_row,
-				t2.reference_name as against_order, t1.posting_date
+				t2.reference_name as against_order, t1.posting_date,
+				t1.{0} as currency
 			from `tabPayment Entry` t1, `tabPayment Entry Reference` t2
 			where
-				t1.name = t2.parent and t1.{0} = %s and t1.payment_type = %s
+				t1.name = t2.parent and t1.{1} = %s and t1.payment_type = %s
 				and t1.party_type = %s and t1.party = %s and t1.docstatus = 1
-				and t2.reference_doctype = %s {1}
-			order by t1.posting_date {2}
-		""".format(party_account_field, reference_condition, limit_cond),
+				and t2.reference_doctype = %s {2}
+			order by t1.posting_date {3}
+		""".format(currency_field, party_account_field, reference_condition, limit_cond),
 													  [party_account, payment_type, party_type, party,
 													   order_doctype] + order_list, as_dict=1)
 
diff --git a/erpnext/crm/crm_dashboard/crm/crm.json b/erpnext/crm/crm_dashboard/crm/crm.json
new file mode 100644
index 0000000..69c2c8a
--- /dev/null
+++ b/erpnext/crm/crm_dashboard/crm/crm.json
@@ -0,0 +1,58 @@
+{
+ "cards": [
+  {
+   "card": "New Lead (Last 1 Month)"
+  },
+  {
+   "card": "New Opportunity (Last 1 Month)"
+  },
+  {
+   "card": "Won Opportunity (Last 1 Month)"
+  },
+  {
+   "card": "Open Opportunity"
+  }
+ ],
+ "charts": [
+  {
+   "chart": "Incoming Leads",
+   "width": "Full"
+  },
+  {
+   "chart": "Opportunity Trends",
+   "width": "Full"
+  },
+  {
+   "chart": "Won Opportunities",
+   "width": "Full"
+  },
+  {
+   "chart": "Territory Wise Opportunity Count",
+   "width": "Half"
+  },
+  {
+   "chart": "Opportunities via Campaigns",
+   "width": "Half"
+  },
+  {
+   "chart": "Territory Wise Sales",
+   "width": "Full"
+  },
+  {
+   "chart": "Lead Source",
+   "width": "Half"
+  }
+ ],
+ "creation": "2020-07-20 20:17:15.985657",
+ "dashboard_name": "CRM",
+ "docstatus": 0,
+ "doctype": "Dashboard",
+ "idx": 0,
+ "is_default": 0,
+ "is_standard": 1,
+ "modified": "2020-07-21 18:56:47.230053",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "CRM",
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_chart/incoming_leads/incoming_leads.json b/erpnext/crm/dashboard_chart/incoming_leads/incoming_leads.json
new file mode 100644
index 0000000..82398eb
--- /dev/null
+++ b/erpnext/crm/dashboard_chart/incoming_leads/incoming_leads.json
@@ -0,0 +1,28 @@
+{
+ "based_on": "creation",
+ "chart_name": "Incoming Leads",
+ "chart_type": "Count",
+ "creation": "2020-07-20 20:17:15.639164",
+ "custom_options": "{\"type\": \"line\", \"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"tooltipOptions\": {}, \"lineOptions\": {\"regionFill\": 1}}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Lead",
+ "dynamic_filters_json": "[[\"Lead\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[]",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 15:49:19.896501",
+ "modified": "2020-07-22 16:06:34.941729",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Incoming Leads",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Weekly",
+ "timeseries": 1,
+ "timespan": "Last Quarter",
+ "type": "Bar",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_chart/lead_source/lead_source.json b/erpnext/crm/dashboard_chart/lead_source/lead_source.json
new file mode 100644
index 0000000..f25fea5
--- /dev/null
+++ b/erpnext/crm/dashboard_chart/lead_source/lead_source.json
@@ -0,0 +1,27 @@
+{
+ "chart_name": "Lead Source",
+ "chart_type": "Group By",
+ "creation": "2020-07-20 20:17:15.842106",
+ "custom_options": "{\"truncateLegends\": 1, \"maxSlices\": 8}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Lead",
+ "dynamic_filters_json": "[[\"Lead\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[]",
+ "group_by_based_on": "source",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 16:11:14.170636",
+ "modified": "2020-07-22 16:13:38.696710",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Lead Source",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Donut",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_chart/opportunities_via_campaigns/opportunities_via_campaigns.json b/erpnext/crm/dashboard_chart/opportunities_via_campaigns/opportunities_via_campaigns.json
new file mode 100644
index 0000000..4adda9a
--- /dev/null
+++ b/erpnext/crm/dashboard_chart/opportunities_via_campaigns/opportunities_via_campaigns.json
@@ -0,0 +1,27 @@
+{
+ "chart_name": "Opportunities via Campaigns",
+ "chart_type": "Group By",
+ "creation": "2020-07-20 20:17:15.705402",
+ "custom_options": "{\"truncateLegends\": 1, \"maxSlices\": 8}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[]",
+ "group_by_based_on": "campaign",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 15:45:32.572011",
+ "modified": "2020-07-22 16:10:02.497726",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Opportunities via Campaigns",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Pie",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_chart/opportunity_trends/opportunity_trends.json b/erpnext/crm/dashboard_chart/opportunity_trends/opportunity_trends.json
new file mode 100644
index 0000000..08e26cd
--- /dev/null
+++ b/erpnext/crm/dashboard_chart/opportunity_trends/opportunity_trends.json
@@ -0,0 +1,28 @@
+{
+ "based_on": "creation",
+ "chart_name": "Opportunity Trends",
+ "chart_type": "Count",
+ "creation": "2020-07-20 20:17:15.672124",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[]",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 15:45:32.590967",
+ "modified": "2020-07-22 16:08:33.100532",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Opportunity Trends",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Weekly",
+ "timeseries": 1,
+ "timespan": "Last Quarter",
+ "type": "Bar",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_chart/territory_wise_opportunity_count/territory_wise_opportunity_count.json b/erpnext/crm/dashboard_chart/territory_wise_opportunity_count/territory_wise_opportunity_count.json
new file mode 100644
index 0000000..8b15ec9
--- /dev/null
+++ b/erpnext/crm/dashboard_chart/territory_wise_opportunity_count/territory_wise_opportunity_count.json
@@ -0,0 +1,27 @@
+{
+ "chart_name": "Territory Wise Opportunity Count",
+ "chart_type": "Group By",
+ "creation": "2020-07-20 20:17:15.774176",
+ "custom_options": "{\"truncateLegends\": 1, \"maxSlices\": 8}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[]",
+ "group_by_based_on": "territory",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 15:45:32.134026",
+ "modified": "2020-07-22 16:09:42.921547",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Territory Wise Opportunity Count",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Donut",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_chart/territory_wise_sales/territory_wise_sales.json b/erpnext/crm/dashboard_chart/territory_wise_sales/territory_wise_sales.json
new file mode 100644
index 0000000..fe142b4
--- /dev/null
+++ b/erpnext/crm/dashboard_chart/territory_wise_sales/territory_wise_sales.json
@@ -0,0 +1,28 @@
+{
+ "aggregate_function_based_on": "opportunity_amount",
+ "chart_name": "Territory Wise Sales",
+ "chart_type": "Group By",
+ "creation": "2020-07-20 20:17:15.809008",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Opportunity\",\"status\",\"=\",\"Converted\",false]]",
+ "group_by_based_on": "territory",
+ "group_by_type": "Sum",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 15:45:32.501313",
+ "modified": "2020-07-22 16:10:28.308110",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Territory Wise Sales",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_chart/won_opportunities/won_opportunities.json b/erpnext/crm/dashboard_chart/won_opportunities/won_opportunities.json
new file mode 100644
index 0000000..2b5576b
--- /dev/null
+++ b/erpnext/crm/dashboard_chart/won_opportunities/won_opportunities.json
@@ -0,0 +1,27 @@
+{
+ "based_on": "modified",
+ "chart_name": "Won Opportunities",
+ "chart_type": "Count",
+ "creation": "2020-07-20 20:17:15.738889",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Opportunity\",\"status\",\"=\",\"Converted\",false]]",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 15:45:32.575964",
+ "modified": "2020-07-22 16:09:14.265231",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Won Opportunities",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Monthly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/crm/dashboard_fixtures.py b/erpnext/crm/dashboard_fixtures.py
deleted file mode 100644
index 901c058..0000000
--- a/erpnext/crm/dashboard_fixtures.py
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-import frappe, erpnext, json
-from frappe import _
-
-def get_data():
-	return frappe._dict({
-        "dashboards": get_dashboards(),
-        "charts": get_charts(),
-        "number_cards": get_number_cards()
-	})
-
-def get_dashboards():
-	return [{
-            "doctype": "Dashboard",
-            "name": "CRM",
-            "dashboard_name": "CRM",
-            "charts": [
-                { "chart": "Incoming Leads", "width": "Full" },
-                { "chart": "Opportunity Trends", "width": "Full"},
-                { "chart": "Won Opportunities", "width": "Full" },
-                { "chart": "Territory Wise Opportunity Count", "width": "Half"},
-                { "chart": "Opportunities via Campaigns", "width": "Half" },
-                { "chart": "Territory Wise Sales", "width": "Full"},
-                { "chart": "Lead Source", "width": "Half"}
-            ],
-            "cards": [
-                { "card": "New Lead (Last 1 Month)" },
-                { "card": "New Opportunity (Last 1 Month)" },
-                { "card": "Won Opportunity (Last 1 Month)" },
-                { "card": "Open Opportunity"},
-            ]
-        }]
-
-def get_company_for_dashboards():
-	company = frappe.defaults.get_defaults().company
-	if company:
-		return company
-	else:
-		company_list = frappe.get_list("Company")
-		if company_list:
-			return company_list[0].name
-	return None
-
-def get_charts():
-	company = get_company_for_dashboards()
-
-	return [{
-        "name": "Incoming Leads",
-        "doctype": "Dashboard Chart",
-        "time_interval": "Yearly",
-        "chart_type": "Count",
-        "chart_name": _("Incoming Leads"),
-        "timespan": "Last Quarter",
-        "time_interval": "Weekly",
-        "document_type": "Lead",
-        "based_on": "creation",
-        'is_public': 1,
-        'timeseries': 1,
-        "owner": "Administrator",
-        "filters_json": json.dumps([]),
-        "type": "Bar"
-    },
-    {
-        "name": "Opportunity Trends",
-        "doctype": "Dashboard Chart",
-        "time_interval": "Yearly",
-        "chart_type": "Count",
-        "chart_name": _("Opportunity Trends"),
-        "timespan": "Last Quarter",
-        "time_interval": "Weekly",
-        "document_type": "Opportunity",
-        "based_on": "creation",
-        'is_public': 1,
-        'timeseries': 1,
-        "owner": "Administrator",
-        "filters_json": json.dumps([["Opportunity", "company", "=", company, False]]),
-        "type": "Bar"
-    },
-    {
-        "name": "Opportunities via Campaigns",
-        "chart_name": _("Opportunities via Campaigns"),
-        "doctype": "Dashboard Chart",
-        "chart_type": "Group By",
-        "group_by_type": "Count",
-        "group_by_based_on": "campaign",
-        "document_type": "Opportunity",
-        'is_public': 1,
-        'timeseries': 1,
-        "owner": "Administrator",
-        "filters_json": json.dumps([["Opportunity", "company", "=", company, False]]),
-        "type": "Pie",
-        "custom_options": json.dumps({
-            "truncateLegends": 1,
-            "maxSlices": 8
-        })
-    },
-    {
-        "name": "Won Opportunities",
-        "doctype": "Dashboard Chart",
-        "time_interval": "Yearly",
-        "chart_type": "Count",
-        "chart_name": _("Won Opportunities"),
-        "timespan": "Last Year",
-        "time_interval": "Monthly",
-        "document_type": "Opportunity",
-        "based_on": "modified",
-        'is_public': 1,
-        'timeseries': 1,
-        "owner": "Administrator",
-        "filters_json": json.dumps([
-            ["Opportunity", "company", "=", company, False],
-            ["Opportunity", "status", "=", "Converted", False]]),
-        "type": "Bar"
-    },
-    {
-        "name": "Territory Wise Opportunity Count",
-        "doctype": "Dashboard Chart",
-        "chart_type": "Group By",
-        "group_by_type": "Count",
-        "group_by_based_on": "territory",
-        "chart_name": _("Territory Wise Opportunity Count"),
-        "document_type": "Opportunity",
-        'is_public': 1,
-        "filters_json": json.dumps([
-            ["Opportunity", "company", "=", company, False]
-        ]),
-        "owner": "Administrator",
-        "type": "Donut",
-        "custom_options": json.dumps({
-            "truncateLegends": 1,
-            "maxSlices": 8
-        })
-    },
-    {
-        "name": "Territory Wise Sales",
-        "doctype": "Dashboard Chart",
-        "chart_type": "Group By",
-        "group_by_type": "Sum",
-        "group_by_based_on": "territory",
-        "chart_name": _("Territory Wise Sales"),
-        "aggregate_function_based_on": "opportunity_amount",
-        "document_type": "Opportunity",
-        'is_public': 1,
-        "owner": "Administrator",
-        "filters_json": json.dumps([
-            ["Opportunity", "company", "=", company, False],
-            ["Opportunity", "status", "=", "Converted", False]
-        ]),
-        "type": "Bar"
-    },
-    {
-        "name": "Lead Source",
-        "doctype": "Dashboard Chart",
-        "chart_type": "Group By",
-        "group_by_type": "Count",
-        "group_by_based_on": "source",
-        "chart_name": _("Lead Source"),
-        "document_type": "Lead",
-        'is_public': 1,
-        "owner": "Administrator",
-        "type": "Pie",
-        "custom_options": json.dumps({
-            "truncateLegends": 1,
-            "maxSlices": 8
-        })
-    }]
-
-def get_number_cards():
-	return [{
-        "doctype": "Number Card",
-        "document_type": "Lead",
-        "name": "New Lead (Last 1 Month)",
-        "filters_json": json.dumps([
-            ["Lead", "creation", "Timespan", "last month"]
-        ]),
-        "function": "Count",
-        "is_public": 1,
-        "label": _("New Lead (Last 1 Month)"),
-        "show_percentage_stats": 1,
-        "stats_time_interval": "Daily"
-    },
-    {
-        "doctype": "Number Card",
-        "document_type": "Opportunity",
-        "name": "New Opportunity (Last 1 Month)",
-        "filters_json": json.dumps([
-            ["Opportunity", "creation", "Timespan", "last month"]
-        ]),
-        "function": "Count",
-        "is_public": 1,
-        "label": _("New Opportunity (Last 1 Month)"),
-        "show_percentage_stats": 1,
-        "stats_time_interval": "Daily"
-    },
-    {
-        "doctype": "Number Card",
-        "document_type": "Opportunity",
-        "name": "Won Opportunity (Last 1 Month)",
-        "filters_json": json.dumps([
-            ["Opportunity", "status", "=", "Converted",False],
-            ["Opportunity", "creation", "Timespan", "last month"]
-        ]),
-        "function": "Count",
-        "is_public": 1,
-        "label": _("Won Opportunity (Last 1 Month)"),
-        "show_percentage_stats": 1,
-        "stats_time_interval": "Daily"
-    },
-    {
-        "doctype": "Number Card",
-        "document_type": "Opportunity",
-        "name": "Open Opportunity",
-        "filters_json": json.dumps([["Opportunity","status","=","Open",False]]),
-        "function": "Count",
-        "is_public": 1,
-        "label": _("Open Opportunity"),
-        "show_percentage_stats": 1,
-        "stats_time_interval": "Daily"
-    }] 
\ No newline at end of file
diff --git "a/erpnext/crm/number_card/new_lead_\050last_1_month\051/new_lead_\050last_1_month\051.json" "b/erpnext/crm/number_card/new_lead_\050last_1_month\051/new_lead_\050last_1_month\051.json"
new file mode 100644
index 0000000..4511f54
--- /dev/null
+++ "b/erpnext/crm/number_card/new_lead_\050last_1_month\051/new_lead_\050last_1_month\051.json"
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-20 20:17:15.870736",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Lead",
+ "dynamic_filters_json": "[[\"Lead\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Lead\",\"creation\",\"Timespan\",\"last month\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "New Lead (Last 1 Month)",
+ "modified": "2020-07-22 16:15:17.274972",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "New Lead (Last 1 Month)",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git "a/erpnext/crm/number_card/new_opportunity_\050last_1_month\051/new_opportunity_\050last_1_month\051.json" "b/erpnext/crm/number_card/new_opportunity_\050last_1_month\051/new_opportunity_\050last_1_month\051.json"
new file mode 100644
index 0000000..90997b7
--- /dev/null
+++ "b/erpnext/crm/number_card/new_opportunity_\050last_1_month\051/new_opportunity_\050last_1_month\051.json"
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-20 20:17:15.897112",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Opportunity\",\"creation\",\"Timespan\",\"last month\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "New Opportunity (Last 1 Month)",
+ "modified": "2020-07-22 16:07:27.910432",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "New Opportunity (Last 1 Month)",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/crm/number_card/open_opportunity/open_opportunity.json b/erpnext/crm/number_card/open_opportunity/open_opportunity.json
new file mode 100644
index 0000000..6e06ed6
--- /dev/null
+++ b/erpnext/crm/number_card/open_opportunity/open_opportunity.json
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-20 20:17:15.948113",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"status\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Opportunity\",\"company\",\"=\",null,false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Open Opportunity",
+ "modified": "2020-07-22 16:16:16.420446",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Open Opportunity",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git "a/erpnext/crm/number_card/won_opportunity_\050last_1_month\051/won_opportunity_\050last_1_month\051.json" "b/erpnext/crm/number_card/won_opportunity_\050last_1_month\051/won_opportunity_\050last_1_month\051.json"
new file mode 100644
index 0000000..ba0c07e
--- /dev/null
+++ "b/erpnext/crm/number_card/won_opportunity_\050last_1_month\051/won_opportunity_\050last_1_month\051.json"
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-20 20:17:15.922486",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Opportunity",
+ "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Opportunity\",\"creation\",\"Timespan\",\"last month\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Won Opportunity (Last 1 Month)",
+ "modified": "2020-07-22 16:15:53.088837",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Won Opportunity (Last 1 Month)",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/clinical_procedures/clinical_procedures.json b/erpnext/healthcare/dashboard_chart/clinical_procedures/clinical_procedures.json
new file mode 100644
index 0000000..a59f149
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/clinical_procedures/clinical_procedures.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Clinical Procedures",
+ "chart_type": "Group By",
+ "creation": "2020-07-14 18:17:54.601236",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Clinical Procedure",
+ "dynamic_filters_json": "[[\"Clinical Procedure\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Clinical Procedure\",\"docstatus\",\"=\",\"1\",false]]",
+ "group_by_based_on": "procedure_template",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 13:22:47.008622",
+ "modified": "2020-07-22 13:36:48.114479",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Clinical Procedures",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Percentage",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/clinical_procedures_status/clinical_procedures_status.json b/erpnext/healthcare/dashboard_chart/clinical_procedures_status/clinical_procedures_status.json
new file mode 100644
index 0000000..6d560f7
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/clinical_procedures_status/clinical_procedures_status.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Clinical Procedure Status",
+ "chart_type": "Group By",
+ "creation": "2020-07-14 18:17:54.654325",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Clinical Procedure",
+ "dynamic_filters_json": "[[\"Clinical Procedure\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Clinical Procedure\",\"docstatus\",\"=\",\"1\",false]]",
+ "group_by_based_on": "status",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 13:22:46.691764",
+ "modified": "2020-07-22 13:40:17.215775",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Clinical Procedures Status",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Pie",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/department_wise_patient_appointments/department_wise_patient_appointments.json b/erpnext/healthcare/dashboard_chart/department_wise_patient_appointments/department_wise_patient_appointments.json
new file mode 100644
index 0000000..b24bb34
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/department_wise_patient_appointments/department_wise_patient_appointments.json
@@ -0,0 +1,25 @@
+{
+ "chart_name": "Department wise Patient Appointments",
+ "chart_type": "Custom",
+ "creation": "2020-07-17 11:25:37.190130",
+ "custom_options": "{\"colors\": [\"#7CD5FA\", \"#5F62F6\", \"#7544E2\", \"#EE5555\"], \"barOptions\": {\"stacked\": 1}, \"height\": 300}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\"}",
+ "filters_json": "{}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 15:32:05.827566",
+ "modified": "2020-07-22 15:35:12.798035",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Department wise Patient Appointments",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "source": "Department wise Patient Appointments",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/diagnoses/diagnoses.json b/erpnext/healthcare/dashboard_chart/diagnoses/diagnoses.json
new file mode 100644
index 0000000..0195aac
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/diagnoses/diagnoses.json
@@ -0,0 +1,25 @@
+{
+ "chart_name": "Diagnoses",
+ "chart_type": "Group By",
+ "creation": "2020-07-14 18:17:54.705698",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Patient Encounter Diagnosis",
+ "filters_json": "[]",
+ "group_by_based_on": "diagnosis",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 13:22:47.895521",
+ "modified": "2020-07-22 13:43:32.369481",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Diagnoses",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Percentage",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/in_patient_status/in_patient_status.json b/erpnext/healthcare/dashboard_chart/in_patient_status/in_patient_status.json
new file mode 100644
index 0000000..77b47c9
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/in_patient_status/in_patient_status.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "In-Patient Status",
+ "chart_type": "Group By",
+ "creation": "2020-07-14 18:17:54.629199",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Inpatient Record",
+ "dynamic_filters_json": "[[\"Inpatient Record\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[]",
+ "group_by_based_on": "status",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 13:22:46.792131",
+ "modified": "2020-07-22 13:33:16.008150",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "In-Patient Status",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/lab_tests/lab_tests.json b/erpnext/healthcare/dashboard_chart/lab_tests/lab_tests.json
new file mode 100644
index 0000000..0524835
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/lab_tests/lab_tests.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Lab Tests",
+ "chart_type": "Group By",
+ "creation": "2020-07-14 18:17:54.574903",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Lab Test",
+ "dynamic_filters_json": "[[\"Lab Test\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Lab Test\",\"docstatus\",\"=\",\"1\",false]]",
+ "group_by_based_on": "template",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 13:22:47.344055",
+ "modified": "2020-07-22 13:37:34.490129",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Lab Tests",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Percentage",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/patient_appointments/patient_appointments.json b/erpnext/healthcare/dashboard_chart/patient_appointments/patient_appointments.json
new file mode 100644
index 0000000..19bfb72
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/patient_appointments/patient_appointments.json
@@ -0,0 +1,27 @@
+{
+ "based_on": "appointment_datetime",
+ "chart_name": "Patient Appointments",
+ "chart_type": "Count",
+ "creation": "2020-07-14 18:17:54.525082",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Patient Appointment",
+ "dynamic_filters_json": "[[\"Patient Appointment\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Patient Appointment\",\"status\",\"!=\",\"Cancelled\",false]]",
+ "idx": 0,
+ "is_public": 0,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 13:22:46.830491",
+ "modified": "2020-07-22 13:38:02.254190",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Patient Appointments",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Daily",
+ "timeseries": 1,
+ "timespan": "Last Month",
+ "type": "Line",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart/symptoms/symptoms.json b/erpnext/healthcare/dashboard_chart/symptoms/symptoms.json
new file mode 100644
index 0000000..8fc86a1
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart/symptoms/symptoms.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Symptoms",
+ "chart_type": "Group By",
+ "creation": "2020-07-14 18:17:54.680852",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Patient Encounter Symptom",
+ "dynamic_filters_json": "",
+ "filters_json": "[]",
+ "group_by_based_on": "complaint",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-22 13:22:47.296748",
+ "modified": "2020-07-22 13:40:59.655129",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Symptoms",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "timeseries": 0,
+ "type": "Percentage",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py
deleted file mode 100644
index 94668a1..0000000
--- a/erpnext/healthcare/dashboard_fixtures.py
+++ /dev/null
@@ -1,245 +0,0 @@
-# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-import frappe
-import json
-from frappe import _
-
-def get_data():
-	return frappe._dict({
-		"dashboards": get_dashboards(),
-		"charts": get_charts(),
-		"number_cards": get_number_cards(),
-	})
-
-def get_company():
-	company = frappe.defaults.get_defaults().company
-	if company:
-		return company
-	else:
-		company = frappe.get_list("Company", limit=1)
-		if company:
-			return company[0].name
-	return None
-
-def get_dashboards():
-	return [{
-		"name": "Healthcare",
-		"dashboard_name": "Healthcare",
-		"charts": [
-			{ "chart": "Patient Appointments", "width": "Full"},
-			{ "chart": "In-Patient Status", "width": "Half"},
-			{ "chart": "Clinical Procedures Status", "width": "Half"},
-			{ "chart": "Lab Tests", "width": "Half"},
-			{ "chart": "Clinical Procedures", "width": "Half"},
-			{ "chart": "Symptoms", "width": "Half"},
-			{ "chart": "Diagnoses", "width": "Half"},
-			{ "chart": "Department wise Patient Appointments", "width": "Full"}
-		],
-		"cards": [
-			{ "card": "Total Patients" },
-			{ "card": "Total Patient Admitted" },
-			{ "card": "Open Appointments" },
-			{ "card": "Appointments to Bill" }
-		]
-	}]
-
-def get_charts():
-	company = get_company()
-	return [
-			{
-				"doctype": "Dashboard Chart",
-				"time_interval": "Daily",
-				"name": "Patient Appointments",
-				"chart_name": _("Patient Appointments"),
-				"timespan": "Last Month",
-				"filters_json": json.dumps([
-					["Patient Appointment", "company", "=", company, False],
-					["Patient Appointment", "status", "!=", "Cancelled"]
-				]),
-				"chart_type": "Count",
-				"timeseries": 1,
-				"based_on": "appointment_datetime",
-				"owner": "Administrator",
-				"document_type": "Patient Appointment",
-				"type": "Line",
-				"width": "Half"
-			},
-			{
-				"doctype": "Dashboard Chart",
-				"name": "Department wise Patient Appointments",
-				"chart_name": _("Department wise Patient Appointments"),
-				"chart_type": "Custom",
-				"source": "Department wise Patient Appointments",
-				"filters_json": json.dumps([]),
-				'is_public': 1,
-				"owner": "Administrator",
-				"type": "Bar",
-				"width": "Full",
-				"custom_options": json.dumps({
-					"colors": ["#7CD5FA", "#5F62F6", "#7544E2", "#EE5555"],
-					"barOptions":{
-						"stacked":1
-					},
-					"height": 300
-				})
-			},
-			{
-				"doctype": "Dashboard Chart",
-				"name": "Lab Tests",
-				"chart_name": _("Lab Tests"),
-				"chart_type": "Group By",
-				"document_type": "Lab Test",
-				"group_by_type": "Count",
-				"group_by_based_on": "template",
-				"filters_json": json.dumps([
-					["Lab Test", "company", "=", company, False],
-					["Lab Test", "docstatus", "=", 1]
-				]),
-				'is_public': 1,
-				"owner": "Administrator",
-				"type": "Percentage",
-				"width": "Half",
-			},
-			{
-				"doctype": "Dashboard Chart",
-				"name": "Clinical Procedures",
-				"chart_name": _("Clinical Procedures"),
-				"chart_type": "Group By",
-				"document_type": "Clinical Procedure",
-				"group_by_type": "Count",
-				"group_by_based_on": "procedure_template",
-				"filters_json": json.dumps([
-					["Clinical Procedure", "company", "=", company, False],
-					["Clinical Procedure", "docstatus", "=", 1]
-				]),
-				'is_public': 1,
-				"owner": "Administrator",
-				"type": "Percentage",
-				"width": "Half",
-			},
-			{
-				"doctype": "Dashboard Chart",
-				"name": "In-Patient Status",
-				"chart_name": _("In-Patient Status"),
-				"chart_type": "Group By",
-				"document_type": "Inpatient Record",
-				"group_by_type": "Count",
-				"group_by_based_on": "status",
-				"filters_json": json.dumps([
-					["Inpatient Record", "company", "=", company, False]
-				]),
-				'is_public': 1,
-				"owner": "Administrator",
-				"type": "Bar",
-				"width": "Half",
-			},
-			{
-				"doctype": "Dashboard Chart",
-				"name": "Clinical Procedures Status",
-				"chart_name": _("Clinical Procedure Status"),
-				"chart_type": "Group By",
-				"document_type": "Clinical Procedure",
-				"group_by_type": "Count",
-				"group_by_based_on": "status",
-				"filters_json": json.dumps([
-					["Clinical Procedure", "company", "=", company, False],
-					["Clinical Procedure", "docstatus", "=", 1]
-				]),
-				'is_public': 1,
-				"owner": "Administrator",
-				"type": "Pie",
-				"width": "Half",
-			},
-			{
-				"doctype": "Dashboard Chart",
-				"name": "Symptoms",
-				"chart_name": _("Symptoms"),
-				"chart_type": "Group By",
-				"document_type": "Patient Encounter Symptom",
-				"group_by_type": "Count",
-				"group_by_based_on": "complaint",
-				"filters_json": json.dumps([]),
-				'is_public': 1,
-				"owner": "Administrator",
-				"type": "Percentage",
-				"width": "Half",
-			},
-			{
-				"doctype": "Dashboard Chart",
-				"name": "Diagnoses",
-				"chart_name": _("Diagnoses"),
-				"chart_type": "Group By",
-				"document_type": "Patient Encounter Diagnosis",
-				"group_by_type": "Count",
-				"group_by_based_on": "diagnosis",
-				"filters_json": json.dumps([]),
-				'is_public': 1,
-				"owner": "Administrator",
-				"type": "Percentage",
-				"width": "Half",
-			}
-		]
-
-def get_number_cards():
-	company = get_company()
-	return [
-		{
-			"name": "Total Patients",
-			"label": _("Total Patients"),
-			"function": "Count",
-			"doctype": "Number Card",
-			"document_type": "Patient",
-			"filters_json": json.dumps(
-				[["Patient","status","=","Active",False]]
-			),
-			"is_public": 1,
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Daily"
-		},
-		{
-			"name": "Total Patients Admitted",
-			"label": _("Total Patients Admitted"),
-			"function": "Count",
-			"doctype": "Number Card",
-			"document_type": "Patient",
-			"filters_json": json.dumps(
-				[["Patient","inpatient_status","=","Admitted",False]]
-			),
-			"is_public": 1,
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Daily"
-		},
-		{
-			"name": "Open Appointments",
-			"label": _("Open Appointments"),
-			"function": "Count",
-			"doctype": "Number Card",
-			"document_type": "Patient Appointment",
-			"filters_json": json.dumps(
-				[["Patient Appointment","company","=",company,False],
-				["Patient Appointment","status","=","Open",False]]
-			),
-			"is_public": 1,
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Daily"
-		},
-		{
-			"name": "Appointments to Bill",
-			"label": _("Appointments To Bill"),
-			"function": "Count",
-			"doctype": "Number Card",
-			"document_type": "Patient Appointment",
-			"filters_json": json.dumps(
-				[["Patient Appointment","company","=",company,False],
-				["Patient Appointment","invoiced","=",0,False]]
-			),
-			"is_public": 1,
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Daily"
-		}
-	]
\ No newline at end of file
diff --git a/erpnext/healthcare/healthcare_dashboard/healthcare/healthcare.json b/erpnext/healthcare/healthcare_dashboard/healthcare/healthcare.json
new file mode 100644
index 0000000..2fea668
--- /dev/null
+++ b/erpnext/healthcare/healthcare_dashboard/healthcare/healthcare.json
@@ -0,0 +1,62 @@
+{
+ "cards": [
+  {
+   "card": "Total Patients"
+  },
+  {
+   "card": "Total Patients Admitted"
+  },
+  {
+   "card": "Open Appointments"
+  },
+  {
+   "card": "Appointments to Bill"
+  }
+ ],
+ "charts": [
+  {
+   "chart": "Patient Appointments",
+   "width": "Full"
+  },
+  {
+   "chart": "In-Patient Status",
+   "width": "Half"
+  },
+  {
+   "chart": "Clinical Procedures Status",
+   "width": "Half"
+  },
+  {
+   "chart": "Lab Tests",
+   "width": "Half"
+  },
+  {
+   "chart": "Clinical Procedures",
+   "width": "Half"
+  },
+  {
+   "chart": "Symptoms",
+   "width": "Half"
+  },
+  {
+   "chart": "Diagnoses",
+   "width": "Half"
+  },
+  {
+   "chart": "Department wise Patient Appointments",
+   "width": "Full"
+  }
+ ],
+ "creation": "2020-07-14 18:17:54.823311",
+ "dashboard_name": "Healthcare",
+ "docstatus": 0,
+ "doctype": "Dashboard",
+ "idx": 0,
+ "is_default": 0,
+ "is_standard": 1,
+ "modified": "2020-07-22 15:36:34.220387",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Healthcare",
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/number_card/appointments_to_bill/appointments_to_bill.json b/erpnext/healthcare/number_card/appointments_to_bill/appointments_to_bill.json
new file mode 100644
index 0000000..3e4d4e2
--- /dev/null
+++ b/erpnext/healthcare/number_card/appointments_to_bill/appointments_to_bill.json
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-14 18:17:54.792773",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Patient Appointment",
+ "dynamic_filters_json": "[[\"Patient Appointment\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Patient Appointment\",\"invoiced\",\"=\",0,false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Appointments To Bill",
+ "modified": "2020-07-22 13:27:58.038577",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Appointments to Bill",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/number_card/open_appointments/open_appointments.json b/erpnext/healthcare/number_card/open_appointments/open_appointments.json
new file mode 100644
index 0000000..8d121cc
--- /dev/null
+++ b/erpnext/healthcare/number_card/open_appointments/open_appointments.json
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-14 18:17:54.771092",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Patient Appointment",
+ "dynamic_filters_json": "[[\"Patient Appointment\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Patient Appointment\",\"status\",\"=\",\"Open\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Open Appointments",
+ "modified": "2020-07-22 13:27:09.542122",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Open Appointments",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/number_card/total_patients/total_patients.json b/erpnext/healthcare/number_card/total_patients/total_patients.json
new file mode 100644
index 0000000..75441a6
--- /dev/null
+++ b/erpnext/healthcare/number_card/total_patients/total_patients.json
@@ -0,0 +1,20 @@
+{
+ "creation": "2020-07-14 18:17:54.727946",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Patient",
+ "filters_json": "[[\"Patient\",\"status\",\"=\",\"Active\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Patients",
+ "modified": "2020-07-22 13:26:02.643534",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Total Patients",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/number_card/total_patients_admitted/total_patients_admitted.json b/erpnext/healthcare/number_card/total_patients_admitted/total_patients_admitted.json
new file mode 100644
index 0000000..69a967d
--- /dev/null
+++ b/erpnext/healthcare/number_card/total_patients_admitted/total_patients_admitted.json
@@ -0,0 +1,20 @@
+{
+ "creation": "2020-07-14 18:17:54.749754",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Patient",
+ "filters_json": "[[\"Patient\",\"inpatient_status\",\"=\",\"Admitted\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Patients Admitted",
+ "modified": "2020-07-22 13:26:20.027788",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Total Patients Admitted",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/completed_operation/completed_operation.json b/erpnext/manufacturing/dashboard_chart/completed_operation/completed_operation.json
new file mode 100644
index 0000000..d74ae2f
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/completed_operation/completed_operation.json
@@ -0,0 +1,28 @@
+{
+ "based_on": "creation",
+ "chart_name": "Completed Operation",
+ "chart_type": "Sum",
+ "creation": "2020-07-08 22:40:22.441658",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Work Order Operation",
+ "filters_json": "[[\"Work Order Operation\",\"docstatus\",\"=\",1,false]]",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-21 16:57:09.767009",
+ "modified": "2020-07-21 16:57:55.719802",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Completed Operation",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Quarterly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Line",
+ "use_report_chart": 0,
+ "value_based_on": "completed_qty",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/job_card_analysis/job_card_analysis.json b/erpnext/manufacturing/dashboard_chart/job_card_analysis/job_card_analysis.json
new file mode 100644
index 0000000..e3cbba6
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/job_card_analysis/job_card_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Job Card Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.549096",
+ "custom_options": "{\"barOptions\": {\"stacked\": 1}}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"docstatus\":1,\"range\":\"Monthly\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:47:06.537924",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Job Card Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Job Card Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/last_month_downtime_analysis/last_month_downtime_analysis.json b/erpnext/manufacturing/dashboard_chart/last_month_downtime_analysis/last_month_downtime_analysis.json
new file mode 100644
index 0000000..46d2215
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/last_month_downtime_analysis/last_month_downtime_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Last Month Downtime Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.516460",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{}",
+ "filters_json": "{\"from_date\":\"2020-06-21 00:00:00\",\"to_date\":\"2020-07-21 18:46:45\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 18:46:50.767333",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Last Month Downtime Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Downtime Analysis",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/pending_work_order/pending_work_order.json b/erpnext/manufacturing/dashboard_chart/pending_work_order/pending_work_order.json
new file mode 100644
index 0000000..91cd12b
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/pending_work_order/pending_work_order.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Pending Work Order",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.499217",
+ "custom_options": "{\"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"height\": 300}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"charts_based_on\":\"Age\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:46:42.917598",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Pending Work Order",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Work Order Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Donut",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/produced_quantity/produced_quantity.json b/erpnext/manufacturing/dashboard_chart/produced_quantity/produced_quantity.json
new file mode 100644
index 0000000..ba1a29d
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/produced_quantity/produced_quantity.json
@@ -0,0 +1,30 @@
+{
+ "based_on": "modified",
+ "chart_name": "Produced Quantity",
+ "chart_type": "Sum",
+ "creation": "2020-07-08 22:40:22.416285",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Work Order",
+ "dynamic_filters_json": "[[\"Work Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Work Order\",\"docstatus\",\"=\",\"1\",false]]",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-21 17:46:34.058882",
+ "modified": "2020-07-21 17:54:11.233531",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Produced Quantity",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Monthly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Line",
+ "use_report_chart": 0,
+ "value_based_on": "produced_qty",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/quality_inspection_analysis/quality_inspection_analysis.json b/erpnext/manufacturing/dashboard_chart/quality_inspection_analysis/quality_inspection_analysis.json
new file mode 100644
index 0000000..8388f3d
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/quality_inspection_analysis/quality_inspection_analysis.json
@@ -0,0 +1,25 @@
+{
+ "chart_name": "Quality Inspection Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.483617",
+ "custom_options": "{\"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"height\": 300}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "filters_json": "{\"from_date\":\"2019-07-09\",\"to_date\":\"2020-07-09\"}",
+ "idx": 0,
+ "use_report_chart": 1,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-09 12:15:51.564487",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Quality Inspection Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Quality Inspection Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Donut",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/work_order_analysis/work_order_analysis.json b/erpnext/manufacturing/dashboard_chart/work_order_analysis/work_order_analysis.json
new file mode 100644
index 0000000..879826a
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/work_order_analysis/work_order_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Work Order Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.465459",
+ "custom_options": "{\"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"height\": 300}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"charts_based_on\":\"Status\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:50:23.806007",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Work Order Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Work Order Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Donut",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/work_order_qty_analysis/work_order_qty_analysis.json b/erpnext/manufacturing/dashboard_chart/work_order_qty_analysis/work_order_qty_analysis.json
new file mode 100644
index 0000000..9357279
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/work_order_qty_analysis/work_order_qty_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Work Order Qty Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.532889",
+ "custom_options": "{\"barOptions\": {\"stacked\": 1}}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"charts_based_on\":\"Quantity\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:46:59.020709",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Work Order Qty Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Work Order Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/manufacturing_dashboard/manufacturing/manufacturing.json b/erpnext/manufacturing/manufacturing_dashboard/manufacturing/manufacturing.json
new file mode 100644
index 0000000..314efe7
--- /dev/null
+++ b/erpnext/manufacturing/manufacturing_dashboard/manufacturing/manufacturing.json
@@ -0,0 +1,62 @@
+{
+ "cards": [
+  {
+   "card": "Monthly Total Work Order"
+  },
+  {
+   "card": "Monthly Completed Work Order"
+  },
+  {
+   "card": "Ongoing Job Card"
+  },
+  {
+   "card": "Monthly Quality Inspection"
+  }
+ ],
+ "charts": [
+  {
+   "chart": "Produced Quantity",
+   "width": "Half"
+  },
+  {
+   "chart": "Completed Operation",
+   "width": "Half"
+  },
+  {
+   "chart": "Work Order Analysis",
+   "width": "Half"
+  },
+  {
+   "chart": "Quality Inspection Analysis",
+   "width": "Half"
+  },
+  {
+   "chart": "Pending Work Order",
+   "width": "Half"
+  },
+  {
+   "chart": "Last Month Downtime Analysis",
+   "width": "Half"
+  },
+  {
+   "chart": "Work Order Qty Analysis",
+   "width": "Full"
+  },
+  {
+   "chart": "Job Card Analysis",
+   "width": "Full"
+  }
+ ],
+ "creation": "2020-07-08 22:40:22.626607",
+ "dashboard_name": "Manufacturing",
+ "docstatus": 0,
+ "doctype": "Dashboard",
+ "idx": 0,
+ "is_default": 0,
+ "is_standard": 1,
+ "modified": "2020-07-09 12:39:39.455039",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Manufacturing",
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json
new file mode 100644
index 0000000..36c0b9a
--- /dev/null
+++ b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.575086",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Work Order",
+ "filters_json": "[[\"Work Order\",\"status\",\"=\",\"Completed\"],[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Monthly Completed Work Orders",
+ "modified": "2020-07-09 12:22:54.809813",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Monthly Completed Work Order",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json
new file mode 100644
index 0000000..91a4536
--- /dev/null
+++ b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.606867",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Quality Inspection",
+ "filters_json": "[[\"Quality Inspection\",\"docstatus\",\"=\",1],[\"Quality Inspection\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Monthly Quality Inspections",
+ "modified": "2020-07-09 12:23:34.838154",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Monthly Quality Inspection",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json
new file mode 100644
index 0000000..80d3b15
--- /dev/null
+++ b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.562715",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Work Order",
+ "filters_json": "[[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Monthly Total Work Orders",
+ "modified": "2020-07-09 12:22:25.698795",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Monthly Total Work Order",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json
new file mode 100644
index 0000000..ba23ff3
--- /dev/null
+++ b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.592042",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Job Card",
+ "filters_json": "[[\"Job Card\",\"status\",\"!=\",\"Completed\"],[\"Job Card\",\"docstatus\",\"=\",1]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Ongoing Job Cards",
+ "modified": "2020-07-09 12:23:18.218233",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Ongoing Job Card",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 566b979..474c343 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -709,3 +709,4 @@
 erpnext.patches.v13_0.check_is_income_tax_component #22-06-2020
 erpnext.patches.v12_0.add_taxjar_integration_field
 erpnext.patches.v12_0.update_item_tax_template_company
+erpnext.patches.v13_0.move_branch_code_to_bank_account
diff --git a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py
index 1ddbae6..a670ade 100644
--- a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py
+++ b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py
@@ -7,8 +7,7 @@
 	if frappe.db.table_exists('Bank') and frappe.db.table_exists('Bank Account') and frappe.db.has_column('Bank Account', 'swift_number'):
 		frappe.db.sql("""
 			UPDATE `tabBank` b, `tabBank Account` ba
-			SET b.swift_number = ba.swift_number, b.branch_code = ba.branch_code
-			WHERE b.name = ba.bank
+			SET b.swift_number = ba.swift_number WHERE b.name = ba.bank
 		""")
 
 	frappe.reload_doc('accounts', 'doctype', 'bank_account')
diff --git a/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py b/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py
index 8889056..06331d7 100644
--- a/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py
+++ b/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py
@@ -100,8 +100,10 @@
 				tax_type = None
 			else:
 				company = get_company(parts[-1], parenttype, parent)
-				parent_account = frappe.db.get_value("Account",
-					filters={"account_type": "Tax", "root_type": "Liability", "is_group": 0, "company": company}, fieldname="parent_account")
+				parent_account = frappe.get_value("Account", {"account_name": account_name, "company": company}, "parent_account")
+				if not parent_account:
+					parent_account = frappe.db.get_value("Account",
+						filters={"account_type": "Tax", "root_type": "Liability", "is_group": 0, "company": company}, fieldname="parent_account")
 				if not parent_account:
 					parent_account = frappe.db.get_value("Account",
 						filters={"account_type": "Tax", "root_type": "Liability", "is_group": 1, "company": company})
@@ -115,8 +117,11 @@
 				if not tax_type:
 					account = frappe.new_doc("Account")
 					account.update(filters)
-					account.insert()
-					tax_type = account.name
+					try:
+						account.insert()
+						tax_type = account.name
+					except frappe.DuplicateEntryError:
+						tax_type = frappe.db.get_value("Account", {"account_name": account_name, "company": company}, "name")
 
 		account_type = frappe.get_cached_value("Account", tax_type, "account_type")
 
diff --git a/erpnext/patches/v13_0/move_branch_code_to_bank_account.py b/erpnext/patches/v13_0/move_branch_code_to_bank_account.py
new file mode 100644
index 0000000..833ae2a
--- /dev/null
+++ b/erpnext/patches/v13_0/move_branch_code_to_bank_account.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2019, Frappe and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+
+import frappe
+
+def execute():
+
+	frappe.reload_doc('accounts', 'doctype', 'bank_account')
+	frappe.reload_doc('accounts', 'doctype', 'bank')
+
+	if frappe.db.has_column('Bank', 'branch_code') and frappe.db.has_column('Bank Account', 'branch_code'):
+		frappe.db.sql("""UPDATE `tabBank` b, `tabBank Account` ba
+			SET ba.branch_code = b.branch_code
+			WHERE ba.bank = b.name AND
+			ifnull(b.branch_code, '') != '' AND ifnull(ba.branch_code, '') = ''""")
\ No newline at end of file
diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js
index d89d471..459c01b 100644
--- a/erpnext/public/js/financial_statements.js
+++ b/erpnext/public/js/financial_statements.js
@@ -3,7 +3,7 @@
 erpnext.financial_statements = {
 	"filters": get_filters(),
 	"formatter": function(value, row, column, data, default_formatter) {
-		if (column.fieldname=="account") {
+		if (data && column.fieldname=="account") {
 			value = data.account_name || value;
 
 			column.link_onclick =
@@ -13,7 +13,7 @@
 
 		value = default_formatter(value, row, column, data);
 
-		if (!data.parent_account) {
+		if (data && !data.parent_account) {
 			value = $(`<span>${value}</span>`);
 
 			var $value = $(value).css("font-weight", "bold");
diff --git a/erpnext/selling/dashboard_chart/item_wise_annual_sales/item_wise_annual_sales.json b/erpnext/selling/dashboard_chart/item_wise_annual_sales/item_wise_annual_sales.json
new file mode 100644
index 0000000..290e526
--- /dev/null
+++ b/erpnext/selling/dashboard_chart/item_wise_annual_sales/item_wise_annual_sales.json
@@ -0,0 +1,24 @@
+{
+ "chart_name": "Item-wise Annual Sales",
+ "chart_type": "Report",
+ "creation": "2020-07-20 20:17:16.474566",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"to_date\":\"frappe.datetime.nowdate()\"}",
+ "filters_json": "{\"from_date\":\"2020-06-22\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 14:42:25.512675",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Item-wise Annual Sales",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Item-wise Sales History",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/selling/dashboard_chart/sales_order_analysis/sales_order_analysis.json b/erpnext/selling/dashboard_chart/sales_order_analysis/sales_order_analysis.json
new file mode 100644
index 0000000..5e1a0d9
--- /dev/null
+++ b/erpnext/selling/dashboard_chart/sales_order_analysis/sales_order_analysis.json
@@ -0,0 +1,24 @@
+{
+ "chart_name": "Sales Order Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-20 20:17:16.440393",
+ "custom_options": "{\"type\": \"donut\", \"height\": 300, \"axisOptions\": {\"shortenYAxisNumbers\": 1}}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"to_date\":\"frappe.datetime.nowdate()\"}",
+ "filters_json": "{\"status\":[\"To Bill\",\"To Deliver\"],\"group_by_so\":0,\"from_date\":\"2020-06-22\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 17:06:05.750660",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Sales Order Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Sales Order Analysis",
+ "timeseries": 0,
+ "type": "Donut",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/selling/dashboard_chart/sales_order_trends/sales_order_trends.json b/erpnext/selling/dashboard_chart/sales_order_trends/sales_order_trends.json
new file mode 100644
index 0000000..914d915
--- /dev/null
+++ b/erpnext/selling/dashboard_chart/sales_order_trends/sales_order_trends.json
@@ -0,0 +1,24 @@
+{
+ "chart_name": "Sales Order Trends",
+ "chart_type": "Report",
+ "creation": "2020-07-20 20:17:16.508240",
+ "custom_options": "{\"type\": \"line\", \"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"tooltipOptions\": {}, \"lineOptions\": {\"regionFill\": 1}}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
+ "filters_json": "{\"period\":\"Monthly\",\"based_on\":\"Item\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 16:24:45.726270",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Sales Order Trends",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Sales Order Trends",
+ "timeseries": 0,
+ "type": "Line",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/selling/dashboard_chart/top_customers/top_customers.json b/erpnext/selling/dashboard_chart/top_customers/top_customers.json
new file mode 100644
index 0000000..59a2ba3
--- /dev/null
+++ b/erpnext/selling/dashboard_chart/top_customers/top_customers.json
@@ -0,0 +1,24 @@
+{
+ "chart_name": "Top Customers",
+ "chart_type": "Report",
+ "creation": "2020-07-20 20:17:16.539281",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
+ "filters_json": "{\"period\":\"Yearly\",\"based_on\":\"Customer\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 17:03:10.320147",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Top Customers",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Delivery Note Trends",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/selling/dashboard_fixtures.py b/erpnext/selling/dashboard_fixtures.py
deleted file mode 100644
index 889cb88..0000000
--- a/erpnext/selling/dashboard_fixtures.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-import frappe
-import json
-from frappe import _
-from frappe.utils import nowdate
-from erpnext.accounts.utils import get_fiscal_year
-
-def get_data():
-	return frappe._dict({
-		"dashboards": get_dashboards(),
-		"charts": get_charts(),
-		"number_cards": get_number_cards(),
-	})
-
-def get_company_for_dashboards():
-	company = frappe.defaults.get_defaults().company
-	if company:
-		return company
-	else:
-		company_list = frappe.get_list("Company")
-		if company_list:
-			return company_list[0].name
-	return None
-
-company = frappe.get_doc("Company", get_company_for_dashboards())
-fiscal_year = get_fiscal_year(nowdate(), as_dict=1)
-fiscal_year_name = fiscal_year.get("name")
-start_date = str(fiscal_year.get("year_start_date"))
-end_date = str(fiscal_year.get("year_end_date"))
-
-def get_dashboards():
-	return [{
-		"name": "Selling",
-		"dashboard_name": "Selling",
-		"charts": [
-			{ "chart": "Sales Order Trends", "width": "Full"},
-			{ "chart": "Top Customers", "width": "Half"},
-			{ "chart": "Sales Order Analysis", "width": "Half"},
-			{ "chart": "Item-wise Annual Sales", "width": "Full"}
-		],
-		"cards": [
-			{ "card": "Annual Sales"},
-			{ "card": "Sales Orders to Deliver"},
-			{ "card": "Sales Orders to Bill"},
-			{ "card": "Active Customers"}
-		]
-	}]
-
-def get_charts():
-	return [
-		{
-			"name": "Sales Order Analysis",
-			"chart_name": _("Sales Order Analysis"),
-			"chart_type": "Report",
-			"custom_options": json.dumps({
-				"type": "donut",
-				"height": 300,
-				"axisOptions": {"shortenYAxisNumbers": 1}
-			}),
-			"doctype": "Dashboard Chart",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"from_date": start_date,
-				"to_date": end_date
-			}),
-			"is_custom": 1,
-			"is_public": 1,
-			"owner": "Administrator",
-			"report_name": "Sales Order Analysis",
-			"type": "Donut"
-		},
-		{
-			"name": "Item-wise Annual Sales",
-			"chart_name": _("Item-wise Annual Sales"),
-			"chart_type": "Report",
-			"doctype": "Dashboard Chart",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"from_date": start_date,
-				"to_date": end_date
-			}),
-			"is_custom": 1,
-			"is_public": 1,
-			"owner": "Administrator",
-			"report_name": "Item-wise Sales History",
-			"type": "Bar"
-		},
-		{
-			"name": "Sales Order Trends",
-			"chart_name": _("Sales Order Trends"),
-			"chart_type": "Report",
-			"custom_options": json.dumps({
-				"type": "line",
-				"axisOptions": {"shortenYAxisNumbers": 1},
-				"tooltipOptions": {},
-				"lineOptions": {
-					"regionFill": 1
-				}
-			}),
-			"doctype": "Dashboard Chart",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"period": "Monthly",
-				"fiscal_year": fiscal_year_name,
-				"based_on": "Item"
-			}),
-			"is_custom": 1,
-			"is_public": 1,
-			"owner": "Administrator",
-			"report_name": "Sales Order Trends",
-			"type": "Line"
-		},
-		{
-			"name": "Top Customers",
-			"chart_name": _("Top Customers"),
-			"chart_type": "Report",
-			"doctype": "Dashboard Chart",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"period": "Monthly",
-				"fiscal_year": fiscal_year_name,
-				"based_on": "Customer"
-			}),
-			"is_custom": 1,
-			"is_public": 1,
-			"owner": "Administrator",
-			"report_name": "Delivery Note Trends",
-			"type": "Bar"
-		}
- 	]
-
-def get_number_cards():
-	return [
-		{
-			"name": "Annual Sales",
-			"aggregate_function_based_on": "base_net_total",
-			"doctype": "Number Card",
-			"document_type": "Sales Order",
-			"filters_json": json.dumps([
-				["Sales Order", "transaction_date", "Between", [start_date, end_date], False],
-				["Sales Order", "status", "not in", ["Draft", "Cancelled", "Closed", None], False],
-				["Sales Order", "docstatus", "=", 1, False],
-				["Sales Order", "company", "=", company.name, False]
-			]),
-			"function": "Sum",
-			"is_public": 1,
-			"label": _("Annual Sales"),
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		},
-		{
-			"name": "Sales Orders to Deliver",
-			"doctype": "Number Card",
-			"document_type": "Sales Order",
-			"filters_json": json.dumps([
-				["Sales Order", "status", "in", ["To Deliver and Bill", "To Deliver", None], False],
-				["Sales Order", "docstatus", "=", 1, False],
-				["Sales Order", "company", "=", company.name, False]
-			]),
-			"function": "Count",
-			"is_public": 1,
-			"label": _("Sales Orders to Deliver"),
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Weekly"
-		},
-		{
-			"name": "Sales Orders to Bill",
-			"doctype": "Number Card",
-			"document_type": "Sales Order",
-			"filters_json": json.dumps([
-				["Sales Order", "status", "in", ["To Deliver and Bill", "To Bill", None], False],
-				["Sales Order", "docstatus", "=", 1, False],
-				["Sales Order", "company", "=", company.name, False]
-			]),
-			"function": "Count",
-			"is_public": 1,
-			"label": _("Sales Orders to Bill"),
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Weekly"
-		},
-		{
-			"name": "Active Customers",
-			"doctype": "Number Card",
-			"document_type": "Customer",
-			"filters_json": json.dumps([["Customer", "disabled", "=", "0"]]),
-			"function": "Count",
-			"is_public": 1,
-			"label": "Active Customers",
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		}
-	]
\ No newline at end of file
diff --git a/erpnext/selling/number_card/active_customers/active_customers.json b/erpnext/selling/number_card/active_customers/active_customers.json
new file mode 100644
index 0000000..3377634
--- /dev/null
+++ b/erpnext/selling/number_card/active_customers/active_customers.json
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-20 20:17:16.653866",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Customer",
+ "dynamic_filters_json": "",
+ "filters_json": "[[\"Customer\",\"disabled\",\"=\",\"0\"]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Active Customers",
+ "modified": "2020-07-22 14:20:32.268103",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Active Customers",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/selling/number_card/annual_sales/annual_sales.json b/erpnext/selling/number_card/annual_sales/annual_sales.json
new file mode 100644
index 0000000..8746ee4
--- /dev/null
+++ b/erpnext/selling/number_card/annual_sales/annual_sales.json
@@ -0,0 +1,22 @@
+{
+ "aggregate_function_based_on": "base_net_total",
+ "creation": "2020-07-20 20:17:16.568132",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Sales Order",
+ "dynamic_filters_json": "[[\"Sales Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Sales Order\",\"status\",\"not in\",[\"Draft\",\"Cancelled\",\"Closed\",null],false],[\"Sales Order\",\"docstatus\",\"=\",\"1\",false],[\"Sales Order\",\"modified\",\"Timespan\",\"this year\",false]]",
+ "function": "Sum",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Annual Sales",
+ "modified": "2020-07-22 16:56:33.747156",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Annual Sales",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/selling/number_card/sales_orders_to_bill/sales_orders_to_bill.json b/erpnext/selling/number_card/sales_orders_to_bill/sales_orders_to_bill.json
new file mode 100644
index 0000000..27fea45
--- /dev/null
+++ b/erpnext/selling/number_card/sales_orders_to_bill/sales_orders_to_bill.json
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-20 20:17:16.625001",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Sales Order",
+ "dynamic_filters_json": "[[\"Sales Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Sales Order\",\"status\",\"in\",[\"To Deliver and Bill\",\"To Bill\",null],false],[\"Sales Order\",\"docstatus\",\"=\",\"1\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Sales Orders to Bill",
+ "modified": "2020-07-22 14:20:09.918626",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Sales Orders to Bill",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/selling/number_card/sales_orders_to_deliver/sales_orders_to_deliver.json b/erpnext/selling/number_card/sales_orders_to_deliver/sales_orders_to_deliver.json
new file mode 100644
index 0000000..6e19cf4
--- /dev/null
+++ b/erpnext/selling/number_card/sales_orders_to_deliver/sales_orders_to_deliver.json
@@ -0,0 +1,21 @@
+{
+ "creation": "2020-07-20 20:17:16.596857",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Sales Order",
+ "dynamic_filters_json": "[[\"Sales Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Sales Order\",\"status\",\"in\",[\"To Deliver and Bill\",\"To Deliver\",null],false],[\"Sales Order\",\"docstatus\",\"=\",\"1\",false]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Sales Orders to Deliver",
+ "modified": "2020-07-22 14:19:28.833784",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Sales Orders to Deliver",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py
index 1bc4657..0a70b97 100644
--- a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py
+++ b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py
@@ -191,7 +191,7 @@
 		conditions += "AND so_item.item_code = '%s'" %frappe.db.escape(filters.item_code)
 
 	if filters.get("customer"):
-		conditions += "AND so.customer = '%s'" %frappe.db.escape(filters.customer)
+		conditions += "AND so.customer = %s" %frappe.db.escape(filters.customer)
 
 	return conditions
 
diff --git a/erpnext/selling/selling_dashboard/selling/selling.json b/erpnext/selling/selling_dashboard/selling/selling.json
new file mode 100644
index 0000000..52e6714
--- /dev/null
+++ b/erpnext/selling/selling_dashboard/selling/selling.json
@@ -0,0 +1,46 @@
+{
+ "cards": [
+  {
+   "card": "Annual Sales"
+  },
+  {
+   "card": "Sales Orders to Deliver"
+  },
+  {
+   "card": "Sales Orders to Bill"
+  },
+  {
+   "card": "Active Customers"
+  }
+ ],
+ "charts": [
+  {
+   "chart": "Sales Order Trends",
+   "width": "Full"
+  },
+  {
+   "chart": "Top Customers",
+   "width": "Half"
+  },
+  {
+   "chart": "Sales Order Analysis",
+   "width": "Half"
+  },
+  {
+   "chart": "Item-wise Annual Sales",
+   "width": "Full"
+  }
+ ],
+ "creation": "2020-07-20 20:17:16.688162",
+ "dashboard_name": "Selling",
+ "docstatus": 0,
+ "doctype": "Dashboard",
+ "idx": 0,
+ "is_default": 0,
+ "is_standard": 1,
+ "modified": "2020-07-22 15:31:22.299903",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Selling",
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/dashboard_chart/delivery_trends/delivery_trends.json b/erpnext/stock/dashboard_chart/delivery_trends/delivery_trends.json
new file mode 100644
index 0000000..b3f6e35
--- /dev/null
+++ b/erpnext/stock/dashboard_chart/delivery_trends/delivery_trends.json
@@ -0,0 +1,27 @@
+{
+ "based_on": "posting_date",
+ "chart_name": "Delivery Trends",
+ "chart_type": "Sum",
+ "color": "#4d4da8",
+ "creation": "2020-07-20 21:01:04.255291",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Delivery Note",
+ "filters_json": "[[\"Delivery Note\",\"docstatus\",\"=\",1]]",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 13:03:24.937045",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Delivery Trends",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Monthly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 0,
+ "value_based_on": "base_net_total",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/stock/dashboard_chart/item_shortage_summary/item_shortage_summary.json b/erpnext/stock/dashboard_chart/item_shortage_summary/item_shortage_summary.json
new file mode 100644
index 0000000..ce71124
--- /dev/null
+++ b/erpnext/stock/dashboard_chart/item_shortage_summary/item_shortage_summary.json
@@ -0,0 +1,23 @@
+{
+ "chart_name": "Item Shortage Summary",
+ "chart_type": "Report",
+ "creation": "2020-07-20 21:01:04.383451",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\"}",
+ "filters_json": "{}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 13:07:01.905334",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Item Shortage Summary",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Item Shortage Report",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json
new file mode 100644
index 0000000..6da3b28
--- /dev/null
+++ b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json
@@ -0,0 +1,24 @@
+{
+ "chart_name": "Oldest Items",
+ "chart_type": "Report",
+ "creation": "2020-07-20 21:01:04.336845",
+ "custom_options": "{\"colors\": [\"#5e64ff\"]}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"to_date\":\"frappe.datetime.nowdate()\"}",
+ "filters_json": "{\"show_warehouse_wise_stock\":0}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 13:04:36.271198",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Oldest Items",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Stock Ageing",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/stock/dashboard_chart/purchase_receipt_trends/purchase_receipt_trends.json b/erpnext/stock/dashboard_chart/purchase_receipt_trends/purchase_receipt_trends.json
new file mode 100644
index 0000000..584a6cc
--- /dev/null
+++ b/erpnext/stock/dashboard_chart/purchase_receipt_trends/purchase_receipt_trends.json
@@ -0,0 +1,27 @@
+{
+ "based_on": "posting_date",
+ "chart_name": "Purchase Receipt Trends",
+ "chart_type": "Sum",
+ "color": "#78d6ff",
+ "creation": "2020-07-20 21:01:04.205230",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Purchase Receipt",
+ "filters_json": "[[\"Purchase Receipt\",\"docstatus\",\"=\",1]]",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 13:05:25.923130",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Purchase Receipt Trends",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Monthly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 0,
+ "value_based_on": "base_net_total",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json
new file mode 100644
index 0000000..a07b553
--- /dev/null
+++ b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json
@@ -0,0 +1,22 @@
+{
+ "chart_name": "Warehouse wise Stock Value",
+ "chart_type": "Custom",
+ "creation": "2020-07-20 21:01:04.296157",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "filters_json": "{}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 13:01:01.815123",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Warehouse wise Stock Value",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "source": "Warehouse wise Stock Value",
+ "timeseries": 0,
+ "type": "Bar",
+ "use_report_chart": 0,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/stock/dashboard_fixtures.py b/erpnext/stock/dashboard_fixtures.py
deleted file mode 100644
index 7625b1a..0000000
--- a/erpnext/stock/dashboard_fixtures.py
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-import frappe
-import json
-from frappe import _
-from frappe.utils import nowdate
-from erpnext.accounts.dashboard_fixtures import _get_fiscal_year
-from erpnext.buying.dashboard_fixtures import get_company_for_dashboards
-
-def get_data():
-	fiscal_year = _get_fiscal_year(nowdate())
-
-	if not fiscal_year:
-		return frappe._dict()
-
-	company = frappe.get_doc("Company", get_company_for_dashboards())
-	fiscal_year_name = fiscal_year.get("name")
-	start_date = str(fiscal_year.get("year_start_date"))
-	end_date = str(fiscal_year.get("year_end_date"))
-
-	return frappe._dict({
-		"dashboards": get_dashboards(),
-		"charts": get_charts(company, fiscal_year_name, start_date, end_date),
-		"number_cards": get_number_cards(company, fiscal_year_name, start_date, end_date),
-	})
-
-def get_dashboards():
-	return [{
-		"name": "Stock",
-		"dashboard_name": "Stock",
-		"charts": [
-			{ "chart": "Warehouse wise Stock Value", "width": "Full"},
-			{ "chart": "Purchase Receipt Trends", "width": "Half"},
-			{ "chart": "Delivery Trends", "width": "Half"},
-			{ "chart": "Oldest Items", "width": "Half"},
-			{ "chart": "Item Shortage Summary", "width": "Half"}
-		],
-		"cards": [
-			{ "card": "Total Active Items"},
-			{ "card": "Total Warehouses"},
-			{ "card": "Total Stock Value"}
-		]
-	}]
-
-def get_charts(company, fiscal_year_name, start_date, end_date):
-	return [
-		{
-			"doctype": "Dashboard Chart",
-			"name": "Purchase Receipt Trends",
-			"time_interval": "Monthly",
-			"chart_name": _("Purchase Receipt Trends"),
-			"timespan": "Last Year",
-			"color": "#7b933d",
-			"value_based_on": "base_net_total",
-			"filters_json": json.dumps([["Purchase Receipt", "docstatus", "=", 1]]),
-			"chart_type": "Sum",
-			"timeseries": 1,
-			"based_on": "posting_date",
-			"owner": "Administrator",
-			"document_type": "Purchase Receipt",
-			"type": "Bar",
-			"width": "Half",
-			"is_public": 1
-		},
-		{
-			"doctype": "Dashboard Chart",
-			"name": "Delivery Trends",
-			"time_interval": "Monthly",
-			"chart_name": _("Delivery Trends"),
-			"timespan": "Last Year",
-			"color": "#7b933d",
-			"value_based_on": "base_net_total",
-			"filters_json": json.dumps([["Delivery Note", "docstatus", "=", 1]]),
-			"chart_type": "Sum",
-			"timeseries": 1,
-			"based_on": "posting_date",
-			"owner": "Administrator",
-			"document_type": "Delivery Note",
-			"type": "Bar",
-			"width": "Half",
-			"is_public": 1
-		},
-		{
-			"name": "Warehouse wise Stock Value",
-			"chart_name": _("Warehouse wise Stock Value"),
-			"chart_type": "Custom",
-			"doctype": "Dashboard Chart",
-			"filters_json": json.dumps({}),
-			"is_custom": 0,
-			"is_public": 1,
-			"owner": "Administrator",
-			"source": "Warehouse wise Stock Value",
-			"type": "Bar"
-		},
-		{
-			"name": "Oldest Items",
-			"chart_name": _("Oldest Items"),
-			"chart_type": "Report",
-			"custom_options": json.dumps({
-				"colors": ["#5e64ff"]
-				}),
-			"doctype": "Dashboard Chart",
-			"filters_json": json.dumps({
-				"company": company.name,
-				"to_date": nowdate(),
-				"show_warehouse_wise_stock": 0
-			}),
-			"is_custom": 1,
-			"is_public": 1,
-			"owner": "Administrator",
-			"report_name": "Stock Ageing",
-			"type": "Bar"
-		},
-		{
-			"name": "Item Shortage Summary",
-			"chart_name": _("Item Shortage Summary"),
-			"chart_type": "Report",
-			"doctype": "Dashboard Chart",
-			"filters_json": json.dumps({
-				"company": company.name
-			}),
-			"is_custom": 1,
-			"is_public": 1,
-			"owner": "Administrator",
-			"report_name": "Item Shortage Report",
-			"type": "Bar"
-		}
-	]
-
-def get_number_cards(company, fiscal_year_name, start_date, end_date):
-	return [
-		{
-			"name": "Total Active Items",
-			"label": _("Total Active Items"),
-			"function": "Count",
-			"doctype": "Number Card",
-			"document_type": "Item",
-			"filters_json": json.dumps([["Item", "disabled", "=", 0]]),
-			"is_public": 1,
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		},
-		{
-			"name": "Total Warehouses",
-			"label": _("Total Warehouses"),
-			"function": "Count",
-			"doctype": "Number Card",
-			"document_type": "Warehouse",
-			"filters_json": json.dumps([["Warehouse", "disabled", "=", 0]]),
-			"is_public": 1,
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Monthly"
-		},
-		{
-			"name": "Total Stock Value",
-			"label": _("Total Stock Value"),
-			"function": "Sum",
-			"aggregate_function_based_on": "stock_value",
-			"doctype": "Number Card",
-			"document_type": "Bin",
-			"filters_json": json.dumps([]),
-			"is_public": 1,
-			"owner": "Administrator",
-			"show_percentage_stats": 1,
-			"stats_time_interval": "Daily"
-		}
-	]
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index a75ee67..d5f479f 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -13,7 +13,7 @@
 from erpnext.setup.doctype.item_group.item_group import (get_parent_item_groups, invalidate_cache_for)
 from frappe import _, msgprint
 from frappe.utils import (cint, cstr, flt, formatdate, get_timestamp, getdate,
-						  now_datetime, random_string, strip)
+						  now_datetime, random_string, strip, get_link_to_form)
 from frappe.utils.html_utils import clean_html
 from frappe.website.doctype.website_slideshow.website_slideshow import \
 	get_slideshow
@@ -634,6 +634,9 @@
 									+ ": \n" + ", ".join([self.meta.get_label(fld) for fld in field_list]))
 
 	def after_rename(self, old_name, new_name, merge):
+		if merge:
+			self.validate_duplicate_item_in_stock_reconciliation(old_name, new_name)
+
 		if self.route:
 			invalidate_cache_for_item(self)
 			clear_cache(self.route)
@@ -656,6 +659,27 @@
 					frappe.db.set_value(dt, d.name, "item_wise_tax_detail",
 											json.dumps(item_wise_tax_detail), update_modified=False)
 
+	def validate_duplicate_item_in_stock_reconciliation(self, old_name, new_name):
+		records = frappe.db.sql(""" SELECT parent, COUNT(*) as records
+			FROM `tabStock Reconciliation Item`
+			WHERE item_code = %s and docstatus = 1
+			GROUP By item_code, warehouse, parent
+			HAVING records > 1
+		""", new_name, as_dict=1)
+
+		if not records: return
+		document = _("Stock Reconciliation") if len(records) == 1 else _("Stock Reconciliations")
+
+		msg = _("The items {0} and {1} are present in the following {2} : <br>"
+			.format(frappe.bold(old_name), frappe.bold(new_name), document))
+
+		msg += ', '.join([get_link_to_form("Stock Reconciliation", d.parent) for d in records]) + "<br><br>"
+
+		msg += _("Note: To merge the items, create a separate Stock Reconciliation for the old item {0}"
+			.format(frappe.bold(old_name)))
+
+		frappe.throw(_(msg), title=_("Merge not allowed"))
+
 	def set_last_purchase_rate(self, new_name):
 		last_purchase_rate = get_last_purchase_details(new_name).get("base_net_rate", 0)
 		frappe.db.set_value("Item", new_name, "last_purchase_rate", last_purchase_rate)
diff --git a/erpnext/stock/doctype/serial_no/serial_no.json b/erpnext/stock/doctype/serial_no/serial_no.json
index 2be14c8..3acf3a9 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.json
+++ b/erpnext/stock/doctype/serial_no/serial_no.json
@@ -1,6 +1,7 @@
 {
  "actions": [],
  "allow_import": 1,
+ "allow_rename": 1,
  "autoname": "field:serial_no",
  "creation": "2013-05-16 10:59:15",
  "description": "Distinct unit of an Item",
@@ -426,7 +427,7 @@
  "icon": "fa fa-barcode",
  "idx": 1,
  "links": [],
- "modified": "2020-06-25 15:53:50.900855",
+ "modified": "2020-07-20 20:50:16.660433",
  "modified_by": "Administrator",
  "module": "Stock",
  "name": "Serial No",
diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py
index 90f0f58..153ce2f 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.py
+++ b/erpnext/stock/doctype/serial_no/serial_no.py
@@ -190,6 +190,23 @@
 		if sle_exists:
 			frappe.throw(_("Cannot delete Serial No {0}, as it is used in stock transactions").format(self.name))
 
+	def before_rename(self, old, new, merge=False):
+		if merge:
+			frappe.throw(_("Sorry, Serial Nos cannot be merged"))
+
+	def after_rename(self, old, new, merge=False):
+		"""rename serial_no text fields"""
+		for dt in frappe.db.sql("""select parent from tabDocField
+			where fieldname='serial_no' and fieldtype in ('Text', 'Small Text', 'Long Text')"""):
+
+			for item in frappe.db.sql("""select name, serial_no from `tab%s`
+				where serial_no like %s""" % (dt[0], frappe.db.escape('%' + old + '%'))):
+
+				serial_nos = map(lambda i: new if i.upper()==old.upper() else i, item[1].split('\n'))
+				frappe.db.sql("""update `tab%s` set serial_no = %s
+					where name=%s""" % (dt[0], '%s', '%s'),
+					('\n'.join(list(serial_nos)), item[0]))
+
 	def update_serial_no_reference(self, serial_no=None):
 		last_sle = self.get_last_sle(serial_no)
 		self.set_purchase_details(last_sle.get("purchase_sle"))
diff --git a/erpnext/stock/number_card/total_active_items/total_active_items.json b/erpnext/stock/number_card/total_active_items/total_active_items.json
new file mode 100644
index 0000000..f6863b9
--- /dev/null
+++ b/erpnext/stock/number_card/total_active_items/total_active_items.json
@@ -0,0 +1,20 @@
+{
+ "creation": "2020-07-20 21:01:04.422436",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Item",
+ "filters_json": "[[\"Item\",\"disabled\",\"=\",0]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Active Items",
+ "modified": "2020-07-22 13:08:30.430677",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Total Active Items",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/stock/number_card/total_stock_value/total_stock_value.json b/erpnext/stock/number_card/total_stock_value/total_stock_value.json
new file mode 100644
index 0000000..8e480a6
--- /dev/null
+++ b/erpnext/stock/number_card/total_stock_value/total_stock_value.json
@@ -0,0 +1,21 @@
+{
+ "aggregate_function_based_on": "stock_value",
+ "creation": "2020-07-20 21:01:04.495481",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Bin",
+ "filters_json": "[]",
+ "function": "Sum",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Stock Value",
+ "modified": "2020-07-22 13:08:48.412001",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Total Stock Value",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Daily",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/stock/number_card/total_warehouses/total_warehouses.json b/erpnext/stock/number_card/total_warehouses/total_warehouses.json
new file mode 100644
index 0000000..ab0836a
--- /dev/null
+++ b/erpnext/stock/number_card/total_warehouses/total_warehouses.json
@@ -0,0 +1,20 @@
+{
+ "creation": "2020-07-20 21:01:04.457598",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Warehouse",
+ "filters_json": "[[\"Warehouse\",\"disabled\",\"=\",0]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Total Warehouses",
+ "modified": "2020-07-22 13:08:40.258927",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Total Warehouses",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Monthly",
+ "type": "Document Type"
+}
\ No newline at end of file
diff --git a/erpnext/stock/stock_dashboard/stock/stock.json b/erpnext/stock/stock_dashboard/stock/stock.json
new file mode 100644
index 0000000..dee7fed
--- /dev/null
+++ b/erpnext/stock/stock_dashboard/stock/stock.json
@@ -0,0 +1,47 @@
+{
+ "cards": [
+  {
+   "card": "Total Active Items"
+  },
+  {
+   "card": "Total Warehouses"
+  },
+  {
+   "card": "Total Stock Value"
+  }
+ ],
+ "charts": [
+  {
+   "chart": "Warehouse wise Stock Value",
+   "width": "Full"
+  },
+  {
+   "chart": "Purchase Receipt Trends",
+   "width": "Half"
+  },
+  {
+   "chart": "Delivery Trends",
+   "width": "Half"
+  },
+  {
+   "chart": "Oldest Items",
+   "width": "Half"
+  },
+  {
+   "chart": "Item Shortage Summary",
+   "width": "Half"
+  }
+ ],
+ "creation": "2020-07-20 21:01:04.549136",
+ "dashboard_name": "Stock",
+ "docstatus": 0,
+ "doctype": "Dashboard",
+ "idx": 0,
+ "is_default": 1,
+ "is_standard": 1,
+ "modified": "2020-07-22 13:09:33.096694",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Stock",
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/templates/includes/footer/footer_extension.html b/erpnext/templates/includes/footer/footer_extension.html
index 8cf3081..6171b61 100644
--- a/erpnext/templates/includes/footer/footer_extension.html
+++ b/erpnext/templates/includes/footer/footer_extension.html
@@ -6,7 +6,7 @@
 		aria-label="{{ _('Your email address...') }}"
 		aria-describedby="footer-subscribe-button">
 	<div class="input-group-append">
-		<button class="btn btn-outline-secondary"
+		<button class="btn btn-sm btn-outline-secondary"
 			type="button" id="footer-subscribe-button">{{ _("Get Updates") }}</button>
 	</div>
 </div>