From 335173c5ba432ee6c269c4a916dc8e9cc0b19a8c Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 8 Jun 2026 19:44:48 +0530 Subject: [PATCH] chore: fix conflicts Reintroduce the _qty_tolerance function to handle float rounding. --- erpnext/stock/doctype/stock_entry/stock_entry.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index cc0813ffd9e..ce2eb0ced74 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -80,17 +80,7 @@ from erpnext.controllers.stock_controller import StockController form_grid_templates = {"items": "templates/form_grid/stock_entry_grid.html"} -<<<<<<< HEAD class StockEntry(StockController): -======= -def _qty_tolerance(precision: int) -> float: - """One unit at the column's precision -- absorbs float rounding without letting a real - (whole-unit) quantity divergence slip through.""" - return 1.0 / (10**precision) - - -class StockEntry(StockController, SubcontractingInwardController): ->>>>>>> 4453c1072a (fix: validate fg and materials qty in the disassemble entry) # begin: auto-generated types # This code is auto-generated. Do not modify anything in this block. @@ -3491,6 +3481,12 @@ def move_sample_to_retention_warehouse(company, items): return stock_entry.as_dict() +def _qty_tolerance(precision: int) -> float: + """One unit at the column's precision -- absorbs float rounding without letting a real + (whole-unit) quantity divergence slip through.""" + return 1.0 / (10**precision) + + @frappe.whitelist() def make_stock_in_entry(source_name, target_doc=None): def set_missing_values(source, target):