[fix] [minor] stock uom and price list currency in webshop
This commit is contained in:
parent
20a8b1302d
commit
e122121dc4
@ -27,7 +27,7 @@ def get_product_info(item_code):
|
|||||||
else:
|
else:
|
||||||
in_stock = -1
|
in_stock = -1
|
||||||
|
|
||||||
price = price_list and webnotes.conn.sql("""select ip.ref_rate, pl.ref_currency from
|
price = price_list and webnotes.conn.sql("""select ip.ref_rate, pl.currency from
|
||||||
`tabItem Price` ip, `tabPrice List` pl where ip.parent = pl.name and
|
`tabItem Price` ip, `tabPrice List` pl where ip.parent = pl.name and
|
||||||
ip.item_code=%s and ip.parent=%s""",
|
ip.item_code=%s and ip.parent=%s""",
|
||||||
(item_code, price_list), as_dict=1) or []
|
(item_code, price_list), as_dict=1) or []
|
||||||
@ -36,10 +36,10 @@ def get_product_info(item_code):
|
|||||||
qty = 0
|
qty = 0
|
||||||
|
|
||||||
if price:
|
if price:
|
||||||
price["formatted_price"] = fmt_money(price["ref_rate"], currency=price["ref_currency"])
|
price["formatted_price"] = fmt_money(price["ref_rate"], currency=price["currency"])
|
||||||
|
|
||||||
price["ref_currency"] = not cint(webnotes.conn.get_default("hide_currency_symbol")) \
|
price["currency"] = not cint(webnotes.conn.get_default("hide_currency_symbol")) \
|
||||||
and (webnotes.conn.get_value("Currency", price.ref_currency, "symbol") or price.ref_currency) \
|
and (webnotes.conn.get_value("Currency", price.currency, "symbol") or price.currency) \
|
||||||
or ""
|
or ""
|
||||||
|
|
||||||
if webnotes.session.user != "Guest":
|
if webnotes.session.user != "Guest":
|
||||||
|
@ -75,8 +75,8 @@ class DocType(DocListController):
|
|||||||
bin_list = webnotes.conn.sql("select * from tabBin where item_code=%s",
|
bin_list = webnotes.conn.sql("select * from tabBin where item_code=%s",
|
||||||
self.doc.item_code, as_dict=1)
|
self.doc.item_code, as_dict=1)
|
||||||
for bin in bin_list:
|
for bin in bin_list:
|
||||||
if bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \
|
if (bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \
|
||||||
or bin.planned_qty > 0 and cstr(bin.stock_uom) != cstr(self.doc.stock_uom):
|
or bin.planned_qty > 0) and cstr(bin.stock_uom) != cstr(self.doc.stock_uom):
|
||||||
matched = False
|
matched = False
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user