[Minor] Landed Cost Voucher test case fixed
This commit is contained in:
		
							parent
							
								
									fe61c314b7
								
							
						
					
					
						commit
						1d45a4312e
					
				| @ -12,8 +12,9 @@ from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make | |||||||
| 
 | 
 | ||||||
| class TestLandedCostVoucher(unittest.TestCase): | class TestLandedCostVoucher(unittest.TestCase): | ||||||
| 	def test_landed_cost_voucher(self): | 	def test_landed_cost_voucher(self): | ||||||
|  | 		frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1) | ||||||
| 		set_perpetual_inventory(1) | 		set_perpetual_inventory(1) | ||||||
| 		pr = frappe.copy_doc(pr_test_records[1]) | 		pr = frappe.copy_doc(pr_test_records[0]) | ||||||
| 		pr.submit() | 		pr.submit() | ||||||
| 
 | 
 | ||||||
| 		last_sle = frappe.db.get_value("Stock Ledger Entry", { | 		last_sle = frappe.db.get_value("Stock Ledger Entry", { | ||||||
|  | |||||||
| @ -249,6 +249,7 @@ def get_gl_entries(voucher_type, voucher_no): | |||||||
| 		order by account desc""", (voucher_type, voucher_no), as_dict=1) | 		order by account desc""", (voucher_type, voucher_no), as_dict=1) | ||||||
| 
 | 
 | ||||||
| def make_purchase_receipt(**args): | def make_purchase_receipt(**args): | ||||||
|  | 	frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1) | ||||||
| 	pr = frappe.new_doc("Purchase Receipt") | 	pr = frappe.new_doc("Purchase Receipt") | ||||||
| 	args = frappe._dict(args) | 	args = frappe._dict(args) | ||||||
| 	pr.posting_date = args.posting_date or today() | 	pr.posting_date = args.posting_date or today() | ||||||
|  | |||||||
| @ -50,10 +50,10 @@ | |||||||
|    { |    { | ||||||
|     "base_amount": 250.0, |     "base_amount": 250.0, | ||||||
|     "conversion_factor": 1.0, |     "conversion_factor": 1.0, | ||||||
|     "description": "_Test FG Item", |     "description": "_Test Item", | ||||||
|     "doctype": "Purchase Receipt Item", |     "doctype": "Purchase Receipt Item", | ||||||
|     "item_code": "_Test FG Item", |     "item_code": "_Test Item", | ||||||
|     "item_name": "_Test FG Item", |     "item_name": "_Test Item", | ||||||
|     "parentfield": "items", |     "parentfield": "items", | ||||||
|     "qty": 5.0, |     "qty": 5.0, | ||||||
|     "rate": 50.0, |     "rate": 50.0, | ||||||
| @ -67,10 +67,10 @@ | |||||||
|    { |    { | ||||||
|     "base_amount": 250.0, |     "base_amount": 250.0, | ||||||
|     "conversion_factor": 1.0, |     "conversion_factor": 1.0, | ||||||
|     "description": "_Test Item", |     "description": "_Test Item Home Desktop 100", | ||||||
|     "doctype": "Purchase Receipt Item", |     "doctype": "Purchase Receipt Item", | ||||||
|     "item_code": "_Test Item", |     "item_code": "_Test Item Home Desktop 100", | ||||||
|     "item_name": "_Test Item", |     "item_name": "_Test Item Home Desktop 100", | ||||||
|     "parentfield": "items", |     "parentfield": "items", | ||||||
|     "qty": 5.0, |     "qty": 5.0, | ||||||
|     "rate": 50.0, |     "rate": 50.0, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user