mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 23:49:19 +00:00
test: add test for fg item expense account in direct manufacturing
(cherry picked from commit ba2411b4ee)
# Conflicts:
# erpnext/stock/doctype/stock_entry/test_stock_entry.py
This commit is contained in:
committed by
Mergify
parent
4ca5e9eef8
commit
4553d04c38
@@ -1267,6 +1267,7 @@ class TestStockEntry(FrappeTestCase):
|
|||||||
frappe._dict(item_code="_Test FG Item", qty=4, t_warehouse="_Test Warehouse 1 - _TC"),
|
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
|
# SE must have atleast one FG
|
||||||
self.assertRaises(FinishedGoodError, se.save)
|
self.assertRaises(FinishedGoodError, se.save)
|
||||||
|
|
||||||
@@ -1284,7 +1285,14 @@ class TestStockEntry(FrappeTestCase):
|
|||||||
self.assertEqual(se.value_difference, 0.0)
|
self.assertEqual(se.value_difference, 0.0)
|
||||||
self.assertEqual(se.total_incoming_value, se.total_outgoing_value)
|
self.assertEqual(se.total_incoming_value, se.total_outgoing_value)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
@change_settings("Stock Settings", {"allow_negative_stock": 0})
|
@change_settings("Stock Settings", {"allow_negative_stock": 0})
|
||||||
|
=======
|
||||||
|
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})
|
||||||
|
>>>>>>> ba2411b4ee (test: add test for fg item expense account in direct manufacturing)
|
||||||
def test_future_negative_sle(self):
|
def test_future_negative_sle(self):
|
||||||
# Initialize item, batch, warehouse, opening qty
|
# Initialize item, batch, warehouse, opening qty
|
||||||
item_code = "_Test Future Neg Item"
|
item_code = "_Test Future Neg Item"
|
||||||
|
|||||||
Reference in New Issue
Block a user