style: fix formatting
diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js
index 7dc0533..7516134 100644
--- a/erpnext/accounts/doctype/account/account_tree.js
+++ b/erpnext/accounts/doctype/account/account_tree.js
@@ -123,7 +123,7 @@
}, "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 a09d123..26a2907 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 4e2ccaa..8699103 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 @@
<caption>${__('Following course schedules were created')}</caption>
<thead><tr><th>${__("Course")}</th><th>${__("Date")}</th></tr></thead>
<tbody>
- ${course_schedules.map(
- c => `<tr><td><a href="/app/course-schedule/${c.name}">${c.name}</a></td>
+ ${course_schedules.map(c =>
+ `<tr><td><a href="/app/course-schedule/${c.name}">${c.name}</a></td>
<td>${c.schedule_date}</td></tr>`
).join('')}
</tbody>
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 bfb0ba1..b75f271 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 @@
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) {
$('<span class="balance-area pull-right">'
+ " " + node.data.occupied_out_of_vacant
+ '</span>').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") {
$('<span class="balance-area pull-right">'
+ " " + node.data.occupancy_status
+ '</span>').insertBefore(node.$ul);
}
- if (node.data.occupancy_status == "Vacant"){
+ if (node.data.occupancy_status == "Vacant") {
$('<span class="balance-area pull-right">'
+ " " + node.data.occupancy_status
+ '</span>').insertBefore(node.$ul);
diff --git a/erpnext/hr/page/team_updates/team_updates.js b/erpnext/hr/page/team_updates/team_updates.js
index 29780b8..13d0074 100644
--- a/erpnext/hr/page/team_updates/team_updates.js
+++ b/erpnext/hr/page/team_updates/team_updates.js
@@ -41,7 +41,7 @@
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 ee30f53..159a8a4 100644
--- a/erpnext/public/scss/shopping_cart.scss
+++ b/erpnext/public/scss/shopping_cart.scss
@@ -58,7 +58,7 @@
.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/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js
index 6d8ad7e..501c7df 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -10,7 +10,7 @@
frappe.require('assets/js/point-of-sale.min.js', function() {
wrapper.pos = new erpnext.PointOfSale.Controller(wrapper);
window.cur_pos = wrapper.pos;
- })
+ });
};
frappe.pages['point-of-sale'].refresh = function(wrapper) {
diff --git a/erpnext/shopping_cart/search.py b/erpnext/shopping_cart/search.py
index 012d09f..63e9fe1 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 @@
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 0de0267..c390cd1 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -35,7 +35,7 @@
},
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 @@
},
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 @@
});
}
});
+
+ return d;
},
get_address_template(type) {