[Enhance] Companywise perpetual inventory setting
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index d770af3..553c7b3 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -227,7 +227,7 @@
})
if not rm.rate:
rm.rate = get_valuation_rate(bom_item.item_code, self.supplier_warehouse,
- self.doctype, self.name, currency=self.company_currency)
+ self.doctype, self.name, currency=self.company_currency, company = self.company)
else:
rm.rate = bom_item.rate