Files
erpnext/erpnext/patches/v16_0/update_serial_batch_entries.py
2026-01-11 13:43:09 +05:30

20 lines
567 B
Python

import frappe
def execute():
if frappe.db.has_table("Serial and Batch Entry"):
frappe.db.sql(
"""
UPDATE `tabSerial and Batch Entry` SABE, `tabSerial and Batch Bundle` SABB
SET
SABE.posting_datetime = SABB.posting_datetime,
SABE.voucher_type = SABB.voucher_type,
SABE.voucher_no = SABB.voucher_no,
SABE.voucher_detail_no = SABB.voucher_detail_no,
SABE.type_of_transaction = SABB.type_of_transaction,
SABE.is_cancelled = SABB.is_cancelled,
SABE.item_code = SABB.item_code
WHERE SABE.parent = SABB.name
"""
)