mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 02:34:41 +00:00
@@ -670,7 +670,7 @@ class StockReconciliation(StockController):
|
||||
has_batch_no, has_serial_no = frappe.get_value(
|
||||
"Item", item_code, ["has_batch_no", "has_serial_no"]
|
||||
)
|
||||
if row.use_serial_batch_fields:
|
||||
if row.use_serial_batch_fields and self.purpose == "Stock Reconciliation":
|
||||
if has_batch_no and not row.batch_no:
|
||||
raise frappe.ValidationError(_("Please enter Batch No"))
|
||||
if has_serial_no and not row.serial_no:
|
||||
|
||||
@@ -1450,6 +1450,7 @@ class TestStockReconciliation(IntegrationTestCase, StockTestMixin):
|
||||
qty=10,
|
||||
rate=100,
|
||||
use_serial_batch_fields=1,
|
||||
purpose="Opening Stock",
|
||||
)
|
||||
|
||||
sr.reload()
|
||||
@@ -1592,6 +1593,7 @@ class TestStockReconciliation(IntegrationTestCase, StockTestMixin):
|
||||
qty=10,
|
||||
rate=80,
|
||||
use_serial_batch_fields=1,
|
||||
purpose="Opening Stock",
|
||||
)
|
||||
|
||||
batch_no = get_batch_from_bundle(reco.items[0].serial_and_batch_bundle)
|
||||
@@ -1676,6 +1678,7 @@ class TestStockReconciliation(IntegrationTestCase, StockTestMixin):
|
||||
qty=10,
|
||||
rate=100,
|
||||
use_serial_batch_fields=1,
|
||||
purpose="Opening Stock",
|
||||
)
|
||||
|
||||
sr.reload()
|
||||
|
||||
Reference in New Issue
Block a user