mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: error report for item price (#18213)
This commit is contained in:
committed by
Nabin Hait
parent
35fe0a6cbd
commit
e6ab86e185
@@ -31,13 +31,16 @@ class ItemPrice(Document):
|
|||||||
frappe.throw(_("Valid From Date must be lesser than Valid Upto Date."))
|
frappe.throw(_("Valid From Date must be lesser than Valid Upto Date."))
|
||||||
|
|
||||||
def update_price_list_details(self):
|
def update_price_list_details(self):
|
||||||
self.buying, self.selling, self.currency = \
|
if self.price_list:
|
||||||
frappe.db.get_value("Price List",
|
self.buying, self.selling, self.currency = \
|
||||||
{"name": self.price_list, "enabled": 1},
|
frappe.db.get_value("Price List",
|
||||||
["buying", "selling", "currency"])
|
{"name": self.price_list, "enabled": 1},
|
||||||
|
["buying", "selling", "currency"])
|
||||||
|
|
||||||
def update_item_details(self):
|
def update_item_details(self):
|
||||||
self.item_name, self.item_description = frappe.db.get_value("Item",self.item_code,["item_name", "description"])
|
if self.item_code:
|
||||||
|
self.item_name, self.item_description = frappe.db.get_value("Item",
|
||||||
|
self.item_code,["item_name", "description"])
|
||||||
|
|
||||||
def check_duplicates(self):
|
def check_duplicates(self):
|
||||||
conditions = "where item_code=%(item_code)s and price_list=%(price_list)s and name != %(name)s"
|
conditions = "where item_code=%(item_code)s and price_list=%(price_list)s and name != %(name)s"
|
||||||
|
|||||||
Reference in New Issue
Block a user