fixes in dynamic label setting and column hiding based on currency

This commit is contained in:
Nabin Hait 2013-01-25 18:31:06 +05:30
parent 163bebb670
commit d4c7159f60
5 changed files with 22 additions and 22 deletions

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:08",
"creation": "2013-01-24 11:03:29",
"docstatus": 0,
"modified": "2013-01-23 17:11:17",
"modified": "2013-01-25 18:28:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -126,7 +126,7 @@
"doctype": "DocField",
"fieldname": "rate",
"fieldtype": "Currency",
"label": "Rate *(Default Curr.)",
"label": "Rate*",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
@ -137,7 +137,7 @@
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"label": "Amount (Default Curr.)",
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",

View File

@ -228,10 +228,10 @@ erpnext.buying.BuyingController = erpnext.utils.Controller.extend({
// toggle columns
var item_grid = this.frm.fields_dict[this.fname].grid;
var hide = this.frm.doc.currency == company_currency;
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, hide);
item_grid.set_column_disp(fname, show);
});
// set labels

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:10",
"creation": "2013-01-24 11:03:31",
"docstatus": 0,
"modified": "2013-01-23 17:11:19",
"modified": "2013-01-25 18:26:49",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -160,7 +160,7 @@
"doctype": "DocField",
"fieldname": "purchase_rate",
"fieldtype": "Currency",
"label": "Rate (Default Curr.) *",
"label": "Rate*",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
@ -174,7 +174,7 @@
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"label": "Amount (Default Curr.)",
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:12",
"creation": "2013-01-24 11:03:32",
"docstatus": 0,
"modified": "2013-01-23 17:11:19",
"modified": "2013-01-25 18:28:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -146,7 +146,7 @@
"doctype": "DocField",
"fieldname": "purchase_rate",
"fieldtype": "Currency",
"label": "Rate (Default Curr.) *",
"label": "Rate*",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
@ -160,7 +160,7 @@
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"label": "Amount (Default Curr.)",
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:28",
"creation": "2013-01-24 11:03:43",
"docstatus": 0,
"modified": "2013-01-23 17:11:25",
"modified": "2013-01-25 18:27:53",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -164,7 +164,7 @@
"doctype": "DocField",
"fieldname": "purchase_rate",
"fieldtype": "Currency",
"label": "Rate *(Default Curr.)",
"label": "Rate*",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
@ -178,7 +178,7 @@
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"label": "Amount (Default Curr.)",
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",