Merge pull request #25833 from ankush/translation_fixes

fix(ux): fix unstranslated text in msgprint/throw
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js
index fb0d359..84f7868 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.js
+++ b/erpnext/accounts/report/general_ledger/general_ledger.js
@@ -166,6 +166,11 @@
 			"fieldname": "show_cancelled_entries",
 			"label": __("Show Cancelled Entries"),
 			"fieldtype": "Check"
+		},
+		{
+			"fieldname": "show_net_values_in_party_account",
+			"label": __("Show Net Values in Party Account"),
+			"fieldtype": "Check"
 		}
 	]
 }
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index b5d7992..562df4f 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -344,6 +344,9 @@
 	consolidated_gle = OrderedDict()
 	group_by = group_by_field(filters.get('group_by'))
 
+	if filters.get('show_net_values_in_party_account'):
+		account_type_map = get_account_type_map(filters.get('company'))
+
 	def update_value_in_dict(data, key, gle):
 		data[key].debit += flt(gle.debit)
 		data[key].credit += flt(gle.credit)
@@ -351,6 +354,24 @@
 		data[key].debit_in_account_currency += flt(gle.debit_in_account_currency)
 		data[key].credit_in_account_currency += flt(gle.credit_in_account_currency)
 
+		if filters.get('show_net_values_in_party_account') and \
+			account_type_map.get(data[key].account) in ('Receivable', 'Payable'):
+			net_value = flt(data[key].debit) - flt(data[key].credit)
+			net_value_in_account_currency = flt(data[key].debit_in_account_currency) \
+				- flt(data[key].credit_in_account_currency)
+
+			if net_value < 0:
+				dr_or_cr = 'credit'
+				rev_dr_or_cr = 'debit'
+			else:
+				dr_or_cr = 'debit'
+				rev_dr_or_cr = 'credit'
+
+			data[key][dr_or_cr] = abs(net_value)
+			data[key][dr_or_cr+'_in_account_currency'] = abs(net_value_in_account_currency)
+			data[key][rev_dr_or_cr] = 0
+			data[key][rev_dr_or_cr+'_in_account_currency'] = 0
+
 		if data[key].against_voucher and gle.against_voucher:
 			data[key].against_voucher += ', ' + gle.against_voucher
 
@@ -388,6 +409,12 @@
 
 	return totals, entries
 
+def get_account_type_map(company):
+	account_type_map = frappe._dict(frappe.get_all('Account', fields=['name', 'account_type'],
+		filters={'company': company}, as_list=1))
+
+	return account_type_map
+
 def get_result_as_list(data, filters):
 	balance, balance_in_account_currency = 0, 0
 	inv_details = get_supplier_invoice_details()
diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py
index ed3aee5..83d4c33 100644
--- a/erpnext/controllers/status_updater.py
+++ b/erpnext/controllers/status_updater.py
@@ -76,12 +76,12 @@
 		["Stopped", "eval:self.status == 'Stopped'"],
 		["Cancelled", "eval:self.docstatus == 2"],
 		["Pending", "eval:self.status != 'Stopped' and self.per_ordered == 0 and self.docstatus == 1"],
-		["Partially Ordered", "eval:self.status != 'Stopped' and self.per_ordered < 100 and self.per_ordered > 0 and self.docstatus == 1"],
 		["Ordered", "eval:self.status != 'Stopped' and self.per_ordered == 100 and self.docstatus == 1 and self.material_request_type == 'Purchase'"],
 		["Transferred", "eval:self.status != 'Stopped' and self.per_ordered == 100 and self.docstatus == 1 and self.material_request_type == 'Material Transfer'"],
 		["Issued", "eval:self.status != 'Stopped' and self.per_ordered == 100 and self.docstatus == 1 and self.material_request_type == 'Material Issue'"],
 		["Received", "eval:self.status != 'Stopped' and self.per_received == 100 and self.docstatus == 1 and self.material_request_type == 'Purchase'"],
 		["Partially Received", "eval:self.status != 'Stopped' and self.per_received > 0 and self.per_received < 100 and self.docstatus == 1 and self.material_request_type == 'Purchase'"],
+		["Partially Ordered", "eval:self.status != 'Stopped' and self.per_ordered < 100 and self.per_ordered > 0 and self.docstatus == 1"],
 		["Manufactured", "eval:self.status != 'Stopped' and self.per_ordered == 100 and self.docstatus == 1 and self.material_request_type == 'Manufacture'"]
 	],
 	"Bank Transaction": [
diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py
index 2dc0f63..6be9e71 100644
--- a/erpnext/education/doctype/student/student.py
+++ b/erpnext/education/doctype/student/student.py
@@ -74,7 +74,6 @@
 			student_user.flags.ignore_permissions = True
 			student_user.add_roles("Student")
 			student_user.save()
-			update_password_link = student_user.reset_password()
 
 	def update_applicant_status(self):
 		"""Updates Student Applicant status to Admitted"""
diff --git a/erpnext/payroll/doctype/additional_salary/additional_salary.json b/erpnext/payroll/doctype/additional_salary/additional_salary.json
index 5e17a5c..d9efe45 100644
--- a/erpnext/payroll/doctype/additional_salary/additional_salary.json
+++ b/erpnext/payroll/doctype/additional_salary/additional_salary.json
@@ -7,25 +7,30 @@
  "editable_grid": 1,
  "engine": "InnoDB",
  "field_order": [
+  "employee_details_section",
   "naming_series",
   "employee",
   "employee_name",
-  "salary_component",
-  "type",
-  "amount",
-  "ref_doctype",
-  "ref_docname",
-  "amended_from",
   "column_break_5",
   "company",
   "department",
+  "salary_details_section",
+  "salary_component",
+  "type",
   "currency",
+  "amount",
+  "column_break_13",
+  "is_recurring",
+  "payroll_date",
   "from_date",
   "to_date",
-  "payroll_date",
-  "is_recurring",
+  "properties_and_references_section",
+  "deduct_full_tax_on_selected_payroll_date",
+  "ref_doctype",
+  "ref_docname",
+  "column_break_22",
   "overwrite_salary_structure_amount",
-  "deduct_full_tax_on_selected_payroll_date"
+  "amended_from"
  ],
  "fields": [
   {
@@ -81,7 +86,7 @@
   },
   {
    "depends_on": "eval:(doc.is_recurring==0)",
-   "description": "Date on which this component is applied",
+   "description": "The date on which Salary Component with Amount will contribute for Earnings/Deduction in Salary Slip. ",
    "fieldname": "payroll_date",
    "fieldtype": "Date",
    "in_list_view": 1,
@@ -159,6 +164,7 @@
    "fieldname": "ref_docname",
    "fieldtype": "Dynamic Link",
    "label": "Reference Document",
+   "no_copy": 1,
    "options": "ref_doctype",
    "read_only": 1
   },
@@ -171,11 +177,34 @@
    "print_hide": 1,
    "read_only": 1,
    "reqd": 1
+  },
+  {
+   "fieldname": "employee_details_section",
+   "fieldtype": "Section Break",
+   "label": "Employee Details"
+  },
+  {
+   "fieldname": "column_break_13",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "column_break_22",
+   "fieldtype": "Column Break"
+  },
+  {
+   "fieldname": "salary_details_section",
+   "fieldtype": "Section Break",
+   "label": "Salary Details"
+  },
+  {
+   "fieldname": "properties_and_references_section",
+   "fieldtype": "Section Break",
+   "label": "Properties and References"
   }
  ],
  "is_submittable": 1,
  "links": [],
- "modified": "2021-03-31 22:33:59.098532",
+ "modified": "2021-05-26 11:10:00.812698",
  "modified_by": "Administrator",
  "module": "Payroll",
  "name": "Additional Salary",
diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py
index 1e28a40..b7c0962 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.py
+++ b/erpnext/regional/report/gstr_1/gstr_1.py
@@ -574,7 +574,7 @@
 def get_json(filters, report_name, data):
 	filters = json.loads(filters)
 	report_data = json.loads(data)
-	gstin = get_company_gstin_number(filters["company"])
+	gstin = get_company_gstin_number(filters["company"], filters["company_address"])
 
 	fp = "%02d%s" % (getdate(filters["to_date"]).month, getdate(filters["to_date"]).year)
 
@@ -810,23 +810,29 @@
 
 	return {"num": int(num), "itm_det": itm_det}
 
-def get_company_gstin_number(company):
-	filters = [
-		["is_your_company_address", "=", 1],
-		["Dynamic Link", "link_doctype", "=", "Company"],
-		["Dynamic Link", "link_name", "=", company],
-		["Dynamic Link", "parenttype", "=", "Address"],
-	]
+def get_company_gstin_number(company, address=None):
+	if address:
+		gstin = frappe.db.get_value("Address", address, "gstin")
 
-	gstin = frappe.get_all("Address", filters=filters, fields=["gstin"])
-
-	if gstin:
-		return gstin[0]["gstin"]
-	else:
-		frappe.throw(_("Please set valid GSTIN No. in Company Address for company {0}").format(
-			frappe.bold(company)
+	if not gstin:
+		filters = [
+			["is_your_company_address", "=", 1],
+			["Dynamic Link", "link_doctype", "=", "Company"],
+			["Dynamic Link", "link_name", "=", company],
+			["Dynamic Link", "parenttype", "=", "Address"],
+		]
+		gstin = frappe.get_all("Address", filters=filters, pluck="gstin")
+		if gstin:
+			gstin[0]
+	
+	if not gstin:
+		address = frappe.bold(address) if address else ""
+		frappe.throw(_("Please set valid GSTIN No. in Company Address {} for company {}").format(
+			address, frappe.bold(company)
 		))
 
+	return gstin
+
 @frappe.whitelist()
 def download_json_file():
 	''' download json content in a file '''
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json
index 7f94591..a0b5457 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.json
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.json
@@ -59,10 +59,6 @@
   "supplier_name",
   "supplier_address",
   "address_display",
-  "column_break_39",
-  "customer",
-  "customer_name",
-  "customer_address",
   "accounting_dimensions_section",
   "project",
   "dimension_col_break",
@@ -435,13 +431,13 @@
   },
   {
    "collapsible": 1,
-   "depends_on": "eval: in_list([\"Sales Return\", \"Purchase Return\", \"Send to Subcontractor\"], doc.purpose)",
+   "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"",
    "fieldname": "contact_section",
    "fieldtype": "Section Break",
-   "label": "Customer or Supplier Details"
+   "label": "Supplier Details"
   },
   {
-   "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"",
+   "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"",
    "fieldname": "supplier",
    "fieldtype": "Link",
    "label": "Supplier",
@@ -453,7 +449,7 @@
   },
   {
    "bold": 1,
-   "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"",
+   "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"",
    "fieldname": "supplier_name",
    "fieldtype": "Data",
    "label": "Supplier Name",
@@ -463,7 +459,7 @@
    "read_only": 1
   },
   {
-   "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"",
+   "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"",
    "fieldname": "supplier_address",
    "fieldtype": "Link",
    "label": "Supplier Address",
@@ -478,41 +474,6 @@
    "label": "Address"
   },
   {
-   "fieldname": "column_break_39",
-   "fieldtype": "Column Break"
-  },
-  {
-   "depends_on": "eval:doc.purpose==\"Sales Return\"",
-   "fieldname": "customer",
-   "fieldtype": "Link",
-   "label": "Customer",
-   "no_copy": 1,
-   "oldfieldname": "customer",
-   "oldfieldtype": "Link",
-   "options": "Customer",
-   "print_hide": 1
-  },
-  {
-   "bold": 1,
-   "depends_on": "eval:doc.purpose==\"Sales Return\"",
-   "fieldname": "customer_name",
-   "fieldtype": "Data",
-   "label": "Customer Name",
-   "no_copy": 1,
-   "oldfieldname": "customer_name",
-   "oldfieldtype": "Data",
-   "read_only": 1
-  },
-  {
-   "depends_on": "eval:doc.purpose==\"Sales Return\"",
-   "fieldname": "customer_address",
-   "fieldtype": "Small Text",
-   "label": "Customer Address",
-   "no_copy": 1,
-   "oldfieldname": "customer_address",
-   "oldfieldtype": "Small Text"
-  },
-  {
    "collapsible": 1,
    "fieldname": "printing_settings",
    "fieldtype": "Section Break",
@@ -657,7 +618,7 @@
  "index_web_pages_for_search": 1,
  "is_submittable": 1,
  "links": [],
- "modified": "2021-05-21 11:29:11.917161",
+ "modified": "2021-05-24 11:32:23.904307",
  "modified_by": "Administrator",
  "module": "Stock",
  "name": "Stock Entry",