diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js
index 7dc05335066..7516134baf5 100644
--- a/erpnext/accounts/doctype/account/account_tree.js
+++ b/erpnext/accounts/doctype/account/account_tree.js
@@ -123,7 +123,7 @@ frappe.treeview_settings["Account"] = {
}, "add");
},
onrender: function(node) {
- if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){
+ if (frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
// show Dr if positive since balance is calculated as debit - credit else show Cr
let balance = node.data.balance_in_account_currency || node.data.balance;
diff --git a/erpnext/crm/doctype/contract/contract_list.js b/erpnext/crm/doctype/contract/contract_list.js
index a09d123ed26..26a2907c7cc 100644
--- a/erpnext/crm/doctype/contract/contract_list.js
+++ b/erpnext/crm/doctype/contract/contract_list.js
@@ -1,12 +1,12 @@
frappe.listview_settings['Contract'] = {
- add_fields: ["status"],
- get_indicator: function (doc) {
- if (doc.status == "Unsigned") {
- return [__(doc.status), "red", "status,=," + doc.status];
- } else if (doc.status == "Active") {
- return [__(doc.status), "green", "status,=," + doc.status];
- } else if (doc.status == "Inactive") {
- return [__(doc.status), "gray", "status,=," + doc.status];
- }
- },
+ add_fields: ["status"],
+ get_indicator: function (doc) {
+ if (doc.status == "Unsigned") {
+ return [__(doc.status), "red", "status,=," + doc.status];
+ } else if (doc.status == "Active") {
+ return [__(doc.status), "green", "status,=," + doc.status];
+ } else if (doc.status == "Inactive") {
+ return [__(doc.status), "gray", "status,=," + doc.status];
+ }
+ },
};
\ No newline at end of file
diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js
index 4e2ccaa30cf..8699103cb2c 100644
--- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js
+++ b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js
@@ -24,8 +24,8 @@ frappe.ui.form.on('Course Scheduling Tool', {
${__('Following course schedules were created')}
| ${__("Course")} | ${__("Date")} |
- ${course_schedules.map(
- c => `| ${c.name} |
+ ${course_schedules.map(c =>
+ `
| ${c.name} |
${c.schedule_date} |
`
).join('')}
diff --git a/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js b/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js
index bfb0ba13ceb..b75f2718271 100644
--- a/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js
+++ b/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js
@@ -12,19 +12,19 @@ frappe.treeview_settings["Healthcare Service Unit"] = {
get_tree_nodes: 'erpnext.healthcare.utils.get_children',
ignore_fields:["parent_healthcare_service_unit"],
onrender: function(node) {
- if (node.data.occupied_out_of_vacant!==undefined){
+ if (node.data.occupied_out_of_vacant!==undefined) {
$(''
+ " " + node.data.occupied_out_of_vacant
+ '').insertBefore(node.$ul);
}
if (node.data && node.data.inpatient_occupancy!==undefined) {
- if (node.data.inpatient_occupancy == 1){
- if (node.data.occupancy_status == "Occupied"){
+ if (node.data.inpatient_occupancy == 1) {
+ if (node.data.occupancy_status == "Occupied") {
$(''
+ " " + node.data.occupancy_status
+ '').insertBefore(node.$ul);
}
- if (node.data.occupancy_status == "Vacant"){
+ if (node.data.occupancy_status == "Vacant") {
$(''
+ " " + node.data.occupancy_status
+ '').insertBefore(node.$ul);
diff --git a/erpnext/hr/page/team_updates/team_updates.js b/erpnext/hr/page/team_updates/team_updates.js
index 29780b81619..13d0074660b 100644
--- a/erpnext/hr/page/team_updates/team_updates.js
+++ b/erpnext/hr/page/team_updates/team_updates.js
@@ -41,7 +41,7 @@ frappe.team_updates = {
me.add_row(d);
});
} else {
- frappe.show_alert({message:__('No more updates'), indicator:'gray'});
+ frappe.show_alert({message: __('No more updates'), indicator: 'gray'});
me.more.parent().addClass('hidden');
}
}
diff --git a/erpnext/public/scss/shopping_cart.scss b/erpnext/public/scss/shopping_cart.scss
index ee30f531862..159a8a47cd3 100644
--- a/erpnext/public/scss/shopping_cart.scss
+++ b/erpnext/public/scss/shopping_cart.scss
@@ -58,7 +58,7 @@ body.product-page {
.card-grid {
display: grid;
grid-gap: 15px;
- grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));;
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
}
diff --git a/erpnext/shopping_cart/search.py b/erpnext/shopping_cart/search.py
index 012d09fafc8..63e9fe1b31b 100644
--- a/erpnext/shopping_cart/search.py
+++ b/erpnext/shopping_cart/search.py
@@ -1,7 +1,6 @@
import frappe
from frappe.search.full_text_search import FullTextSearch
from whoosh.fields import TEXT, ID, KEYWORD, Schema
-from frappe.website.render import render_page
from frappe.utils import strip_html_tags
from whoosh.qparser import MultifieldParser, FieldsPlugin, WildcardPlugin
from whoosh.analysis import StemmingAnalyzer
@@ -52,7 +51,7 @@ class ProductSearch(FullTextSearch):
if item.web_long_description:
content = strip_html_tags(item.web_long_description)
- elif description:
+ elif item.description:
content = strip_html_tags(item.description)
return frappe._dict(
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index 0de02676afe..c390cd171d3 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -35,7 +35,7 @@ $.extend(shopping_cart, {
},
get_update_address_dialog() {
- return new frappe.ui.Dialog({
+ let d = new frappe.ui.Dialog({
title: "Select Address",
fields: [{
'fieldtype': 'HTML',
@@ -56,7 +56,7 @@ $.extend(shopping_cart, {
},
callback: function(r) {
d.hide();
- if(!r.exc) {
+ if (!r.exc) {
$(".cart-tax-items").html(r.message.taxes);
shopping_cart.parent.find(
`.address-container[data-address-type="${address_type}"]`
@@ -66,6 +66,8 @@ $.extend(shopping_cart, {
});
}
});
+
+ return d;
},
get_address_template(type) {