Merge pull request #32836 from resilient-tech/perf-fix-get-cached-value-for-accounts

perf: use `get_cached_value` instead of `db.get_value` in accounts module
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.json b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.json
index a7315a6..e00b17e 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.json
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.json
@@ -1,389 +1,138 @@
 {
- "allow_copy": 0, 
- "allow_guest_to_view": 0, 
- "allow_import": 1, 
- "allow_rename": 0, 
- "autoname": "ACC-ERR-.YYYY.-.#####", 
- "beta": 0, 
- "creation": "2018-04-13 18:25:55.943587", 
- "custom": 0, 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "", 
- "editable_grid": 1, 
- "engine": "InnoDB", 
+ "actions": [],
+ "allow_import": 1,
+ "autoname": "ACC-ERR-.YYYY.-.#####",
+ "creation": "2018-04-13 18:25:55.943587",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+  "posting_date",
+  "column_break_2",
+  "company",
+  "section_break_4",
+  "get_entries",
+  "accounts",
+  "section_break_6",
+  "total_gain_loss",
+  "amended_from"
+ ],
  "fields": [
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "default": "Today", 
-   "fieldname": "posting_date", 
-   "fieldtype": "Date", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 1, 
-   "in_standard_filter": 0, 
-   "label": "Posting Date", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 1, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "default": "Today",
+   "fieldname": "posting_date",
+   "fieldtype": "Date",
+   "in_list_view": 1,
+   "label": "Posting Date",
+   "reqd": 1
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "column_break_2", 
-   "fieldtype": "Column Break", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "column_break_2",
+   "fieldtype": "Column Break"
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 1, 
-   "in_standard_filter": 0, 
-   "label": "Company", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "Company", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 1, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_list_view": 1,
+   "label": "Company",
+   "options": "Company",
+   "reqd": 1
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "section_break_4", 
-   "fieldtype": "Section Break", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "section_break_4",
+   "fieldtype": "Section Break"
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "get_entries", 
-   "fieldtype": "Button", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Get Entries", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "get_entries",
+   "fieldtype": "Button",
+   "label": "Get Entries"
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "accounts", 
-   "fieldtype": "Table", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Exchange Rate Revaluation Account", 
-   "length": 0, 
-   "no_copy": 1, 
-   "options": "Exchange Rate Revaluation Account", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 1, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "accounts",
+   "fieldtype": "Table",
+   "label": "Exchange Rate Revaluation Account",
+   "no_copy": 1,
+   "options": "Exchange Rate Revaluation Account",
+   "reqd": 1
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "section_break_6", 
-   "fieldtype": "Section Break", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "section_break_6",
+   "fieldtype": "Section Break"
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "total_gain_loss", 
-   "fieldtype": "Currency", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Total Gain/Loss", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
-  }, 
+   "fieldname": "total_gain_loss",
+   "fieldtype": "Currency",
+   "label": "Total Gain/Loss",
+   "options": "Company:company:default_currency",
+   "read_only": 1
+  },
   {
-   "allow_bulk_edit": 0, 
-   "allow_in_quick_entry": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Amended From", 
-   "length": 0, 
-   "no_copy": 1, 
-   "options": "Exchange Rate Revaluation", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "label": "Amended From",
+   "no_copy": 1,
+   "options": "Exchange Rate Revaluation",
+   "print_hide": 1,
+   "read_only": 1
   }
- ], 
- "has_web_view": 0, 
- "hide_heading": 0, 
- "hide_toolbar": 0, 
- "idx": 0, 
- "image_view": 0, 
- "in_create": 0, 
- "is_submittable": 1, 
- "issingle": 0, 
- "istable": 0, 
- "max_attachments": 0, 
- "modified": "2018-08-21 16:15:34.660715", 
- "modified_by": "Administrator", 
- "module": "Accounts", 
- "name": "Exchange Rate Revaluation", 
- "name_case": "", 
- "owner": "Administrator", 
+ ],
+ "is_submittable": 1,
+ "links": [],
+ "modified": "2022-11-17 10:28:03.911554",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Exchange Rate Revaluation",
+ "naming_rule": "Expression (old style)",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "export": 1, 
-   "if_owner": 0, 
-   "import": 0, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "System Manager", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "export": 1,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "System Manager",
+   "share": 1,
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "export": 1, 
-   "if_owner": 0, 
-   "import": 0, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts Manager", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "export": 1,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Accounts Manager",
+   "share": 1,
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "export": 1, 
-   "if_owner": 0, 
-   "import": 0, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts User", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "export": 1,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Accounts User",
+   "share": 1,
+   "submit": 1,
    "write": 1
   }
- ], 
- "quick_entry": 0, 
- "read_only": 0, 
- "read_only_onload": 0, 
- "show_name_in_global_search": 0, 
- "sort_field": "modified", 
- "sort_order": "DESC", 
- "track_changes": 1, 
- "track_seen": 0, 
- "track_views": 0
+ ],
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "states": [],
+ "track_changes": 1
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
index 03d0e49..68e828b 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
@@ -233,6 +233,10 @@
 	balance = get_balance_on(
 		account, date=posting_date, party_type=party_type, party=party, in_account_currency=False
 	)
+	account_details = {
+		"account_currency": account_currency,
+	}
+
 	if balance:
 		balance_in_account_currency = get_balance_on(
 			account, date=posting_date, party_type=party_type, party=party
@@ -242,13 +246,14 @@
 		)
 		new_exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)
 		new_balance_in_base_currency = balance_in_account_currency * new_exchange_rate
-		account_details = {
-			"account_currency": account_currency,
-			"balance_in_base_currency": balance,
-			"balance_in_account_currency": balance_in_account_currency,
-			"current_exchange_rate": current_exchange_rate,
-			"new_exchange_rate": new_exchange_rate,
-			"new_balance_in_base_currency": new_balance_in_base_currency,
-		}
+		account_details = account_details.update(
+			{
+				"balance_in_base_currency": balance,
+				"balance_in_account_currency": balance_in_account_currency,
+				"current_exchange_rate": current_exchange_rate,
+				"new_exchange_rate": new_exchange_rate,
+				"new_balance_in_base_currency": new_balance_in_base_currency,
+			}
+		)
 
 	return account_details
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.json b/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.json
index 30ff9eb..80e972b 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.json
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.json
@@ -1,475 +1,120 @@
 {
- "allow_copy": 0,
- "allow_events_in_timeline": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
+ "actions": [],
  "creation": "2018-04-13 18:30:06.110433",
- "custom": 0,
- "docstatus": 0,
  "doctype": "DocType",
- "document_type": "",
  "editable_grid": 1,
  "engine": "InnoDB",
+ "field_order": [
+  "account",
+  "party_type",
+  "party",
+  "column_break_2",
+  "account_currency",
+  "balance_in_account_currency",
+  "balances",
+  "current_exchange_rate",
+  "balance_in_base_currency",
+  "column_break_9",
+  "new_exchange_rate",
+  "new_balance_in_base_currency",
+  "gain_loss"
+ ],
  "fields": [
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "account",
    "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
    "in_list_view": 1,
-   "in_standard_filter": 0,
    "label": "Account",
-   "length": 0,
-   "no_copy": 0,
    "options": "Account",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "reqd": 1
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "party_type",
    "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
    "label": "Party Type",
-   "length": 0,
-   "no_copy": 0,
-   "options": "DocType",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "options": "DocType"
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "party",
    "fieldtype": "Dynamic Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
    "label": "Party",
-   "length": 0,
-   "no_copy": 0,
-   "options": "party_type",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "options": "party_type"
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "column_break_2",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "fieldtype": "Column Break"
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "account_currency",
    "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
    "label": "Account Currency",
-   "length": 0,
-   "no_copy": 0,
    "options": "Currency",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "read_only": 1
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "balance_in_account_currency",
    "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
    "label": "Balance In Account Currency",
-   "length": 0,
-   "no_copy": 0,
    "options": "account_currency",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "read_only": 1
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "balances",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "fieldtype": "Section Break"
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "current_exchange_rate",
    "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
    "label": "Current Exchange Rate",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "read_only": 1
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "balance_in_base_currency",
    "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
    "in_list_view": 1,
-   "in_standard_filter": 0,
    "label": "Balance In Base Currency",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "options": "Company:company:default_currency",
+   "read_only": 1
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "column_break_9",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "fieldtype": "Column Break"
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "new_exchange_rate",
    "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
    "in_list_view": 1,
-   "in_standard_filter": 0,
    "label": "New Exchange Rate",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "reqd": 1
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "new_balance_in_base_currency",
    "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
    "in_list_view": 1,
-   "in_standard_filter": 0,
    "label": "New Balance In Base Currency",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "options": "Company:company:default_currency",
+   "read_only": 1
   },
   {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
    "fieldname": "gain_loss",
    "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
    "in_list_view": 1,
-   "in_standard_filter": 0,
    "label": "Gain/Loss",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
+   "options": "Company:company:default_currency",
+   "read_only": 1
   }
  ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
  "istable": 1,
- "max_attachments": 0,
- "modified": "2019-06-26 18:57:51.762345",
+ "links": [],
+ "modified": "2022-11-17 10:26:18.302728",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Exchange Rate Revaluation Account",
- "name_case": "",
  "owner": "Administrator",
  "permissions": [],
  "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
  "sort_field": "modified",
  "sort_order": "DESC",
- "track_changes": 1,
- "track_seen": 0,
- "track_views": 0
+ "states": [],
+ "track_changes": 1
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index a5ff7f1..30a3201 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -253,9 +253,6 @@
 				var party_account_field = jvd.reference_type==="Sales Invoice" ? "debit_to": "credit_to";
 				out.filters.push([jvd.reference_type, party_account_field, "=", jvd.account]);
 
-				if (in_list(['Debit Note', 'Credit Note'], doc.voucher_type)) {
-					out.filters.push([jvd.reference_type, "is_return", "=", 1]);
-				}
 			}
 
 			if(in_list(["Sales Order", "Purchase Order"], jvd.reference_type)) {
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
index 1f41661..88867d1 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
@@ -20,7 +20,6 @@
 				frm.dashboard.reset();
 				frm.doc.import_in_progress = true;
 			}
-			if (data.user != frappe.session.user) return;
 			if (data.count == data.total) {
 				setTimeout(() => {
 					frm.doc.import_in_progress = false;
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
index 57fe405..47c2ceb 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
@@ -260,10 +260,10 @@
 		dict(
 			title=_("Opening Invoice Creation In Progress"),
 			message=_("Creating {} out of {} {}").format(index + 1, total, doctype),
-			user=frappe.session.user,
 			count=index + 1,
 			total=total,
 		),
+		user=frappe.session.user,
 	)
 
 
diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js
index 1d596c1..e6d9fe2 100644
--- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js
+++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js
@@ -25,7 +25,7 @@
 
 		frappe.realtime.on('closing_process_complete', async function(data) {
 			await frm.reload_doc();
-			if (frm.doc.status == 'Failed' && frm.doc.error_message && data.user == frappe.session.user) {
+			if (frm.doc.status == 'Failed' && frm.doc.error_message) {
 				frappe.msgprint({
 					title: __('POS Closing Failed'),
 					message: frm.doc.error_message,
diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py
index a0a1c8c..3a237a4 100644
--- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py
+++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py
@@ -430,7 +430,7 @@
 
 	finally:
 		frappe.db.commit()
-		frappe.publish_realtime("closing_process_complete", {"user": frappe.session.user})
+		frappe.publish_realtime("closing_process_complete", user=frappe.session.user)
 
 
 def cancel_merge_logs(merge_logs, closing_entry=None):
@@ -457,7 +457,7 @@
 
 	finally:
 		frappe.db.commit()
-		frappe.publish_realtime("closing_process_complete", {"user": frappe.session.user})
+		frappe.publish_realtime("closing_process_complete", user=frappe.session.user)
 
 
 def enqueue_job(job, **kwargs):
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 39a6235..a098e8d 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -81,7 +81,7 @@
 		}
 
 		if(doc.docstatus == 1 && doc.outstanding_amount != 0
-			&& !(doc.is_return && doc.return_against)) {
+			&& !(doc.is_return && doc.return_against) && !doc.on_hold) {
 			this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __('Create'));
 			cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
 		}
@@ -99,7 +99,7 @@
 			}
 		}
 
-		if (doc.outstanding_amount > 0 && !cint(doc.is_return)) {
+		if (doc.outstanding_amount > 0 && !cint(doc.is_return) && !doc.on_hold) {
 			cur_frm.add_custom_button(__('Payment Request'), function() {
 				me.make_payment_request()
 			}, __('Create'));
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 370c0fc..a5981fd 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -25,6 +25,10 @@
   "apply_tds",
   "tax_withholding_category",
   "amended_from",
+  "supplier_invoice_details",
+  "bill_no",
+  "column_break_15",
+  "bill_date",
   "accounting_dimensions_section",
   "cost_center",
   "dimension_col_break",
@@ -151,10 +155,6 @@
   "status",
   "column_break_177",
   "per_received",
-  "supplier_invoice_details",
-  "bill_no",
-  "column_break_15",
-  "bill_date",
   "accounting_details_section",
   "credit_to",
   "party_account_currency",
@@ -1540,7 +1540,7 @@
  "idx": 204,
  "is_submittable": 1,
  "links": [],
- "modified": "2022-11-04 01:02:44.544878",
+ "modified": "2022-11-22 12:44:29.935567",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Purchase Invoice",
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
index 82d0030..e1c37c6 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
@@ -63,7 +63,7 @@
 		});
 
 		listview.page.add_action_item(__("Payment"), ()=>{
-			erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment");
+			erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment Entry");
 		});
 	}
 };
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 62cf0dc..c276be2 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -2165,6 +2165,8 @@
 		if source.doctype == "Purchase Order Item" and target.doctype == "Sales Order Item":
 			target.purchase_order = source.parent
 			target.purchase_order_item = source.name
+			target.material_request = source.material_request
+			target.material_request_item = source.material_request_item
 
 		if (
 			source.get("purchase_order")
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
index 1130284..1605b15 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
@@ -29,7 +29,7 @@
 		});
 
 		listview.page.add_action_item(__("Payment"), ()=>{
-			erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment");
+			erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment Entry");
 		});
 	}
 };
diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
index 40c732b..23caac0 100644
--- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
+++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
@@ -226,6 +226,42 @@
 		for d in reversed(invoices):
 			d.cancel()
 
+		orders = []
+
+		po = create_purchase_order(supplier="Test TDS Supplier4", rate=20000, do_not_save=True)
+		po.extend(
+			"items",
+			[
+				{
+					"doctype": "Purchase Order Item",
+					"item_code": frappe.db.get_value("Item", {"item_name": "TDS Item"}, "name"),
+					"qty": 1,
+					"rate": 20000,
+					"cost_center": "Main - _TC",
+					"expense_account": "Stock Received But Not Billed - _TC",
+					"apply_tds": 0,
+				},
+				{
+					"doctype": "Purchase Order Item",
+					"item_code": frappe.db.get_value("Item", {"item_name": "TDS Item"}, "name"),
+					"qty": 1,
+					"rate": 35000,
+					"cost_center": "Main - _TC",
+					"expense_account": "Stock Received But Not Billed - _TC",
+					"apply_tds": 1,
+				},
+			],
+		)
+		po.save()
+		po.submit()
+		orders.append(po)
+
+		self.assertEqual(po.taxes[0].tax_amount, 5500)
+
+		# cancel orders to avoid clashing
+		for d in reversed(orders):
+			d.cancel()
+
 	def test_multi_category_single_supplier(self):
 		frappe.db.set_value(
 			"Supplier", "Test TDS Supplier5", "tax_withholding_category", "Test Service Category"
@@ -348,6 +384,39 @@
 	return pi
 
 
+def create_purchase_order(**args):
+	# return purchase order doc object
+	item = frappe.db.get_value("Item", {"item_name": "TDS Item"}, "name")
+
+	args = frappe._dict(args)
+	po = frappe.get_doc(
+		{
+			"doctype": "Purchase Order",
+			"transaction_date": today(),
+			"schedule_date": today(),
+			"apply_tds": 0 if args.do_not_apply_tds else 1,
+			"supplier": args.supplier,
+			"company": "_Test Company",
+			"taxes_and_charges": "",
+			"currency": "INR",
+			"taxes": [],
+			"items": [
+				{
+					"doctype": "Purchase Order Item",
+					"item_code": item,
+					"qty": args.qty or 1,
+					"rate": args.rate or 10000,
+					"cost_center": "Main - _TC",
+					"expense_account": "Stock Received But Not Billed - _TC",
+				}
+			],
+		}
+	)
+
+	po.save()
+	return po
+
+
 def create_sales_invoice(**args):
 	# return sales invoice doc object
 	item = frappe.db.get_value("Item", {"item_name": "TCS Item"}, "name")
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index 6d164ee..c757057 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -394,20 +394,22 @@
 	round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(
 		gl_map[0].company, gl_map[0].voucher_type, gl_map[0].voucher_no
 	)
-	round_off_account_exists = False
 	round_off_gle = frappe._dict()
-	for d in gl_map:
-		if d.account == round_off_account:
-			round_off_gle = d
-			if d.debit:
-				debit_credit_diff -= flt(d.debit)
-			else:
-				debit_credit_diff += flt(d.credit)
-			round_off_account_exists = True
+	round_off_account_exists = False
 
-	if round_off_account_exists and abs(debit_credit_diff) < (1.0 / (10**precision)):
-		gl_map.remove(round_off_gle)
-		return
+	if gl_map[0].voucher_type != "Period Closing Voucher":
+		for d in gl_map:
+			if d.account == round_off_account:
+				round_off_gle = d
+				if d.debit:
+					debit_credit_diff -= flt(d.debit) - flt(d.credit)
+				else:
+					debit_credit_diff += flt(d.credit)
+				round_off_account_exists = True
+
+		if round_off_account_exists and abs(debit_credit_diff) < (1.0 / (10**precision)):
+			gl_map.remove(round_off_gle)
+			return
 
 	if not round_off_gle:
 		for k in ["voucher_type", "voucher_no", "company", "posting_date", "remarks"]:
@@ -430,7 +432,6 @@
 	)
 
 	update_accounting_dimensions(round_off_gle)
-
 	if not round_off_account_exists:
 		gl_map.append(round_off_gle)
 
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index f0167f1..e3531b0 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -121,7 +121,7 @@
 				if is_same_account_currency:
 					account_currency = currency
 
-		elif filters.get("party"):
+		elif filters.get("party") and filters.get("party_type"):
 			gle_currency = frappe.db.get_value(
 				"GL Entry",
 				{"party_type": filters.party_type, "party": filters.party[0], "company": filters.company},
@@ -134,7 +134,7 @@
 				account_currency = (
 					None
 					if filters.party_type in ["Employee", "Shareholder", "Member"]
-					else frappe.db.get_value(filters.party_type, filters.party[0], "default_currency")
+					else frappe.get_cached_value(filters.party_type, filters.party[0], "default_currency")
 				)
 
 		filters["account_currency"] = account_currency or filters.company_currency
diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py
index e8a1e79..a05d581 100644
--- a/erpnext/accounts/report/purchase_register/purchase_register.py
+++ b/erpnext/accounts/report/purchase_register/purchase_register.py
@@ -232,12 +232,12 @@
 
 					conditions += (
 						common_condition
-						+ "and ifnull(`tabPurchase Invoice Item`.{0}, '') in %({0})s)".format(dimension.fieldname)
+						+ "and ifnull(`tabPurchase Invoice`.{0}, '') in %({0})s)".format(dimension.fieldname)
 					)
 				else:
 					conditions += (
 						common_condition
-						+ "and ifnull(`tabPurchase Invoice Item`.{0}, '') in %({0})s)".format(dimension.fieldname)
+						+ "and ifnull(`tabPurchase Invoice`.{0}, '') in %({0})s)".format(dimension.fieldname)
 					)
 
 	return conditions
diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py
index 06e3c61..b333901 100644
--- a/erpnext/accounts/report/sales_register/sales_register.py
+++ b/erpnext/accounts/report/sales_register/sales_register.py
@@ -390,12 +390,12 @@
 
 					conditions += (
 						common_condition
-						+ "and ifnull(`tabSales Invoice Item`.{0}, '') in %({0})s)".format(dimension.fieldname)
+						+ "and ifnull(`tabSales Invoice`.{0}, '') in %({0})s)".format(dimension.fieldname)
 					)
 				else:
 					conditions += (
 						common_condition
-						+ "and ifnull(`tabSales Invoice Item`.{0}, '') in %({0})s)".format(dimension.fieldname)
+						+ "and ifnull(`tabSales Invoice`.{0}, '') in %({0})s)".format(dimension.fieldname)
 					)
 
 	return conditions
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index ded45b8..e2a70c2 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -54,6 +54,8 @@
   "column_break_26",
   "total",
   "net_total",
+  "tax_withholding_net_total",
+  "base_tax_withholding_net_total",
   "section_break_48",
   "pricing_rules",
   "raw_material_details",
@@ -1221,6 +1223,26 @@
    "oldfieldtype": "Section Break"
   },
   {
+   "default": "0",
+   "fieldname": "tax_withholding_net_total",
+   "fieldtype": "Currency",
+   "hidden": 1,
+   "label": "Tax Withholding Net Total",
+   "no_copy": 1,
+   "options": "currency",
+   "read_only": 1
+  },
+  {
+   "fieldname": "base_tax_withholding_net_total",
+   "fieldtype": "Currency",
+   "hidden": 1,
+   "label": "Base Tax Withholding Net Total",
+   "no_copy": 1,
+   "options": "currency",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
    "fieldname": "column_break_99",
    "fieldtype": "Column Break"
   },
diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
index 5a96131..291d756 100644
--- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
@@ -736,27 +736,29 @@
 	def test_advance_paid_upon_payment_entry_cancellation(self):
 		from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
 
-		po_doc = create_purchase_order()
+		po_doc = create_purchase_order(supplier="_Test Supplier USD", currency="USD", do_not_submit=1)
+		po_doc.conversion_rate = 80
+		po_doc.submit()
 
-		pe = get_payment_entry("Purchase Order", po_doc.name, bank_account="_Test Bank - _TC")
-		pe.reference_no = "1"
-		pe.reference_date = nowdate()
-		pe.paid_from_account_currency = po_doc.currency
-		pe.paid_to_account_currency = po_doc.currency
-		pe.source_exchange_rate = 1
+		pe = get_payment_entry("Purchase Order", po_doc.name)
+		pe.mode_of_payment = "Cash"
+		pe.paid_from = "Cash - _TC"
+		pe.source_exchange_rate = 80
 		pe.target_exchange_rate = 1
 		pe.paid_amount = po_doc.grand_total
 		pe.save(ignore_permissions=True)
 		pe.submit()
 
 		po_doc.reload()
-		self.assertEqual(po_doc.advance_paid, po_doc.base_grand_total)
+		self.assertEqual(po_doc.advance_paid, po_doc.grand_total)
+		self.assertEqual(po_doc.party_account_currency, "USD")
 
 		pe_doc = frappe.get_doc("Payment Entry", pe.name)
 		pe_doc.cancel()
 
 		po_doc.reload()
 		self.assertEqual(po_doc.advance_paid, 0)
+		self.assertEqual(po_doc.party_account_currency, "USD")
 
 	def test_schedule_date(self):
 		po = create_purchase_order(do_not_submit=True)
@@ -833,6 +835,10 @@
 		prepare_data_for_internal_transfer()
 		supplier = "_Test Internal Supplier 2"
 
+		mr = make_material_request(
+			qty=2, company="_Test Company with perpetual inventory", warehouse="Stores - TCP1"
+		)
+
 		po = create_purchase_order(
 			company="_Test Company with perpetual inventory",
 			supplier=supplier,
@@ -840,6 +846,8 @@
 			from_warehouse="_Test Internal Warehouse New 1 - TCP1",
 			qty=2,
 			rate=1,
+			material_request=mr.name,
+			material_request_item=mr.items[0].name,
 		)
 
 		so = make_inter_company_sales_order(po.name)
@@ -875,9 +883,11 @@
 		self.assertTrue(pi.items[0].purchase_order)
 		self.assertTrue(pi.items[0].po_detail)
 		pi.submit()
+		mr.reload()
 
 		po.load_from_db()
 		self.assertEqual(po.status, "Completed")
+		self.assertEqual(mr.status, "Received")
 
 
 def prepare_data_for_internal_transfer():
@@ -979,6 +989,8 @@
 				"schedule_date": add_days(nowdate(), 1),
 				"include_exploded_items": args.get("include_exploded_items", 1),
 				"against_blanket_order": args.against_blanket_order,
+				"material_request": args.material_request,
+				"material_request_item": args.material_request_item,
 			},
 		)
 
diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
index b8203bd..d471783 100644
--- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
+++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
@@ -44,6 +44,7 @@
   "discount_amount",
   "base_rate_with_margin",
   "sec_break2",
+  "apply_tds",
   "rate",
   "amount",
   "item_tax_template",
@@ -889,6 +890,12 @@
   {
    "fieldname": "column_break_54",
    "fieldtype": "Column Break"
+  },
+  {
+   "default": "1",
+   "fieldname": "apply_tds",
+   "fieldtype": "Check",
+   "label": "Apply TDS"
   }
  ],
  "idx": 1,
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 216c9f4..1849e8b 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -1352,12 +1352,12 @@
 		party = self.customer if self.doctype == "Sales Order" else self.supplier
 		advance = (
 			frappe.qb.from_(ple)
-			.select(ple.account_currency, Abs(Sum(ple.amount)).as_("amount"))
+			.select(ple.account_currency, Abs(Sum(ple.amount_in_account_currency)).as_("amount"))
 			.where(
 				(ple.against_voucher_type == self.doctype)
 				& (ple.against_voucher_no == self.name)
 				& (ple.party == party)
-				& (ple.delinked == 0)
+				& (ple.docstatus == 1)
 				& (ple.company == self.company)
 			)
 			.run(as_dict=True)
diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py
index 39ef68a..15c82af 100644
--- a/erpnext/controllers/sales_and_purchase_return.py
+++ b/erpnext/controllers/sales_and_purchase_return.py
@@ -404,12 +404,17 @@
 			returned_qty_map = get_returned_qty_map_for_row(
 				source_parent.name, source_parent.supplier, source_doc.name, doctype
 			)
-			target_doc.received_qty = -1 * flt(
-				source_doc.received_qty - (returned_qty_map.get("received_qty") or 0)
-			)
-			target_doc.rejected_qty = -1 * flt(
-				source_doc.rejected_qty - (returned_qty_map.get("rejected_qty") or 0)
-			)
+
+			if doctype == "Subcontracting Receipt":
+				target_doc.received_qty = -1 * flt(source_doc.qty)
+			else:
+				target_doc.received_qty = -1 * flt(
+					source_doc.received_qty - (returned_qty_map.get("received_qty") or 0)
+				)
+				target_doc.rejected_qty = -1 * flt(
+					source_doc.rejected_qty - (returned_qty_map.get("rejected_qty") or 0)
+				)
+
 			target_doc.qty = -1 * flt(source_doc.qty - (returned_qty_map.get("qty") or 0))
 
 			if hasattr(target_doc, "stock_qty"):
diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py
index b93c5c4..da56997 100644
--- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py
+++ b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py
@@ -1345,7 +1345,7 @@
 		)[0]["name"]
 
 	def _publish(self, *args, **kwargs):
-		frappe.publish_realtime("quickbooks_progress_update", *args, **kwargs)
+		frappe.publish_realtime("quickbooks_progress_update", *args, **kwargs, user=self.modified_by)
 
 	def _get_unique_account_name(self, quickbooks_name, number=0):
 		if number:
diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py
index cd4aaee..e6840f5 100644
--- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py
+++ b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py
@@ -304,6 +304,7 @@
 		frappe.publish_realtime(
 			"tally_migration_progress_update",
 			{"title": title, "message": message, "count": count, "total": total},
+			user=self.modified_by,
 		)
 
 	def _import_master_data(self):
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index f9ddb12..4f42cca 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -175,6 +175,7 @@
 		},
 	},
 	{"from_route": "/project", "to_route": "Project"},
+	{"from_route": "/tasks", "to_route": "Task"},
 ]
 
 standard_portal_menu_items = [
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 2624181..73d5d3e 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -317,4 +317,4 @@
 erpnext.patches.v14_0.migrate_remarks_from_gl_to_payment_ledger
 erpnext.patches.v13_0.update_schedule_type_in_loans
 erpnext.patches.v14_0.create_accounting_dimensions_for_asset_capitalization
-erpnext.patches.v14_0.update_tds_fields
+erpnext.patches.v14_0.update_partial_tds_fields
diff --git a/erpnext/patches/v14_0/update_tds_fields.py b/erpnext/patches/v14_0/update_partial_tds_fields.py
similarity index 64%
rename from erpnext/patches/v14_0/update_tds_fields.py
rename to erpnext/patches/v14_0/update_partial_tds_fields.py
index a333c5d..5ccc2dc 100644
--- a/erpnext/patches/v14_0/update_tds_fields.py
+++ b/erpnext/patches/v14_0/update_partial_tds_fields.py
@@ -25,5 +25,21 @@
 			).where(
 				purchase_invoice.docstatus == 1
 			).run()
+
+			purchase_order = frappe.qb.DocType("Purchase Order")
+
+			frappe.qb.update(purchase_order).set(
+				purchase_order.tax_withholding_net_total, purchase_order.net_total
+			).set(
+				purchase_order.base_tax_withholding_net_total, purchase_order.base_net_total
+			).where(
+				purchase_order.company == company.name
+			).where(
+				purchase_order.apply_tds == 1
+			).where(
+				purchase_order.transaction_date >= fiscal_year_details.year_start_date
+			).where(
+				purchase_order.docstatus == 1
+			).run()
 		except FiscalYearError:
 			pass
diff --git a/erpnext/public/js/projects/timer.js b/erpnext/public/js/projects/timer.js
index 0e5c0d3..9dae711 100644
--- a/erpnext/public/js/projects/timer.js
+++ b/erpnext/public/js/projects/timer.js
@@ -48,21 +48,23 @@
 	var $btn_complete = dialog.$wrapper.find(".playpause .btn-complete");
 	var interval = null;
 	var currentIncrement = timestamp;
-	var initialised = row ? true : false;
+	var initialized = row ? true : false;
 	var clicked = false;
 	var flag = true; // Alert only once
 	// If row with not completed status, initialize timer with the time elapsed on click of 'Start Timer'.
 	if (row) {
-		initialised = true;
+		initialized = true;
 		$btn_start.hide();
 		$btn_complete.show();
-		initialiseTimer();
+		initializeTimer();
 	}
-	if (!initialised) {
+
+	if (!initialized) {
 		$btn_complete.hide();
 	}
+
 	$btn_start.click(function(e) {
-		if (!initialised) {
+		if (!initialized) {
 			// New activity if no activities found
 			var args = dialog.get_values();
 			if(!args) return;
@@ -90,11 +92,11 @@
 			return false;
 		}
 
-		if (!initialised) {
-			initialised = true;
+		if (!initialized) {
+			initialized = true;
 			$btn_start.hide();
 			$btn_complete.show();
-			initialiseTimer();
+			initializeTimer();
 		}
 	});
 
@@ -110,11 +112,13 @@
 		grid_row.doc.hours = currentIncrement / 3600;
 		grid_row.doc.to_time = frappe.datetime.now_datetime();
 		grid_row.refresh();
+		frm.dirty();
 		frm.save();
 		reset();
 		dialog.hide();
 	});
-	function initialiseTimer() {
+
+	function initializeTimer() {
 		interval = setInterval(function() {
 			var current = setCurrentIncrement();
 			updateStopwatch(current);
@@ -151,7 +155,7 @@
 
 	function reset() {
 		currentIncrement = 0;
-		initialised = false;
+		initialized = false;
 		clearInterval(interval);
 		$(".hours").text("00");
 		$(".minutes").text("00");
diff --git a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py
index 34701c1..c52685e 100644
--- a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py
+++ b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py
@@ -146,7 +146,9 @@
 
 	def publish(self, title, message, count, total):
 		frappe.publish_realtime(
-			"import_invoice_update", {"title": title, "message": message, "count": count, "total": total}
+			"import_invoice_update",
+			{"title": title, "message": message, "count": count, "total": total},
+			user=self.modified_by,
 		)
 
 
diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
index 8c7c552..b801de3 100644
--- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json
+++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
@@ -95,8 +95,10 @@
   "item_tax_rate",
   "transaction_date",
   "inter_transfer_reference_section",
+  "material_request",
   "purchase_order",
   "column_break_89",
+  "material_request_item",
   "purchase_order_item"
  ],
  "fields": [
@@ -847,12 +849,23 @@
    "label": "quotation_item",
    "no_copy": 1,
    "read_only": 1
+  },
+  {
+   "fieldname": "material_request",
+   "fieldtype": "Link",
+   "label": "Material Request",
+   "options": "Material Request"
+  },
+  {
+   "fieldname": "material_request_item",
+   "fieldtype": "Data",
+   "label": "Material Request Item"
   }
  ],
  "idx": 1,
  "istable": 1,
  "links": [],
- "modified": "2022-11-10 18:20:30.137455",
+ "modified": "2022-11-18 11:39:01.741665",
  "modified_by": "Administrator",
  "module": "Selling",
  "name": "Sales Order Item",
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 9dd28dc..a1df764 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -902,6 +902,8 @@
 					"serial_no": "serial_no",
 					"purchase_order": "purchase_order",
 					"purchase_order_item": "purchase_order_item",
+					"material_request": "material_request",
+					"Material_request_item": "material_request_item",
 				},
 				"field_no_map": ["warehouse"],
 			},
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py
index fd44e9c..b6b5ff4 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py
@@ -11,11 +11,14 @@
 		},
 		"internal_links": {
 			"Sales Order": ["items", "against_sales_order"],
+			"Material Request": ["items", "material_request"],
+			"Purchase Order": ["items", "purchase_order"],
 		},
 		"transactions": [
 			{"label": _("Related"), "items": ["Sales Invoice", "Packing Slip", "Delivery Trip"]},
 			{"label": _("Reference"), "items": ["Sales Order", "Shipment", "Quality Inspection"]},
 			{"label": _("Returns"), "items": ["Stock Entry"]},
 			{"label": _("Subscription"), "items": ["Auto Repeat"]},
+			{"label": _("Internal Transfer"), "items": ["Material Request", "Purchase Order"]},
 		],
 	}
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
index 3229463..916ab2a 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
@@ -88,9 +88,11 @@
   "allow_zero_valuation_rate",
   "column_break_71",
   "internal_transfer_section",
+  "material_request",
   "purchase_order",
   "column_break_82",
   "purchase_order_item",
+  "material_request_item",
   "accounting_dimensions_section",
   "cost_center",
   "dimension_col_break",
@@ -818,13 +820,24 @@
    "fieldtype": "Check",
    "label": "Has Item Scanned",
    "read_only": 1
+  },
+  {
+   "fieldname": "material_request",
+   "fieldtype": "Link",
+   "label": "Material Request",
+   "options": "Material Request"
+  },
+  {
+   "fieldname": "material_request_item",
+   "fieldtype": "Data",
+   "label": "Material Request Item"
   }
  ],
  "idx": 1,
  "index_web_pages_for_search": 1,
  "istable": 1,
  "links": [],
- "modified": "2022-11-02 12:54:07.225623",
+ "modified": "2022-11-09 12:17:50.850142",
  "modified_by": "Administrator",
  "module": "Stock",
  "name": "Delivery Note Item",
diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.js b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.js
index 79e7895..ba1023a 100644
--- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.js
+++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.js
@@ -71,6 +71,8 @@
 					if (r.message && r.message.length) {
 						frm.set_df_property("fetch_from_parent", "options",
 							[""].concat(r.message));
+					} else {
+						frm.set_df_property("fetch_from_parent", "hidden", 1);
 					}
 				}
 			});
diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.json b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.json
index 09f4f63..4397e11 100644
--- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.json
+++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.json
@@ -11,20 +11,20 @@
   "reference_document",
   "column_break_4",
   "disabled",
-  "section_break_7",
   "field_mapping_section",
   "source_fieldname",
   "column_break_9",
   "target_fieldname",
   "applicable_for_documents_tab",
   "apply_to_all_doctypes",
+  "column_break_13",
   "document_type",
-  "istable",
   "type_of_transaction",
   "fetch_from_parent",
-  "column_break_16",
-  "condition",
+  "istable",
   "applicable_condition_example_section",
+  "condition",
+  "conditional_rule_examples_section",
   "html_19"
  ],
  "fields": [
@@ -52,13 +52,13 @@
   {
    "fieldname": "applicable_for_documents_tab",
    "fieldtype": "Tab Break",
-   "label": "Applicable For Documents"
+   "label": "Applicable For"
   },
   {
    "depends_on": "eval:!doc.apply_to_all_doctypes",
    "fieldname": "document_type",
    "fieldtype": "Link",
-   "label": "Applicable to Document",
+   "label": "Apply to Document",
    "mandatory_depends_on": "eval:!doc.apply_to_all_doctypes",
    "options": "DocType"
   },
@@ -72,6 +72,7 @@
    "fetch_from": "document_type.istable",
    "fieldname": "istable",
    "fieldtype": "Check",
+   "hidden": 1,
    "label": " Is Child Table",
    "read_only": 1
   },
@@ -79,13 +80,13 @@
    "depends_on": "eval:!doc.apply_to_all_doctypes",
    "fieldname": "condition",
    "fieldtype": "Code",
-   "label": "Applicable Condition"
+   "label": "Conditional Rule"
   },
   {
-   "default": "0",
+   "default": "1",
    "fieldname": "apply_to_all_doctypes",
    "fieldtype": "Check",
-   "label": "Apply to All Inventory Document Types"
+   "label": "Apply to All Inventory Documents"
   },
   {
    "default": "0",
@@ -94,10 +95,6 @@
    "label": "Disabled"
   },
   {
-   "fieldname": "section_break_7",
-   "fieldtype": "Section Break"
-  },
-  {
    "fieldname": "target_fieldname",
    "fieldtype": "Data",
    "label": "Target Fieldname (Stock Ledger Entry)",
@@ -115,13 +112,11 @@
    "collapsible": 1,
    "fieldname": "field_mapping_section",
    "fieldtype": "Section Break",
+   "hidden": 1,
    "label": "Field Mapping"
   },
   {
-   "fieldname": "column_break_16",
-   "fieldtype": "Column Break"
-  },
-  {
+   "depends_on": "eval:!doc.apply_to_all_doctypes",
    "fieldname": "type_of_transaction",
    "fieldtype": "Select",
    "label": "Type of Transaction",
@@ -136,23 +131,33 @@
    "collapsible": 1,
    "depends_on": "eval:!doc.apply_to_all_doctypes",
    "fieldname": "applicable_condition_example_section",
-   "fieldtype": "Section Break",
-   "label": "Applicable Condition Examples"
+   "fieldtype": "Column Break"
   },
   {
    "fieldname": "column_break_4",
    "fieldtype": "Column Break"
   },
   {
-   "description": "Set fieldname or DocType name like Supplier, Customer etc.",
+   "depends_on": "eval:!doc.apply_to_all_doctypes",
+   "description": "Set fieldname from which you want to fetch the data from the parent form.",
    "fieldname": "fetch_from_parent",
    "fieldtype": "Select",
-   "label": "Fetch Value From Parent Form"
+   "label": "Fetch Value From"
+  },
+  {
+   "fieldname": "column_break_13",
+   "fieldtype": "Section Break"
+  },
+  {
+   "depends_on": "eval:!doc.apply_to_all_doctypes",
+   "fieldname": "conditional_rule_examples_section",
+   "fieldtype": "Section Break",
+   "label": "Conditional Rule Examples"
   }
  ],
  "index_web_pages_for_search": 1,
  "links": [],
- "modified": "2022-09-02 13:29:04.098469",
+ "modified": "2022-11-15 15:50:16.767105",
  "modified_by": "Administrator",
  "module": "Stock",
  "name": "Inventory Dimension",
diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py
index 7b99b00..009548a 100644
--- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py
+++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py
@@ -33,10 +33,22 @@
 		)
 
 	def validate(self):
+		self.validate_reference_document()
+
+	def before_save(self):
 		self.do_not_update_document()
 		self.reset_value()
-		self.validate_reference_document()
 		self.set_source_and_target_fieldname()
+		self.set_type_of_transaction()
+		self.set_fetch_value_from()
+
+	def set_type_of_transaction(self):
+		if self.apply_to_all_doctypes:
+			self.type_of_transaction = "Both"
+
+	def set_fetch_value_from(self):
+		if self.apply_to_all_doctypes:
+			self.fetch_from_parent = self.reference_document
 
 	def do_not_update_document(self):
 		if self.is_new() or not self.has_stock_ledger():
diff --git a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py
index 52b3deb..edff3fd 100644
--- a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py
+++ b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py
@@ -140,14 +140,13 @@
 		self.assertRaises(DoNotChangeError, inv_dim1.save)
 
 	def test_inventory_dimension_for_purchase_receipt_and_delivery_note(self):
-		create_inventory_dimension(
-			reference_document="Rack",
-			type_of_transaction="Both",
-			dimension_name="Rack",
-			apply_to_all_doctypes=1,
-			fetch_from_parent="Rack",
+		inv_dimension = create_inventory_dimension(
+			reference_document="Rack", dimension_name="Rack", apply_to_all_doctypes=1
 		)
 
+		self.assertEqual(inv_dimension.type_of_transaction, "Both")
+		self.assertEqual(inv_dimension.fetch_from_parent, "Rack")
+
 		create_custom_field(
 			"Purchase Receipt", dict(fieldname="rack", label="Rack", fieldtype="Link", options="Rack")
 		)
diff --git a/erpnext/stock/doctype/item_price/item_price.json b/erpnext/stock/doctype/item_price/item_price.json
index 8c6f6d8..f4d9bb0 100644
--- a/erpnext/stock/doctype/item_price/item_price.json
+++ b/erpnext/stock/doctype/item_price/item_price.json
@@ -1,6 +1,7 @@
 {
  "actions": [],
  "allow_import": 1,
+ "autoname": "hash",
  "creation": "2013-05-02 16:29:48",
  "description": "Multiple Item prices.",
  "doctype": "DocType",
@@ -77,9 +78,10 @@
   {
    "fetch_from": "item_code.brand",
    "fieldname": "brand",
-   "fieldtype": "Read Only",
+   "fieldtype": "Link",
    "in_list_view": 1,
    "label": "Brand",
+   "options": "Brand",
    "read_only": 1
   },
   {
@@ -218,11 +220,11 @@
  "idx": 1,
  "index_web_pages_for_search": 1,
  "links": [],
- "modified": "2022-09-02 16:33:55.612992",
+ "modified": "2022-11-15 08:26:04.041861",
  "modified_by": "Administrator",
  "module": "Stock",
  "name": "Item Price",
- "name_case": "Title Case",
+ "naming_rule": "Random",
  "owner": "Administrator",
  "permissions": [
   {
diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py
index 691a8b3..2bba52a 100644
--- a/erpnext/stock/doctype/material_request/material_request_dashboard.py
+++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py
@@ -14,5 +14,6 @@
 			},
 			{"label": _("Stock"), "items": ["Stock Entry", "Purchase Receipt", "Pick List"]},
 			{"label": _("Manufacturing"), "items": ["Work Order"]},
+			{"label": _("Internal Transfer"), "items": ["Sales Order"]},
 		],
 	}
diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py
index b725d49..8b63c0f 100644
--- a/erpnext/stock/report/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/report/stock_ledger/stock_ledger.py
@@ -58,6 +58,12 @@
 		if sle.serial_no:
 			update_available_serial_nos(available_serial_nos, sle)
 
+		if sle.actual_qty:
+			sle["in_out_rate"] = flt(sle.stock_value_difference / sle.actual_qty, precision)
+
+		elif sle.voucher_type == "Stock Reconciliation":
+			sle["in_out_rate"] = sle.valuation_rate
+
 		data.append(sle)
 
 		if include_uom:
@@ -185,10 +191,18 @@
 				"convertible": "rate",
 			},
 			{
-				"label": _("Valuation Rate"),
+				"label": _("Avg Rate (Balance Stock)"),
 				"fieldname": "valuation_rate",
 				"fieldtype": "Currency",
-				"width": 110,
+				"width": 180,
+				"options": "Company:company:default_currency",
+				"convertible": "rate",
+			},
+			{
+				"label": _("Valuation Rate"),
+				"fieldname": "in_out_rate",
+				"fieldtype": "Currency",
+				"width": 140,
 				"options": "Company:company:default_currency",
 				"convertible": "rate",
 			},
diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
index 5cd4e63..3385eac 100644
--- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
+++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
@@ -1,700 +1,701 @@
 {
-    "actions": [],
-    "autoname": "naming_series:",
-    "creation": "2022-04-18 11:20:44.226738",
-    "doctype": "DocType",
-    "document_type": "Document",
-    "editable_grid": 1,
-    "engine": "InnoDB",
-    "field_order": [
-        "title",
-        "naming_series",
-        "supplier",
-        "supplier_name",
-        "column_break1",
-        "company",
-        "posting_date",
-        "posting_time",
-        "set_posting_time",
-        "is_return",
-        "return_against",
-        "accounting_dimensions_section",
-        "cost_center",
-        "dimension_col_break",
-        "project",
-        "section_addresses",
-        "supplier_address",
-        "contact_person",
-        "address_display",
-        "contact_display",
-        "contact_mobile",
-        "contact_email",
-        "col_break_address",
-        "shipping_address",
-        "shipping_address_display",
-        "billing_address",
-        "billing_address_display",
-        "sec_warehouse",
-        "set_warehouse",
-        "rejected_warehouse",
-        "col_break_warehouse",
-        "supplier_warehouse",
-        "items_section",
-        "items",
-        "section_break0",
-        "total_qty",
-        "column_break_27",
-        "total",
-        "raw_material_details",
-        "get_current_stock",
-        "supplied_items",
-        "additional_costs_section",
-        "distribute_additional_costs_based_on",
-        "additional_costs",
-        "total_additional_costs",
-        "section_break_46",
-        "in_words",
-        "bill_no",
-        "bill_date",
-        "more_info",
-        "status",
-        "column_break_39",
-        "per_returned",
-        "section_break_47",
-        "amended_from",
-        "range",
-        "column_break4",
-        "represents_company",
-        "subscription_detail",
-        "auto_repeat",
-        "printing_settings",
-        "letter_head",
-        "language",
-        "instructions",
-        "column_break_97",
-        "select_print_heading",
-        "other_details",
-        "remarks",
-        "transporter_info",
-        "transporter_name",
-        "column_break5",
-        "lr_no",
-        "lr_date"
-    ],
-    "fields": [
-        {
-            "allow_on_submit": 1,
-            "default": "{supplier_name}",
-            "fieldname": "title",
-            "fieldtype": "Data",
-            "hidden": 1,
-            "label": "Title",
-            "no_copy": 1,
-            "print_hide": 1
-        },
-        {
-            "fieldname": "naming_series",
-            "fieldtype": "Select",
-            "label": "Series",
-            "no_copy": 1,
-            "options": "MAT-SCR-.YYYY.-\nMAT-SCR-RET-.YYYY.-",
-            "print_hide": 1,
-            "reqd": 1,
-            "set_only_once": 1
-        },
-        {
-            "bold": 1,
-            "fieldname": "supplier",
-            "fieldtype": "Link",
-            "in_global_search": 1,
-            "label": "Supplier",
-            "options": "Supplier",
-            "print_hide": 1,
-            "print_width": "150px",
-            "reqd": 1,
-            "search_index": 1,
-            "width": "150px"
-        },
-        {
-            "bold": 1,
-            "depends_on": "supplier",
-            "fetch_from": "supplier.supplier_name",
-            "fieldname": "supplier_name",
-            "fieldtype": "Data",
-            "in_global_search": 1,
-            "label": "Supplier Name",
-            "read_only": 1
-        },
-        {
-            "fieldname": "column_break1",
-            "fieldtype": "Column Break",
-            "print_width": "50%",
-            "width": "50%"
-        },
-        {
-            "default": "Today",
-            "fieldname": "posting_date",
-            "fieldtype": "Date",
-            "in_list_view": 1,
-            "label": "Date",
-            "no_copy": 1,
-            "print_width": "100px",
-            "read_only_depends_on": "eval: !doc.set_posting_time",
-            "reqd": 1,
-            "search_index": 1,
-            "width": "100px"
-        },
-        {
-            "description": "Time at which materials were received",
-            "fieldname": "posting_time",
-            "fieldtype": "Time",
-            "label": "Posting Time",
-            "no_copy": 1,
-            "print_hide": 1,
-            "print_width": "100px",
-            "read_only_depends_on": "eval: !doc.set_posting_time",
-            "reqd": 1,
-            "width": "100px"
-        },
-        {
-            "fieldname": "company",
-            "fieldtype": "Link",
-            "in_standard_filter": 1,
-            "label": "Company",
-            "options": "Company",
-            "print_hide": 1,
-            "print_width": "150px",
-            "remember_last_selected_value": 1,
-            "reqd": 1,
-            "width": "150px"
-        },
-        {
-            "collapsible": 1,
-            "fieldname": "section_addresses",
-            "fieldtype": "Section Break",
-            "label": "Address and Contact"
-        },
-        {
-            "fieldname": "supplier_address",
-            "fieldtype": "Link",
-            "label": "Select Supplier Address",
-            "options": "Address",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "contact_person",
-            "fieldtype": "Link",
-            "label": "Contact Person",
-            "options": "Contact",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "address_display",
-            "fieldtype": "Small Text",
-            "label": "Address",
-            "read_only": 1
-        },
-        {
-            "fieldname": "contact_display",
-            "fieldtype": "Small Text",
-            "in_global_search": 1,
-            "label": "Contact",
-            "read_only": 1
-        },
-        {
-            "fieldname": "contact_mobile",
-            "fieldtype": "Small Text",
-            "label": "Mobile No",
-            "read_only": 1
-        },
-        {
-            "fieldname": "contact_email",
-            "fieldtype": "Small Text",
-            "label": "Contact Email",
-            "options": "Email",
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "col_break_address",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "shipping_address",
-            "fieldtype": "Link",
-            "label": "Select Shipping Address",
-            "options": "Address",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "shipping_address_display",
-            "fieldtype": "Small Text",
-            "label": "Shipping Address",
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "sec_warehouse",
-            "fieldtype": "Section Break"
-        },
-        {
-            "description": "Sets 'Accepted Warehouse' in each row of the Items table.",
-            "fieldname": "set_warehouse",
-            "fieldtype": "Link",
-            "label": "Accepted Warehouse",
-            "options": "Warehouse",
-            "print_hide": 1
-        },
-        {
-            "description": "Sets 'Rejected Warehouse' in each row of the Items table.",
-            "fieldname": "rejected_warehouse",
-            "fieldtype": "Link",
-            "label": "Rejected Warehouse",
-            "no_copy": 1,
-            "options": "Warehouse",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "col_break_warehouse",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "supplier_warehouse",
-            "fieldtype": "Link",
-            "label": "Supplier Warehouse",
-            "no_copy": 1,
-            "options": "Warehouse",
-            "print_hide": 1,
-            "print_width": "50px",
-            "width": "50px"
-        },
-        {
-            "fieldname": "items_section",
-            "fieldtype": "Section Break",
-            "options": "fa fa-shopping-cart"
-        },
-        {
-            "allow_bulk_edit": 1,
-            "fieldname": "items",
-            "fieldtype": "Table",
-            "label": "Items",
-            "options": "Subcontracting Receipt Item",
-            "reqd": 1
-        },
-        {
-            "depends_on": "supplied_items",
-            "fieldname": "get_current_stock",
-            "fieldtype": "Button",
-            "label": "Get Current Stock",
-            "options": "get_current_stock",
-            "print_hide": 1
-        },
-        {
-            "collapsible": 1,
-            "collapsible_depends_on": "supplied_items",
-            "depends_on": "supplied_items",
-            "fieldname": "raw_material_details",
-            "fieldtype": "Section Break",
-            "label": "Raw Materials Consumed",
-            "options": "fa fa-table",
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "supplied_items",
-            "fieldtype": "Table",
-            "label": "Consumed Items",
-            "no_copy": 1,
-            "options": "Subcontracting Receipt Supplied Item",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "section_break0",
-            "fieldtype": "Section Break"
-        },
-        {
-            "fieldname": "total_qty",
-            "fieldtype": "Float",
-            "label": "Total Quantity",
-            "read_only": 1
-        },
-        {
-            "fieldname": "column_break_27",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "total",
-            "fieldtype": "Currency",
-            "label": "Total",
-            "options": "currency",
-            "read_only": 1
-        },
-        {
-            "fieldname": "section_break_46",
-            "fieldtype": "Section Break"
-        },
-        {
-            "fieldname": "in_words",
-            "fieldtype": "Data",
-            "label": "In Words",
-            "length": 240,
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "bill_no",
-            "fieldtype": "Data",
-            "hidden": 1,
-            "label": "Bill No",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "bill_date",
-            "fieldtype": "Date",
-            "hidden": 1,
-            "label": "Bill Date",
-            "print_hide": 1
-        },
-        {
-            "collapsible": 1,
-            "fieldname": "more_info",
-            "fieldtype": "Section Break",
-            "label": "More Information",
-            "options": "fa fa-file-text"
-        },
-        {
-            "default": "Draft",
-            "fieldname": "status",
-            "fieldtype": "Select",
-            "in_standard_filter": 1,
-            "label": "Status",
-            "no_copy": 1,
-            "options": "\nDraft\nCompleted\nReturn\nReturn Issued\nCancelled\nClosed",
-            "print_hide": 1,
-            "print_width": "150px",
-            "read_only": 1,
-            "reqd": 1,
-            "search_index": 1,
-            "width": "150px"
-        },
-        {
-            "fieldname": "amended_from",
-            "fieldtype": "Link",
-            "hidden": 1,
-            "ignore_user_permissions": 1,
-            "label": "Amended From",
-            "no_copy": 1,
-            "options": "Subcontracting Receipt",
-            "print_hide": 1,
-            "print_width": "150px",
-            "read_only": 1,
-            "width": "150px"
-        },
-        {
-            "fieldname": "range",
-            "fieldtype": "Data",
-            "hidden": 1,
-            "label": "Range",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "column_break4",
-            "fieldtype": "Column Break",
-            "print_hide": 1,
-            "print_width": "50%",
-            "width": "50%"
-        },
-        {
-            "fieldname": "subscription_detail",
-            "fieldtype": "Section Break",
-            "label": "Auto Repeat Detail"
-        },
-        {
-            "fieldname": "auto_repeat",
-            "fieldtype": "Link",
-            "label": "Auto Repeat",
-            "no_copy": 1,
-            "options": "Auto Repeat",
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "collapsible": 1,
-            "fieldname": "printing_settings",
-            "fieldtype": "Section Break",
-            "label": "Printing Settings"
-        },
-        {
-            "allow_on_submit": 1,
-            "fieldname": "letter_head",
-            "fieldtype": "Link",
-            "label": "Letter Head",
-            "options": "Letter Head",
-            "print_hide": 1
-        },
-        {
-            "allow_on_submit": 1,
-            "fieldname": "select_print_heading",
-            "fieldtype": "Link",
-            "label": "Print Heading",
-            "no_copy": 1,
-            "options": "Print Heading",
-            "print_hide": 1,
-            "report_hide": 1
-        },
-        {
-            "fieldname": "language",
-            "fieldtype": "Data",
-            "label": "Print Language",
-            "read_only": 1
-        },
-        {
-            "fieldname": "column_break_97",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "other_details",
-            "fieldtype": "HTML",
-            "hidden": 1,
-            "label": "Other Details",
-            "options": "<div class=\"columnHeading\">Other Details</div>",
-            "print_hide": 1,
-            "print_width": "30%",
-            "width": "30%"
-        },
-        {
-            "fieldname": "instructions",
-            "fieldtype": "Small Text",
-            "label": "Instructions"
-        },
-        {
-            "fieldname": "remarks",
-            "fieldtype": "Small Text",
-            "label": "Remarks",
-            "print_hide": 1
-        },
-        {
-            "collapsible": 1,
-            "collapsible_depends_on": "transporter_name",
-            "fieldname": "transporter_info",
-            "fieldtype": "Section Break",
-            "label": "Transporter Details",
-            "options": "fa fa-truck"
-        },
-        {
-            "fieldname": "transporter_name",
-            "fieldtype": "Data",
-            "label": "Transporter Name"
-        },
-        {
-            "fieldname": "column_break5",
-            "fieldtype": "Column Break",
-            "print_width": "50%",
-            "width": "50%"
-        },
-        {
-            "fieldname": "lr_no",
-            "fieldtype": "Data",
-            "label": "Vehicle Number",
-            "no_copy": 1,
-            "print_width": "100px",
-            "width": "100px"
-        },
-        {
-            "fieldname": "lr_date",
-            "fieldtype": "Date",
-            "label": "Vehicle Date",
-            "no_copy": 1,
-            "print_width": "100px",
-            "width": "100px"
-        },
-        {
-            "fieldname": "billing_address",
-            "fieldtype": "Link",
-            "label": "Select Billing Address",
-            "options": "Address"
-        },
-        {
-            "fieldname": "billing_address_display",
-            "fieldtype": "Small Text",
-            "label": "Billing Address",
-            "read_only": 1
-        },
-        {
-            "fetch_from": "supplier.represents_company",
-            "fieldname": "represents_company",
-            "fieldtype": "Link",
-            "ignore_user_permissions": 1,
-            "label": "Represents Company",
-            "options": "Company",
-            "read_only": 1
-        },
-        {
-            "default": "0",
-            "fieldname": "is_return",
-            "fieldtype": "Check",
-            "label": "Is Return",
-            "no_copy": 1,
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "depends_on": "is_return",
-            "fieldname": "return_against",
-            "fieldtype": "Link",
-            "label": "Return Against Subcontracting Receipt",
-            "no_copy": 1,
-            "options": "Subcontracting Receipt",
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "column_break_39",
-            "fieldtype": "Column Break"
-        },
-        {
-            "depends_on": "eval:(!doc.__islocal && doc.is_return==0)",
-            "fieldname": "per_returned",
-            "fieldtype": "Percent",
-            "in_list_view": 1,
-            "label": "% Returned",
-            "no_copy": 1,
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "section_break_47",
-            "fieldtype": "Section Break"
-        },
-        {
-            "collapsible": 1,
-            "fieldname": "accounting_dimensions_section",
-            "fieldtype": "Section Break",
-            "label": "Accounting Dimensions "
-        },
-        {
-            "fieldname": "cost_center",
-            "fieldtype": "Link",
-            "label": "Cost Center",
-            "options": "Cost Center"
-        },
-        {
-            "fieldname": "dimension_col_break",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "project",
-            "fieldtype": "Link",
-            "label": "Project",
-            "options": "Project"
-        },
-        {
-            "collapsible": 1,
-            "collapsible_depends_on": "total_additional_costs",
-            "depends_on": "eval:(doc.docstatus == 0 || doc.total_additional_costs)",
-            "fieldname": "additional_costs_section",
-            "fieldtype": "Section Break",
-            "label": "Additional Costs"
-        },
-        {
-            "default": "Qty",
-            "fieldname": "distribute_additional_costs_based_on",
-            "fieldtype": "Select",
-            "label": "Distribute Additional Costs Based On ",
-            "options": "Qty\nAmount"
-        },
-        {
-            "fieldname": "additional_costs",
-            "fieldtype": "Table",
-            "label": "Additional Costs",
-            "options": "Landed Cost Taxes and Charges"
-        },
-        {
-            "fieldname": "total_additional_costs",
-            "fieldtype": "Currency",
-            "label": "Total Additional Costs",
-            "print_hide_if_no_value": 1,
-            "read_only": 1
-        },
-        {
-            "default": "0",
-            "depends_on": "eval:doc.docstatus==0",
-            "fieldname": "set_posting_time",
-            "fieldtype": "Check",
-            "label": "Edit Posting Date and Time",
-            "print_hide": 1
-        }
-    ],
-    "in_create": 1,
-    "is_submittable": 1,
-    "links": [],
-    "modified": "2022-08-26 21:02:26.353870",
-    "modified_by": "Administrator",
-    "module": "Subcontracting",
-    "name": "Subcontracting Receipt",
-    "naming_rule": "By \"Naming Series\" field",
-    "owner": "Administrator",
-    "permissions": [
-        {
-            "amend": 1,
-            "cancel": 1,
-            "create": 1,
-            "delete": 1,
-            "email": 1,
-            "print": 1,
-            "read": 1,
-            "report": 1,
-            "role": "Stock Manager",
-            "share": 1,
-            "submit": 1,
-            "write": 1
-        },
-        {
-            "amend": 1,
-            "cancel": 1,
-            "create": 1,
-            "delete": 1,
-            "email": 1,
-            "print": 1,
-            "read": 1,
-            "report": 1,
-            "role": "Stock User",
-            "share": 1,
-            "submit": 1,
-            "write": 1
-        },
-        {
-            "amend": 1,
-            "cancel": 1,
-            "create": 1,
-            "delete": 1,
-            "email": 1,
-            "print": 1,
-            "read": 1,
-            "report": 1,
-            "role": "Purchase User",
-            "share": 1,
-            "submit": 1,
-            "write": 1
-        },
-        {
-            "read": 1,
-            "report": 1,
-            "role": "Accounts User"
-        },
-        {
-            "permlevel": 1,
-            "read": 1,
-            "role": "Stock Manager",
-            "write": 1
-        }
-    ],
-    "search_fields": "status, posting_date, supplier",
-    "show_name_in_global_search": 1,
-    "sort_field": "modified",
-    "sort_order": "DESC",
-    "states": [],
-    "timeline_field": "supplier",
-    "title_field": "title",
-    "track_changes": 1
+ "actions": [],
+ "autoname": "naming_series:",
+ "creation": "2022-04-18 11:20:44.226738",
+ "doctype": "DocType",
+ "document_type": "Document",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+  "title",
+  "naming_series",
+  "supplier",
+  "supplier_name",
+  "column_break1",
+  "company",
+  "posting_date",
+  "posting_time",
+  "set_posting_time",
+  "is_return",
+  "return_against",
+  "accounting_dimensions_section",
+  "cost_center",
+  "dimension_col_break",
+  "project",
+  "section_addresses",
+  "supplier_address",
+  "contact_person",
+  "address_display",
+  "contact_display",
+  "contact_mobile",
+  "contact_email",
+  "col_break_address",
+  "shipping_address",
+  "shipping_address_display",
+  "billing_address",
+  "billing_address_display",
+  "sec_warehouse",
+  "set_warehouse",
+  "rejected_warehouse",
+  "col_break_warehouse",
+  "supplier_warehouse",
+  "items_section",
+  "items",
+  "section_break0",
+  "total_qty",
+  "column_break_27",
+  "total",
+  "raw_material_details",
+  "get_current_stock",
+  "supplied_items",
+  "additional_costs_section",
+  "distribute_additional_costs_based_on",
+  "additional_costs",
+  "total_additional_costs",
+  "section_break_46",
+  "in_words",
+  "bill_no",
+  "bill_date",
+  "more_info",
+  "status",
+  "column_break_39",
+  "per_returned",
+  "section_break_47",
+  "amended_from",
+  "range",
+  "column_break4",
+  "represents_company",
+  "subscription_detail",
+  "auto_repeat",
+  "printing_settings",
+  "letter_head",
+  "language",
+  "instructions",
+  "column_break_97",
+  "select_print_heading",
+  "other_details",
+  "remarks",
+  "transporter_info",
+  "transporter_name",
+  "column_break5",
+  "lr_no",
+  "lr_date"
+ ],
+ "fields": [
+  {
+   "allow_on_submit": 1,
+   "default": "{supplier_name}",
+   "fieldname": "title",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Title",
+   "no_copy": 1,
+   "print_hide": 1
+  },
+  {
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "options": "MAT-SCR-.YYYY.-\nMAT-SCR-RET-.YYYY.-",
+   "print_hide": 1,
+   "reqd": 1,
+   "set_only_once": 1
+  },
+  {
+   "bold": 1,
+   "fieldname": "supplier",
+   "fieldtype": "Link",
+   "in_global_search": 1,
+   "label": "Supplier",
+   "options": "Supplier",
+   "print_hide": 1,
+   "print_width": "150px",
+   "reqd": 1,
+   "search_index": 1,
+   "width": "150px"
+  },
+  {
+   "bold": 1,
+   "depends_on": "supplier",
+   "fetch_from": "supplier.supplier_name",
+   "fieldname": "supplier_name",
+   "fieldtype": "Data",
+   "in_global_search": 1,
+   "label": "Supplier Name",
+   "read_only": 1
+  },
+  {
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "print_width": "50%",
+   "width": "50%"
+  },
+  {
+   "default": "Today",
+   "fieldname": "posting_date",
+   "fieldtype": "Date",
+   "in_list_view": 1,
+   "label": "Date",
+   "no_copy": 1,
+   "print_width": "100px",
+   "read_only_depends_on": "eval: !doc.set_posting_time",
+   "reqd": 1,
+   "search_index": 1,
+   "width": "100px"
+  },
+  {
+   "description": "Time at which materials were received",
+   "fieldname": "posting_time",
+   "fieldtype": "Time",
+   "label": "Posting Time",
+   "no_copy": 1,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only_depends_on": "eval: !doc.set_posting_time",
+   "reqd": 1,
+   "width": "100px"
+  },
+  {
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_standard_filter": 1,
+   "label": "Company",
+   "options": "Company",
+   "print_hide": 1,
+   "print_width": "150px",
+   "remember_last_selected_value": 1,
+   "reqd": 1,
+   "width": "150px"
+  },
+  {
+   "collapsible": 1,
+   "fieldname": "section_addresses",
+   "fieldtype": "Section Break",
+   "label": "Address and Contact"
+  },
+  {
+   "fieldname": "supplier_address",
+   "fieldtype": "Link",
+   "label": "Select Supplier Address",
+   "options": "Address",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "label": "Contact Person",
+   "options": "Contact",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "label": "Address",
+   "read_only": 1
+  },
+  {
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "in_global_search": 1,
+   "label": "Contact",
+   "read_only": 1
+  },
+  {
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "label": "Mobile No",
+   "read_only": 1
+  },
+  {
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "label": "Contact Email",
+   "options": "Email",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "col_break_address",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "shipping_address",
+   "fieldtype": "Link",
+   "label": "Select Shipping Address",
+   "options": "Address",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "shipping_address_display",
+   "fieldtype": "Small Text",
+   "label": "Shipping Address",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "sec_warehouse",
+   "fieldtype": "Section Break"
+  },
+  {
+   "description": "Sets 'Accepted Warehouse' in each row of the Items table.",
+   "fieldname": "set_warehouse",
+   "fieldtype": "Link",
+   "label": "Accepted Warehouse",
+   "options": "Warehouse",
+   "print_hide": 1
+  },
+  {
+   "depends_on": "eval: !doc.is_return",
+   "description": "Sets 'Rejected Warehouse' in each row of the Items table.",
+   "fieldname": "rejected_warehouse",
+   "fieldtype": "Link",
+   "label": "Rejected Warehouse",
+   "no_copy": 1,
+   "options": "Warehouse",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "col_break_warehouse",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "supplier_warehouse",
+   "fieldtype": "Link",
+   "label": "Supplier Warehouse",
+   "no_copy": 1,
+   "options": "Warehouse",
+   "print_hide": 1,
+   "print_width": "50px",
+   "width": "50px"
+  },
+  {
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "options": "fa fa-shopping-cart"
+  },
+  {
+   "allow_bulk_edit": 1,
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "options": "Subcontracting Receipt Item",
+   "reqd": 1
+  },
+  {
+   "depends_on": "supplied_items",
+   "fieldname": "get_current_stock",
+   "fieldtype": "Button",
+   "label": "Get Current Stock",
+   "options": "get_current_stock",
+   "print_hide": 1
+  },
+  {
+   "collapsible": 1,
+   "collapsible_depends_on": "supplied_items",
+   "depends_on": "supplied_items",
+   "fieldname": "raw_material_details",
+   "fieldtype": "Section Break",
+   "label": "Raw Materials Consumed",
+   "options": "fa fa-table",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "supplied_items",
+   "fieldtype": "Table",
+   "label": "Consumed Items",
+   "no_copy": 1,
+   "options": "Subcontracting Receipt Supplied Item",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "section_break0",
+   "fieldtype": "Section Break"
+  },
+  {
+   "fieldname": "total_qty",
+   "fieldtype": "Float",
+   "label": "Total Quantity",
+   "read_only": 1
+  },
+  {
+   "fieldname": "column_break_27",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "total",
+   "fieldtype": "Currency",
+   "label": "Total",
+   "options": "currency",
+   "read_only": 1
+  },
+  {
+   "fieldname": "section_break_46",
+   "fieldtype": "Section Break"
+  },
+  {
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "length": 240,
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "bill_no",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Bill No",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "bill_date",
+   "fieldtype": "Date",
+   "hidden": 1,
+   "label": "Bill Date",
+   "print_hide": 1
+  },
+  {
+   "collapsible": 1,
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Information",
+   "options": "fa fa-file-text"
+  },
+  {
+   "default": "Draft",
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_standard_filter": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "options": "\nDraft\nCompleted\nReturn\nReturn Issued\nCancelled\nClosed",
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
+   "reqd": 1,
+   "search_index": 1,
+   "width": "150px"
+  },
+  {
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "options": "Subcontracting Receipt",
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
+   "width": "150px"
+  },
+  {
+   "fieldname": "range",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Range",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "column_break4",
+   "fieldtype": "Column Break",
+   "print_hide": 1,
+   "print_width": "50%",
+   "width": "50%"
+  },
+  {
+   "fieldname": "subscription_detail",
+   "fieldtype": "Section Break",
+   "label": "Auto Repeat Detail"
+  },
+  {
+   "fieldname": "auto_repeat",
+   "fieldtype": "Link",
+   "label": "Auto Repeat",
+   "no_copy": 1,
+   "options": "Auto Repeat",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "collapsible": 1,
+   "fieldname": "printing_settings",
+   "fieldtype": "Section Break",
+   "label": "Printing Settings"
+  },
+  {
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "options": "Letter Head",
+   "print_hide": 1
+  },
+  {
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "options": "Print Heading",
+   "print_hide": 1,
+   "report_hide": 1
+  },
+  {
+   "fieldname": "language",
+   "fieldtype": "Data",
+   "label": "Print Language",
+   "read_only": 1
+  },
+  {
+   "fieldname": "column_break_97",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "other_details",
+   "fieldtype": "HTML",
+   "hidden": 1,
+   "label": "Other Details",
+   "options": "<div class=\"columnHeading\">Other Details</div>",
+   "print_hide": 1,
+   "print_width": "30%",
+   "width": "30%"
+  },
+  {
+   "fieldname": "instructions",
+   "fieldtype": "Small Text",
+   "label": "Instructions"
+  },
+  {
+   "fieldname": "remarks",
+   "fieldtype": "Small Text",
+   "label": "Remarks",
+   "print_hide": 1
+  },
+  {
+   "collapsible": 1,
+   "collapsible_depends_on": "transporter_name",
+   "fieldname": "transporter_info",
+   "fieldtype": "Section Break",
+   "label": "Transporter Details",
+   "options": "fa fa-truck"
+  },
+  {
+   "fieldname": "transporter_name",
+   "fieldtype": "Data",
+   "label": "Transporter Name"
+  },
+  {
+   "fieldname": "column_break5",
+   "fieldtype": "Column Break",
+   "print_width": "50%",
+   "width": "50%"
+  },
+  {
+   "fieldname": "lr_no",
+   "fieldtype": "Data",
+   "label": "Vehicle Number",
+   "no_copy": 1,
+   "print_width": "100px",
+   "width": "100px"
+  },
+  {
+   "fieldname": "lr_date",
+   "fieldtype": "Date",
+   "label": "Vehicle Date",
+   "no_copy": 1,
+   "print_width": "100px",
+   "width": "100px"
+  },
+  {
+   "fieldname": "billing_address",
+   "fieldtype": "Link",
+   "label": "Select Billing Address",
+   "options": "Address"
+  },
+  {
+   "fieldname": "billing_address_display",
+   "fieldtype": "Small Text",
+   "label": "Billing Address",
+   "read_only": 1
+  },
+  {
+   "fetch_from": "supplier.represents_company",
+   "fieldname": "represents_company",
+   "fieldtype": "Link",
+   "ignore_user_permissions": 1,
+   "label": "Represents Company",
+   "options": "Company",
+   "read_only": 1
+  },
+  {
+   "default": "0",
+   "fieldname": "is_return",
+   "fieldtype": "Check",
+   "label": "Is Return",
+   "no_copy": 1,
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "depends_on": "is_return",
+   "fieldname": "return_against",
+   "fieldtype": "Link",
+   "label": "Return Against Subcontracting Receipt",
+   "no_copy": 1,
+   "options": "Subcontracting Receipt",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "column_break_39",
+   "fieldtype": "Column Break"
+  },
+  {
+   "depends_on": "eval:(!doc.__islocal && doc.is_return==0)",
+   "fieldname": "per_returned",
+   "fieldtype": "Percent",
+   "in_list_view": 1,
+   "label": "% Returned",
+   "no_copy": 1,
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "section_break_47",
+   "fieldtype": "Section Break"
+  },
+  {
+   "collapsible": 1,
+   "fieldname": "accounting_dimensions_section",
+   "fieldtype": "Section Break",
+   "label": "Accounting Dimensions "
+  },
+  {
+   "fieldname": "cost_center",
+   "fieldtype": "Link",
+   "label": "Cost Center",
+   "options": "Cost Center"
+  },
+  {
+   "fieldname": "dimension_col_break",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "project",
+   "fieldtype": "Link",
+   "label": "Project",
+   "options": "Project"
+  },
+  {
+   "collapsible": 1,
+   "collapsible_depends_on": "total_additional_costs",
+   "depends_on": "eval:(doc.docstatus == 0 || doc.total_additional_costs)",
+   "fieldname": "additional_costs_section",
+   "fieldtype": "Section Break",
+   "label": "Additional Costs"
+  },
+  {
+   "default": "Qty",
+   "fieldname": "distribute_additional_costs_based_on",
+   "fieldtype": "Select",
+   "label": "Distribute Additional Costs Based On ",
+   "options": "Qty\nAmount"
+  },
+  {
+   "fieldname": "additional_costs",
+   "fieldtype": "Table",
+   "label": "Additional Costs",
+   "options": "Landed Cost Taxes and Charges"
+  },
+  {
+   "fieldname": "total_additional_costs",
+   "fieldtype": "Currency",
+   "label": "Total Additional Costs",
+   "print_hide_if_no_value": 1,
+   "read_only": 1
+  },
+  {
+   "default": "0",
+   "depends_on": "eval:doc.docstatus==0",
+   "fieldname": "set_posting_time",
+   "fieldtype": "Check",
+   "label": "Edit Posting Date and Time",
+   "print_hide": 1
+  }
+ ],
+ "in_create": 1,
+ "is_submittable": 1,
+ "links": [],
+ "modified": "2022-11-16 14:18:57.001239",
+ "modified_by": "Administrator",
+ "module": "Subcontracting",
+ "name": "Subcontracting Receipt",
+ "naming_rule": "By \"Naming Series\" field",
+ "owner": "Administrator",
+ "permissions": [
+  {
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Stock Manager",
+   "share": 1,
+   "submit": 1,
+   "write": 1
+  },
+  {
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Stock User",
+   "share": 1,
+   "submit": 1,
+   "write": 1
+  },
+  {
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Purchase User",
+   "share": 1,
+   "submit": 1,
+   "write": 1
+  },
+  {
+   "read": 1,
+   "report": 1,
+   "role": "Accounts User"
+  },
+  {
+   "permlevel": 1,
+   "read": 1,
+   "role": "Stock Manager",
+   "write": 1
+  }
+ ],
+ "search_fields": "status, posting_date, supplier",
+ "show_name_in_global_search": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "states": [],
+ "timeline_field": "supplier",
+ "title_field": "title",
+ "track_changes": 1
 }
\ No newline at end of file
diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json
index fd86895..4b64e4b 100644
--- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json
+++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json
@@ -1,488 +1,490 @@
 {
-    "actions": [],
-    "autoname": "hash",
-    "creation": "2022-04-13 16:05:55.395695",
-    "doctype": "DocType",
-    "document_type": "Document",
-    "editable_grid": 1,
-    "engine": "InnoDB",
-    "field_order": [
-        "item_code",
-        "column_break_2",
-        "item_name",
-        "section_break_4",
-        "description",
-        "brand",
-        "image_column",
-        "image",
-        "image_view",
-        "received_and_accepted",
-        "received_qty",
-        "qty",
-        "rejected_qty",
-        "returned_qty",
-        "col_break2",
-        "stock_uom",
-        "conversion_factor",
-        "tracking_section",
-        "col_break_tracking_section",
-        "rate_and_amount",
-        "rate",
-        "amount",
-        "recalculate_rate",
-        "column_break_19",
-        "rm_cost_per_qty",
-        "service_cost_per_qty",
-        "additional_cost_per_qty",
-        "rm_supp_cost",
-        "warehouse_and_reference",
-        "warehouse",
-        "rejected_warehouse",
-        "subcontracting_order",
-        "column_break_40",
-        "schedule_date",
-        "quality_inspection",
-        "subcontracting_order_item",
-        "subcontracting_receipt_item",
-        "section_break_45",
-        "bom",
-        "serial_no",
-        "col_break5",
-        "batch_no",
-        "rejected_serial_no",
-        "manufacture_details",
-        "manufacturer",
-        "column_break_16",
-        "manufacturer_part_no",
-        "accounting_details_section",
-        "expense_account",
-        "accounting_dimensions_section",
-        "cost_center",
-        "dimension_col_break",
-        "project",
-        "section_break_80",
-        "page_break"
-    ],
-    "fields": [
-        {
-            "bold": 1,
-            "columns": 3,
-            "fieldname": "item_code",
-            "fieldtype": "Link",
-            "in_global_search": 1,
-            "in_list_view": 1,
-            "label": "Item Code",
-            "options": "Item",
-            "print_width": "100px",
-            "reqd": 1,
-            "search_index": 1,
-            "width": "100px"
-        },
-        {
-            "fieldname": "column_break_2",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "item_name",
-            "fieldtype": "Data",
-            "in_global_search": 1,
-            "label": "Item Name",
-            "print_hide": 1,
-            "reqd": 1
-        },
-        {
-            "collapsible": 1,
-            "fieldname": "section_break_4",
-            "fieldtype": "Section Break",
-            "label": "Description"
-        },
-        {
-            "fieldname": "description",
-            "fieldtype": "Text Editor",
-            "label": "Description",
-            "print_width": "300px",
-            "reqd": 1,
-            "width": "300px"
-        },
-        {
-            "fieldname": "image",
-            "fieldtype": "Attach",
-            "hidden": 1,
-            "label": "Image"
-        },
-        {
-            "fieldname": "image_view",
-            "fieldtype": "Image",
-            "label": "Image View",
-            "options": "image",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "received_and_accepted",
-            "fieldtype": "Section Break",
-            "label": "Received and Accepted"
-        },
-        {
-            "bold": 1,
-            "default": "0",
-            "fieldname": "received_qty",
-            "fieldtype": "Float",
-            "label": "Received Quantity",
-            "no_copy": 1,
-            "print_hide": 1,
-            "print_width": "100px",
-            "read_only": 1,
-            "reqd": 1,
-            "width": "100px"
-        },
-        {
-            "columns": 2,
-            "fieldname": "qty",
-            "fieldtype": "Float",
-            "in_list_view": 1,
-            "label": "Accepted Quantity",
-            "no_copy": 1,
-            "print_width": "100px",
-            "width": "100px"
-        },
-        {
-            "columns": 1,
-            "fieldname": "rejected_qty",
-            "fieldtype": "Float",
-            "in_list_view": 1,
-            "label": "Rejected Quantity",
-            "no_copy": 1,
-            "print_hide": 1,
-            "print_width": "100px",
-            "width": "100px"
-        },
-        {
-            "fieldname": "col_break2",
-            "fieldtype": "Column Break",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "stock_uom",
-            "fieldtype": "Link",
-            "label": "Stock UOM",
-            "options": "UOM",
-            "print_hide": 1,
-            "print_width": "100px",
-            "read_only": 1,
-            "reqd": 1,
-            "width": "100px"
-        },
-        {
-            "default": "1",
-            "fieldname": "conversion_factor",
-            "fieldtype": "Float",
-            "hidden": 1,
-            "label": "Conversion Factor",
-            "read_only": 1
-        },
-        {
-            "fieldname": "rate_and_amount",
-            "fieldtype": "Section Break",
-            "label": "Rate and Amount"
-        },
-        {
-            "bold": 1,
-            "columns": 2,
-            "fieldname": "rate",
-            "fieldtype": "Currency",
-            "in_list_view": 1,
-            "label": "Rate",
-            "options": "currency",
-            "print_width": "100px",
-            "read_only": 1,
-            "read_only_depends_on": "eval: doc.recalculate_rate",
-            "width": "100px"
-        },
-        {
-            "fieldname": "amount",
-            "fieldtype": "Currency",
-            "in_list_view": 1,
-            "label": "Amount",
-            "options": "currency",
-            "read_only": 1
-        },
-        {
-            "fieldname": "column_break_19",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "rm_cost_per_qty",
-            "fieldtype": "Currency",
-            "label": "Raw Material Cost Per Qty",
-            "no_copy": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "service_cost_per_qty",
-            "fieldtype": "Currency",
-            "label": "Service Cost Per Qty",
-            "read_only": 1,
-            "reqd": 1
-        },
-        {
-            "default": "0",
-            "fieldname": "additional_cost_per_qty",
-            "fieldtype": "Currency",
-            "label": "Additional Cost Per Qty",
-            "read_only": 1
-        },
-        {
-            "fieldname": "warehouse_and_reference",
-            "fieldtype": "Section Break",
-            "label": "Warehouse and Reference"
-        },
-        {
-            "bold": 1,
-            "fieldname": "warehouse",
-            "fieldtype": "Link",
-            "in_list_view": 1,
-            "label": "Accepted Warehouse",
-            "options": "Warehouse",
-            "print_hide": 1,
-            "print_width": "100px",
-            "width": "100px"
-        },
-        {
-            "fieldname": "rejected_warehouse",
-            "fieldtype": "Link",
-            "label": "Rejected Warehouse",
-            "no_copy": 1,
-            "options": "Warehouse",
-            "print_hide": 1,
-            "print_width": "100px",
-            "width": "100px"
-        },
-        {
-            "depends_on": "eval:!doc.__islocal",
-            "fieldname": "quality_inspection",
-            "fieldtype": "Link",
-            "label": "Quality Inspection",
-            "no_copy": 1,
-            "options": "Quality Inspection",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "column_break_40",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "subcontracting_order",
-            "fieldtype": "Link",
-            "label": "Subcontracting Order",
-            "no_copy": 1,
-            "options": "Subcontracting Order",
-            "print_width": "150px",
-            "read_only": 1,
-            "search_index": 1,
-            "width": "150px"
-        },
-        {
-            "fieldname": "schedule_date",
-            "fieldtype": "Date",
-            "label": "Required By",
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "section_break_45",
-            "fieldtype": "Section Break"
-        },
-        {
-            "depends_on": "eval:!doc.is_fixed_asset",
-            "fieldname": "serial_no",
-            "fieldtype": "Small Text",
-            "in_list_view": 1,
-            "label": "Serial No",
-            "no_copy": 1
-        },
-        {
-            "depends_on": "eval:!doc.is_fixed_asset",
-            "fieldname": "batch_no",
-            "fieldtype": "Link",
-            "in_list_view": 1,
-            "label": "Batch No",
-            "no_copy": 1,
-            "options": "Batch",
-            "print_hide": 1
-        },
-        {
-            "depends_on": "eval:!doc.is_fixed_asset",
-            "fieldname": "rejected_serial_no",
-            "fieldtype": "Small Text",
-            "label": "Rejected Serial No",
-            "no_copy": 1,
-            "print_hide": 1
-        },
-        {
-            "fieldname": "subcontracting_order_item",
-            "fieldtype": "Data",
-            "hidden": 1,
-            "label": "Subcontracting Order Item",
-            "no_copy": 1,
-            "print_hide": 1,
-            "print_width": "150px",
-            "read_only": 1,
-            "search_index": 1,
-            "width": "150px"
-        },
-        {
-            "fieldname": "col_break5",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "bom",
-            "fieldtype": "Link",
-            "label": "BOM",
-            "no_copy": 1,
-            "options": "BOM",
-            "print_hide": 1
-        },
-        {
-            "fetch_from": "item_code.brand",
-            "fieldname": "brand",
-            "fieldtype": "Link",
-            "hidden": 1,
-            "label": "Brand",
-            "options": "Brand",
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "rm_supp_cost",
-            "fieldtype": "Currency",
-            "hidden": 1,
-            "label": "Raw Materials Supplied Cost",
-            "no_copy": 1,
-            "options": "Company:company:default_currency",
-            "print_hide": 1,
-            "print_width": "150px",
-            "read_only": 1,
-            "width": "150px"
-        },
-        {
-            "fieldname": "expense_account",
-            "fieldtype": "Link",
-            "label": "Expense Account",
-            "options": "Account"
-        },
-        {
-            "collapsible": 1,
-            "fieldname": "manufacture_details",
-            "fieldtype": "Section Break",
-            "label": "Manufacture"
-        },
-        {
-            "fieldname": "manufacturer",
-            "fieldtype": "Link",
-            "label": "Manufacturer",
-            "options": "Manufacturer"
-        },
-        {
-            "fieldname": "column_break_16",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "manufacturer_part_no",
-            "fieldtype": "Data",
-            "label": "Manufacturer Part Number"
-        },
-        {
-            "fieldname": "subcontracting_receipt_item",
-            "fieldtype": "Data",
-            "hidden": 1,
-            "label": "Subcontracting Receipt Item",
-            "no_copy": 1,
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "collapsible": 1,
-            "fieldname": "image_column",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "tracking_section",
-            "fieldtype": "Section Break"
-        },
-        {
-            "fieldname": "col_break_tracking_section",
-            "fieldtype": "Column Break"
-        },
-        {
-            "fieldname": "accounting_dimensions_section",
-            "fieldtype": "Section Break",
-            "label": "Accounting Dimensions"
-        },
-        {
-            "fieldname": "project",
-            "fieldtype": "Link",
-            "label": "Project",
-            "options": "Project",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "dimension_col_break",
-            "fieldtype": "Column Break"
-        },
-        {
-            "default": ":Company",
-            "depends_on": "eval:cint(erpnext.is_perpetual_inventory_enabled(parent.company))",
-            "fieldname": "cost_center",
-            "fieldtype": "Link",
-            "label": "Cost Center",
-            "options": "Cost Center",
-            "print_hide": 1
-        },
-        {
-            "fieldname": "section_break_80",
-            "fieldtype": "Section Break"
-        },
-        {
-            "allow_on_submit": 1,
-            "default": "0",
-            "fieldname": "page_break",
-            "fieldtype": "Check",
-            "label": "Page Break",
-            "print_hide": 1
-        },
-        {
-            "depends_on": "returned_qty",
-            "fieldname": "returned_qty",
-            "fieldtype": "Float",
-            "label": "Returned Qty",
-            "no_copy": 1,
-            "print_hide": 1,
-            "read_only": 1
-        },
-        {
-            "fieldname": "accounting_details_section",
-            "fieldtype": "Section Break",
-            "label": "Accounting Details"
-        },
-        {
-            "default": "1",
-            "fieldname": "recalculate_rate",
-            "fieldtype": "Check",
-            "label": "Recalculate Rate"
-        }
-    ],
-    "idx": 1,
-    "istable": 1,
-    "links": [],
-    "modified": "2022-08-20 17:16:48.269164",
-    "modified_by": "Administrator",
-    "module": "Subcontracting",
-    "name": "Subcontracting Receipt Item",
-    "naming_rule": "Random",
-    "owner": "Administrator",
-    "permissions": [],
-    "quick_entry": 1,
-    "sort_field": "modified",
-    "sort_order": "DESC",
-    "states": []
+ "actions": [],
+ "autoname": "hash",
+ "creation": "2022-04-13 16:05:55.395695",
+ "doctype": "DocType",
+ "document_type": "Document",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+  "item_code",
+  "column_break_2",
+  "item_name",
+  "section_break_4",
+  "description",
+  "brand",
+  "image_column",
+  "image",
+  "image_view",
+  "received_and_accepted",
+  "received_qty",
+  "qty",
+  "rejected_qty",
+  "returned_qty",
+  "col_break2",
+  "stock_uom",
+  "conversion_factor",
+  "tracking_section",
+  "col_break_tracking_section",
+  "rate_and_amount",
+  "rate",
+  "amount",
+  "recalculate_rate",
+  "column_break_19",
+  "rm_cost_per_qty",
+  "service_cost_per_qty",
+  "additional_cost_per_qty",
+  "rm_supp_cost",
+  "warehouse_and_reference",
+  "warehouse",
+  "rejected_warehouse",
+  "subcontracting_order",
+  "column_break_40",
+  "schedule_date",
+  "quality_inspection",
+  "subcontracting_order_item",
+  "subcontracting_receipt_item",
+  "section_break_45",
+  "bom",
+  "serial_no",
+  "col_break5",
+  "batch_no",
+  "rejected_serial_no",
+  "manufacture_details",
+  "manufacturer",
+  "column_break_16",
+  "manufacturer_part_no",
+  "accounting_details_section",
+  "expense_account",
+  "accounting_dimensions_section",
+  "cost_center",
+  "dimension_col_break",
+  "project",
+  "section_break_80",
+  "page_break"
+ ],
+ "fields": [
+  {
+   "bold": 1,
+   "columns": 3,
+   "fieldname": "item_code",
+   "fieldtype": "Link",
+   "in_global_search": 1,
+   "in_list_view": 1,
+   "label": "Item Code",
+   "options": "Item",
+   "print_width": "100px",
+   "reqd": 1,
+   "search_index": 1,
+   "width": "100px"
+  },
+  {
+   "fieldname": "column_break_2",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "item_name",
+   "fieldtype": "Data",
+   "in_global_search": 1,
+   "label": "Item Name",
+   "print_hide": 1,
+   "reqd": 1
+  },
+  {
+   "collapsible": 1,
+   "fieldname": "section_break_4",
+   "fieldtype": "Section Break",
+   "label": "Description"
+  },
+  {
+   "fieldname": "description",
+   "fieldtype": "Text Editor",
+   "label": "Description",
+   "print_width": "300px",
+   "reqd": 1,
+   "width": "300px"
+  },
+  {
+   "fieldname": "image",
+   "fieldtype": "Attach",
+   "hidden": 1,
+   "label": "Image"
+  },
+  {
+   "fieldname": "image_view",
+   "fieldtype": "Image",
+   "label": "Image View",
+   "options": "image",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "received_and_accepted",
+   "fieldtype": "Section Break",
+   "label": "Received and Accepted"
+  },
+  {
+   "bold": 1,
+   "default": "0",
+   "fieldname": "received_qty",
+   "fieldtype": "Float",
+   "label": "Received Quantity",
+   "no_copy": 1,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 1,
+   "reqd": 1,
+   "width": "100px"
+  },
+  {
+   "columns": 2,
+   "fieldname": "qty",
+   "fieldtype": "Float",
+   "in_list_view": 1,
+   "label": "Accepted Quantity",
+   "no_copy": 1,
+   "print_width": "100px",
+   "width": "100px"
+  },
+  {
+   "columns": 1,
+   "depends_on": "eval: !parent.is_return",
+   "fieldname": "rejected_qty",
+   "fieldtype": "Float",
+   "in_list_view": 1,
+   "label": "Rejected Quantity",
+   "no_copy": 1,
+   "print_hide": 1,
+   "print_width": "100px",
+   "width": "100px"
+  },
+  {
+   "fieldname": "col_break2",
+   "fieldtype": "Column Break",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "stock_uom",
+   "fieldtype": "Link",
+   "label": "Stock UOM",
+   "options": "UOM",
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 1,
+   "reqd": 1,
+   "width": "100px"
+  },
+  {
+   "default": "1",
+   "fieldname": "conversion_factor",
+   "fieldtype": "Float",
+   "hidden": 1,
+   "label": "Conversion Factor",
+   "read_only": 1
+  },
+  {
+   "fieldname": "rate_and_amount",
+   "fieldtype": "Section Break",
+   "label": "Rate and Amount"
+  },
+  {
+   "bold": 1,
+   "columns": 2,
+   "fieldname": "rate",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Rate",
+   "options": "currency",
+   "print_width": "100px",
+   "read_only": 1,
+   "read_only_depends_on": "eval: doc.recalculate_rate",
+   "width": "100px"
+  },
+  {
+   "fieldname": "amount",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Amount",
+   "options": "currency",
+   "read_only": 1
+  },
+  {
+   "fieldname": "column_break_19",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "rm_cost_per_qty",
+   "fieldtype": "Currency",
+   "label": "Raw Material Cost Per Qty",
+   "no_copy": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "service_cost_per_qty",
+   "fieldtype": "Currency",
+   "label": "Service Cost Per Qty",
+   "read_only": 1,
+   "reqd": 1
+  },
+  {
+   "default": "0",
+   "fieldname": "additional_cost_per_qty",
+   "fieldtype": "Currency",
+   "label": "Additional Cost Per Qty",
+   "read_only": 1
+  },
+  {
+   "fieldname": "warehouse_and_reference",
+   "fieldtype": "Section Break",
+   "label": "Warehouse and Reference"
+  },
+  {
+   "bold": 1,
+   "fieldname": "warehouse",
+   "fieldtype": "Link",
+   "in_list_view": 1,
+   "label": "Accepted Warehouse",
+   "options": "Warehouse",
+   "print_hide": 1,
+   "print_width": "100px",
+   "width": "100px"
+  },
+  {
+   "depends_on": "eval: !parent.is_return",
+   "fieldname": "rejected_warehouse",
+   "fieldtype": "Link",
+   "label": "Rejected Warehouse",
+   "no_copy": 1,
+   "options": "Warehouse",
+   "print_hide": 1,
+   "print_width": "100px",
+   "width": "100px"
+  },
+  {
+   "depends_on": "eval:!doc.__islocal",
+   "fieldname": "quality_inspection",
+   "fieldtype": "Link",
+   "label": "Quality Inspection",
+   "no_copy": 1,
+   "options": "Quality Inspection",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "column_break_40",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "subcontracting_order",
+   "fieldtype": "Link",
+   "label": "Subcontracting Order",
+   "no_copy": 1,
+   "options": "Subcontracting Order",
+   "print_width": "150px",
+   "read_only": 1,
+   "search_index": 1,
+   "width": "150px"
+  },
+  {
+   "fieldname": "schedule_date",
+   "fieldtype": "Date",
+   "label": "Required By",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "section_break_45",
+   "fieldtype": "Section Break"
+  },
+  {
+   "depends_on": "eval:!doc.is_fixed_asset",
+   "fieldname": "serial_no",
+   "fieldtype": "Small Text",
+   "in_list_view": 1,
+   "label": "Serial No",
+   "no_copy": 1
+  },
+  {
+   "depends_on": "eval:!doc.is_fixed_asset",
+   "fieldname": "batch_no",
+   "fieldtype": "Link",
+   "in_list_view": 1,
+   "label": "Batch No",
+   "no_copy": 1,
+   "options": "Batch",
+   "print_hide": 1
+  },
+  {
+   "depends_on": "eval: !parent.is_return",
+   "fieldname": "rejected_serial_no",
+   "fieldtype": "Small Text",
+   "label": "Rejected Serial No",
+   "no_copy": 1,
+   "print_hide": 1
+  },
+  {
+   "fieldname": "subcontracting_order_item",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Subcontracting Order Item",
+   "no_copy": 1,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
+   "search_index": 1,
+   "width": "150px"
+  },
+  {
+   "fieldname": "col_break5",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "bom",
+   "fieldtype": "Link",
+   "label": "BOM",
+   "no_copy": 1,
+   "options": "BOM",
+   "print_hide": 1
+  },
+  {
+   "fetch_from": "item_code.brand",
+   "fieldname": "brand",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "label": "Brand",
+   "options": "Brand",
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "rm_supp_cost",
+   "fieldtype": "Currency",
+   "hidden": 1,
+   "label": "Raw Materials Supplied Cost",
+   "no_copy": 1,
+   "options": "Company:company:default_currency",
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
+   "width": "150px"
+  },
+  {
+   "fieldname": "expense_account",
+   "fieldtype": "Link",
+   "label": "Expense Account",
+   "options": "Account"
+  },
+  {
+   "collapsible": 1,
+   "fieldname": "manufacture_details",
+   "fieldtype": "Section Break",
+   "label": "Manufacture"
+  },
+  {
+   "fieldname": "manufacturer",
+   "fieldtype": "Link",
+   "label": "Manufacturer",
+   "options": "Manufacturer"
+  },
+  {
+   "fieldname": "column_break_16",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "manufacturer_part_no",
+   "fieldtype": "Data",
+   "label": "Manufacturer Part Number"
+  },
+  {
+   "fieldname": "subcontracting_receipt_item",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Subcontracting Receipt Item",
+   "no_copy": 1,
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "collapsible": 1,
+   "fieldname": "image_column",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "tracking_section",
+   "fieldtype": "Section Break"
+  },
+  {
+   "fieldname": "col_break_tracking_section",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "accounting_dimensions_section",
+   "fieldtype": "Section Break",
+   "label": "Accounting Dimensions"
+  },
+  {
+   "fieldname": "project",
+   "fieldtype": "Link",
+   "label": "Project",
+   "options": "Project",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "dimension_col_break",
+   "fieldtype": "Column Break"
+  },
+  {
+   "default": ":Company",
+   "depends_on": "eval:cint(erpnext.is_perpetual_inventory_enabled(parent.company))",
+   "fieldname": "cost_center",
+   "fieldtype": "Link",
+   "label": "Cost Center",
+   "options": "Cost Center",
+   "print_hide": 1
+  },
+  {
+   "fieldname": "section_break_80",
+   "fieldtype": "Section Break"
+  },
+  {
+   "allow_on_submit": 1,
+   "default": "0",
+   "fieldname": "page_break",
+   "fieldtype": "Check",
+   "label": "Page Break",
+   "print_hide": 1
+  },
+  {
+   "depends_on": "returned_qty",
+   "fieldname": "returned_qty",
+   "fieldtype": "Float",
+   "label": "Returned Qty",
+   "no_copy": 1,
+   "print_hide": 1,
+   "read_only": 1
+  },
+  {
+   "fieldname": "accounting_details_section",
+   "fieldtype": "Section Break",
+   "label": "Accounting Details"
+  },
+  {
+   "default": "1",
+   "fieldname": "recalculate_rate",
+   "fieldtype": "Check",
+   "label": "Recalculate Rate"
+  }
+ ],
+ "idx": 1,
+ "istable": 1,
+ "links": [],
+ "modified": "2022-11-16 14:21:26.125815",
+ "modified_by": "Administrator",
+ "module": "Subcontracting",
+ "name": "Subcontracting Receipt Item",
+ "naming_rule": "Random",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "states": []
 }
\ No newline at end of file
diff --git a/erpnext/templates/includes/projects/project_tasks.html b/erpnext/templates/includes/projects/project_tasks.html
index 2b07a5f..4069d3d 100644
--- a/erpnext/templates/includes/projects/project_tasks.html
+++ b/erpnext/templates/includes/projects/project_tasks.html
@@ -1,5 +1,57 @@
+{% macro task_row(task, indent) %}
+<div class="row mt-5 {% if task.children %} font-weight-bold {% endif %}">
+  <div class="col-sm-4">
+    <a class="nav-link " style="color: inherit; {% if task.parent_task %} margin-left: {{ indent }}px {% endif %}"
+      href="/tasks/{{ task.name | urlencode }}">
+      {% if task.parent_task %}
+        <span class="">
+          <i class="fa fa-level-up fa-rotate-90"></i>
+        </span>
+      {% endif %}
+      {{ task.subject }}</a>
+  </div>
+  <div class="col-sm-2">{{ task.status }}</div>
+  <div class="col-sm-2 small text-muted">
+    {% if task.exp_end_date %}
+      {{ task.exp_end_date }}
+    {% else %}
+      --
+    {% endif %}
+  </div>
+  <div class="col-sm-2">
+    {% if task["_assign"] %}
+      {% set assigned_users = json.loads(task["_assign"])%}
+      {% for user in assigned_users %}
+        {% set user_details = frappe.db.get_value("User", user,
+		["full_name", "user_image"],
+		as_dict = True)%}
+        {% if user_details.user_image %}
+          <span class="avatar avatar-small" style="width:32px; height:32px;" title="{{ user_details.full_name }}">
+            <img src="{{ user_details.user_image }}">
+          </span>
+        {% else %}
+          <span class="avatar avatar-small" style="width:32px; height:32px;" title="{{ user_details.full_name }}">
+            <div class='standard-image' style='background-color: #F5F4F4; color: #000;'>
+              {{ frappe.utils.get_abbr(user_details.full_name) }}
+            </div>
+          </span>
+        {% endif %}
+      {% endfor %}
+    {% endif %}
+  </div>
+  <div class="col-xs-2 text-right small text-muted">
+    {{ frappe.utils.pretty_date(task.modified) }}
+  </div>
+</div>
+{% if task.children %}
+  {% for child in task.children %}
+    {{ task_row(child, indent + 30) }}
+  {% endfor %}
+{% endif %}
+{% endmacro %}
+
 {% for task in doc.tasks %}
   <div class="web-list-item transaction-list-item">
-    {{ task_row(task, 0) }}
+      {{ task_row(task, 0) }}
   </div>
-{% endfor %}
+{% endfor %}
\ No newline at end of file
diff --git a/erpnext/templates/pages/projects.html b/erpnext/templates/pages/projects.html
index 6d366c5..9fe4338 100644
--- a/erpnext/templates/pages/projects.html
+++ b/erpnext/templates/pages/projects.html
@@ -9,7 +9,7 @@
 {% endblock %}
 
 {% block header %}
-  <h1>{{ doc.project_name }}</h1>
+  <h3 class="my-account-header">{{ doc.project_name }}</h3>
 {% endblock %}
 
 {% block style %}
@@ -21,61 +21,62 @@
 {% endblock %}
 
 {% block page_content %}
-
-  {{ progress_bar(doc.percent_complete) }}
-
-  <div class="d-flex mt-5 mb-5 justify-content-between">
-    <h4>Status:</h4>
-    <h4>Progress:
-      <span>{{ doc.percent_complete }}
-        %</span>
-    </h4>
-    <h4>Hours Spent:
-      <span>{{ doc.actual_time }}</span>
-    </h4>
+  <div class="web-list-item transaction-list-item">
+    <div class="row align-items-center">
+      <div class="col-sm-4 "><b>Status: {{ doc.status }}</b></div>
+      <div class="col-sm-4 "><b>Progress: {{ doc.percent_complete }}%</b></div>
+      <div class="col-sm-4 "><b>Hours Spent: {{ doc.actual_time | round }}</b></div>
+    </div>
   </div>
 
   {{ progress_bar(doc.percent_complete) }}
 
-  {% if doc.tasks %}
-    <div class="website-list">
-      <div class="result">
-        <div class="web-list-item transaction-list-item">
-          <div class="row">
-            <h3 class="col-xs-4">Tasks</h3>
-            <h3 class="col-xs-2">Status</h3>
-            <h3 class="col-xs-2">End Date</h3>
-            <h3 class="col-xs-2">Assigned To</h3>
-            <div class="col-xs-2 text-right">
-              <a class="btn btn-secondary btn-light btn-sm" href='/tasks?new=1&project={{ doc.project_name }}'>{{ _("New task") }}</a>
-            </div>
-          </div>
-        </div>
-        {% include "erpnext/templates/includes/projects/project_tasks.html" %}
-      </div>
+  <hr>
+
+  <div class="row align-items-center">
+    <div class="col-sm-6 my-account-header"> <h4>Tasks</h4></div>
+    <div class="col-sm-6 text-right">
+      <a class="btn btn-secondary btn-light btn-sm" href='/tasks/new?project={{ doc.project_name }}'>{{ _("New task") }}</a>
     </div>
+  </div>
+  {% if doc.tasks %}
+  <div class="website-list">
+    <div class="result">
+      <div class="web-list-item transaction-list-item">
+        <div class="row align-items-center">
+          <div class="col-sm-4"><b>Tasks</b></div>
+          <div class="col-sm-2"><b>Status</b></div>
+          <div class="col-sm-2"><b>End Date</b></div>
+          <div class="col-sm-2"><b>Assignment</b></div>
+          <div class="col-sm-2"><b>Modified On</b></div>
+        </div>
+      </div>
+      {% include "erpnext/templates/includes/projects/project_tasks.html" %}
+    </div>
+  </div>
   {% else %}
-    <p class="font-weight-bold">{{ _("No Tasks") }}</p>
+    {{ empty_state('Task')}}
   {% endif %}
 
+  <h4 class="my-account-header">Timesheets</h4>
   {% if doc.timesheets %}
     <div class="website-list">
       <div class="result">
         <div class="web-list-item transaction-list-item">
-          <div class="row">
-            <h3 class="col-xs-2">Timesheets</h3>
-            <h3 class="col-xs-2">Status</h3>
-            <h3 class="col-xs-2">From</h3>
-            <h3 class="col-xs-2">To</h3>
-            <h3 class="col-xs-2">Modified By</h3>
-            <h3 class="col-xs-2 text-right">Modified On</h3>
+          <div class="row align-items-center">
+            <div class="col-xs-2"><b>Timesheet</b></div>
+            <div class="col-xs-2"><b>Status</b></div>
+            <div class="col-xs-2"><b>From</b></div>
+            <div class="col-xs-2"><b>To</b></div>
+            <div class="col-xs-2"><b>Modified By</b></div>
+            <div class="col-xs-2"><b>Modified On</b></div>
           </div>
         </div>
-        {% include "erpnext/templates/includes/projects/project_timesheets.html" %}
+      {% include "erpnext/templates/includes/projects/project_timesheets.html" %}
       </div>
     </div>
   {% else %}
-    <p class="font-weight-bold mt-5">{{ _("No Timesheets") }}</p>
+    {{ empty_state('Timesheet')}}
   {% endif %}
 
   {% if doc.attachments %}
@@ -104,70 +105,37 @@
 </div>
 
 <script>
-  { % include "frappe/public/js/frappe/provide.js" %
-  } { % include "frappe/public/js/frappe/form/formatters.js" %
-  }
-</script>
+  { % include "frappe/public/js/frappe/provide.js" % }
+  { % include "frappe/public/js/frappe/form/formatters.js" % }
+ </script>
 
 {% endblock %}
 
 {% macro progress_bar(percent_complete) %}
 {% if percent_complete %}
-  <div class="progress progress-hg" style="height: 5px;">
-    <div class="progress-bar progress-bar-{{ 'warning' if percent_complete|round < 100 else 'success' }} active" role="progressbar" aria-valuenow="{{ percent_complete|round|int }}" aria-valuemin="0" aria-valuemax="100" style="width:{{ percent_complete|round|int }}%;"></div>
+  <span class="small py-2">Project Progress:</span>
+  <div class="progress progress-hg" style="height: 15px;">
+    <div
+      class="progress-bar progress-bar-{{ 'warning' if percent_complete|round < 100 else 'success' }} active"\
+      role="progressbar" aria-valuenow="{{ percent_complete|round|int }}" aria-valuemin="0"\
+      aria-valuemax="100" style="width:{{ percent_complete|round|int }}%;">
+    </div>
   </div>
-{% else %}
-  <hr>
 {% endif %}
 {% endmacro %}
 
-{% macro task_row(task, indent) %}
-<div class="row mt-5 {% if task.children %} font-weight-bold {% endif %}">
-  <div class="col-xs-4">
-    <a class="nav-link " style="color: inherit; {% if task.parent_task %} margin-left: {{ indent }}px {% endif %}" href="/tasks?name={{ task.name | urlencode }}">
-      {% if task.parent_task %}
-        <span class="">
-          <i class="fa fa-level-up fa-rotate-90"></i>
-        </span>
-      {% endif %}
-      {{ task.subject }}</a>
+
+{% macro empty_state(section_name) %}
+<div class="frappe-list align-items-center">
+  <div class=" text-muted flex justify-center align-center" style="">
+    <div class=" text-muted flex text-center">
+      <div class="msg-box no-border">
+        <div>
+          <img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state">
+        </div>
+        <p>You haven't created a {{ section_name }} yet</p>
+      </div>
+    </div>
   </div>
-  <div class="col-xs-2">{{ task.status }}</div>
-  <div class="col-xs-2">
-    {% if task.exp_end_date %}
-      {{ task.exp_end_date }}
-    {% else %}
-      --
-    {% endif %}
   </div>
-  <div class="col-xs-2">
-    {% if task["_assign"] %}
-      {% set assigned_users = json.loads(task["_assign"])%}
-      {% for user in assigned_users %}
-        {% set user_details = frappe.db.get_value("User", user,
-		["full_name", "user_image"],
-		as_dict = True)%}
-        {% if user_details.user_image %}
-          <span class="avatar avatar-small" style="width:32px; height:32px;" title="{{ user_details.full_name }}">
-            <img src="{{ user_details.user_image }}">
-          </span>
-        {% else %}
-          <span class="avatar avatar-small" style="width:32px; height:32px;" title="{{ user_details.full_name }}">
-            <div class='standard-image' style='background-color: #F5F4F4; color: #000;'>
-              {{ frappe.utils.get_abbr(user_details.full_name) }}
-            </div>
-          </span>
-        {% endif %}
-      {% endfor %}
-    {% endif %}
-  </div>
-  <div class="col-xs-2 text-right">
-    {{ frappe.utils.pretty_date(task.modified) }}
-  </div>
-</div>
-{% if task.children %}
-  {% for child in task.children %}
-    {{ task_row(child, indent + 30) }}
-  {% endfor %}
-{% endif %}
-{% endmacro %}
+{% endmacro %}
\ No newline at end of file
diff --git a/erpnext/utilities/bulk_transaction.py b/erpnext/utilities/bulk_transaction.py
index eed7c12..c1579b3 100644
--- a/erpnext/utilities/bulk_transaction.py
+++ b/erpnext/utilities/bulk_transaction.py
@@ -73,7 +73,7 @@
 		},
 		"Sales Invoice": {
 			"Delivery Note": sales_invoice.make_delivery_note,
-			"Payment": payment_entry.get_payment_entry,
+			"Payment Entry": payment_entry.get_payment_entry,
 		},
 		"Delivery Note": {
 			"Sales Invoice": delivery_note.make_sales_invoice,
@@ -94,11 +94,11 @@
 		},
 		"Purchase Invoice": {
 			"Purchase Receipt": purchase_invoice.make_purchase_receipt,
-			"Payment": payment_entry.get_payment_entry,
+			"Payment Entry": payment_entry.get_payment_entry,
 		},
 		"Purchase Receipt": {"Purchase Invoice": purchase_receipt.make_purchase_invoice},
 	}
-	if to_doctype in ["Advance Payment", "Payment"]:
+	if to_doctype in ["Advance Payment", "Payment Entry"]:
 		obj = mapper[from_doctype][to_doctype](from_doctype, doc_name)
 	else:
 		obj = mapper[from_doctype][to_doctype](doc_name)
@@ -151,7 +151,9 @@
 def show_job_status(fail_count, deserialized_data_count, to_doctype):
 	if not fail_count:
 		frappe.msgprint(
-			_("Creation of {0} successful").format(to_doctype),
+			_("Creation of <b><a href='/app/{0}'>{1}(s)</a></b> successful").format(
+				to_doctype.lower().replace(" ", "-"), to_doctype
+			),
 			title="Successful",
 			indicator="green",
 		)