mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 12:39:18 +00:00
[price list] Separated Default Price List for Selling and Buying and changed fieldnames
This commit is contained in:
@@ -297,7 +297,7 @@ def apply_cart_settings(party=None, quotation=None):
|
||||
|
||||
def set_price_list_and_rate(quotation, cart_settings, billing_territory):
|
||||
"""set price list based on billing territory"""
|
||||
quotation.doc.price_list_name = cart_settings.get_price_list(billing_territory)
|
||||
quotation.doc.selling_price_list = cart_settings.get_price_list(billing_territory)
|
||||
|
||||
# reset values
|
||||
quotation.doc.price_list_currency = quotation.doc.currency = \
|
||||
@@ -309,7 +309,7 @@ def set_price_list_and_rate(quotation, cart_settings, billing_territory):
|
||||
quotation.run_method("set_price_list_and_item_details")
|
||||
|
||||
# set it in cookies for using in product page
|
||||
webnotes.cookies[b"price_list_name"] = quotation.doc.price_list_name
|
||||
webnotes.cookies[b"selling_price_list"] = quotation.doc.selling_price_list
|
||||
|
||||
def set_taxes(quotation, cart_settings, billing_territory):
|
||||
"""set taxes based on billing territory"""
|
||||
|
||||
@@ -16,7 +16,7 @@ def get_product_info(item_code):
|
||||
|
||||
cart_quotation = _get_cart_quotation()
|
||||
|
||||
price_list = webnotes.cookies.get("price_list_name").value
|
||||
price_list = webnotes.cookies.get("selling_price_list").value
|
||||
|
||||
warehouse = webnotes.conn.get_value("Item", item_code, "website_warehouse")
|
||||
if warehouse:
|
||||
@@ -28,7 +28,7 @@ def get_product_info(item_code):
|
||||
in_stock = -1
|
||||
|
||||
price = price_list and webnotes.conn.sql("""select ref_rate, ref_currency from
|
||||
`tabItem Price` where parent=%s and price_list_name=%s""",
|
||||
`tabItem Price` where parent=%s and price_list=%s""",
|
||||
(item_code, price_list), as_dict=1) or []
|
||||
|
||||
price = price and price[0] or None
|
||||
|
||||
Reference in New Issue
Block a user