[fields, project] [fix] NaN bug, project gantt refresh bug

This commit is contained in:
Rushabh Mehta 2013-03-26 13:02:22 +05:30
parent 06e3ef055b
commit b6c117957f
3 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,5 @@
erpnext.updates = [
["27th March", ["Rename multiple items together. Go to Setup > Rename Tool"]],
["19th March", ["Sales and Purchase Return Tool deprecated. Use Stock Entry instead."]],
["12th March", ["Updates to website module. Added more options in Style Settings and Website Settings."]],
["5th March", ["Refactored Upload Attendance Tool"]],

View File

@ -26,6 +26,9 @@ cur_frm.cscript.refresh = function(doc) {
.appendTo(cur_frm.fields_dict.project_tasks.wrapper);
cur_frm.gantt_area.empty();
erpnext.show_task_gantt(cur_frm.gantt_area, cur_frm.docname);
} else {
if(cur_frm.gantt_area)
cur_frm.gantt_area.empty();
}
}

View File

@ -860,9 +860,9 @@ cur_frm.cscript.commission_rate = function(doc, cdt, cdn) {
alert("Commision rate cannot be greater than 100.");
doc.total_commission = 0;
doc.commission_rate = 0;
}
else
} else {
doc.total_commission = doc.net_total * doc.commission_rate / 100;
}
refresh_many(['total_commission','commission_rate']);
}
@ -874,9 +874,9 @@ cur_frm.cscript.total_commission = function(doc, cdt, cdn) {
alert("Total commission cannot be greater than net total.");
doc.total_commission = 0;
doc.commission_rate = 0;
}
else
} else {
doc.commission_rate = doc.total_commission * 100 / doc.net_total;
}
refresh_many(['total_commission','commission_rate']);
}
}