fixes
This commit is contained in:
parent
9e6af24269
commit
654f6bfa85
@ -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
|
||||
|
@ -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', '');
|
||||
var ph = new PageHeader(cur_frm.fields_dict['head_html'].wrapper, 'Bank Reconciliation', '');
|
||||
}
|
@ -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
|
||||
|
@ -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']);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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'];
|
||||
|
||||
|
@ -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();}
|
||||
|
@ -1 +1 @@
|
||||
1665
|
||||
1667
|
Loading…
Reference in New Issue
Block a user