fix: not able to make stock entry (#36759)

This commit is contained in:
rohitwaghchaure
2023-08-22 16:57:08 +05:30
committed by GitHub
parent 13b1263723
commit 873ee384a1

View File

@@ -660,7 +660,10 @@ def make_stock_entry(source_name, target_doc=None):
"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,