floating point issue in percentage delivered/billed

This commit is contained in:
Nabin Hait
2012-12-07 14:43:06 +05:30
parent c842f79811
commit 2ce027fc9f
5 changed files with 11 additions and 11 deletions

View File

@@ -59,9 +59,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
if(doc.per_billed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
if(flt(doc.per_billed, 2) < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
if(doc.per_installed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Installation Note', cur_frm.cscript['Make Installation Note']);
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Installation Note', cur_frm.cscript['Make Installation Note']);
if (doc.docstatus==1) cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);

View File

@@ -49,7 +49,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, cdt, cdn);
if(doc.docstatus == 1){
if (doc.per_billed < 100) cur_frm.add_custom_button('Make Purchase Invoice', cur_frm.cscript['Make Purchase Invoice']);
if (flt(doc.per_billed, 2) < 100) cur_frm.add_custom_button('Make Purchase Invoice', cur_frm.cscript['Make Purchase Invoice']);
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
}