fix: not able to make stock entry (backport #36759) (#36767)
fix: not able to make stock entry (#36759)
(cherry picked from commit 873ee384a1f0832faf84015167f7bdc697f1dc46)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index 1139c4b..9efae6a 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -656,7 +656,10 @@
"job_card_item": "job_card_item",
},
"postprocess": update_item,
- "condition": lambda doc: doc.ordered_qty < doc.stock_qty,
+ "condition": lambda doc: (
+ flt(doc.ordered_qty, doc.precision("ordered_qty"))
+ < flt(doc.stock_qty, doc.precision("ordered_qty"))
+ ),
},
},
target_doc,