mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-05 14:38:26 +00:00
Negative stock allowed for perpetual inventory. Blocked in specific case
This commit is contained in:
@@ -277,6 +277,9 @@ class BuyingController(StockController):
|
||||
"qty": -1 * required_qty,
|
||||
"serial_no": rm.serial_no
|
||||
})
|
||||
if not item_rate:
|
||||
from erpnext.controllers.stock_controller import get_valuation_rate
|
||||
item_rate = get_valuation_rate(bom_item.item_code, self.supplier_warehouse)
|
||||
rm.rate = item_rate or bom_item.rate
|
||||
else:
|
||||
rm.rate = bom_item.rate
|
||||
|
||||
Reference in New Issue
Block a user