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:
parent
282a0ee2ce
commit
0cd870fc29
@ -63,8 +63,9 @@ def search_by_term(search_term, warehouse, price_list):
|
|||||||
filters={
|
filters={
|
||||||
"price_list": price_list,
|
"price_list": price_list,
|
||||||
"item_code": item_code,
|
"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):
|
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 = frappe.get_all(
|
||||||
"Item Price",
|
"Item Price",
|
||||||
fields=["price_list_rate", "currency", "uom"],
|
fields=["price_list_rate", "currency", "uom", "batch_no"],
|
||||||
filters={
|
filters={
|
||||||
"price_list": price_list,
|
"price_list": price_list,
|
||||||
"item_code": item.item_code,
|
"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"),
|
"price_list_rate": price.get("price_list_rate"),
|
||||||
"currency": price.get("currency"),
|
"currency": price.get("currency"),
|
||||||
"uom": price.uom or item.uom,
|
"uom": price.uom or item.uom,
|
||||||
|
"batch_no": price.batch_no,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
return {"items": result}
|
return {"items": result}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user