mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[fix] validate_valuation_rate for Repack
This commit is contained in:
committed by
Rushabh Mehta
parent
72fbf902d7
commit
52dfc32eca
@@ -147,7 +147,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
|
||||
cur_frm.fields_dict['items'].grid.get_field('item_code').get_query = function(doc) {
|
||||
return{
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: [["Item", "name", "!=", doc.item]]
|
||||
filters: [["Item", "name", "!=", cur_frm.doc.item]]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -578,10 +578,14 @@ class StockEntry(StockController):
|
||||
to_warehouse = self.pro_doc.fg_warehouse
|
||||
else:
|
||||
item_code = frappe.db.get_value("BOM", self.bom_no, "item")
|
||||
to_warehouse = ""
|
||||
to_warehouse = self.to_warehouse
|
||||
|
||||
item = frappe.db.get_value("Item", item_code, ["item_name",
|
||||
"description", "stock_uom", "expense_account", "buying_cost_center", "name"], as_dict=1)
|
||||
"description", "stock_uom", "expense_account", "buying_cost_center", "name", "default_warehouse"], as_dict=1)
|
||||
|
||||
if not self.production_order and not to_warehouse:
|
||||
# in case of BOM
|
||||
to_warehouse = item.default_warehouse
|
||||
|
||||
self.add_to_stock_entry_detail({
|
||||
item.name: {
|
||||
|
||||
Reference in New Issue
Block a user