From 654f6bfa854d5549076085cee84d18ebd370dc4b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 12 Apr 2012 12:15:35 +0530 Subject: [PATCH] fixes --- erpnext/accounts/doctype/account/account.js | 4 ++-- .../doctype/bank_reconciliation/bank_reconciliation.js | 4 ++-- erpnext/accounts/doctype/cost_center/cost_center.js | 6 +++--- erpnext/accounts/doctype/fiscal_year/fiscal_year.js | 4 ++-- .../accounts/doctype/journal_voucher/journal_voucher.js | 8 ++++---- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 4 ++-- js/all-app.js | 3 +-- version.num | 2 +- 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js index 57edd5a2ec..640e2a9c22 100644 --- a/erpnext/accounts/doctype/account/account.js +++ b/erpnext/accounts/doctype/account/account.js @@ -51,8 +51,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // ----------------------------------------- cur_frm.cscript.hide_unhide_group_ledger = function(doc) { hide_field(['Convert to Group', 'Convert to Ledger']); - if (cstr(doc.group_or_ledger) == 'Group') unhide_field('Convert to Ledger'); - else if (cstr(doc.group_or_ledger) == 'Ledger') unhide_field('Convert to Group'); + if (cstr(doc.group_or_ledger) == 'Group') unhide_field('convert_to_ledger'); + else if (cstr(doc.group_or_ledger) == 'Ledger') unhide_field('convert_to_ledger'); } // Convert group to ledger diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js index 73e767b51f..4ca9218680 100644 --- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js +++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js @@ -16,5 +16,5 @@ cur_frm.cscript.onload = function(doc, cdt, cdn){ // add page head - var ph = new PageHeader(cur_frm.fields_dict['Head HTML'].wrapper, 'Bank Reconciliation', ''); -} \ No newline at end of file + var ph = new PageHeader(cur_frm.fields_dict['head_html'].wrapper, 'Bank Reconciliation', ''); +} diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js index d638ee43fa..ade4ee882b 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.js +++ b/erpnext/accounts/doctype/cost_center/cost_center.js @@ -58,9 +58,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // Hide/unhide group or ledger // ----------------------------------------- cur_frm.cscript.hide_unhide_group_ledger = function(doc) { - hide_field(['Convert to Group', 'Convert to Ledger']); - if (cstr(doc.group_or_ledger) == 'Group') unhide_field('Convert to Ledger'); - else if (cstr(doc.group_or_ledger) == 'Ledger') unhide_field('Convert to Group'); + hide_field(['convert_to_group', 'convert_to_ledger']); + if (cstr(doc.group_or_ledger) == 'Group') unhide_field('convert_to_ledger'); + else if (cstr(doc.group_or_ledger) == 'Ledger') unhide_field('convert_to_group'); } // Convert group to ledger diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js index fdc25feb56..6a03bf7014 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js @@ -1,7 +1,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { if (doc.__islocal) { - hide_field(['Repost Account Balances', 'Repost Voucher Outstanding']); + hide_field(['repost_account_balances', 'repost_voucher_outstanding']); set_multiple(dt, dn, {'is_fiscal_year_closed': 'No'}); } - else unhide_field(['Repost Account Balances', 'Repost Voucher Outstanding']); + else unhide_field(['repost_account_balances', 'repost_voucher_outstanding']); } diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js index e947133e60..772532e9e6 100644 --- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js +++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js @@ -20,10 +20,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { if (!doc.voucher_date) doc.voucher_date = dateutil.obj_to_str(new Date()); if(cp.country == 'India') { - unhide_field(['tds_applicable','tds_category','Get TDS','tax_code','rate','ded_amount','supplier_account']); + unhide_field(['tds_applicable','tds_category','get_tds','tax_code','rate','ded_amount','supplier_account']); } else { - hide_field(['tds_applicable','tds_category','Get TDS','tax_code','rate','ded_amount','supplier_account']); + hide_field(['tds_applicable','tds_category','get_tds','tax_code','rate','ded_amount','supplier_account']); } cur_frm.cscript.load_defaults(doc, cdt, cdn); @@ -51,8 +51,8 @@ cur_frm.cscript.is_opening = function(doc, cdt, cdn) { hide_field('aging_date'); if (doc.is_opening == 'Yes') unhide_field('aging_date'); - if(doc.docstatus==1) { unhide_field('View Ledger Entry'); } - else hide_field('View Ledger Entry'); + if(doc.docstatus==1) { unhide_field('view_ledger_entry'); } + else hide_field('view_ledger_entry'); } cur_frm.cscript.refresh = cur_frm.cscript.is_opening; diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 5735cd3b1c..0a25feb104 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -75,9 +75,9 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) { // ------------ cur_frm.cscript.hide_fields = function(doc, cdt, cdn) { par_flds = ['project_name', 'due_date', 'sales_order_main', - 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', + 'delivery_note_main', 'get_items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', - 'gross_profit_percent', 'Get Advances Received', + 'gross_profit_percent', 'get_advances_received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'repair_outstanding_amt']; diff --git a/js/all-app.js b/js/all-app.js index d97ad6e081..4f36e9fe18 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -1756,8 +1756,7 @@ this.copy_doc(fn,1);} _f.get_value=function(dt,dn,fn){if(locals[dt]&&locals[dt][dn]) return locals[dt][dn][fn];} _f.set_value=function(dt,dn,fn,v){var d=locals[dt][dn];if(!d){console.log('_f.set_value - '+fn+': "'+dt+','+dn+'" not found');return;} -var changed=d[fn]!=v;if(changed&&(d[fn]==null||v==null)&&(cstr(d[fn])==cstr(v)))changed=0;if(changed){d[fn]=v;d.__unsaved=1;console.log(d.doctype);var frm=wn.views.formview[d.doctype].frm;try{if(d.parent&&d.parenttype){locals[d.parenttype][d.parent].__unsaved=1;frm=wn.views.formview[d.parenttype].frm;}}catch(e){if(d.parent&&d.parenttype) -errprint('Setting __unsaved error:'+d.name+','+d.parent+','+d.parenttype);} +var changed=d[fn]!=v;if(changed&&(d[fn]==null||v==null)&&(cstr(d[fn])==cstr(v)))changed=0;if(changed){d[fn]=v;d.__unsaved=1;if(d.parent&&d.parenttype){locals[d.parenttype][d.parent].__unsaved=1;var frm=wn.views.formview[d.parenttype].frm;}else{locals[d.doctype][d.name].__unsaved=1;var frm=wn.views.formview[d.doctype].frm;} if(frm&&frm==cur_frm&&frm.frm_head){frm.frm_head.refresh_labels();}}} _f.Frm.prototype.show_comments=function(){if(!cur_frm.comments){cur_frm.comments=new Dialog(540,400,'Comments');cur_frm.comments.comment_body=$a(cur_frm.comments.body,'div','dialog_frm');$y(cur_frm.comments.body,{backgroundColor:'#EEE'});cur_frm.comments.list=new CommentList(cur_frm.comments.comment_body);} cur_frm.comments.list.dt=cur_frm.doctype;cur_frm.comments.list.dn=cur_frm.docname;cur_frm.comments.show();cur_frm.comments.list.run();} diff --git a/version.num b/version.num index 4fb34a5f91..d09be2fad9 100644 --- a/version.num +++ b/version.num @@ -1 +1 @@ -1665 \ No newline at end of file +1667 \ No newline at end of file