mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
Fixes for subcontracting
This commit is contained in:
@@ -256,7 +256,7 @@ class BuyingController(StockController):
|
|||||||
|
|
||||||
rm_supplied_idx += 1
|
rm_supplied_idx += 1
|
||||||
|
|
||||||
raw_materials_cost += required_qty * flt(item.rate)
|
raw_materials_cost += required_qty * flt(bom_item.rate)
|
||||||
|
|
||||||
if self.doctype == "Purchase Receipt":
|
if self.doctype == "Purchase Receipt":
|
||||||
item.rm_supp_cost = raw_materials_cost
|
item.rm_supp_cost = raw_materials_cost
|
||||||
|
|||||||
@@ -94,8 +94,9 @@ class TestPurchaseReceipt(unittest.TestCase):
|
|||||||
pr.run_method("calculate_taxes_and_totals")
|
pr.run_method("calculate_taxes_and_totals")
|
||||||
pr.insert()
|
pr.insert()
|
||||||
|
|
||||||
self.assertEquals(pr.get("purchase_receipt_details")[0].rm_supp_cost, 70000.0)
|
|
||||||
self.assertEquals(len(pr.get("pr_raw_material_details")), 2)
|
self.assertEquals(len(pr.get("pr_raw_material_details")), 2)
|
||||||
|
self.assertEquals(pr.get("purchase_receipt_details")[0].rm_supp_cost, 70000.0)
|
||||||
|
|
||||||
|
|
||||||
def test_serial_no_supplier(self):
|
def test_serial_no_supplier(self):
|
||||||
pr = frappe.copy_doc(test_records[0])
|
pr = frappe.copy_doc(test_records[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user