From 0cd870fc29525532a6c5e6996110c6d2ec96171f Mon Sep 17 00:00:00 2001 From: Shram Kadia <65490105+Shram007@users.noreply.github.com> Date: Fri, 24 Mar 2023 12:05:26 +0530 Subject: [PATCH] fix: get batch_no. for item automatically (#34473) * fix: default pos conversion factor set to 1 * fix:get-batch-no-of-item-automatically --- erpnext/selling/page/point_of_sale/point_of_sale.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 657623d18f7..62b31058720 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -63,8 +63,9 @@ def search_by_term(search_term, warehouse, price_list): filters={ "price_list": price_list, "item_code": item_code, + "batch_no": batch_no, }, - fields=["uom", "stock_uom", "currency", "price_list_rate"], + fields=["uom", "stock_uom", "currency", "price_list_rate", "batch_no"], ) def __sort(p): @@ -167,7 +168,7 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te item_price = frappe.get_all( "Item Price", - fields=["price_list_rate", "currency", "uom"], + fields=["price_list_rate", "currency", "uom", "batch_no"], filters={ "price_list": price_list, "item_code": item.item_code, @@ -190,9 +191,9 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te "price_list_rate": price.get("price_list_rate"), "currency": price.get("currency"), "uom": price.uom or item.uom, + "batch_no": price.batch_no, } ) - return {"items": result}