mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
[item price] item price made as an individual master and removed from price list
This commit is contained in:
@@ -6,6 +6,7 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
// read only if any stock ledger entry exists
|
||||
|
||||
cur_frm.cscript.make_dashboard()
|
||||
cur_frm.cscript.edit_prices_button();
|
||||
|
||||
cur_frm.toggle_display("naming_series", sys_defaults.item_naming_by=="Naming Series"
|
||||
&& doc.__islocal)
|
||||
@@ -28,6 +29,15 @@ cur_frm.cscript.make_dashboard = function() {
|
||||
return;
|
||||
}
|
||||
|
||||
cur_frm.cscript.edit_prices_button = function() {
|
||||
cur_frm.add_custom_button("Edit Prices", function() {
|
||||
wn.route_options = {
|
||||
"item_code": cur_frm.doc.name
|
||||
};
|
||||
wn.set_route("Report", "Item Price");
|
||||
}, "icon-money");
|
||||
}
|
||||
|
||||
cur_frm.cscript.item_code = function(doc) {
|
||||
if(!doc.item_name) cur_frm.set_value("item_name", doc.item_code);
|
||||
if(!doc.description) cur_frm.set_value("description", doc.item_code);
|
||||
|
||||
@@ -57,10 +57,9 @@ def get_price_list():
|
||||
|
||||
rate = {}
|
||||
|
||||
price_list = webnotes.conn.sql("""select ip.item_code, pl.buying_or_selling,
|
||||
concat(pl.name, " - ", pl.currency, " ", ip.ref_rate) as price
|
||||
from `tabItem Price` ip, `tabPrice List` pl where
|
||||
ip.parent = pl.name and pl.docstatus<2""", as_dict=1)
|
||||
price_list = webnotes.conn.sql("""select item_code, buying_or_selling,
|
||||
concat(price_list, " - ", currency, " ", ref_rate) as price
|
||||
from `tabItem Price`""", as_dict=1)
|
||||
|
||||
for j in price_list:
|
||||
if j.price:
|
||||
|
||||
Reference in New Issue
Block a user