diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 83c7aecd38d..0eafe4323a2 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -874,15 +874,6 @@ class update_entries_after: if not self.args.get("sle_id"): self.get_dynamic_incoming_outgoing_rate(sle) - if ( - sle.voucher_type == "Stock Reconciliation" - and (sle.serial_and_batch_bundle) - and sle.voucher_detail_no - and not self.args.get("sle_id") - and sle.is_cancelled == 0 - ): - self.reset_actual_qty_for_stock_reco(sle) - if ( sle.voucher_type in ["Purchase Receipt", "Purchase Invoice"] and sle.voucher_detail_no @@ -1059,30 +1050,6 @@ class update_entries_after: if not allow_zero_rate: self.wh_data.valuation_rate = self.get_fallback_rate(sle) - def reset_actual_qty_for_stock_reco(self, sle): - doc = frappe.get_doc("Stock Reconciliation", sle.voucher_no) - - if sle.actual_qty < 0: - doc.reload() - - sle.actual_qty = ( - flt(frappe.db.get_value("Stock Reconciliation Item", sle.voucher_detail_no, "current_qty")) - * -1 - ) - - if abs(sle.actual_qty) == 0.0: - sle.is_cancelled = 1 - - if sle.serial_and_batch_bundle: - for row in doc.items: - if row.name == sle.voucher_detail_no: - row.db_set("current_serial_and_batch_bundle", "") - - sabb_doc = frappe.get_doc("Serial and Batch Bundle", sle.serial_and_batch_bundle) - sabb_doc.voucher_detail_no = None - sabb_doc.voucher_no = None - sabb_doc.cancel() - def calculate_valuation_for_serial_batch_bundle(self, sle): if not frappe.db.exists("Serial and Batch Bundle", sle.serial_and_batch_bundle): return