Default warehouse is mandatory only for stock item in POS. Fixed #6893
This commit is contained in:
parent
8d161ef2e1
commit
977eff911f
@ -122,7 +122,8 @@ def get_items_list(pos_profile):
|
|||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
select
|
select
|
||||||
name, item_code, item_name, description, item_group, expense_account, has_batch_no,
|
name, item_code, item_name, description, item_group, expense_account, has_batch_no,
|
||||||
has_serial_no, expense_account, selling_cost_center, stock_uom, image, default_warehouse
|
has_serial_no, expense_account, selling_cost_center, stock_uom, image,
|
||||||
|
default_warehouse, is_stock_item
|
||||||
from
|
from
|
||||||
tabItem
|
tabItem
|
||||||
where
|
where
|
||||||
|
@ -1076,7 +1076,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
validate_warehouse: function(){
|
validate_warehouse: function(){
|
||||||
if(!this.items[0].default_warehouse && !this.pos_profile_data['warehouse']){
|
if(this.items[0].is_stock_item && !this.items[0].default_warehouse && !this.pos_profile_data['warehouse']){
|
||||||
frappe.throw(__("Default warehouse is required for selected item"))
|
frappe.throw(__("Default warehouse is required for selected item"))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user