Merge pull request #11137 from mbauskar/healthcare
[hotfix] passed localise item_group value for create_lab_test_itemsfield
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 8535365..32dde37 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -4,7 +4,7 @@
import frappe
from erpnext.hooks import regional_overrides
-__version__ = '9.1.2'
+__version__ = '9.1.3'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/subscription/subscription.json b/erpnext/accounts/doctype/subscription/subscription.json
index dfdcbec..167a92f 100644
--- a/erpnext/accounts/doctype/subscription/subscription.json
+++ b/erpnext/accounts/doctype/subscription/subscription.json
@@ -844,7 +844,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-10-03 17:20:26.919630",
+ "modified": "2017-10-10 17:28:10.105561",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Subscription",
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.js b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
index f639898..776fd3c 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.js
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
@@ -39,6 +39,7 @@
args: {
method: 'erpnext.hr.doctype.upload_attendance.upload_attendance.upload'
},
+ no_socketio: true,
sample_url: "e.g. http://example.com/somefile.csv",
callback: function(attachment, r) {
var $log_wrapper = $(cur_frm.fields_dict.import_log.wrapper).empty();
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 c042244..8bbbc3f 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -101,16 +101,13 @@
if (!this.payment) {
this.make_payment_modal();
} else {
- const mop_field = this.payment.default_mop;
- let amount = 0.0;
this.frm.doc.payments.map(p => {
- if (p.mode_of_payment == mop_field) {
- amount = p.amount;
- return;
+ if (p.amount) {
+ this.payment.dialog.set_value(p.mode_of_payment, p.amount);
}
});
- this.payment.dialog.set_value(mop_field, flt(amount));
+ this.payment.set_title();
}
this.payment.open_modal();
}
@@ -1185,12 +1182,7 @@
make() {
this.set_flag();
-
- let title = __('Total Amount {0}',
- [format_currency(this.frm.doc.grand_total, this.frm.doc.currency)]);
-
this.dialog = new frappe.ui.Dialog({
- title: title,
fields: this.get_fields(),
width: 800
});
@@ -1213,6 +1205,13 @@
});
}
+ set_title() {
+ let title = __('Total Amount {0}',
+ [format_currency(this.frm.doc.grand_total, this.frm.doc.currency)]);
+
+ this.dialog.set_title(title);
+ }
+
bind_events() {
var me = this;
$(this.dialog.body).find('.input-with-feedback').focusin(function() {
@@ -1234,10 +1233,6 @@
const me = this;
let fields = this.frm.doc.payments.map(p => {
- if (p.default) {
- this.default_mop = p.mode_of_payment;
- }
-
return {
fieldtype: 'Currency',
label: __(p.mode_of_payment),
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py
index 5694ad9..b92c653 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.py
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.py
@@ -9,6 +9,8 @@
def get_items(start, page_length, price_list, item_group, search_value=""):
serial_no = ""
batch_no = ""
+ barcode = ""
+
item_code = search_value
if not frappe.db.exists('Item Group', item_group):
item_group = get_root_of('Item Group')
@@ -24,7 +26,12 @@
if batch_no_data:
batch_no, item_code = batch_no_data
- item_code, condition = get_conditions(item_code, serial_no, batch_no)
+ if not serial_no and not batch_no:
+ barcode_data = frappe.db.get_value('Item', {'barcode': search_value}, ['name', 'barcode'])
+ if barcode_data:
+ item_code, barcode = barcode_data
+
+ item_code, condition = get_conditions(item_code, serial_no, batch_no, barcode)
lft, rgt = frappe.db.get_value('Item Group', item_group, ['lft', 'rgt'])
# locate function is used to sort by closest match from the beginning of the value
@@ -62,12 +69,12 @@
return res
-def get_conditions(item_code, serial_no, batch_no):
- if serial_no or batch_no:
+def get_conditions(item_code, serial_no, batch_no, barcode):
+ if serial_no or batch_no or barcode:
return frappe.db.escape(item_code), "i.item_code = %(item_code)s"
condition = """(i.item_code like %(item_code)s
- or i.item_name like %(item_code)s or i.barcode like %(item_code)s)"""
+ or i.item_name like %(item_code)s)"""
return '%%%s%%'%(frappe.db.escape(item_code)), condition