Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta
2013-07-26 11:22:09 +05:30
13 changed files with 29 additions and 37 deletions

View File

@@ -90,7 +90,6 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
freeze: true,
callback: function(r) {
if(!r.exc) {
me.frm.refresh_fields();
if(me.frm.doc.price_list_name !== price_list_name) me.price_list_name();
}
}
@@ -485,12 +484,12 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
// toggle columns
var item_grid = this.frm.fields_dict[this.fname].grid;
var show = this.frm.doc.currency != company_currency;
$.each(["purchase_rate", "purchase_ref_rate", "amount", "rate"], function(i, fname) {
if(wn.meta.get_docfield(item_grid.doctype, fname))
item_grid.set_column_disp(fname, show);
var fieldnames = $.map(["purchase_rate", "purchase_ref_rate", "amount", "rate"], function(fname) {
return wn.meta.get_docfield(item_grid.doctype, fname, me.frm.docname) ? fname : null;
});
item_grid.set_column_disp(fieldnames, this.frm.doc.currency != company_currency);
// set labels
var $wrapper = $(this.frm.wrapper);
$.each(field_label_map, function(fname, label) {