resolved merge conflicts
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 777b7bd..178d7e8 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
-__version__ = '10.1.23'
+__version__ = '10.1.24'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js
index 9f06ada..fe1977c 100644
--- a/erpnext/accounts/doctype/account/account_tree.js
+++ b/erpnext/accounts/doctype/account/account_tree.js
@@ -71,7 +71,7 @@
// financial statements
for (let report of ['Trial Balance', 'General Ledger', 'Balance Sheet',
- 'Profit and Loss', 'Cash Flow Statement', 'Accounts Payable', 'Accounts Receivable']) {
+ 'Profit and Loss Statement', 'Cash Flow Statement', 'Accounts Payable', 'Accounts Receivable']) {
treeview.page.add_inner_button(__(report), function() {
frappe.set_route('query-report', report, {company: get_company()});
}, __('Financial Statements'));
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
index 91db378..46fff7d 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
@@ -165,7 +165,7 @@
tree[child.account_name] = {}
# assign account_type and root_type
- if child.account_type:
+ if child.account_number:
tree[child.account_name]["account_number"] = child.account_number
if child.account_type:
tree[child.account_name]["account_type"] = child.account_type
@@ -193,4 +193,4 @@
_get_account_names(chart)
- return (bank_account in accounts)
\ No newline at end of file
+ return (bank_account in accounts)
diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py
index 5b7d73f..0556e9b 100644
--- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py
+++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py
@@ -29,11 +29,11 @@
cheque_print.html = """
<div style="position: relative; top:%(starting_position_from_top_edge)scm">
<div style="width:%(cheque_width)scm;height:%(cheque_height)scm;">
- <span style="top: {{ %(acc_pay_dist_from_top_edge)s }}cm; left: {{ %(acc_pay_dist_from_left_edge)s }}cm;
+ <span style="top:%(acc_pay_dist_from_top_edge)scm; left:%(acc_pay_dist_from_left_edge)scm;
border-bottom: solid 1px;border-top:solid 1px; position: absolute;">
%(message_to_show)s
</span>
- <span style="top:%(date_dist_from_top_edge)s cm; left:%(date_dist_from_left_edge)scm;
+ <span style="top:%(date_dist_from_top_edge)scm; left:%(date_dist_from_left_edge)scm;
position: absolute;">
{{ frappe.utils.formatdate(doc.reference_date) or '' }}
</span>
diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md b/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md
index 4afaee1..2e6b12b 100644
--- a/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md
+++ b/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md
@@ -4,7 +4,7 @@
Feedback Trigger.
To request a feedback manually go to respective document e.g. Sales Order, Issue etc.
-and click on Ask a Feedback option in Menu.
+and click on Request Feedback option in Menu.
<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/manual-feedback-request-option.png">
diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js
index f3f8c88..5373df9 100644
--- a/erpnext/education/doctype/student_group/student_group.js
+++ b/erpnext/education/doctype/student_group/student_group.js
@@ -82,36 +82,39 @@
max_roll_no = d.group_roll_number;
}
});
- frappe.call({
- method: "erpnext.education.doctype.student_group.student_group.get_students",
- args: {
- "academic_year": frm.doc.academic_year,
- "academic_term": frm.doc.academic_term,
- "group_based_on": frm.doc.group_based_on,
- "program": frm.doc.program,
- "batch" : frm.doc.batch,
- "course": frm.doc.course
- },
- callback: function(r) {
- if(r.message) {
- $.each(r.message, function(i, d) {
- if(!in_list(student_list, d.student)) {
- var s = frm.add_child("students");
- s.student = d.student;
- s.student_name = d.student_name;
- if (d.active === 0) {
- s.active = 0;
+
+ if(frm.doc.academic_year) {
+ frappe.call({
+ method: "erpnext.education.doctype.student_group.student_group.get_students",
+ args: {
+ "academic_year": frm.doc.academic_year,
+ "academic_term": frm.doc.academic_term,
+ "group_based_on": frm.doc.group_based_on,
+ "program": frm.doc.program,
+ "batch" : frm.doc.batch,
+ "course": frm.doc.course
+ },
+ callback: function(r) {
+ if(r.message) {
+ $.each(r.message, function(i, d) {
+ if(!in_list(student_list, d.student)) {
+ var s = frm.add_child("students");
+ s.student = d.student;
+ s.student_name = d.student_name;
+ if (d.active === 0) {
+ s.active = 0;
+ }
+ s.group_roll_number = ++max_roll_no;
}
- s.group_roll_number = ++max_roll_no;
- }
- });
- refresh_field("students");
- frm.save();
- } else {
- frappe.msgprint(__("Student Group is already updated."))
+ });
+ refresh_field("students");
+ frm.save();
+ } else {
+ frappe.msgprint(__("Student Group is already updated."))
+ }
}
- }
- })
+ })
+ }
} else {
frappe.msgprint(__("Select students manually for the Activity based Group"));
}
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
index 7221423..c35e397 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
@@ -1,8 +1,8 @@
frappe.views.calendar["Patient Appointment"] = {
field_map: {
- "start": "start",
- "end": "end",
+ "start": "appointment_date",
+ "end": "appointment_datetime",
"id": "name",
"title": "patient",
"allDay": "allDay",
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
index 3cc8dd5..507d070 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
+++ b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
@@ -3,8 +3,8 @@
frappe.views.calendar["Holiday List"] = {
field_map: {
- "start": "holiday_date",
- "end": "holiday_date",
+ "start": "from_date",
+ "end": "to_date",
"id": "name",
"title": "description",
"allDay": "allDay"
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 5c4bd16..fcd2212 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -816,7 +816,7 @@
});
this.numpad.reset_value();
} else {
- const item_code = this.selected_item.attr('data-item-code');
+ const item_code = unescape(this.selected_item.attr('data-item-code'));
const batch_no = this.selected_item.attr('data-batch-no');
const field = this.selected_item.active_field;
const value = this.numpad.get_value();
@@ -863,7 +863,7 @@
update_item(item) {
const item_selector = item.batch_no ?
- `[data-batch-no="${item.batch_no}"]` : `[data-item-code="${item.item_code}"]`;
+ `[data-batch-no="${item.batch_no}"]` : `[data-item-code="${escape(item.item_code)}"]`;
const $item = this.$cart_items.find(item_selector);
@@ -889,7 +889,7 @@
const batch_no = item.batch_no || '';
return `
- <div class="list-item indicator ${indicator_class}" data-item-code="${item.item_code}"
+ <div class="list-item indicator ${indicator_class}" data-item-code="${escape(item.item_code)}"
data-batch-no="${batch_no}" title="Item: ${item.item_name} Available Qty: ${item.actual_qty}">
<div class="item-name list-item__content list-item__content--flex-1.5 ellipsis">
${item.item_name}
@@ -933,20 +933,21 @@
exists(item_code, batch_no) {
const is_exists = batch_no ?
- `[data-batch-no="${batch_no}"]` : `[data-item-code="${item_code}"]`;
+ `[data-batch-no="${batch_no}"]` : `[data-item-code="${escape(item_code)}"]`;
let $item = this.$cart_items.find(is_exists);
+
return $item.length > 0;
}
highlight_item(item_code) {
- const $item = this.$cart_items.find(`[data-item-code="${item_code}"]`);
+ const $item = this.$cart_items.find(`[data-item-code="${escape(item_code)}"]`);
$item.addClass('highlight');
setTimeout(() => $item.removeClass('highlight'), 1000);
}
scroll_to_item(item_code) {
- const $item = this.$cart_items.find(`[data-item-code="${item_code}"]`);
+ const $item = this.$cart_items.find(`[data-item-code="${escape(item_code)}"]`);
if ($item.length === 0) return;
const scrollTop = $item.offset().top - this.$cart_items.offset().top + this.$cart_items.scrollTop();
this.$cart_items.animate({ scrollTop });
@@ -961,7 +962,7 @@
'[data-action="increment"], [data-action="decrement"]', function() {
const $btn = $(this);
const $item = $btn.closest('.list-item[data-item-code]');
- const item_code = $item.attr('data-item-code');
+ const item_code = unescape($item.attr('data-item-code'));
const action = $btn.attr('data-action');
if(action === 'increment') {
@@ -984,7 +985,7 @@
this.$cart_items.on('change', '.quantity input', function() {
const $input = $(this);
const $item = $input.closest('.list-item[data-item-code]');
- const item_code = $item.attr('data-item-code');
+ const item_code = unescape($item.attr('data-item-code'));
events.on_field_change(item_code, 'qty', flt($input.val()));
});
@@ -1252,7 +1253,7 @@
var me = this;
this.wrapper.on('click', '.pos-item-wrapper', function() {
const $item = $(this);
- const item_code = $item.attr('data-item-code');
+ const item_code = unescape($item.attr('data-item-code'));
me.events.update_cart(item_code, 'qty', '+1');
});
}
@@ -1278,7 +1279,7 @@
const item_title = item_name || item_code;
const template = `
- <div class="pos-item-wrapper image-view-item" data-item-code="${item_code}">
+ <div class="pos-item-wrapper image-view-item" data-item-code="${escape(item_code)}">
<div class="image-view-header">
<div>
<a class="grey list-id" data-name="${item_code}" title="${item_title}">
diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py
index eed9f4a..52e4730 100644
--- a/erpnext/stock/report/stock_balance/stock_balance.py
+++ b/erpnext/stock/report/stock_balance/stock_balance.py
@@ -202,13 +202,14 @@
item_details = {}
if not items:
items = list(set([d.item_code for d in sle]))
-
- for item in frappe.db.sql("""
- select name, item_name, description, item_group, brand, stock_uom
- from `tabItem`
- where name in ({0})
- """.format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), as_dict=1):
- item_details.setdefault(item.name, item)
+
+ if items:
+ for item in frappe.db.sql("""
+ select name, item_name, description, item_group, brand, stock_uom
+ from `tabItem`
+ where name in ({0})
+ """.format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), as_dict=1):
+ item_details.setdefault(item.name, item)
if filters.get('show_variant_attributes', 0) == 1:
variant_values = get_variant_values_for(item_details.keys())
@@ -217,11 +218,14 @@
return item_details
def get_item_reorder_details(items):
- item_reorder_details = frappe.db.sql("""
- select parent, warehouse, warehouse_reorder_qty, warehouse_reorder_level
- from `tabItem Reorder`
- where parent in ({0})
- """.format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), as_dict=1)
+ item_reorder_details = frappe._dict()
+
+ if items:
+ item_reorder_details = frappe.db.sql("""
+ select parent, warehouse, warehouse_reorder_qty, warehouse_reorder_level
+ from `tabItem Reorder`
+ where parent in ({0})
+ """.format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), as_dict=1)
return dict((d.parent + d.warehouse, d) for d in item_reorder_details)
diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py
index 5e185e0..e29f50a 100644
--- a/erpnext/stock/report/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/report/stock_ledger/stock_ledger.py
@@ -93,11 +93,14 @@
if not items:
items = list(set([d.item_code for d in sl_entries]))
+ if not items:
+ return item_details
+
for item in frappe.db.sql("""
select name, item_name, description, item_group, brand, stock_uom
from `tabItem`
where name in ({0})
- """.format(', '.join(['"' + frappe.db.escape(i,percent=False) + '"' for i in items])), as_dict=1):
+ """.format(', '.join(['"' + frappe.db.escape(i,percent=False) + '"' for i in items])), as_dict=1, debug=1):
item_details.setdefault(item.name, item)
return item_details
diff --git a/erpnext/utilities/page/leaderboard/leaderboard.js b/erpnext/utilities/page/leaderboard/leaderboard.js
index af62dad..6e4db1b 100644
--- a/erpnext/utilities/page/leaderboard/leaderboard.js
+++ b/erpnext/utilities/page/leaderboard/leaderboard.js
@@ -24,7 +24,7 @@
"Item": ["total_sales_amount", "total_qty_sold", "total_purchase_amount",
"total_qty_purchased", "available_stock_qty", "available_stock_value"],
"Supplier": ["total_purchase_amount", "total_qty_purchased", "outstanding_amount"],
- "Sales Partner": ["total_sales_amount", "total_commision"],
+ "Sales Partner": ["total_sales_amount", "total_commission"],
"Sales Person": ["total_sales_amount"],
};