diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json
index 4e22218c6e..570111acac 100644
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.json
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json
@@ -14,6 +14,7 @@
"column_break_9",
"update_stock",
"ignore_pricing_rule",
+ "hide_unavailable_items",
"warehouse",
"campaign",
"company_address",
@@ -307,13 +308,19 @@
"fieldtype": "Check",
"label": "Update Stock",
"read_only": 1
+ },
+ {
+ "default": "0",
+ "fieldname": "hide_unavailable_items",
+ "fieldtype": "Check",
+ "label": "Hide Unavailable Items"
}
],
"icon": "icon-cog",
"idx": 1,
"index_web_pages_for_search": 1,
"links": [],
- "modified": "2020-10-20 13:16:50.665081",
+ "modified": "2020-10-29 13:18:38.795925",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",
diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py
index 811fc356cf..c17fccdce0 100644
--- a/erpnext/accounts/doctype/subscription/test_subscription.py
+++ b/erpnext/accounts/doctype/subscription/test_subscription.py
@@ -237,7 +237,7 @@ class TestSubscription(unittest.TestCase):
subscription.party_type = 'Customer'
subscription.party = '_Test Customer'
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
- subscription.start_date = '2018-01-01'
+ subscription.start_date = add_days(nowdate(), -1000)
subscription.insert()
subscription.process() # generate first invoice
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py
index 4cf798d3e2..a314a15c23 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.py
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -742,10 +742,12 @@ def get_items_for_material_requests(doc, warehouses=None):
mr_items = new_mr_items
if not mr_items:
- frappe.msgprint(_("""As raw materials projected quantity is more than required quantity,
- there is no need to create material request for the warehouse {0}.
- Still if you want to make material request,
- kindly enable Ignore Existing Projected Quantity checkbox""").format(doc.get('for_warehouse')))
+ to_enable = frappe.bold(_("Ignore Existing Projected Quantity"))
+ warehouse = frappe.bold(doc.get('for_warehouse'))
+ message = _("As there are sufficient raw materials, Material Request is not required for Warehouse {0}.").format(warehouse) + "
"
+ message += _(" If you still want to proceed, please enable {0}.").format(to_enable)
+
+ frappe.msgprint(message, title=_("Note"))
return mr_items
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 02b1dc0beb..1358a4bd08 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -352,9 +352,15 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
let show_description = function(idx, exist = null) {
if (exist) {
- scan_barcode_field.set_new_description(__('Row #{0}: Qty increased by 1', [idx]));
+ frappe.show_alert({
+ message: __('Row #{0}: Qty increased by 1', [idx]),
+ indicator: 'green'
+ });
} else {
- scan_barcode_field.set_new_description(__('Row #{0}: Item added', [idx]));
+ frappe.show_alert({
+ message: __('Row #{0}: Item added', [idx]),
+ indicator: 'green'
+ });
}
}
@@ -365,7 +371,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}).then(r => {
const data = r && r.message;
if (!data || Object.keys(data).length === 0) {
- scan_barcode_field.set_new_description(__('Cannot find Item with this barcode'));
+ frappe.show_alert({
+ message: __('Cannot find Item with this Barcode'),
+ indicator: 'red'
+ });
return;
}
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 e5b50d7789..6b9939e8ef 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.py
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.py
@@ -14,11 +14,11 @@ from six import string_types
def get_items(start, page_length, price_list, item_group, pos_profile, search_value=""):
data = dict()
result = []
- warehouse, show_only_available_items = "", False
+ warehouse, hide_unavailable_items = "", False
allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock')
if not allow_negative_stock:
- warehouse, show_only_available_items = frappe.db.get_value('POS Profile', pos_profile, ['warehouse', 'show_only_available_items'])
+ warehouse, hide_unavailable_items = frappe.db.get_value('POS Profile', pos_profile, ['warehouse', 'hide_unavailable_items'])
if not frappe.db.exists('Item Group', item_group):
item_group = get_root_of('Item Group')
@@ -48,7 +48,7 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_va
lft, rgt = frappe.db.get_value('Item Group', item_group, ['lft', 'rgt'])
bin_join_selection, bin_join_condition = "", ""
- if show_only_available_items:
+ if hide_unavailable_items:
bin_join_selection = ", `tabBin` bin"
bin_join_condition = "AND bin.warehouse = %(warehouse)s AND bin.item_code = item.name AND bin.actual_qty > 0"