Merge pull request #21793 from deepeshgarg007/general_ledger_against_voucher

fix: Against voucher in General Ledger
diff --git a/erpnext/buying/dashboard_fixtures.py b/erpnext/buying/dashboard_fixtures.py
new file mode 100644
index 0000000..0e2f78f
--- /dev/null
+++ b/erpnext/buying/dashboard_fixtures.py
@@ -0,0 +1,207 @@
+# 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": "Buying",
+		"dashboard_name": "Buying",
+		"charts": [
+			{ "chart": "Purchase Order Trends", "width": "Full"},
+			{ "chart": "Material Request Analysis", "width": "Half"},
+			{ "chart": "Purchase Order Analysis", "width": "Half"},
+			{ "chart": "Top Suppliers", "width": "Full"}
+		],
+		"cards": [
+			{ "card": "This Year Purchases"},
+			{ "card": "Purchase Orders to Receive"},
+			{ "card": "Purchase Orders to Bill"},
+			{ "card": "Active Suppliers"}
+		]
+	}]
+
+def get_charts():
+	return [
+		{
+			"name": "Purchase Order Analysis",
+			"chart_name": _("Purchase 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": "Purchase Order Analysis",
+			"type": "Donut"
+		},
+		{
+			"name": "Material Request Analysis",
+			"chart_name": _("Material Request Analysis"),
+			"chart_type": "Group By",
+			"custom_options": json.dumps({"height": 300}),
+			"doctype": "Dashboard Chart",
+			"document_type": "Material Request",
+			"filters_json": json.dumps(
+				[["Material Request", "status", "not in", ["Draft", "Cancelled", "Stopped", None], False],
+				["Material Request", "material_request_type", "=", "Purchase", False],
+				["Material Request", "company", "=", company.name, False],
+				["Material Request", "docstatus", "=", 1, False],
+				["Material Request", "transaction_date", "Between", [start_date, end_date], False]]
+			),
+			"group_by_based_on": "status",
+			"group_by_type": "Count",
+			"is_custom": 0,
+			"is_public": 1,
+			"number_of_groups": 0,
+			"owner": "Administrator",
+			"type": "Donut"
+		},
+		{
+			"name": "Purchase Order Trends",
+			"chart_name": _("Purchase 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,
+				"period_based_on": "posting_date",
+				"based_on": "Item"
+			}),
+			"is_custom": 1,
+			"is_public": 1,
+			"owner": "Administrator",
+			"report_name": "Purchase Order Trends",
+			"type": "Line"
+		},
+		{
+			"name": "Top Suppliers",
+			"chart_name": _("Top Suppliers"),
+			"chart_type": "Report",
+			"doctype": "Dashboard Chart",
+			"filters_json": json.dumps({
+				"company": company.name,
+				"period": "Monthly",
+				"fiscal_year": fiscal_year_name,
+				"period_based_on": "posting_date",
+				"based_on": "Supplier"
+			}),
+			"is_custom": 1,
+			"is_public": 1,
+			"owner": "Administrator",
+			"report_name": "Purchase Receipt Trends",
+			"type": "Bar"
+		}
+ 	]
+
+def get_number_cards():
+	return [
+		{
+			"name": "This Year Purchases",
+			"aggregate_function_based_on": "base_net_total",
+			"doctype": "Number Card",
+			"document_type": "Purchase Order",
+			"filters_json": json.dumps([
+				["Purchase Order", "transaction_date", "Between", [start_date, end_date], False],
+				["Purchase Order", "status", "not in", ["Draft", "Cancelled", "Closed", None], False],
+				["Purchase Order", "docstatus", "=", 1, False],
+				["Purchase Order", "company", "=", company.name, False],
+				["Purchase Order", "transaction_date", "Between", [start_date,end_date], False]
+			]),
+			"function": "Sum",
+			"is_public": 1,
+			"label": _("This Year Purchases"),
+			"owner": "Administrator",
+			"show_percentage_stats": 1,
+			"stats_time_interval": "Monthly"
+		},
+		{
+			"name": "Purchase Orders to Receive",
+			"doctype": "Number Card",
+			"document_type": "Purchase Order",
+			"filters_json": json.dumps([
+				["Purchase Order", "status", "in", ["To Receive and Bill", "To Receive", None], False],
+				["Purchase Order", "docstatus", "=", 1, False],
+				["Purchase Order", "company", "=", company.name, False]
+			]),
+			"function": "Count",
+			"is_public": 1,
+			"label": _("Purchase Orders to Receive"),
+			"owner": "Administrator",
+			"show_percentage_stats": 1,
+			"stats_time_interval": "Weekly"
+		},
+		{
+			"name": "Purchase Orders to Bill",
+			"doctype": "Number Card",
+			"document_type": "Purchase Order",
+			"filters_json": json.dumps([
+				["Purchase Order", "status", "in", ["To Receive and Bill", "To Bill", None], False],
+				["Purchase Order", "docstatus", "=", 1, False],
+				["Purchase Order", "company", "=", company.name, False]
+			]),
+			"function": "Count",
+			"is_public": 1,
+			"label": _("Purchase Orders to Bill"),
+			"owner": "Administrator",
+			"show_percentage_stats": 1,
+			"stats_time_interval": "Weekly"
+		},
+		{
+			"name": "Active Suppliers",
+			"doctype": "Number Card",
+			"document_type": "Supplier",
+			"filters_json": json.dumps([["Supplier", "disabled", "=", "0"]]),
+			"function": "Count",
+			"is_public": 1,
+			"label": "Active Suppliers",
+			"owner": "Administrator",
+			"show_percentage_stats": 1,
+			"stats_time_interval": "Monthly"
+		}
+	]
\ No newline at end of file
diff --git a/erpnext/buying/desk_page/buying/buying.json b/erpnext/buying/desk_page/buying/buying.json
index 5e764cf..ee18545 100644
--- a/erpnext/buying/desk_page/buying/buying.json
+++ b/erpnext/buying/desk_page/buying/buying.json
@@ -2,18 +2,13 @@
  "cards": [
   {
    "hidden": 0,
-   "label": "Supplier",
-   "links": "[\n    {\n        \"description\": \"Supplier database.\",\n        \"label\": \"Supplier\",\n        \"name\": \"Supplier\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Supplier Group master.\",\n        \"label\": \"Supplier Group\",\n        \"name\": \"Supplier Group\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"All Contacts.\",\n        \"label\": \"Contact\",\n        \"name\": \"Contact\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"All Addresses.\",\n        \"label\": \"Address\",\n        \"name\": \"Address\",\n        \"type\": \"doctype\"\n    }\n]"
+   "label": "Buying",
+   "links": "[   \n    {\n        \"dependencies\": [\n            \"Item\"\n        ],\n        \"description\": \"Request for purchase.\",\n        \"label\": \"Material Request\",\n        \"name\": \"Material Request\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"description\": \"Purchase Orders given to Suppliers.\",\n        \"label\": \"Purchase Order\",\n        \"name\": \"Purchase Order\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"label\": \"Purchase Invoice\",\n        \"name\": \"Purchase Invoice\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"description\": \"Request for quotation.\",\n        \"label\": \"Request for Quotation\",\n        \"name\": \"Request for Quotation\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"description\": \"Quotations received from Suppliers.\",\n        \"label\": \"Supplier Quotation\",\n        \"name\": \"Supplier Quotation\",\n        \"type\": \"doctype\"\n    }\n]"
   },
   {
    "hidden": 0,
-   "label": "Purchasing",
-   "links": "[\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"description\": \"Purchase Orders given to Suppliers.\",\n        \"label\": \"Purchase Order\",\n        \"name\": \"Purchase Order\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"label\": \"Purchase Invoice\",\n        \"name\": \"Purchase Invoice\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\"\n        ],\n        \"description\": \"Request for purchase.\",\n        \"label\": \"Material Request\",\n        \"name\": \"Material Request\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"description\": \"Request for quotation.\",\n        \"label\": \"Request for Quotation\",\n        \"name\": \"Request for Quotation\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"dependencies\": [\n            \"Item\",\n            \"Supplier\"\n        ],\n        \"description\": \"Quotations received from Suppliers.\",\n        \"label\": \"Supplier Quotation\",\n        \"name\": \"Supplier Quotation\",\n        \"type\": \"doctype\"\n    }\n]"
-  },
-  {
-   "hidden": 0,
-   "label": "Items and Pricing",
-   "links": "[\n    {\n        \"description\": \"All Products or Services.\",\n        \"label\": \"Item\",\n        \"name\": \"Item\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Multiple Item prices.\",\n        \"label\": \"Item Price\",\n        \"name\": \"Item Price\",\n        \"onboard\": 1,\n        \"route\": \"#Report/Item Price\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Price List master.\",\n        \"label\": \"Price List\",\n        \"name\": \"Price List\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Bundle items at time of sale.\",\n        \"label\": \"Product Bundle\",\n        \"name\": \"Product Bundle\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Tree of Item Groups.\",\n        \"icon\": \"fa fa-sitemap\",\n        \"label\": \"Item Group\",\n        \"link\": \"Tree/Item Group\",\n        \"name\": \"Item Group\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Rules for applying different promotional schemes.\",\n        \"label\": \"Promotional Scheme\",\n        \"name\": \"Promotional Scheme\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Rules for applying pricing and discount.\",\n        \"label\": \"Pricing Rule\",\n        \"name\": \"Pricing Rule\",\n        \"type\": \"doctype\"\n    }\n]"
+   "label": "Items & Pricing",
+   "links": "[\n    {\n        \"description\": \"All Products or Services.\",\n        \"label\": \"Item\",\n        \"name\": \"Item\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Multiple Item prices.\",\n        \"label\": \"Item Price\",\n        \"name\": \"Item Price\",\n        \"onboard\": 1,\n        \"route\": \"#Report/Item Price\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Price List master.\",\n        \"label\": \"Price List\",\n        \"name\": \"Price List\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Bundle items at time of sale.\",\n        \"label\": \"Product Bundle\",\n        \"name\": \"Product Bundle\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Tree of Item Groups.\",\n        \"icon\": \"fa fa-sitemap\",\n        \"label\": \"Item Group\",\n        \"link\": \"Tree/Item Group\",\n        \"name\": \"Item Group\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Rules for applying different promotional schemes.\",\n        \"label\": \"Promotional Scheme\",\n        \"name\": \"Promotional Scheme\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Rules for applying pricing and discount.\",\n        \"label\": \"Pricing Rule\",\n        \"name\": \"Pricing Rule\",\n        \"type\": \"doctype\"\n    }\n]"
   },
   {
    "hidden": 0,
@@ -22,73 +17,92 @@
   },
   {
    "hidden": 0,
+   "label": "Supplier",
+   "links": "[\n    {\n        \"description\": \"Supplier database.\",\n        \"label\": \"Supplier\",\n        \"name\": \"Supplier\",\n        \"onboard\": 1,\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Supplier Group master.\",\n        \"label\": \"Supplier Group\",\n        \"name\": \"Supplier Group\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"All Contacts.\",\n        \"label\": \"Contact\",\n        \"name\": \"Contact\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"All Addresses.\",\n        \"label\": \"Address\",\n        \"name\": \"Address\",\n        \"type\": \"doctype\"\n    }\n]"
+  },
+  {
+   "hidden": 0,
    "label": "Supplier Scorecard",
    "links": "[\n    {\n        \"description\": \"All Supplier scorecards.\",\n        \"label\": \"Supplier Scorecard\",\n        \"name\": \"Supplier Scorecard\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Templates of supplier scorecard variables.\",\n        \"label\": \"Supplier Scorecard Variable\",\n        \"name\": \"Supplier Scorecard Variable\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Templates of supplier scorecard criteria.\",\n        \"label\": \"Supplier Scorecard Criteria\",\n        \"name\": \"Supplier Scorecard Criteria\",\n        \"type\": \"doctype\"\n    },\n    {\n        \"description\": \"Templates of supplier standings.\",\n        \"label\": \"Supplier Scorecard Standing\",\n        \"name\": \"Supplier Scorecard Standing\",\n        \"type\": \"doctype\"\n    }\n]"
   },
   {
    "hidden": 0,
    "label": "Key Reports",
-   "links": "[\n    {\n        \"is_query_report\": true,\n        \"label\": \"Purchase Analytics\",\n        \"name\": \"Purchase Analytics\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Supplier-Wise Sales Analytics\",\n        \"name\": \"Supplier-Wise Sales Analytics\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Stock Ledger Entry\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Purchase Order Trends\",\n        \"name\": \"Purchase Order Trends\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Procurement Tracker\",\n        \"name\": \"Procurement Tracker\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Requested Items To Be Ordered\",\n        \"name\": \"Requested Items To Be Ordered\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Material Request\",\n        \"type\": \"report\"\n    }\n]"
+   "links": "[\n    {\n        \"is_query_report\": true,\n        \"label\": \"Purchase Analytics\",\n        \"name\": \"Purchase Analytics\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Purchase Order Analysis\",\n        \"name\": \"Purchase Order Analysis\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Supplier-Wise Sales Analytics\",\n        \"name\": \"Supplier-Wise Sales Analytics\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Stock Ledger Entry\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Requested Items to Order\",\n        \"name\": \"Requested Items to Order\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Material Request\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Purchase Order Trends\",\n        \"name\": \"Purchase Order Trends\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Procurement Tracker\",\n        \"name\": \"Procurement Tracker\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    }\n]"
   },
   {
    "hidden": 0,
    "label": "Other Reports",
-   "links": "[\n    {\n        \"is_query_report\": true,\n        \"label\": \"Items To Be Requested\",\n        \"name\": \"Items To Be Requested\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Item\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Item-wise Purchase History\",\n        \"name\": \"Item-wise Purchase History\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Item\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Material Requests for which Supplier Quotations are not created\",\n        \"name\": \"Material Requests for which Supplier Quotations are not created\",\n        \"reference_doctype\": \"Material Request\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Supplier Addresses And Contacts\",\n        \"name\": \"Address And Contacts\",\n        \"reference_doctype\": \"Address\",\n        \"route_options\": {\n            \"party_type\": \"Supplier\"\n        },\n        \"type\": \"report\"\n    }\n]"
+   "links": "[\n    {\n        \"is_query_report\": true,\n        \"label\": \"Items To Be Requested\",\n        \"name\": \"Items To Be Requested\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Item\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Item-wise Purchase History\",\n        \"name\": \"Item-wise Purchase History\",\n        \"onboard\": 1,\n        \"reference_doctype\": \"Item\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Subcontracted Raw Materials To Be Transferred\",\n        \"name\": \"Subcontracted Raw Materials To Be Transferred\",\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Subcontracted Item To Be Received\",\n        \"name\": \"Subcontracted Item To Be Received\",\n        \"reference_doctype\": \"Purchase Order\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Quoted Item Comparison\",\n        \"name\": \"Quoted Item Comparison\",\n         \"onboard\": 1,\n        \"reference_doctype\": \"Supplier Quotation\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Material Requests for which Supplier Quotations are not created\",\n        \"name\": \"Material Requests for which Supplier Quotations are not created\",\n        \"reference_doctype\": \"Material Request\",\n        \"type\": \"report\"\n    },\n    {\n        \"is_query_report\": true,\n        \"label\": \"Supplier Addresses And Contacts\",\n        \"name\": \"Address And Contacts\",\n        \"reference_doctype\": \"Address\",\n        \"route_options\": {\n            \"party_type\": \"Supplier\"\n        },\n        \"type\": \"report\"\n    }\n]"
   }
  ],
+ "cards_label": "Masters & Reports ",
  "category": "Modules",
  "charts": [
   {
-   "chart_name": "Expenses",
-   "label": "Expenses"
+   "chart_name": "Purchase Order Trends",
+   "label": "Purchase Order Trends"
   }
  ],
+ "charts_label": "Buying Dashboard",
  "creation": "2020-01-28 11:50:26.195467",
  "developer_mode_only": 0,
  "disable_user_customization": 0,
  "docstatus": 0,
  "doctype": "Desk Page",
  "extends_another_page": 0,
- "icon": "",
+ "hide_custom": 0,
  "idx": 0,
  "is_standard": 1,
  "label": "Buying",
- "modified": "2020-04-01 11:28:51.192097",
+ "modified": "2020-05-19 19:44:36.260982",
  "modified_by": "Administrator",
  "module": "Buying",
  "name": "Buying",
+ "onboarding": "Buying",
  "owner": "Administrator",
  "pin_to_bottom": 0,
  "pin_to_top": 0,
  "shortcuts": [
   {
-   "format": "{} Unpaid",
-   "label": "Purchase Invoice",
-   "link_to": "Purchase Invoice",
-   "stats_filter": "{\n    \"company\": [\"like\", '%' + frappe.defaults.get_global_default(\"company\") + '%'],\n    \"status\": \"Unpaid\"\n}",
+   "color": "#cef6d1",
+   "format": "{} available",
+   "label": "Item",
+   "link_to": "Item",
+   "stats_filter": "{\n    \"disabled\": 0\n}",
    "type": "DocType"
   },
   {
-   "format": "{} to receive",
+   "color": "#ffe8cd",
+   "format": "{} Pending",
+   "label": "Material Request",
+   "link_to": "Material Request",
+   "stats_filter": "{\n    \"company\": [\"like\", '%' + frappe.defaults.get_global_default(\"company\") + '%'],\n    \"status\": \"Pending\"\n}",
+   "type": "DocType"
+  },
+  {
+   "color": "#ffe8cd",
+   "format": "{}  to Receive",
    "label": "Purchase Order",
    "link_to": "Purchase Order",
-   "stats_filter": "{\n    \"company\": [\"like\", '%' + frappe.defaults.get_global_default(\"company\") + '%'],\n    \"status\": \"To Receive\"\n}",
+   "stats_filter": "{\n    \"company\": [\"like\", '%' + frappe.defaults.get_global_default(\"company\") + '%'],\n    \"status\":[\"in\", [\"To Receive\", \"To Receive and Bill\"]]\n}",
    "type": "DocType"
   },
   {
-   "label": "Supplier Quotation",
-   "link_to": "Supplier Quotation",
-   "type": "DocType"
-  },
-  {
-   "label": "Accounts Payable",
-   "link_to": "Accounts Payable",
+   "label": "Purchase Analytics",
+   "link_to": "Purchase Analytics",
    "type": "Report"
   },
   {
-   "label": "Purchase Register",
-   "link_to": "Purchase Register",
+   "label": "Purchase Order Analysis",
+   "link_to": "Purchase Order Analysis",
    "type": "Report"
+  },
+  {
+   "label": "Buying Dashboard",
+   "link_to": "Buying",
+   "type": "Dashboard"
   }
- ]
+ ],
+ "shortcuts_label": "Quick Access"
 }
\ No newline at end of file
diff --git a/erpnext/buying/doctype/buying_settings/buying_settings.js b/erpnext/buying/doctype/buying_settings/buying_settings.js
index 403b1c9..a27950a 100644
--- a/erpnext/buying/doctype/buying_settings/buying_settings.js
+++ b/erpnext/buying/doctype/buying_settings/buying_settings.js
@@ -6,3 +6,26 @@
 
 	// }
 });
+
+frappe.tour['Buying Settings'] = [
+	{
+		fieldname: "supp_master_name",
+		title: "Supplier Naming By",
+		description: __("By default, the Item Name is set as per the Item Code entered. If you want Items to be named by a set ") + "<a href='https://docs.erpnext.com/docs/user/manual/en/setting-up/settings/naming-series'>Naming Series</a>" + __(" choose the 'Naming Series' option."),
+	},
+	{
+		fieldname: "buying_price_list",
+		title: "Default Buying Price List",
+		description: __("Configure the default Price List when creating a new Buying transaction, the default is set as 'Standard Buying'. Item prices will be fetched from this Price List.")
+	},
+	{
+		fieldname: "po_required",
+		title: "Purchase Order Required for Purchase Invoice & Receipt Creation",
+		description: __("If this option is configured 'Yes', ERPNext will prevent you from creating a Purchase Invoice or Receipt without creating a Purchase Order first. This configuration can be overridden for a particular supplier by enabling the 'Allow Purchase Invoice Creation Without Purchase Order' checkbox in supplier master.")
+	},
+	{
+		fieldname: "pr_required",
+		title: "Purchase Receipt Required for Purchase Invoice Creation",
+		description: __("If this option is configured 'Yes', ERPNext will prevent you from creating a Purchase Invoice without creating a Purchase Receipt first. This configuration can be overridden for a particular supplier by enabling the 'Allow Purchase Invoice Creation Without Purchase Receipt' checkbox in supplier master.")
+	}
+];
\ No newline at end of file
diff --git a/erpnext/buying/doctype/buying_settings/buying_settings.json b/erpnext/buying/doctype/buying_settings/buying_settings.json
index a492519..a0ab2a0 100644
--- a/erpnext/buying/doctype/buying_settings/buying_settings.json
+++ b/erpnext/buying/doctype/buying_settings/buying_settings.json
@@ -1,8 +1,10 @@
 {
+ "actions": [],
  "creation": "2013-06-25 11:04:03",
  "description": "Settings for Buying Module",
  "doctype": "DocType",
  "document_type": "Other",
+ "engine": "InnoDB",
  "field_order": [
   "supp_master_name",
   "supplier_group",
@@ -44,13 +46,13 @@
   {
    "fieldname": "po_required",
    "fieldtype": "Select",
-   "label": "Purchase Order Required",
+   "label": "Purchase Order Required for Purchase Invoice & Receipt Creation",
    "options": "No\nYes"
   },
   {
    "fieldname": "pr_required",
    "fieldtype": "Select",
-   "label": "Purchase Receipt Required",
+   "label": "Purchase Receipt Required for Purchase Invoice Creation",
    "options": "No\nYes"
   },
   {
@@ -92,7 +94,8 @@
  "icon": "fa fa-cog",
  "idx": 1,
  "issingle": 1,
- "modified": "2019-08-20 13:13:09.055189",
+ "links": [],
+ "modified": "2020-05-15 14:49:32.513611",
  "modified_by": "Administrator",
  "module": "Buying",
  "name": "Buying Settings",
@@ -107,5 +110,7 @@
    "share": 1,
    "write": 1
   }
- ]
+ ],
+ "sort_field": "modified",
+ "sort_order": "DESC"
 }
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index 3bc441a..7db1516 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -761,7 +761,7 @@
    "no_copy": 1,
    "oldfieldname": "status",
    "oldfieldtype": "Select",
-   "options": "\nDraft\nSubmitted\nStopped\nCancelled",
+   "options": "\nDraft\nSubmitted\nStopped\nCancelled\nExpired",
    "print_hide": 1,
    "read_only": 1,
    "reqd": 1,
@@ -803,7 +803,7 @@
  "idx": 29,
  "is_submittable": 1,
  "links": [],
- "modified": "2020-04-15 11:44:52.958022",
+ "modified": "2020-05-15 21:24:12.639482",
  "modified_by": "Administrator",
  "module": "Buying",
  "name": "Supplier Quotation",
diff --git a/erpnext/buying/module_onboarding/buying/buying.json b/erpnext/buying/module_onboarding/buying/buying.json
new file mode 100644
index 0000000..8c798b3
--- /dev/null
+++ b/erpnext/buying/module_onboarding/buying/buying.json
@@ -0,0 +1,54 @@
+{
+ "allow_roles": [
+  {
+   "role": "Purchase Manager"
+  },
+  {
+   "role": "Purchase User"
+  },
+  {
+   "role": "Stock Manager"
+  },
+  {
+   "role": "Stock User"
+  }
+ ],
+ "creation": "2020-05-06 15:56:35.049205",
+ "docstatus": 0,
+ "doctype": "Module Onboarding",
+ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/buying",
+ "idx": 0,
+ "is_complete": 0,
+ "modified": "2020-05-19 20:03:55.776080",
+ "modified_by": "Administrator",
+ "module": "Buying",
+ "name": "Buying",
+ "owner": "Administrator",
+ "steps": [
+  {
+   "step": "Introduction to Buying"
+  },
+  {
+   "step": "Create a Supplier"
+  },
+  {
+   "step": "Setup your Warehouse"
+  },
+  {
+   "step": "Create a Product"
+  },
+  {
+   "step": "Create a Material Request"
+  },
+  {
+   "step": "Create your first Purchase Order"
+  },
+  {
+   "step": "Buying Settings"
+  }
+ ],
+ "subtitle": "Products, Purchases, Analysis and more.",
+ "success_message": "The Buying Module is all set up!",
+ "title": "Let's Setup the Buying Module.",
+ "user_can_dismiss": 1
+}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/buying_settings/buying_settings.json b/erpnext/buying/onboarding_step/buying_settings/buying_settings.json
new file mode 100644
index 0000000..a788ccd
--- /dev/null
+++ b/erpnext/buying/onboarding_step/buying_settings/buying_settings.json
@@ -0,0 +1,19 @@
+{
+ "action": "Update Settings",
+ "creation": "2020-05-06 15:53:44.667414",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-12 18:30:06.323797",
+ "modified_by": "Administrator",
+ "name": "Buying Settings",
+ "owner": "Administrator",
+ "reference_document": "Buying Settings",
+ "show_full_form": 0,
+ "title": "Configure Buying Settings.",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/create_a_material_request/create_a_material_request.json b/erpnext/buying/onboarding_step/create_a_material_request/create_a_material_request.json
new file mode 100644
index 0000000..9dc493d
--- /dev/null
+++ b/erpnext/buying/onboarding_step/create_a_material_request/create_a_material_request.json
@@ -0,0 +1,19 @@
+{
+ "action": "Create Entry",
+ "creation": "2020-05-15 14:39:09.818764",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 1,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-15 14:39:09.818764",
+ "modified_by": "Administrator",
+ "name": "Create a Material Request",
+ "owner": "Administrator",
+ "reference_document": "Material Request",
+ "show_full_form": 1,
+ "title": "Create a Material Request",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/create_a_product/create_a_product.json b/erpnext/buying/onboarding_step/create_a_product/create_a_product.json
new file mode 100644
index 0000000..d2068e1
--- /dev/null
+++ b/erpnext/buying/onboarding_step/create_a_product/create_a_product.json
@@ -0,0 +1,19 @@
+{
+ "action": "Create Entry",
+ "creation": "2020-05-12 18:16:06.624554",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-12 18:30:02.489949",
+ "modified_by": "Administrator",
+ "name": "Create a Product",
+ "owner": "Administrator",
+ "reference_document": "Item",
+ "show_full_form": 0,
+ "title": "Create a Product",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/buying/onboarding_step/create_a_supplier/create_a_supplier.json
new file mode 100644
index 0000000..7a64224
--- /dev/null
+++ b/erpnext/buying/onboarding_step/create_a_supplier/create_a_supplier.json
@@ -0,0 +1,19 @@
+{
+ "action": "Create Entry",
+ "creation": "2020-05-14 22:09:10.043554",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-14 22:09:10.043554",
+ "modified_by": "Administrator",
+ "name": "Create a Supplier",
+ "owner": "Administrator",
+ "reference_document": "Supplier",
+ "show_full_form": 0,
+ "title": "Create a Supplier",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/create_your_first_purchase_order/create_your_first_purchase_order.json b/erpnext/buying/onboarding_step/create_your_first_purchase_order/create_your_first_purchase_order.json
new file mode 100644
index 0000000..9dbed23
--- /dev/null
+++ b/erpnext/buying/onboarding_step/create_your_first_purchase_order/create_your_first_purchase_order.json
@@ -0,0 +1,19 @@
+{
+ "action": "Create Entry",
+ "creation": "2020-05-12 18:17:49.976035",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-12 18:31:56.856112",
+ "modified_by": "Administrator",
+ "name": "Create your first Purchase Order",
+ "owner": "Administrator",
+ "reference_document": "Purchase Order",
+ "show_full_form": 0,
+ "title": "Create your first Purchase Order",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/introduction_to_buying/introduction_to_buying.json b/erpnext/buying/onboarding_step/introduction_to_buying/introduction_to_buying.json
new file mode 100644
index 0000000..fd98fdd
--- /dev/null
+++ b/erpnext/buying/onboarding_step/introduction_to_buying/introduction_to_buying.json
@@ -0,0 +1,19 @@
+{
+ "action": "Watch Video",
+ "creation": "2020-05-06 15:37:09.477765",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-12 18:25:08.509900",
+ "modified_by": "Administrator",
+ "name": "Introduction to Buying",
+ "owner": "Administrator",
+ "show_full_form": 0,
+ "title": "Introduction to Buying",
+ "validate_action": 1,
+ "video_url": "https://youtu.be/efFajTTQBa8"
+}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
new file mode 100644
index 0000000..557c905
--- /dev/null
+++ b/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
@@ -0,0 +1,20 @@
+{
+ "action": "Go to Page",
+ "creation": "2020-05-19 18:54:19.383397",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-19 18:54:19.383397",
+ "modified_by": "Administrator",
+ "name": "Setup your Warehouse",
+ "owner": "Administrator",
+ "path": "Tree/Warehouse",
+ "reference_document": "Warehouse",
+ "show_full_form": 0,
+ "title": "Setup your Warehouse",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/purchase_order_analysis/__init__.py b/erpnext/buying/report/purchase_order_analysis/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/buying/report/purchase_order_analysis/__init__.py
diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js
new file mode 100644
index 0000000..701da43
--- /dev/null
+++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js
@@ -0,0 +1,78 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+/* eslint-disable */
+
+frappe.query_reports["Purchase Order Analysis"] = {
+	"filters": [
+		{
+			"fieldname": "company",
+			"label": __("Company"),
+			"fieldtype": "Link",
+			"width": "80",
+			"options": "Company",
+			"reqd": 1,
+			"default": frappe.defaults.get_default("company")
+		},
+		{
+			"fieldname":"from_date",
+			"label": __("From Date"),
+			"fieldtype": "Date",
+			"width": "80",
+			"reqd": 1,
+			"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
+		},
+		{
+			"fieldname":"to_date",
+			"label": __("To Date"),
+			"fieldtype": "Date",
+			"width": "80",
+			"reqd": 1,
+			"default": frappe.datetime.get_today()
+		},
+		{
+			"fieldname": "purchase_order",
+			"label": __("Purchase Order"),
+			"fieldtype": "Link",
+			"width": "80",
+			"options": "Purchase Order",
+			"get_query": () =>{
+				return {
+					filters: { "docstatus": 1 }
+				}
+			}
+		},
+		{
+			"fieldname": "status",
+			"label": __("Status"),
+			"fieldtype": "MultiSelectList",
+			"width": "80",
+			get_data: function(txt) {
+				let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"]
+				let options = []
+				for (let option of status){
+					options.push({
+						"value": option,
+						"description": ""
+					})
+				}
+				return options
+			}
+		},
+		{
+			"fieldname": "group_by_po",
+			"label": __("Group by Purchase Order"),
+			"fieldtype": "Check",
+			"default": 0
+		}
+	],
+
+	"formatter": function (value, row, column, data, default_formatter) {
+		value = default_formatter(value, row, column, data);
+		let format_fields = ["received_qty", "billed_amount"];
+
+		if (in_list(format_fields, column.fieldname) && data && data[column.fieldname] > 0) {
+			value = "<span style='color:green'>" + value + "</span>";
+		}
+		return value;
+	}
+};
diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.json b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.json
new file mode 100644
index 0000000..5ba3101
--- /dev/null
+++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.json
@@ -0,0 +1,33 @@
+{
+ "add_total_row": 1,
+ "creation": "2020-05-04 18:41:28.625119",
+ "disable_prepared_report": 0,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "modified": "2020-05-15 20:57:52.623455",
+ "modified_by": "Administrator",
+ "module": "Buying",
+ "name": "Purchase Order Analysis",
+ "owner": "Administrator",
+ "prepared_report": 0,
+ "ref_doctype": "Purchase Order",
+ "report_name": "Purchase Order Analysis",
+ "report_type": "Script Report",
+ "roles": [
+  {
+   "role": "Purchase Manager"
+  },
+  {
+   "role": "Purchase User"
+  },
+  {
+   "role": "Stock User"
+  },
+  {
+   "role": "Supplier"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py
new file mode 100644
index 0000000..89be622
--- /dev/null
+++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py
@@ -0,0 +1,271 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+import copy
+from frappe import _
+from frappe.utils import flt, date_diff, getdate
+
+def execute(filters=None):
+	if not filters:
+		return [], []
+
+	validate_filters(filters)
+
+	columns = get_columns(filters)
+	conditions = get_conditions(filters)
+
+	data = get_data(conditions, filters)
+
+	if not data:
+		return [], [], None, []
+
+	data, chart_data = prepare_data(data, filters)
+
+	return columns, data, None, chart_data
+
+def validate_filters(filters):
+	from_date, to_date = filters.get("from_date"), filters.get("to_date")
+
+	if not from_date and to_date:
+		frappe.throw(_("From and To Dates are required."))
+	elif date_diff(to_date, from_date) < 0:
+		frappe.throw(_("To Date cannot be before From Date."))
+
+def get_conditions(filters):
+	conditions = ""
+	if filters.get("from_date") and filters.get("to_date"):
+		conditions += " and po.transaction_date between %(from_date)s and %(to_date)s"
+
+	if filters.get("company"):
+		conditions += " and po.company = %(company)s"
+
+	if filters.get("purchase_order"):
+		conditions += " and po.name = %(purchase_order)s"
+
+	if filters.get("status"):
+		conditions += " and po.status in %(status)s"
+
+	return conditions
+
+def get_data(conditions, filters):
+	data = frappe.db.sql("""
+		SELECT
+			po.transaction_date as date,
+			poi.schedule_date as required_date,
+			po.name as purchase_order,
+			po.status, po.supplier, poi.item_code,
+			poi.qty, poi.received_qty,
+			(poi.qty - poi.received_qty) AS pending_qty,
+			IFNULL(pii.qty, 0) as billed_qty,
+			poi.base_amount as amount,
+			(poi.received_qty * poi.base_rate) as received_qty_amount,
+			(poi.billed_amt * IFNULL(po.conversion_rate, 1)) as billed_amount,
+			(poi.base_amount - (poi.billed_amt * IFNULL(po.conversion_rate, 1))) as pending_amount,
+			po.set_warehouse as warehouse,
+			po.company, poi.name
+		FROM
+			`tabPurchase Order` po,
+			`tabPurchase Order Item` poi
+		LEFT JOIN `tabPurchase Invoice Item` pii
+			ON pii.po_detail = poi.name
+		WHERE
+			poi.parent = po.name
+			and po.status not in ('Stopped', 'Closed')
+			and po.docstatus = 1
+			{0}
+		GROUP BY poi.name
+		ORDER BY po.transaction_date ASC
+	""".format(conditions), filters, as_dict=1)
+
+	return data
+
+def prepare_data(data, filters):
+	completed, pending = 0, 0
+	pending_field =  "pending_amount"
+	completed_field = "billed_amount"
+
+	if filters.get("group_by_po"):
+		purchase_order_map = {}
+
+	for row in data:
+		# sum data for chart
+		completed += row[completed_field]
+		pending += row[pending_field]
+
+		# prepare data for report view
+		row["qty_to_bill"] = flt(row["qty"]) - flt(row["billed_qty"])
+
+		if filters.get("group_by_po"):
+			po_name = row["purchase_order"]
+
+			if not po_name in purchase_order_map:
+				# create an entry
+				row_copy = copy.deepcopy(row)
+				purchase_order_map[po_name] = row_copy
+			else:
+				# update existing entry
+				po_row = purchase_order_map[po_name]
+				po_row["required_date"] = min(getdate(po_row["required_date"]), getdate(row["required_date"]))
+
+				# sum numeric columns
+				fields = ["qty", "received_qty", "pending_qty", "billed_qty", "qty_to_bill", "amount",
+					"received_qty_amount", "billed_amount", "pending_amount"]
+				for field in fields:
+					po_row[field] = flt(row[field]) + flt(po_row[field])
+
+	chart_data = prepare_chart_data(pending, completed)
+
+	if filters.get("group_by_po"):
+		data = []
+		for po in purchase_order_map:
+			data.append(purchase_order_map[po])
+		return data, chart_data
+
+	return data, chart_data
+
+def prepare_chart_data(pending, completed):
+	labels = ["Amount to Bill", "Billed Amount"]
+
+	return {
+		"data" : {
+			"labels": labels,
+			"datasets": [
+				{"values": [pending, completed]}
+				]
+		},
+		"type": 'donut',
+		"height": 300
+	}
+
+def get_columns(filters):
+	columns = [
+		{
+			"label":_("Date"),
+			"fieldname": "date",
+			"fieldtype": "Date",
+			"width": 90
+		},
+		{
+			"label":_("Required By"),
+			"fieldname": "required_date",
+			"fieldtype": "Date",
+			"width": 90
+		},
+		{
+			"label": _("Purchase Order"),
+			"fieldname": "purchase_order",
+			"fieldtype": "Link",
+			"options": "Purchase Order",
+			"width": 160
+		},
+		{
+			"label":_("Status"),
+			"fieldname": "status",
+			"fieldtype": "Data",
+			"width": 130
+		},
+		{
+			"label": _("Supplier"),
+			"fieldname": "supplier",
+			"fieldtype": "Link",
+			"options": "Supplier",
+			"width": 130
+		}]
+
+	if not filters.get("group_by_po"):
+		columns.append({
+			"label":_("Item Code"),
+			"fieldname": "item_code",
+			"fieldtype": "Link",
+			"options": "Item",
+			"width": 100
+		})
+
+	columns.extend([
+		{
+			"label": _("Qty"),
+			"fieldname": "qty",
+			"fieldtype": "Float",
+			"width": 120,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Received Qty"),
+			"fieldname": "received_qty",
+			"fieldtype": "Float",
+			"width": 120,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Pending Qty"),
+			"fieldname": "pending_qty",
+			"fieldtype": "Float",
+			"width": 80,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Billed Qty"),
+			"fieldname": "billed_qty",
+			"fieldtype": "Float",
+			"width": 80,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Qty to Bill"),
+			"fieldname": "qty_to_bill",
+			"fieldtype": "Float",
+			"width": 80,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Amount"),
+			"fieldname": "amount",
+			"fieldtype": "Currency",
+			"width": 110,
+			"options": "Company:company:default_currency",
+			"convertible": "rate"
+		},
+		{
+			"label": _("Billed Amount"),
+			"fieldname": "billed_amount",
+			"fieldtype": "Currency",
+			"width": 110,
+			"options": "Company:company:default_currency",
+			"convertible": "rate"
+		},
+		{
+			"label": _("Pending Amount"),
+			"fieldname": "pending_amount",
+			"fieldtype": "Currency",
+			"width": 130,
+			"options": "Company:company:default_currency",
+			"convertible": "rate"
+		},
+		{
+			"label": _("Received Qty Amount"),
+			"fieldname": "received_qty_amount",
+			"fieldtype": "Currency",
+			"width": 130,
+			"options": "Company:company:default_currency",
+			"convertible": "rate"
+		},
+		{
+			"label": _("Warehouse"),
+			"fieldname": "warehouse",
+			"fieldtype": "Link",
+			"options": "Warehouse",
+			"width": 100
+		},
+		{
+			"label": _("Company"),
+			"fieldname": "company",
+			"fieldtype": "Link",
+			"options": "Company",
+			"width": 100
+		}
+	])
+
+	return columns
+
diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
index 888676c..1ed6cad 100644
--- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
+++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
@@ -3,6 +3,7 @@
 
 from __future__ import unicode_literals
 import frappe
+from frappe import _
 from erpnext.controllers.trends	import get_columns,get_data
 
 def execute(filters=None):
@@ -10,5 +11,48 @@
 	data = []
 	conditions = get_columns(filters, "Purchase Order")
 	data = get_data(filters, conditions)
+	chart_data = get_chart_data(data, conditions, filters)
 
-	return conditions["columns"], data 
\ No newline at end of file
+	return conditions["columns"], data, None, chart_data
+
+def get_chart_data(data, conditions, filters):
+	if not (data and conditions):
+		return []
+
+	datapoints = []
+
+	start = 2 if filters.get("based_on") in ["Item", "Supplier"] else 1
+	if filters.get("group_by"):
+		start += 1
+
+	# fetch only periodic columns as labels
+	columns = conditions.get("columns")[start:-2][1::2]
+	labels = [column.split(':')[0] for column in columns]
+	datapoints = [0] * len(labels)
+
+	for row in data:
+		# If group by filter, don't add first row of group (it's already summed)
+		if not row[start-1]:
+			continue
+		# Remove None values and compute only periodic data
+		row = [x if x else 0 for x in row[start:-2]]
+		row  = row[1::2]
+
+		for i in range(len(row)):
+			datapoints[i] += row[i]
+
+	return {
+		"data" : {
+			"labels" : labels,
+			"datasets" : [
+				{
+					"name" : _("{0}").format(filters.get("period")) + _(" Purchase Value"),
+					"values" : datapoints
+				}
+			]
+		},
+		"type" : "line",
+		"lineOptions": {
+			"regionFill": 1
+		}
+	}
\ No newline at end of file
diff --git a/erpnext/buying/report/requested_items_to_order/__init__.py b/erpnext/buying/report/requested_items_to_order/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/buying/report/requested_items_to_order/__init__.py
diff --git a/erpnext/buying/report/requested_items_to_order/requested_items_to_order.js b/erpnext/buying/report/requested_items_to_order/requested_items_to_order.js
new file mode 100644
index 0000000..21adb13
--- /dev/null
+++ b/erpnext/buying/report/requested_items_to_order/requested_items_to_order.js
@@ -0,0 +1,64 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+/* eslint-disable */
+
+frappe.query_reports["Requested Items to Order"] = {
+	"filters": [
+		{
+			"fieldname": "company",
+			"label": __("Company"),
+			"fieldtype": "Link",
+			"width": "80",
+			"options": "Company",
+			"reqd": 1,
+			"default": frappe.defaults.get_default("company")
+		},
+		{
+			"fieldname":"from_date",
+			"label": __("From Date"),
+			"fieldtype": "Date",
+			"width": "80",
+			"reqd": 1,
+			"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
+		},
+		{
+			"fieldname":"to_date",
+			"label": __("To Date"),
+			"fieldtype": "Date",
+			"width": "80",
+			"reqd": 1,
+			"default": frappe.datetime.get_today()
+		},
+		{
+			"fieldname": "material_request",
+			"label": __("Material Request"),
+			"fieldtype": "Link",
+			"width": "80",
+			"options": "Material Request",
+			"get_query": () =>{
+				return {
+					filters: {
+						"docstatus": 1,
+						"material_request_type": "Purchase",
+						"per_received": ["<", 100]
+					}
+				}
+			}
+		},
+		{
+			"fieldname": "group_by_mr",
+			"label": __("Group by Material Request"),
+			"fieldtype": "Check",
+			"default": 0
+		}
+	],
+
+	"formatter": function (value, row, column, data, default_formatter) {
+		value = default_formatter(value, row, column, data);
+
+		if (column.fieldname == "ordered_qty" && data && data.ordered_qty > 0) {
+			value = "<span style='color:green'>" + value + "</span>";
+		}
+		return value;
+	}
+};
diff --git a/erpnext/buying/report/requested_items_to_order/requested_items_to_order.json b/erpnext/buying/report/requested_items_to_order/requested_items_to_order.json
new file mode 100644
index 0000000..4a0578b
--- /dev/null
+++ b/erpnext/buying/report/requested_items_to_order/requested_items_to_order.json
@@ -0,0 +1,34 @@
+{
+ "add_total_row": 1,
+ "creation": "2020-05-04 20:23:57.750719",
+ "disable_prepared_report": 0,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "modified": "2020-05-05 13:05:51.723951",
+ "modified_by": "Administrator",
+ "module": "Buying",
+ "name": "Requested Items to Order",
+ "owner": "Administrator",
+ "prepared_report": 0,
+ "query": "",
+ "ref_doctype": "Material Request",
+ "report_name": "Requested Items to Order",
+ "report_type": "Script Report",
+ "roles": [
+  {
+   "role": "Purchase Manager"
+  },
+  {
+   "role": "Stock Manager"
+  },
+  {
+   "role": "Stock User"
+  },
+  {
+   "role": "Purchase User"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/requested_items_to_order/requested_items_to_order.py b/erpnext/buying/report/requested_items_to_order/requested_items_to_order.py
new file mode 100644
index 0000000..a021d3c
--- /dev/null
+++ b/erpnext/buying/report/requested_items_to_order/requested_items_to_order.py
@@ -0,0 +1,211 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+import copy
+from frappe import _
+from frappe.utils import flt, date_diff, getdate
+
+def execute(filters=None):
+	if not filters:
+		return [],[]
+
+	validate_filters(filters)
+
+	columns = get_columns(filters)
+	conditions = get_conditions(filters)
+
+	#get queried data
+	data = get_data(filters, conditions)
+
+	#prepare data for report and chart views
+	data, chart_data = prepare_data(data, filters)
+
+	return columns, data, None, chart_data
+
+def validate_filters(filters):
+	from_date, to_date = filters.get("from_date"), filters.get("to_date")
+
+	if not from_date and to_date:
+		frappe.throw(_("From and To Dates are required."))
+	elif date_diff(to_date, from_date) < 0:
+		frappe.throw(_("To Date cannot be before From Date."))
+
+def get_conditions(filters):
+	conditions = ''
+
+	if filters.get("from_date") and filters.get("to_date"):
+		conditions += " and mr.transaction_date between '{0}' and '{1}'".format(filters.get("from_date"),filters.get("to_date"))
+
+	if filters.get("company"):
+		conditions += " and mr.company = '{0}'".format(filters.get("company"))
+
+	if filters.get("material_request"):
+		conditions += " and mr.name = '{0}'".format(filters.get("material_request"))
+
+	return conditions
+
+def get_data(filters, conditions):
+	data = frappe.db.sql("""
+		select
+			mr.name as material_request,
+			mr.transaction_date as date,
+			mr_item.schedule_date as required_date,
+			mr_item.item_code as item_code,
+			sum(ifnull(mr_item.stock_qty, 0)) as qty,
+			ifnull(mr_item.stock_uom, '') as uom,
+			sum(ifnull(mr_item.ordered_qty, 0)) as ordered_qty,
+			(sum(mr_item.stock_qty) - sum(ifnull(mr_item.ordered_qty, 0))) as qty_to_order,
+			mr_item.item_name as item_name,
+			mr.company as company
+		from
+			`tabMaterial Request` mr, `tabMaterial Request Item` mr_item
+		where
+			mr_item.parent = mr.name
+			and mr.material_request_type = "Purchase"
+			and mr.docstatus = 1
+			and mr.status != "Stopped"
+			{conditions}
+		group by mr.name, mr_item.item_code
+		having
+			sum(ifnull(mr_item.ordered_qty, 0)) < sum(ifnull(mr_item.stock_qty, 0))
+		order by mr.transaction_date, mr.schedule_date""".format(conditions=conditions), as_dict=1)
+
+	return data
+
+def prepare_data(data, filters):
+	"""Prepare consolidated Report data and Chart data"""
+	material_request_map = {}
+
+	for row in data:
+		if not row["material_request"] in material_request_map:
+			# create an entry with mr as key
+			row_copy = copy.deepcopy(row)
+			material_request_map[row["material_request"]] = row_copy
+		else:
+			mr_row = material_request_map[row["material_request"]]
+			mr_row["required_date"] = min(getdate(mr_row["required_date"]), getdate(row["required_date"]))
+
+			#sum numeric rows
+			fields = ["qty", "ordered_qty", "qty_to_order"]
+			for field in fields:
+					mr_row[field] = flt(mr_row[field]) + flt(row[field])
+
+	chart_data = prepare_chart_data(material_request_map)
+
+	if filters.get("group_by_mr"):
+		data =[]
+		for mr in material_request_map:
+			data.append(material_request_map[mr])
+		return data, chart_data
+
+	return data, chart_data
+
+def prepare_chart_data(data):
+	labels, qty_to_order, ordered_qty = [], [], []
+
+	for row in data:
+		mr_row = data[row]
+		labels.append(mr_row["material_request"])
+		qty_to_order.append(mr_row["qty_to_order"])
+		ordered_qty.append(mr_row["ordered_qty"])
+
+	chart_data = {
+		"data" : {
+			"labels": labels,
+			"datasets": [
+				{
+					'name': _('Qty to Order'),
+					'values': qty_to_order
+				},
+				{
+					'name': _('Ordered Qty'),
+					'values': ordered_qty
+				}
+			]
+		},
+		"type": "bar",
+		"barOptions": {
+			"stacked": 1
+		},
+	}
+
+	return chart_data
+
+def get_columns(filters):
+	columns = [
+		{
+			"label": _("Material Request"),
+			"fieldname": "material_request",
+			"fieldtype": "Link",
+			"options": "Material Request",
+			"width": 150
+		},
+		{
+			"label":_("Date"),
+			"fieldname": "date",
+			"fieldtype": "Date",
+			"width": 90
+		},
+		{
+			"label":_("Required By"),
+			"fieldname": "required_date",
+			"fieldtype": "Date",
+			"width": 100
+		}
+	]
+
+	if not filters.get("group_by_mr"):
+		columns.extend([{
+			"label":_("Item Code"),
+			"fieldname": "item_code",
+			"fieldtype": "Link",
+			"options": "Item",
+			"width": 100
+		},
+		{
+			"label":_("Item Name"),
+			"fieldname": "item_name",
+			"fieldtype": "Data",
+			"width": 100
+		},
+		{
+			"label": _("UOM"),
+			"fieldname": "uom",
+			"fieldtype": "Data",
+			"width": 100,
+		}])
+
+	columns.extend([
+		{
+			"label": _("Qty"),
+			"fieldname": "qty",
+			"fieldtype": "Float",
+			"width": 120,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Ordered Qty"),
+			"fieldname": "ordered_qty",
+			"fieldtype": "Float",
+			"width": 120,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Qty to Order"),
+			"fieldname": "qty_to_order",
+			"fieldtype": "Float",
+			"width": 120,
+			"convertible": "qty"
+		},
+		{
+			"label": _("Company"),
+			"fieldname": "company",
+			"fieldtype": "Link",
+			"options": "Company",
+			"width": 100
+		}
+	])
+
+	return columns
diff --git a/erpnext/config/buying.py b/erpnext/config/buying.py
index 1d40547..16b49a1 100644
--- a/erpnext/config/buying.py
+++ b/erpnext/config/buying.py
@@ -166,7 +166,7 @@
 				{
 					"type": "report",
 					"is_query_report": True,
-					"name": "Requested Items To Be Ordered",
+					"name": "Requested Items To Order",
 					"reference_doctype": "Material Request",
 					"onboard": 1,
 				},
diff --git a/erpnext/healthcare/dashboard_chart_source/__init__.py b/erpnext/healthcare/dashboard_chart_source/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart_source/__init__.py
diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/__init__.py b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/__init__.py
diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js
new file mode 100644
index 0000000..dd6dc66
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js
@@ -0,0 +1,14 @@
+frappe.provide('frappe.dashboards.chart_sources');
+
+frappe.dashboards.chart_sources["Department wise Patient Appointments"] = {
+	method: "erpnext.healthcare.dashboard_chart_source.department_wise_patient_appointments.department_wise_patient_appointments.get",
+	filters: [
+		{
+			fieldname: "company",
+			label: __("Company"),
+			fieldtype: "Link",
+			options: "Company",
+			default: frappe.defaults.get_user_default("Company")
+		}
+	]
+};
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.json b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.json
new file mode 100644
index 0000000..00301ef
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.json
@@ -0,0 +1,13 @@
+{
+ "creation": "2020-05-18 19:18:42.571045",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart Source",
+ "idx": 0,
+ "modified": "2020-05-18 19:18:42.571045",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Department wise Patient Appointments",
+ "owner": "Administrator",
+ "source_name": "Department wise Patient Appointments",
+ "timeseries": 0
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py
new file mode 100644
index 0000000..062da6e
--- /dev/null
+++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py
@@ -0,0 +1,72 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.utils.dashboard import cache_source
+
+@frappe.whitelist()
+@cache_source
+def get(chart_name = None, chart = None, no_cache = None, filters = None, from_date = None,
+	to_date = None, timespan = None, time_interval = None, heatmap_year = None):
+	if chart_name:
+		chart = frappe.get_doc('Dashboard Chart', chart_name)
+	else:
+		chart = frappe._dict(frappe.parse_json(chart))
+
+	filters = frappe.parse_json(filters)
+
+	data = frappe.db.get_list('Medical Department', fields=['name'])
+	if not filters:
+		filters = {}
+
+	status = ['Open', 'Scheduled', 'Closed', 'Cancelled']
+	for department in data:
+		filters['department'] = department.name
+		department['total_appointments'] = frappe.db.count('Patient Appointment', filters=filters)
+
+		for entry in status:
+			filters['status'] = entry
+			department[frappe.scrub(entry)] = frappe.db.count('Patient Appointment', filters=filters)
+		filters.pop('status')
+
+	sorted_department_map = sorted(data, key = lambda i: i['total_appointments'], reverse=True)
+
+	if len(sorted_department_map) > 10:
+		sorted_department_map = sorted_department_map[:10]
+
+	labels = []
+	open_appointments = []
+	scheduled = []
+	closed = []
+	cancelled = []
+
+	for department in sorted_department_map:
+		labels.append(department.name)
+		open_appointments.append(department.open)
+		scheduled.append(department.scheduled)
+		closed.append(department.closed)
+		cancelled.append(department.cancelled)
+
+	return {
+		'labels': labels,
+		'datasets': [
+			{
+				'name': 'Open',
+				'values': open_appointments
+			},
+			{
+				'name': 'Scheduled',
+				'values': scheduled
+			},
+			{
+				'name': 'Closed',
+				'values': closed
+			},
+			{
+				'name': 'Cancelled',
+				'values': cancelled
+			}
+		],
+		'type': 'bar'
+	}
\ No newline at end of file
diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py
index fc3d62f..59da71a 100644
--- a/erpnext/healthcare/dashboard_fixtures.py
+++ b/erpnext/healthcare/dashboard_fixtures.py
@@ -3,33 +3,60 @@
 
 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.name
+	return None
+
 def get_dashboards():
 	return [{
 		"name": "Healthcare",
 		"dashboard_name": "Healthcare",
 		"charts": [
-			{ "chart": "Patient Appointments" }
+			{ "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",
+				"chart_name": _("Patient Appointments"),
 				"timespan": "Last Month",
-				"color": "#77ecca",
-				"filters_json": json.dumps({}),
+				"filters_json": json.dumps([
+					["Patient Appointment", "company", "=", company, False],
+					["Patient Appointment", "status", "!=", "Cancelled"]
+				]),
 				"chart_type": "Count",
 				"timeseries": 1,
 				"based_on": "appointment_datetime",
@@ -37,5 +64,182 @@
 				"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/desk_page/healthcare/healthcare.json b/erpnext/healthcare/desk_page/healthcare/healthcare.json
index 5cf09b3..60b5313 100644
--- a/erpnext/healthcare/desk_page/healthcare/healthcare.json
+++ b/erpnext/healthcare/desk_page/healthcare/healthcare.json
@@ -60,26 +60,30 @@
  "docstatus": 0,
  "doctype": "Desk Page",
  "extends_another_page": 0,
+ "hide_custom": 0,
  "idx": 0,
  "is_standard": 1,
  "label": "Healthcare",
- "modified": "2020-04-25 22:31:36.576444",
+ "modified": "2020-05-19 20:57:22.797267",
  "modified_by": "Administrator",
  "module": "Healthcare",
  "name": "Healthcare",
+ "onboarding": "Healthcare",
  "owner": "Administrator",
  "pin_to_bottom": 0,
  "pin_to_top": 0,
  "restrict_to_domain": "Healthcare",
  "shortcuts": [
   {
+   "color": "#ffe8cd",
    "format": "{} Open",
    "label": "Patient Appointment",
    "link_to": "Patient Appointment",
-   "stats_filter": "{\n    \"status\": \"Open\"\n}",
+   "stats_filter": "{\n    \"status\": \"Open\",\n    \"company\": [\"like\", '%' + frappe.defaults.get_global_default(\"company\") + '%']\n}",
    "type": "DocType"
   },
   {
+   "color": "#ffe8cd",
    "format": "{} Active",
    "label": "Patient",
    "link_to": "Patient",
@@ -87,10 +91,11 @@
    "type": "DocType"
   },
   {
+   "color": "#cef6d1",
    "format": "{} Vacant",
    "label": "Healthcare Service Unit",
    "link_to": "Healthcare Service Unit",
-   "stats_filter": "{\n    \"occupancy_status\": \"Vacant\",\n    \"is_group\": 0\n}",
+   "stats_filter": "{\n    \"occupancy_status\": \"Vacant\",\n    \"is_group\": 0,\n    \"company\": [\"like\", \"%\" + frappe.defaults.get_global_default(\"company\") + \"%\"]\n}",
    "type": "DocType"
   },
   {
@@ -102,6 +107,11 @@
    "label": "Patient History",
    "link_to": "patient_history",
    "type": "Page"
+  },
+  {
+   "label": "Healthcare Dashboard",
+   "link_to": "Healthcare",
+   "type": "Dashboard"
   }
  ]
 }
\ No newline at end of file
diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js
index 57f4cdf..16d4540 100644
--- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js
+++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js
@@ -144,3 +144,38 @@
 		}
 	};
 });
+
+frappe.tour['Clinical Procedure Template'] = [
+	{
+		fieldname: 'template',
+		title: __('Template Name'),
+		description: __('Enter a name for the Clinical Procedure Template')
+	},
+	{
+		fieldname: 'item_code',
+		title: __('Item Code'),
+		description: __('Set the Item Code which will be used for billing the Clinical Procedure.')
+	},
+	{
+		fieldname: 'item_group',
+		title: __('Item Group'),
+		description: __('Select an Item Group for the Clinical Procedure Item.')
+	},
+	{
+		fieldname: 'is_billable',
+		title: __('Clinical Procedure Rate'),
+		description: __('Check this if the Clinical Procedure is billable and also set the rate.')
+	},
+	{
+		fieldname: 'consume_stock',
+		title: __('Allow Stock Consumption'),
+		description: __('Check this if the Clinical Procedure utilises consumables. Click ') + "<a href='https://docs.erpnext.com/docs/user/manual/en/healthcare/clinical_procedure_template#22-manage-procedure-consumables' target='_blank'>here</a>" + __(' to know more')
+
+	},
+	{
+		fieldname: 'medical_department',
+		title: __('Medical Department'),
+		description: __('You can also set the Medical Department for the template. After saving the document, an Item will automatically be created for billing this Clinical Procedure. You can then use this template while creating Clinical Procedures for Patients. Templates save you from filling up redundant data every single time. You can also create templates for other operations like Lab Tests, Therapy Sessions, etc.')
+	}
+];
+
diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js
index 4ab3b6e..fc0b241 100644
--- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js
+++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js
@@ -108,3 +108,38 @@
 		});
 	}
 });
+
+frappe.tour['Healthcare Practitioner'] = [
+	{
+		fieldname: 'employee',
+		title: __('Employee'),
+		description: __('If you want to track Payroll and other HRMS operations for a Practitoner, create an Employee and link it here.')
+	},
+	{
+		fieldname: 'practitioner_schedules',
+		title: __('Practitioner Schedules'),
+		description: __('Set the Practitioner Schedule you just created. This will be used while booking appointments.')
+	},
+	{
+		fieldname: 'op_consulting_charge_item',
+		title: __('Out Patient Consulting Charge Item'),
+		description: __('Create a service item for Out Patient Consulting.')
+	},
+	{
+		fieldname: 'inpatient_visit_charge_item',
+		title: __('Inpatient Visit Charge Item'),
+		description: __('If this Healthcare Practitioner works for the In-Patient Department, create a service item for Inpatient Visits.')
+	},
+	{
+		fieldname: 'op_consulting_charge',
+		title: __('Out Patient Consulting Charge'),
+		description: __('Set the Out Patient Consulting Charge for this Practitioner.')
+
+	},
+	{
+		fieldname: 'inpatient_visit_charge',
+		title: __('Inpatient Visit Charge'),
+		description: __('If this Healthcare Practitioner also works for the In-Patient Department, set the inpatient visit charge for this Practitioner.')
+	}
+];
+
diff --git a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js
index 22fbf50..c266ba8 100644
--- a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js
+++ b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js
@@ -39,3 +39,37 @@
 		};
 	});
 };
+
+frappe.tour['Healthcare Settings'] = [
+	{
+		fieldname: 'link_customer_to_patient',
+		title: __('Link Customer to Patient'),
+		description: __('If checked, a customer will be created for every Patient. Patient Invoices will be created against this Customer. You can also select existing Customer while creating a Patient. This field is checked by default.')
+	},
+	{
+		fieldname: 'collect_registration_fee',
+		title: __('Collect Registration Fee'),
+		description: __('If your Healthcare facility bills registrations of Patients, you can check this and set the Registration Fee in the field below. Checking this will create new Patients with a Disabled status by default and will only be enabled after invoicing the Registration Fee.')
+	},
+	{
+		fieldname: 'automate_appointment_invoicing',
+		title: __('Automate Appointment Invoicing'),
+		description: __('Checking this will automatically create a Sales Invoice whenever an appointment is booked for a Patient.')
+	},
+	{
+		fieldname: 'healthcare_service_items',
+		title: __('Healthcare Service Items'),
+		description: __('Set up the Healthcare Service Items for billing. Click ') + "<a href='https://docs.erpnext.com/docs/user/manual/en/healthcare/healthcare_settings#2-default-healthcare-service-items' target='_blank'>here</a>" + __(' to know more')
+	},
+	{
+		fieldname: 'sb_in_ac',
+		title: __('Set up default Accounts for the Healthcare Facility'),
+		description: __('If you wish to override default accounts settings and configure the Income and Receivable accounts for Healthcare, you can do so here.')
+
+	},
+	{
+		fieldname: 'out_patient_sms_alerts',
+		title: __('Out Patient SMS alerts'),
+		description: __('You can set up Out Patient SMS alerts here. Click ') + "<a href='https://docs.erpnext.com/docs/user/manual/en/healthcare/healthcare_settings#4-out-patient-sms-alerts' target='_blank'>here</a>" + __(' to know more')
+	}
+];
diff --git a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py
index e2b47b4..3521561 100644
--- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py
+++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py
@@ -115,7 +115,7 @@
 		"price_list": price_list_name,
 		"item_code": item,
 		"price_list_rate": item_price
-	}).insert(ignore_permissions=True)
+	}).insert(ignore_permissions=True, ignore_mandatory=True)
 
 @frappe.whitelist()
 def change_test_code_from_template(lab_test_code, doc):
diff --git a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json
new file mode 100644
index 0000000..db35149
--- /dev/null
+++ b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json
@@ -0,0 +1,42 @@
+{
+ "allow_roles": [
+  {
+   "role": "Healthcare Administrator"
+  }
+ ],
+ "creation": "2020-05-19 10:32:43.025852",
+ "docstatus": 0,
+ "doctype": "Module Onboarding",
+ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/healthcare",
+ "idx": 0,
+ "is_complete": 0,
+ "modified": "2020-05-19 12:52:09.757729",
+ "modified_by": "Administrator",
+ "module": "Healthcare",
+ "name": "Healthcare",
+ "owner": "Administrator",
+ "steps": [
+  {
+   "step": "Create Patient"
+  },
+  {
+   "step": "Create Practitioner"
+  },
+  {
+   "step": "Create Practitioner Schedule"
+  },
+  {
+   "step": "Setup Schedule and Employee for Healthcare Practitioner"
+  },
+  {
+   "step": "Explore Healthcare Settings"
+  },
+  {
+   "step": "Explore Clinical Procedure Templates"
+  }
+ ],
+ "subtitle": "Patients, Practitioner Schedules, Settings and more.",
+ "success_message": "Yayy! The Healthcare Module is all set up!",
+ "title": "Let's Setup the Healthcare Module",
+ "user_can_dismiss": 1
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/onboarding_step/create_patient/create_patient.json b/erpnext/healthcare/onboarding_step/create_patient/create_patient.json
new file mode 100644
index 0000000..77bc5bd
--- /dev/null
+++ b/erpnext/healthcare/onboarding_step/create_patient/create_patient.json
@@ -0,0 +1,19 @@
+{
+ "action": "Create Entry",
+ "creation": "2020-05-19 10:32:27.648902",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 1,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-19 12:26:24.023418",
+ "modified_by": "Administrator",
+ "name": "Create Patient",
+ "owner": "Administrator",
+ "reference_document": "Patient",
+ "show_full_form": 1,
+ "title": "Create Patient",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json b/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json
new file mode 100644
index 0000000..614b201
--- /dev/null
+++ b/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json
@@ -0,0 +1,19 @@
+{
+ "action": "Create Entry",
+ "creation": "2020-05-19 10:39:55.728057",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 1,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-19 12:27:39.851375",
+ "modified_by": "Administrator",
+ "name": "Create Practitioner",
+ "owner": "Administrator",
+ "reference_document": "Healthcare Practitioner",
+ "show_full_form": 1,
+ "title": "Create Practitioner",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json b/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json
new file mode 100644
index 0000000..65980ef
--- /dev/null
+++ b/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json
@@ -0,0 +1,19 @@
+{
+ "action": "Create Entry",
+ "creation": "2020-05-19 10:41:19.065753",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 1,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-19 12:27:09.437825",
+ "modified_by": "Administrator",
+ "name": "Create Practitioner Schedule",
+ "owner": "Administrator",
+ "reference_document": "Practitioner Schedule",
+ "show_full_form": 1,
+ "title": "Create Practitioner Schedule",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/onboarding_step/explore_clinical_procedure_templates/explore_clinical_procedure_templates.json b/erpnext/healthcare/onboarding_step/explore_clinical_procedure_templates/explore_clinical_procedure_templates.json
new file mode 100644
index 0000000..f0c0f61
--- /dev/null
+++ b/erpnext/healthcare/onboarding_step/explore_clinical_procedure_templates/explore_clinical_procedure_templates.json
@@ -0,0 +1,19 @@
+{
+ "action": "Show Form Tour",
+ "creation": "2020-05-19 11:40:51.963741",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-19 11:46:35.085270",
+ "modified_by": "Administrator",
+ "name": "Explore Clinical Procedure Templates",
+ "owner": "Administrator",
+ "reference_document": "Clinical Procedure Template",
+ "show_full_form": 0,
+ "title": "Explore Clinical Procedure Templates",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json b/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json
new file mode 100644
index 0000000..2bdab69
--- /dev/null
+++ b/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json
@@ -0,0 +1,19 @@
+{
+ "action": "Show Form Tour",
+ "creation": "2020-05-19 11:14:33.044989",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 1,
+ "is_single": 1,
+ "is_skipped": 0,
+ "modified": "2020-05-19 12:26:48.682673",
+ "modified_by": "Administrator",
+ "name": "Explore Healthcare Settings",
+ "owner": "Administrator",
+ "reference_document": "Healthcare Settings",
+ "show_full_form": 0,
+ "title": "Explore Healthcare Settings",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json b/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json
new file mode 100644
index 0000000..c5af177
--- /dev/null
+++ b/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json
@@ -0,0 +1,20 @@
+{
+ "action": "Show Form Tour",
+ "creation": "2020-05-19 10:43:56.231679",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "field": "schedule",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 1,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-19 12:26:42.492734",
+ "modified_by": "Administrator",
+ "name": "Setup Schedule and Employee for Healthcare Practitioner",
+ "owner": "Administrator",
+ "reference_document": "Healthcare Practitioner",
+ "show_full_form": 0,
+ "title": "Setup Schedule and Employee for Healthcare Practitioner",
+ "validate_action": 0
+}
\ No newline at end of file
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 56186c4..bb9bb97 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -688,4 +688,5 @@
 erpnext.patches.v12_0.update_price_list_currency_in_bom
 execute:frappe.delete_doc_if_exists('Dashboard', 'Accounts')
 erpnext.patches.v13_0.update_actual_start_and_end_date_in_wo
+erpnext.patches.v13_0.set_company_field_in_healthcare_doctypes
 erpnext.patches.v12_0.update_bom_in_so_mr
diff --git a/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py b/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py
new file mode 100644
index 0000000..2c646b1
--- /dev/null
+++ b/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py
@@ -0,0 +1,9 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	company = frappe.db.get_single_value('Global Defaults', 'default_company')
+	doctypes = ['Clinical Procedure', 'Inpatient Record', 'Lab Test', 'Patient Appointment', 'Patient Encounter', 'Vital Signs']
+	for entry in doctypes:
+		if frappe.db.exists('DocType', entry):
+			frappe.db.sql("update `tab{dt}` set company = '{company}' where ifnull(company, '') = ''".format(dt=entry, company=company))
diff --git a/erpnext/projects/dashboard_fixtures.py b/erpnext/projects/dashboard_fixtures.py
new file mode 100644
index 0000000..d89ffe9
--- /dev/null
+++ b/erpnext/projects/dashboard_fixtures.py
@@ -0,0 +1,50 @@
+# 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_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():
+	return frappe._dict({
+		"dashboards": get_dashboards(),
+		"charts": get_charts(),
+	})
+
+def get_dashboards():
+	return [{
+		"doctype": "Dashboard",
+		"name": "Project",
+		"dashboard_name": "Project",
+		"charts": [
+			{ "chart": "Project Summary", "width": "Full" }
+		]
+	}]
+
+def get_charts():
+	company = frappe.get_doc("Company", get_company_for_dashboards())
+
+	return [
+		{
+			'doctype': 'Dashboard Chart',
+			'name': 'Project Summary',
+			'chart_name': _('Project Summary'),
+			'chart_type': 'Report',
+			'report_name': 'Project Summary',
+			'is_public': 1,
+			'is_custom': 1,
+			'filters_json': json.dumps({"company": company.name, "status": "Open"}),
+			'type': 'Bar',
+			'custom_options': '{"type": "bar", "colors": ["#fc4f51", "#78d6ff", "#7575ff"], "axisOptions": { "shortenYAxisNumbers": 1}, "barOptions": { "stacked": 1 }}',
+		}
+	]
\ No newline at end of file
diff --git a/erpnext/projects/desk_page/projects/projects.json b/erpnext/projects/desk_page/projects/projects.json
index a07cdff..fdbe13b 100644
--- a/erpnext/projects/desk_page/projects/projects.json
+++ b/erpnext/projects/desk_page/projects/projects.json
@@ -17,18 +17,23 @@
   }
  ],
  "category": "Modules",
- "charts": [],
+ "charts": [
+  {
+   "chart_name": "Project Summary",
+   "label": "Open Projects"
+  }
+ ],
  "creation": "2020-03-02 15:46:04.874669",
  "developer_mode_only": 0,
  "disable_user_customization": 0,
  "docstatus": 0,
  "doctype": "Desk Page",
  "extends_another_page": 0,
- "icon": "",
+ "hide_custom": 0,
  "idx": 0,
  "is_standard": 1,
  "label": "Projects",
- "modified": "2020-04-01 11:28:51.245756",
+ "modified": "2020-05-19 21:09:52.031828",
  "modified_by": "Administrator",
  "module": "Projects",
  "name": "Projects",
@@ -37,6 +42,7 @@
  "pin_to_top": 0,
  "shortcuts": [
   {
+   "color": "#4d4da8",
    "format": "{} Assigned",
    "label": "Task",
    "link_to": "Task",
@@ -44,8 +50,11 @@
    "type": "DocType"
   },
   {
+   "color": "#4d4da8",
+   "format": "{} Open",
    "label": "Project",
    "link_to": "Project",
+   "stats_filter": "{\n    \"status\": \"Open\"\n}",
    "type": "DocType"
   },
   {
@@ -57,6 +66,11 @@
    "label": "Project Billing Summary",
    "link_to": "Project Billing Summary",
    "type": "Report"
+  },
+  {
+   "label": "Project Dashboard",
+   "link_to": "Project",
+   "type": "Dashboard"
   }
  ]
 }
\ No newline at end of file
diff --git a/erpnext/projects/report/project_summary/__init__.py b/erpnext/projects/report/project_summary/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/projects/report/project_summary/__init__.py
diff --git a/erpnext/projects/report/project_summary/project_summary.js b/erpnext/projects/report/project_summary/project_summary.js
new file mode 100644
index 0000000..15367ac
--- /dev/null
+++ b/erpnext/projects/report/project_summary/project_summary.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+/* eslint-disable */
+
+frappe.query_reports["Project Summary"] = {
+	"filters": [
+		{
+			"fieldname": "company",
+			"label": __("Company"),
+			"fieldtype": "Link",
+			"options": "Company",
+			"default": frappe.defaults.get_user_default("Company"),
+			"reqd": 1
+		},
+		{
+			"fieldname": "status",
+			"label": __("Status"),
+			"fieldtype": "Select",
+			"options": "Open\nComplete\nCancelled",
+			"default": "Open"
+		}
+	]
+};
diff --git a/erpnext/projects/report/project_summary/project_summary.json b/erpnext/projects/report/project_summary/project_summary.json
new file mode 100644
index 0000000..0b18b3e
--- /dev/null
+++ b/erpnext/projects/report/project_summary/project_summary.json
@@ -0,0 +1,27 @@
+{
+ "add_total_row": 0,
+ "creation": "2020-05-04 19:31:54.575765",
+ "disable_prepared_report": 0,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "modified": "2020-05-04 19:32:53.177213",
+ "modified_by": "Administrator",
+ "module": "Projects",
+ "name": "Project Summary",
+ "owner": "Administrator",
+ "prepared_report": 0,
+ "ref_doctype": "Project",
+ "report_name": "Project Summary",
+ "report_type": "Script Report",
+ "roles": [
+  {
+   "role": "Projects User"
+  },
+  {
+   "role": "Projects Manager"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/projects/report/project_summary/project_summary.py b/erpnext/projects/report/project_summary/project_summary.py
new file mode 100644
index 0000000..a20d7f2
--- /dev/null
+++ b/erpnext/projects/report/project_summary/project_summary.py
@@ -0,0 +1,148 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe import _
+
+def execute(filters=None):
+	columns = get_columns()
+	data = []
+
+	data = frappe.db.get_all("Project", filters=filters, fields=["name", 'status', "percent_complete", "expected_start_date", "expected_end_date"], order_by="expected_end_date")
+
+	for project in data:
+		project["total_tasks"] = frappe.db.count("Task", filters={"project": project.name})
+		project["completed_tasks"] = frappe.db.count("Task", filters={"project": project.name, "status": "Completed"})
+		project["overdue_tasks"] = frappe.db.count("Task", filters={"project": project.name, "status": "Overdue"})
+
+	chart = get_chart_data(data)
+	report_summary = get_report_summary(data)
+
+	return columns, data, None, chart, report_summary
+
+def get_columns():
+	return [
+		{
+			"fieldname": "name",
+			"label": _("Project"),
+			"fieldtype": "Link",
+			"options": "Project",
+			"width": 200
+		},
+		{
+			"fieldname": "status",
+			"label": _("Status"),
+			"fieldtype": "Data",
+			"width": 120
+		},
+		{
+			"fieldname": "total_tasks",
+			"label": _("Total Tasks"),
+			"fieldtype": "Data",
+			"width": 120
+		},
+		{
+			"fieldname": "completed_tasks",
+			"label": _("Tasks Completed"),
+			"fieldtype": "Data",
+			"width": 120
+		},
+		{
+			"fieldname": "overdue_tasks",
+			"label": _("Tasks Overdue"),
+			"fieldtype": "Data",
+			"width": 120
+		},
+		{
+			"fieldname": "percent_complete",
+			"label": _("Completion"),
+			"fieldtype": "Data",
+			"width": 120
+		},
+		{
+			"fieldname": "expected_start_date",
+			"label": _("Start Date"),
+			"fieldtype": "Date",
+			"width": 120
+		},
+		{
+			"fieldname": "expected_end_date",
+			"label": _("End Date"),
+			"fieldtype": "Date",
+			"width": 120
+		},
+	]
+
+def get_chart_data(data):
+	labels = []
+	total = []
+	completed = []
+	overdue = []
+
+	for project in data:
+		labels.append(project.name)
+		total.append(project.total_tasks)
+		completed.append(project.completed_tasks)
+		overdue.append(project.overdue_tasks)
+
+	return {
+		"data": {
+			'labels': labels,
+			'datasets': [
+				{
+					"name": "Overdue",
+					"values": overdue
+				},
+				{
+					"name": "Completed",
+					"values": completed
+				},
+				{
+					"name": "Total Tasks",
+					"values": total
+				},
+			]
+		},
+		"type": "bar",
+		"colors": ["#fc4f51", "#78d6ff", "#7575ff"],
+		"barOptions": {
+			"stacked": True
+		}
+	}
+
+def get_report_summary(data):
+	if not data:
+		return None
+
+	avg_completion = sum([project.percent_complete for project in data]) / len(data)
+	total = sum([project.total_tasks for project in data])
+	total_overdue = sum([project.overdue_tasks for project in data])
+	completed = sum([project.completed_tasks for project in data])
+
+	return [
+		{
+			"value": avg_completion,
+			"indicator": "Green" if avg_completion > 50 else "Red",
+			"label": "Average Completion",
+			"datatype": "Percent",
+		},
+		{
+			"value": total,
+			"indicator": "Blue",
+			"label": "Total Tasks",
+			"datatype": "Int",
+		},
+		{
+			"value": completed,
+			"indicator": "Green",
+			"label": "Completed Tasks",
+			"datatype": "Int",
+		},
+		{
+			"value": total_overdue,
+			"indicator": "Green" if total_overdue == 0 else "Red",
+			"label": "Overdue Tasks",
+			"datatype": "Int",
+		}
+	]
diff --git a/erpnext/public/js/purchase_trends_filters.js b/erpnext/public/js/purchase_trends_filters.js
index d95507b..c786a86 100644
--- a/erpnext/public/js/purchase_trends_filters.js
+++ b/erpnext/public/js/purchase_trends_filters.js
@@ -53,7 +53,7 @@
 			],
 			"default": "Item",
 			"dashboard_config": {
-				"read_only": 1,
+				"read_only": 1
 			}
 		},
 		{
diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py
index dd5bb4a..43b1ea8 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.py
+++ b/erpnext/regional/report/gstr_1/gstr_1.py
@@ -60,9 +60,6 @@
 			for inv, items_based_on_rate in self.items_based_on_tax_rate.items():
 				invoice_details = self.invoices.get(inv)
 				for rate, items in items_based_on_rate.items():
-					if inv in self.cgst_igst_invoices:
-						rate = rate/2
-
 					row, taxable_value = self.get_row_data_for_invoice(inv, invoice_details, rate, items)
 
 					if self.filters.get("type_of_business") ==  "CDNR":
@@ -120,9 +117,15 @@
 			else:
 				row.append(invoice_details.get(fieldname))
 		taxable_value = 0
+
+		if invoice in self.cgst_igst_invoices:
+			division_factor = 2
+		else:
+			division_factor = 1
+
 		for item_code, net_amount in self.invoice_items.get(invoice).items():
 			if item_code in items:
-				if self.item_tax_rate.get(invoice) and tax_rate in self.item_tax_rate.get(invoice, {}).get(item_code, []):
+				if self.item_tax_rate.get(invoice) and tax_rate/division_factor in self.item_tax_rate.get(invoice, {}).get(item_code, []):
 					taxable_value += abs(net_amount)
 				elif not self.item_tax_rate.get(invoice):
 					taxable_value += abs(net_amount)
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 6462d3b..b57c4f3 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -282,6 +282,7 @@
    "width": "100px"
   },
   {
+   "fetch_from": "customer.tax_id",
    "fieldname": "tax_id",
    "fieldtype": "Data",
    "label": "Tax Id",
@@ -1196,7 +1197,7 @@
  "idx": 105,
  "is_submittable": 1,
  "links": [],
- "modified": "2020-04-17 12:50:39.640534",
+ "modified": "2020-05-19 21:39:19.486684",
  "modified_by": "Administrator",
  "module": "Selling",
  "name": "Sales Order",
diff --git a/erpnext/setup/setup_wizard/data/dashboard_charts.py b/erpnext/setup/setup_wizard/data/dashboard_charts.py
new file mode 100644
index 0000000..9ce64eb
--- /dev/null
+++ b/erpnext/setup/setup_wizard/data/dashboard_charts.py
@@ -0,0 +1,151 @@
+from __future__ import unicode_literals
+from frappe import _
+import frappe
+import json
+
+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_default_dashboards():
+	company = frappe.get_doc("Company", get_company_for_dashboards())
+	income_account = company.default_income_account or get_account("Income Account", company.name)
+	expense_account = company.default_expense_account or get_account("Expense Account", company.name)
+	bank_account = company.default_bank_account or get_account("Bank", company.name)
+
+	return {
+		"Dashboards": [
+			{
+				"doctype": "Dashboard",
+				"dashboard_name": "Accounts",
+				"charts": [
+					{ "chart": "Outgoing Bills (Sales Invoice)" },
+					{ "chart": "Incoming Bills (Purchase Invoice)" },
+					{ "chart": "Bank Balance" },
+					{ "chart": "Income" },
+					{ "chart": "Expenses" },
+					{ "chart": "Patient Appointments" }
+				]
+			},
+			{
+				"doctype": "Dashboard",
+				"dashboard_name": "Project",
+				"charts": [
+					{ "chart": "Project Summary", "width": "Full" }
+				]
+			},
+		],
+		"Charts": [
+			{
+				"doctype": "Dashboard Chart",
+				"time_interval": "Quarterly",
+				"chart_name": "Income",
+				"timespan": "Last Year",
+				"color": None,
+				"filters_json": json.dumps({"company": company.name, "account": income_account}),
+				"source": "Account Balance Timeline",
+				"chart_type": "Custom",
+				"timeseries": 1,
+				"owner": "Administrator",
+				"type": "Line",
+				"width": "Half"
+			},
+			{
+				"doctype": "Dashboard Chart",
+				"time_interval": "Quarterly",
+				"chart_name": "Expenses",
+				"timespan": "Last Year",
+				"color": None,
+				"filters_json": json.dumps({"company": company.name, "account": expense_account}),
+				"source": "Account Balance Timeline",
+				"chart_type": "Custom",
+				"timeseries": 1,
+				"owner": "Administrator",
+				"type": "Line",
+				"width": "Half"
+			},
+			{
+				"doctype": "Dashboard Chart",
+				"time_interval": "Quarterly",
+				"chart_name": "Bank Balance",
+				"timespan": "Last Year",
+				"color": "#ffb868",
+				"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"
+			},
+			{
+				"doctype": "Dashboard Chart",
+				"time_interval": "Monthly",
+				"chart_name": "Incoming Bills (Purchase Invoice)",
+				"timespan": "Last Year",
+				"color": "#a83333",
+				"value_based_on": "base_grand_total",
+				"filters_json": json.dumps({}),
+				"chart_type": "Sum",
+				"timeseries": 1,
+				"based_on": "posting_date",
+				"owner": "Administrator",
+				"document_type": "Purchase Invoice",
+				"type": "Bar",
+				"width": "Half"
+			},
+			{
+				"doctype": "Dashboard Chart",
+				"time_interval": "Monthly",
+				"chart_name": "Outgoing Bills (Sales Invoice)",
+				"timespan": "Last Year",
+				"color": "#7b933d",
+				"value_based_on": "base_grand_total",
+				"filters_json": json.dumps({}),
+				"chart_type": "Sum",
+				"timeseries": 1,
+				"based_on": "posting_date",
+				"owner": "Administrator",
+				"document_type": "Sales Invoice",
+				"type": "Bar",
+				"width": "Half"
+			},
+			{
+				'doctype': 'Dashboard Chart',
+				'name': 'Project Summary',
+				'chart_name': 'Project Summary',
+				'chart_type': 'Report',
+				'report_name': 'Project Summary',
+				'is_public': 1,
+				'filters_json': json.dumps({"company": company.name, "status": "Open"}),
+				'type': 'Bar',
+				'custom_options': '{"type": "bar", "colors": ["#fc4f51", "#78d6ff", "#7575ff"], "axisOptions": { "shortenYAxisNumbers": 1}, "barOptions": { "stacked": 1 }}',
+			},
+			{
+				"doctype": "Dashboard Chart",
+				"time_interval": "Daily",
+				"chart_name": "Patient Appointments",
+				"timespan": "Last Month",
+				"color": "#77ecca",
+				"filters_json": json.dumps({}),
+				"chart_type": "Count",
+				"timeseries": 1,
+				"based_on": "appointment_datetime",
+				"owner": "Administrator",
+				"document_type": "Patient Appointment",
+				"type": "Line",
+				"width": "Half"
+			}
+		]
+	}
+
+def get_account(account_type, company):
+	accounts = frappe.get_list("Account", filters={"account_type": account_type, "company": company})
+	if accounts:
+		return accounts[0].name
diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
index 43f1f37..8227f15 100644
--- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
+++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
@@ -26,9 +26,10 @@
 		# consider only consolidated row
 		data = [row for row in data if row[0]]
 
+	data = sorted(data, key = lambda i: i[-1], reverse=True)
+
 	if len(data) > 10:
 		# get top 10 if data too long
-		data = sorted(data, key = lambda i: i[-1],reverse=True)
 		data = data[:10]
 
 	for row in data: