mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 13:25:20 +00:00
refactor: single table for better performance
This commit is contained in:
@@ -921,6 +921,10 @@ class StockController(AccountsController):
|
||||
"Serial and Batch Bundle", row.serial_and_batch_bundle, {"is_cancelled": 1}
|
||||
)
|
||||
|
||||
frappe.db.set_value(
|
||||
"Serial and Batch Entry", {"parent": row.serial_and_batch_bundle}, {"is_cancelled": 1}
|
||||
)
|
||||
|
||||
if update_values:
|
||||
row.db_set(update_values)
|
||||
|
||||
@@ -929,6 +933,12 @@ class StockController(AccountsController):
|
||||
"Serial and Batch Bundle", row.rejected_serial_and_batch_bundle, {"is_cancelled": 1}
|
||||
)
|
||||
|
||||
frappe.db.set_value(
|
||||
"Serial and Batch Entry",
|
||||
{"parent": row.rejected_serial_and_batch_bundle},
|
||||
{"is_cancelled": 1},
|
||||
)
|
||||
|
||||
row.db_set("rejected_serial_and_batch_bundle", None)
|
||||
|
||||
if row.get("current_serial_and_batch_bundle"):
|
||||
@@ -2310,6 +2320,7 @@ def make_bundle_for_material_transfer(**kwargs):
|
||||
row.voucher_no = bundle_doc.voucher_no
|
||||
row.voucher_detail_no = bundle_doc.voucher_detail_no
|
||||
row.type_of_transaction = bundle_doc.type_of_transaction
|
||||
row.item_code = bundle_doc.item_code
|
||||
|
||||
bundle_doc.set_incoming_rate()
|
||||
bundle_doc.calculate_qty_and_amount()
|
||||
|
||||
Reference in New Issue
Block a user