mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
[usability] item price moved to price list
This commit is contained in:
@@ -193,7 +193,7 @@ erpnext.POS = Class.extend({
|
||||
</div>',
|
||||
{
|
||||
item_code: obj.name,
|
||||
item_price: format_currency(obj.ref_rate, obj.ref_currency),
|
||||
item_price: format_currency(obj.ref_rate, obj.currency),
|
||||
item_name: obj.name===obj.item_name ? "" : obj.item_name,
|
||||
item_image: image
|
||||
})).appendTo($wrap);
|
||||
|
||||
@@ -15,11 +15,14 @@ def get_items(price_list, item=None, item_group=None):
|
||||
if item:
|
||||
condition = "and i.name='%s'" % item
|
||||
|
||||
return webnotes.conn.sql("""select
|
||||
i.name, i.item_name, i.image, ip.ref_rate, ip.ref_currency
|
||||
from `tabItem` i LEFT JOIN `tabItem Price` ip
|
||||
ON ip.parent=i.name
|
||||
and ip.price_list=%s
|
||||
return webnotes.conn.sql("""select i.name, i.item_name, i.image,
|
||||
pl_items.ref_rate, pl_items.currency
|
||||
from `tabItem` i LEFT JOIN
|
||||
(select ip.item_code, ip.ref_rate, pl.currency from
|
||||
`tabItem Price` ip, `tabPrice List` pl
|
||||
where ip.parent=%s and ip.parent = pl.name) pl_items
|
||||
ON
|
||||
pl_items.item_code=i.name
|
||||
where
|
||||
i.is_sales_item='Yes'%s""" % ('%s', condition), (price_list), as_dict=1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user