Calculate Fields

228 views
Skip to the first unread message

Antreas A

unread,
16 Sept 2014, 16:59:0016/09/2014
to erpnext-u...@googlegroups.com
Hi ERPnext, 

How can we calculate several custom int fields or data fields? 

I tried to find an answer in your group but i didn't found anything. 

Also in your guide. 

Thanks

Rushabh Mehta

unread,
17 Sept 2014, 01:41:0517/09/2014
to erpnext-u...@googlegroups.com
On 17-Sep-2014, at 2:29 am, Antreas A <artem...@gmail.com> wrote:

Hi ERPnext, 

How can we calculate several custom int fields or data fields? 

I tried to find an answer in your group but i didn't found anything. 


Also in your guide. 

Thanks

--
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/984e9427-d09b-4a03-87f0-4f6b0ddc8718%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Addy

unread,
17 Sept 2014, 09:39:3817/09/2014
to erpnext-u...@googlegroups.com
Hi Antreas,

I am using this custom client script as below, maybe this helps a bit:

function inch_mm(mmfd, inchfd){
cur_frm.set_value(mmfd,"");
cal = Math.round(eval(inchfd) * 25400)/1000;
if (cal >0){
cur_frm.set_value(mmfd, cal);
}
else{
frappe.throw("Enter valid fraction in field, if you want to add \
inches greater than 1 then use 1+3/4 for 1.75 \
inch instead of 1-3/4");
}
}

//Calling the function is like this:

cur_frm.cscript.l2_inch = function(doc) {
var mmfd = "l2";
var inchfd = doc.l2_inch
inch_mm(mmfd,inchfd);
}



On Wednesday, September 17, 2014 11:11:05 AM UTC+5:30, Rushabh Mehta wrote:
On 17-Sep-2014, at 2:29 am, Antreas A <artem...@gmail.com> wrote:

Hi ERPnext, 

How can we calculate several custom int fields or data fields? 

I tried to find an answer in your group but i didn't found anything. 

On the client side, use Custom Scripts:



Also in your guide. 

Thanks

--
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages