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