fix: validation error has not throw for the batch (#38494)
* fix: validation error has not throw for the batch
* chore: fix test cases
diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py
index b52fbad..9555902 100644
--- a/erpnext/controllers/subcontracting_controller.py
+++ b/erpnext/controllers/subcontracting_controller.py
@@ -880,6 +880,7 @@
"posting_date": self.posting_date,
"posting_time": self.posting_time,
"qty": -1 * item.consumed_qty,
+ "voucher_detail_no": item.name,
"serial_and_batch_bundle": item.serial_and_batch_bundle,
}
)