Merge pull request #7019 from nabinhait/fix_10014
Default warehouse is mandatory only for stock item in POS. Fixed #6893
This commit is contained in:
commit
d01d74cafd
@ -122,7 +122,8 @@ def get_items_list(pos_profile):
|
||||
return frappe.db.sql("""
|
||||
select
|
||||
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
|
||||
tabItem
|
||||
where
|
||||
|
@ -1076,7 +1076,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
},
|
||||
|
||||
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"))
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user