Merge pull request #34995 from frappe/mergify/bp/version-14-hotfix/pr-34994

fix: duplicate reposting entries of same voucher (backport #34994)
This commit is contained in:
rohitwaghchaure
2023-04-22 14:55:50 +05:30
committed by GitHub

View File

@@ -1388,7 +1388,11 @@ def update_qty_in_future_sle(args, allow_negative_stock=False):
def regenerate_sle_for_batch_stock_reco(detail):
doc = frappe.get_cached_doc("Stock Reconciliation", detail.voucher_no)
doc.recalculate_current_qty(detail.item_code, detail.batch_no)
doc.repost_future_sle_and_gle()
if not frappe.db.exists(
"Repost Item Valuation", {"voucher_no": doc.name, "status": "Queued", "docstatus": "1"}
):
doc.repost_future_sle_and_gle()
def get_stock_reco_qty_shift(args):