diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.js b/erpnext/accounts/doctype/pos_settings/pos_settings.js index fab766bb4b..1a14618513 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.js +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.js @@ -2,7 +2,7 @@ // For license information, please see license.txt frappe.ui.form.on('POS Settings', { - refresh: function(frm) { + refresh: function() { } }); diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.json b/erpnext/accounts/doctype/pos_settings/pos_settings.json index cdd1865b75..a04558da26 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.json +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.json @@ -18,7 +18,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "default": "0", + "default": "1", "fieldname": "is_online", "fieldtype": "Check", "hidden": 0, @@ -55,7 +55,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-08-29 14:34:36.166049", + "modified": "2017-08-30 18:34:58.960276", "modified_by": "Administrator", "module": "Accounts", "name": "POS Settings", diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.py b/erpnext/accounts/doctype/pos_settings/pos_settings.py index c978a4e9ad..736d36eea9 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.py +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.py @@ -3,7 +3,6 @@ # For license information, please see license.txt from __future__ import unicode_literals -import frappe from frappe.model.document import Document class POSSettings(Document): diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 35958e34f5..4e25a9469f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -435,4 +435,4 @@ erpnext.patches.v8_5.remove_project_type_property_setter erpnext.patches.v8_7.add_more_gst_fields erpnext.patches.v8_7.fix_purchase_receipt_status erpnext.patches.v8_6.rename_bom_update_tool - +erpnext.patches.v8_7.set_offline_in_pos_settings diff --git a/erpnext/patches/v8_7/set_offline_in_pos_settings.py b/erpnext/patches/v8_7/set_offline_in_pos_settings.py new file mode 100644 index 0000000000..64a3a7c806 --- /dev/null +++ b/erpnext/patches/v8_7/set_offline_in_pos_settings.py @@ -0,0 +1,12 @@ +# Copyright (c) 2017, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + frappe.reload_doc('accounts', 'doctype', 'pos_settings') + + doc = frappe.get_doc('POS Settings') + doc.is_online = 0 + doc.save() \ No newline at end of file diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index ed5a0f6b8d..3e2414e665 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -146,7 +146,7 @@ erpnext.SerialNoBatchSelector = Class.extend({ this.map_row_values(this.item, this.values, 'serial_no', 'qty'); } refresh_field("items"); - this.callback && this.callback(this.item) + this.callback && this.callback(this.item); }, map_row_values: function(row, values, number, qty_field, warehouse) { 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 4ce1ca1a33..6bbb267271 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -1,7 +1,7 @@ /* global Clusterize */ frappe.pages['point-of-sale'].on_page_load = function(wrapper) { - var page = frappe.ui.make_app_page({ + frappe.ui.make_app_page({ parent: wrapper, title: 'Point of Sale', single_column: true @@ -156,7 +156,7 @@ class PointOfSale { .then(() => { // update cart this.update_cart_data(item); - }) + }); } return; } @@ -172,12 +172,12 @@ class PointOfSale { .trigger('item_code', item.doctype, item.name) .then(() => { // update cart - this.update_cart_data(item) + this.update_cart_data(item); }); } select_batch_and_serial_no(item) { - let dialog = new erpnext.SerialNoBatchSelector({ + new erpnext.SerialNoBatchSelector({ frm: this.frm, item: item, warehouse_details: { @@ -189,9 +189,9 @@ class PointOfSale { .then(() => { // update cart this.update_cart_data(item); - }) + }); } - }, true) + }, true); } update_cart_data(item) { @@ -202,7 +202,7 @@ class PointOfSale { update_item_in_frm(item, field, value) { if (field) { - frappe.model.set_value(item.doctype, item.name, field, value) + frappe.model.set_value(item.doctype, item.name, field, value); } return this.frm.script_manager @@ -219,7 +219,7 @@ class PointOfSale { frm: this.frm, events: { submit_form: () => { - this.submit_sales_invoice() + this.submit_sales_invoice(); } } }); @@ -323,7 +323,7 @@ class PointOfSale { // }).addClass('visible-xs'); this.page.add_menu_item(__("Form View"), function () { - var doc = frappe.model.sync(me.frm.doc); + frappe.model.sync(me.frm.doc); frappe.set_route("Form", me.frm.doc.doctype, me.frm.doc.name); }); @@ -376,7 +376,7 @@ class POSCart {