mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-24 12:36:37 +00:00
test: transfer qty exemption only applies when material transfer is skipped
This commit is contained in:
@@ -2618,11 +2618,20 @@ class TestJobCardLogic(ERPNextTestSuite):
|
||||
def test_semi_fg_job_card_is_exempt_from_transfer_qty_check(self):
|
||||
jc = frappe.new_doc("Job Card")
|
||||
jc.track_semi_finished_goods = 1
|
||||
jc.skip_material_transfer = 1
|
||||
jc.for_quantity = 10
|
||||
jc.transferred_qty = 0
|
||||
jc.append("items", {"item_code": "_Test Item"})
|
||||
|
||||
jc.validate_transfer_qty()
|
||||
|
||||
# with transfer enabled, a legacy card without an FG item keeps the strict check
|
||||
jc.skip_material_transfer = 0
|
||||
self.assertRaises(frappe.ValidationError, jc.validate_transfer_qty)
|
||||
|
||||
jc.finished_good = "_Test Item"
|
||||
jc.validate_transfer_qty()
|
||||
|
||||
jc.finished_good = None
|
||||
jc.track_semi_finished_goods = 0
|
||||
self.assertRaises(frappe.ValidationError, jc.validate_transfer_qty)
|
||||
|
||||
Reference in New Issue
Block a user