fix: validation if no stock ledger entries against stock reco (backport #47292) (#47293)

fix: validation if no stock ledger entries against stock reco (#47292)

(cherry picked from commit 3d36d0b1df)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2025-04-28 19:38:27 +05:30
committed by GitHub
parent 74bdc82bfa
commit 91bcefef8c

View File

@@ -726,6 +726,12 @@ class StockReconciliation(StockController):
)
self.make_sl_entries(sl_entries, allow_negative_stock=allow_negative_stock)
elif self.docstatus == 1:
frappe.throw(
_(
"No stock ledger entries were created. Please set the quantity or valuation rate for the items properly and try again."
)
)
def make_adjustment_entry(self, row, sl_entries):
from erpnext.stock.stock_ledger import get_stock_value_difference