[merge] merged with master

This commit is contained in:
Nabin Hait
2013-10-24 11:21:11 +05:30
61 changed files with 974 additions and 705 deletions

View File

@@ -13,6 +13,7 @@ cur_frm.cscript.refresh = function(doc) {
window.open(doc.page_name);
}, "icon-globe");
}
cur_frm.cscript.edit_prices_button();
if (!doc.__islocal && doc.is_stock_item == 'Yes') {
cur_frm.toggle_enable(['has_serial_no', 'is_stock_item', 'valuation_method'],
@@ -26,6 +27,15 @@ cur_frm.cscript.make_dashboard = function() {
return;
}
cur_frm.cscript.edit_prices_button = function() {
cur_frm.add_custom_button("Add / 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);