mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
test: customer item in stock reconciliation
This commit is contained in:
@@ -420,6 +420,16 @@ class TestStockReconciliation(unittest.TestCase):
|
|||||||
|
|
||||||
for doc in [sr, ste2, ste1]:
|
for doc in [sr, ste2, ste1]:
|
||||||
doc.cancel()
|
doc.cancel()
|
||||||
|
def test_customer_provided_items(self):
|
||||||
|
item_code = 'Stock-Reco-customer-Item-100'
|
||||||
|
create_item(item_code, is_customer_provided_item = 1,
|
||||||
|
customer = '_Test Customer', is_purchase_item = 0)
|
||||||
|
|
||||||
|
sr = create_stock_reconciliation(item_code = item_code, qty = 10, rate = 420)
|
||||||
|
|
||||||
|
self.assertEqual(sr.get("items")[0].allow_zero_valuation_rate, 1)
|
||||||
|
self.assertEqual(sr.get("items")[0].valuation_rate, 0)
|
||||||
|
self.assertEqual(sr.get("items")[0].amount, 0)
|
||||||
|
|
||||||
def insert_existing_sle(warehouse):
|
def insert_existing_sle(warehouse):
|
||||||
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
|
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
|
||||||
|
|||||||
Reference in New Issue
Block a user