currency in test records
This commit is contained in:
parent
2df422de25
commit
60aee54c6c
@ -233,6 +233,7 @@ def make_sales_order(**args):
|
||||
so.company = args.company or "_Test Company"
|
||||
so.customer = args.customer or "_Test Customer"
|
||||
so.delivery_date = add_days(so.transaction_date, 10)
|
||||
so.currency = args.currency or "INR"
|
||||
|
||||
so.append("items", {
|
||||
"item_code": args.item or args.item_code or "_Test Item",
|
||||
|
@ -189,6 +189,7 @@ def create_delivery_note(**args):
|
||||
|
||||
dn.company = args.company or "_Test Company"
|
||||
dn.customer = args.customer or "_Test Customer"
|
||||
dn.currency = args.currency or "INR"
|
||||
|
||||
dn.append("items", {
|
||||
"item_code": args.item or args.item_code or "_Test Item",
|
||||
|
@ -78,6 +78,12 @@ class TestPurchaseReceipt(unittest.TestCase):
|
||||
set_perpetual_inventory(0)
|
||||
|
||||
def test_subcontracting(self):
|
||||
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
|
||||
|
||||
make_stock_entry(item_code="_Test Item", target="_Test Warehouse 1 - _TC", qty=100, incoming_rate=100)
|
||||
make_stock_entry(item_code="_Test Item Home Desktop 100", target="_Test Warehouse 1 - _TC",
|
||||
qty=100, incoming_rate=100)
|
||||
|
||||
pr = make_purchase_receipt(item_code="_Test FG Item", qty=10, rate=500, is_subcontracted="Yes")
|
||||
self.assertEquals(len(pr.get("supplied_items")), 2)
|
||||
|
||||
@ -135,6 +141,7 @@ def make_purchase_receipt(**args):
|
||||
pr.supplier = args.supplier or "_Test Supplier"
|
||||
pr.is_subcontracted = args.is_subcontracted or "No"
|
||||
pr.supplier_warehouse = "_Test Warehouse 1 - _TC"
|
||||
pr.currency = args.currency or "INR"
|
||||
|
||||
pr.append("items", {
|
||||
"item_code": args.item or args.item_code or "_Test Item",
|
||||
|
Loading…
Reference in New Issue
Block a user