[Minor] Landed Cost Voucher test case fixed

This commit is contained in:
Kanchan Chauhan 2017-02-22 17:27:52 +05:30
parent fe61c314b7
commit 1d45a4312e
3 changed files with 10 additions and 8 deletions

View File

@ -12,8 +12,9 @@ from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make
class TestLandedCostVoucher(unittest.TestCase):
def test_landed_cost_voucher(self):
frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
set_perpetual_inventory(1)
pr = frappe.copy_doc(pr_test_records[1])
pr = frappe.copy_doc(pr_test_records[0])
pr.submit()
last_sle = frappe.db.get_value("Stock Ledger Entry", {

View File

@ -249,6 +249,7 @@ def get_gl_entries(voucher_type, voucher_no):
order by account desc""", (voucher_type, voucher_no), as_dict=1)
def make_purchase_receipt(**args):
frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
pr = frappe.new_doc("Purchase Receipt")
args = frappe._dict(args)
pr.posting_date = args.posting_date or today()

View File

@ -50,10 +50,10 @@
{
"base_amount": 250.0,
"conversion_factor": 1.0,
"description": "_Test FG Item",
"description": "_Test Item",
"doctype": "Purchase Receipt Item",
"item_code": "_Test FG Item",
"item_name": "_Test FG Item",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "items",
"qty": 5.0,
"rate": 50.0,
@ -67,10 +67,10 @@
{
"base_amount": 250.0,
"conversion_factor": 1.0,
"description": "_Test Item",
"description": "_Test Item Home Desktop 100",
"doctype": "Purchase Receipt Item",
"item_code": "_Test Item",
"item_name": "_Test Item",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"parentfield": "items",
"qty": 5.0,
"rate": 50.0,
@ -118,4 +118,4 @@
"supplier": "_Test Supplier",
"supplier_warehouse": "_Test Warehouse - _TC"
}
]
]