mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
Merge pull request #6699 from rohitwaghchaure/bom_price_list_issue
[Enhancement] Currency added in the BOM
This commit is contained in:
19
erpnext/patches/v7_1/update_bom_base_currency.py
Normal file
19
erpnext/patches/v7_1/update_bom_base_currency.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import frappe
|
||||
from erpnext import get_default_currency
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("manufacturing", "doctype", "bom")
|
||||
frappe.reload_doc("manufacturing", "doctype", "bom_item")
|
||||
frappe.reload_doc("manufacturing", "doctype", "bom_explosion_item")
|
||||
frappe.reload_doc("manufacturing", "doctype", "bom_operation")
|
||||
frappe.reload_doc("manufacturing", "doctype", "bom_scrap_item")
|
||||
|
||||
frappe.db.sql(""" update `tabBOM Operation` set base_hour_rate = hour_rate,
|
||||
base_operating_cost = operating_cost """)
|
||||
|
||||
frappe.db.sql(""" update `tabBOM Item` set base_rate = rate, base_amount = amount """)
|
||||
frappe.db.sql(""" update `tabBOM Scrap Item` set base_rate = rate, base_amount = amount """)
|
||||
|
||||
frappe.db.sql(""" update `tabBOM` set `tabBOM`.base_operating_cost = `tabBOM`.operating_cost,
|
||||
`tabBOM`.base_raw_material_cost = `tabBOM`.raw_material_cost,
|
||||
`tabBOM`.currency = (select default_currency from `tabCompany` where name = `tabBOM`.company)""")
|
||||
Reference in New Issue
Block a user