diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js
index 87f94ca95a4..3d05d49a899 100644
--- a/accounts/page/trial_balance/trial_balance.js
+++ b/accounts/page/trial_balance/trial_balance.js
@@ -27,7 +27,7 @@ wn.pages['trial-balance'].onload = function(wrapper) {
var msgbox = msgprint('
Select To Download:
\
Account Groups
\
Account Ledgers
\
- ');
+
');
var me = this;
diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.js b/accounts/page/voucher_import_tool/voucher_import_tool.js
index d937436b262..bf6b065b0f4 100644
--- a/accounts/page/voucher_import_tool/voucher_import_tool.js
+++ b/accounts/page/voucher_import_tool/voucher_import_tool.js
@@ -9,11 +9,11 @@ wn.pages['voucher-import-tool'].onload = function(wrapper) {
Import multiple accounting entries via CSV (spreadsheet) file:
\
1. Download Template
\
\
-
\
+
\
Import multiple vouchers with one debit and one credit entry
\
\
\
-
\
+
\
Import multiple vouchers with multiple accounts
\
\
\
diff --git a/public/js/kb_common.js b/public/js/kb_common.js
index ae80acf4f8a..032d2db1433 100644
--- a/public/js/kb_common.js
+++ b/public/js/kb_common.js
@@ -95,7 +95,7 @@ EditableText = function(args) {
\
\
- \
+ \
Cancel\
', args)).appendTo(me.parent);
diff --git a/utilities/page/messages/messages.js b/utilities/page/messages/messages.js
index 6ade603e2b9..1da5bf4a062 100644
--- a/utilities/page/messages/messages.js
+++ b/utilities/page/messages/messages.js
@@ -28,7 +28,7 @@ wn.pages.messages.onload = function(wrapper) {
\
\
').appendTo($(wrapper).find('.layout-main-section'));
@@ -182,7 +182,7 @@ erpnext.Messages = Class.extend({
var $body = $(me.wrapper).find('.layout-side-section');
$('Users
\
\
').appendTo($body);
r.message.sort(function(a, b) { return b.has_session - a.has_session; });
diff --git a/website/helpers/product.py b/website/helpers/product.py
index 6bafc2b436b..fec462607b2 100644
--- a/website/helpers/product.py
+++ b/website/helpers/product.py
@@ -4,6 +4,25 @@
from __future__ import unicode_literals
import webnotes
+@webnotes.whitelist(allow_guest=True)
+def get_product_info(item_code):
+ """get product price / stock info"""
+ price_list = webnotes.conn.get_value("Item", item_code, "website_price_list")
+ warehouse = webnotes.conn.get_value("Item", item_code, "website_warehouse")
+ if warehouse:
+ in_stock = webnotes.conn.sql("""select actual_qty from tabBin where
+ item_code=%s and warehouse=%s""", (item_code, warehouse))
+ if in_stock:
+ in_stock = in_stock[0][0] > 0 and 1 or 0
+ else:
+ in_stock = -1
+ return {
+ "price": price_list and webnotes.conn.sql("""select ref_rate, ref_currency from
+ `tabItem Price` where parent=%s and price_list_name=%s""",
+ (item_code, price_list), as_dict=1) or [],
+ "stock": in_stock
+ }
+
@webnotes.whitelist(allow_guest=True)
def get_product_list(args=None):
"""
diff --git a/website/templates/css/product_page.css b/website/templates/css/product_page.css
index bf893caf984..2b7c9790ff7 100644
--- a/website/templates/css/product_page.css
+++ b/website/templates/css/product_page.css
@@ -1,6 +1,9 @@