mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 12:25:09 +00:00
test: add test for fg item expense account in direct manufacturing
This commit is contained in:
@@ -1261,6 +1261,7 @@ class TestStockEntry(IntegrationTestCase):
|
||||
frappe._dict(item_code="_Test FG Item", qty=4, t_warehouse="_Test Warehouse 1 - _TC"),
|
||||
],
|
||||
)
|
||||
frappe.db.set_value("Company", "_Test Company", "stock_adjustment_account", "Stock Adjustment - _TC")
|
||||
# SE must have atleast one FG
|
||||
self.assertRaises(FinishedGoodError, se.save)
|
||||
|
||||
@@ -1278,6 +1279,9 @@ class TestStockEntry(IntegrationTestCase):
|
||||
self.assertEqual(se.value_difference, 0.0)
|
||||
self.assertEqual(se.total_incoming_value, se.total_outgoing_value)
|
||||
|
||||
self.assertEqual(se.items[0].expense_account, "Stock Adjustment - _TC")
|
||||
self.assertEqual(se.items[1].expense_account, "_Test Account Cost for Goods Sold - _TC")
|
||||
|
||||
@IntegrationTestCase.change_settings("Stock Settings", {"allow_negative_stock": 0})
|
||||
def test_future_negative_sle(self):
|
||||
# Initialize item, batch, warehouse, opening qty
|
||||
|
||||
Reference in New Issue
Block a user