mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-09 23:39:28 +00:00
fix: do not round up finished good qty for whole number UOM
The manufacture stock entry silently ceiled the finished good qty when the item's stock UOM has Must be Whole Number set, booking more produced stock than the fg_completed_qty requested (e.g. 0.286 became 1). Keep the computed qty as is; validate_uom_is_integer already rejects a fractional qty with a clear error on save. The ceil stays in place for backflushed raw material rows, which was its original purpose.
This commit is contained in:
@@ -163,7 +163,7 @@ class BaseManufactureStockEntry(BaseStockEntry):
|
||||
{
|
||||
"conversion_factor": 1,
|
||||
"uom": item_details.stock_uom,
|
||||
"qty": ceil_qty_if_uom_has_whole_number(fg_item_qty, item_details.stock_uom),
|
||||
"qty": fg_item_qty,
|
||||
"t_warehouse": self.doc.to_warehouse
|
||||
or frappe.get_cached_value("BOM", self.doc.bom_no, "default_target_warehouse"),
|
||||
"s_warehouse": None,
|
||||
|
||||
Reference in New Issue
Block a user