Merge pull request #45970 from rohitwaghchaure/fixed-support-32040

fix: serial no status for internal transfer delivery note
This commit is contained in:
rohitwaghchaure
2025-02-18 13:51:00 +05:30
committed by GitHub
2 changed files with 46 additions and 3 deletions

View File

@@ -593,12 +593,13 @@ class SellingController(StockController):
if not self.is_internal_transfer() or self.docstatus == 1
else None
)
if serial_and_batch_bundle and self.is_internal_transfer() and self.is_return:
if self.docstatus == 1:
if self.is_internal_transfer():
if serial_and_batch_bundle and self.docstatus == 1 and self.is_return:
serial_and_batch_bundle = self.make_package_for_transfer(
serial_and_batch_bundle, item_row.warehouse, type_of_transaction="Inward"
)
else:
elif not serial_and_batch_bundle:
serial_and_batch_bundle = frappe.db.get_value(
"Stock Ledger Entry",
{"voucher_detail_no": item_row.name, "warehouse": item_row.warehouse},