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/buying_controller.py b/erpnext/controllers/buying_controller.py
index 54c97b4..3d863e9 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -118,6 +118,7 @@
"company": self.company,
"voucher_type": self.doctype,
"voucher_no": self.name,
+ "voucher_detail_no": row.name,
},
raise_error_if_no_rate=False,
)
@@ -373,6 +374,7 @@
"voucher_type": self.doctype,
"voucher_no": self.name,
"allow_zero_valuation": d.get("allow_zero_valuation"),
+ "voucher_detail_no": d.name,
},
raise_error_if_no_rate=False,
)