Merge pull request #34994 from rohitwaghchaure/fixed-duplicate-repost-entries-of-same-voucher

fix: duplicate reposting entries of same voucher
This commit is contained in:
rohitwaghchaure 2023-04-22 14:08:06 +05:30 committed by GitHub
commit 58a5f816db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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):