mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 02:33:38 +00:00
committed by
Mergify
parent
21a972ad95
commit
9854dedc06
@@ -294,7 +294,7 @@ class SerialandBatchBundle(Document):
|
||||
}
|
||||
)
|
||||
|
||||
if self.returned_against and self.docstatus == 1:
|
||||
if (self.returned_against or self.voucher_type == "Stock Reconciliation") and self.docstatus == 1:
|
||||
kwargs["ignore_voucher_detail_no"] = self.voucher_detail_no
|
||||
|
||||
if self.docstatus == 1:
|
||||
@@ -2677,7 +2677,10 @@ def get_stock_ledgers_for_serial_nos(kwargs):
|
||||
else:
|
||||
query = query.where(stock_ledger_entry[field] == kwargs.get(field))
|
||||
|
||||
if kwargs.voucher_no:
|
||||
if kwargs.ignore_voucher_detail_no:
|
||||
query = query.where(stock_ledger_entry.voucher_detail_no != kwargs.ignore_voucher_detail_no)
|
||||
|
||||
elif kwargs.voucher_no:
|
||||
query = query.where(stock_ledger_entry.voucher_no != kwargs.voucher_no)
|
||||
|
||||
return query.run(as_dict=True)
|
||||
|
||||
Reference in New Issue
Block a user