diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index 6f2c4b745ec..599ecea6849 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -19,8 +19,8 @@ frappe.ui.form.on('Batch', { 'item_code': frm.doc.item, 'selling': 1 } - }; - }); + } + }) }, refresh: (frm) => { if(!frm.is_new()) { diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 26591a71be1..867ca56b875 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -706,7 +706,7 @@ def get_item_price(args, item_code, ignore_party=False): order by valid_from desc, uom desc """.format(conditions=conditions), args) def is_valid_item_price(item_price, posting_date): - if item_price.valid_upto and getdate(posting_date) <= getdate(item_price.valid_upto): + if item_price.valid_upto and getdate(posting_date) <= getdate(valid_upto): return True if getdate(posting_date) >= getdate(item_price.valid_from):