Skip to content

Commit 15739b5

Browse files
fix: pick correct dependant sle during reposting
1 parent f663f9b commit 15739b5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

erpnext/stock/stock_ledger.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,10 +1909,14 @@ def get_stock_ledger_entries(
19091909
)
19101910

19111911

1912-
def get_sle_by_voucher_detail_no(voucher_detail_no, excluded_sle=None):
1912+
def get_sle_by_voucher_detail_no(voucher_detail_no):
19131913
return frappe.db.get_value(
19141914
"Stock Ledger Entry",
1915-
{"voucher_detail_no": voucher_detail_no, "name": ["!=", excluded_sle], "is_cancelled": 0},
1915+
{
1916+
"voucher_detail_no": voucher_detail_no,
1917+
"is_cancelled": 0,
1918+
"dependant_sle_voucher_detail_no": ("is", "not set"),
1919+
},
19161920
["*"],
19171921
as_dict=1,
19181922
)

0 commit comments

Comments
 (0)