fix: get batch_no. for item automatically (#34473)

* fix: default pos conversion factor set to 1

* fix:get-batch-no-of-item-automatically
This commit is contained in:
Shram Kadia 2023-03-24 12:05:26 +05:30 committed by GitHub
parent 282a0ee2ce
commit 0cd870fc29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}